-/bin/
/config.xml
-*.class
+/target/
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="PIMStuff" default="build" basedir=".">
-
- <property name="src" location="src" />
- <property name="build" location="bin" />
- <property name="main" value="de.j32.pimstuff.Main" />
- <property name="lib" value="libs" />
- <property name="test" value="tests" />
-
- <target name="makedirs">
- <mkdir dir="${build}" />
- </target>
-
- <path id="classpath">
- <fileset dir="${lib}">
- <include name="**/*.jar" />
- </fileset>
- </path>
-
- <fileset id="tests" dir="${test}">
- <include name="**/*.java" />
- </fileset>
-
- <target name="build" depends="makedirs" description="Compile project to ${build} directory">
- <javac srcdir="${src}" destdir="${build}" classpathref="classpath" />
- </target>
-
- <target name="clean" description="Clean up ${build} directory">
- <delete>
- <fileset dir="${build}" />
- </delete>
- </target>
-
- <target name="run" depends="build" description="Start main class">
- <java fork="true" classpath="${build}" classpathref="classpath" classname="${main}" />
- </target>
-
- <target name="build-tests" depends="build">
- <javac srcdir="${test}" destdir="${build}" classpath="${build}" classpathref="classpath" />
- </target>
-
- <target name="test" depends="build-tests" description="Run JUnit tests">
- <junit fork="true" printsummary="withOutAndErr" haltonerror="true">
- <classpath>
- <path refid="classpath" />
- <pathelement path="${build}" />
- <pathelement path="${test}" />
- </classpath>
- <batchtest>
- <fileset refid="tests" />
- </batchtest>
- </junit>
- </target>
-
-</project>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
- <bean class="de.j32.pimstuff.conduit.FritzAddressbookConduit"
+ <bean class="de.j32.jpim.conduit.FritzAddressbookConduit"
name="fritzbox" scope="prototype">
</bean>
+++ /dev/null
-Subproject commit 6fb36bd41f967baf1e314ffbcb3af81a0799258d
+++ /dev/null
-Subproject commit f728fccc23a159c0cd9037c5cfd779b726880afd
+++ /dev/null
-Subproject commit 51cae333d72082426093c9dd91ff4d2c4e1ef813
--- /dev/null
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>de.j32.jpim</groupId>
+ <artifactId>jpim</artifactId>
+ <packaging>jar</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <name>jpim</name>
+ <url>http://maven.apache.org</url>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-dbcp</groupId>
+ <artifactId>commons-dbcp</artifactId>
+ <version>1.4</version>
+ </dependency>
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>1.8.0.10</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring</artifactId>
+ <version>2.5.6</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ <version>3.1.3</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ <version>1.1</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.1</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <executable>java</executable>
+ <arguments>
+ <argument>-classpath</argument>
+ <classpath/>
+ <argument>de.j32.jpim.Main</argument>
+ </arguments>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/libs</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <classpathPrefix>libs</classpathPrefix>
+ <mainClass>de.j32.jpim.Main</mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
-package de.j32.pimstuff;
+package de.j32.jpim;
import java.io.IOException;
-import de.j32.pimstuff.conduit.Conduit;
-import de.j32.pimstuff.conduit.ConduitException;
-import de.j32.pimstuff.conduit.Exporter;
-import de.j32.pimstuff.conduit.Importer;
-import de.j32.pimstuff.data.EntryConsumer;
-import de.j32.pimstuff.data.EntryProducer;
+import de.j32.jpim.conduit.Conduit;
+import de.j32.jpim.conduit.ConduitException;
+import de.j32.jpim.conduit.Exporter;
+import de.j32.jpim.conduit.Importer;
+import de.j32.jpim.data.EntryConsumer;
+import de.j32.jpim.data.EntryProducer;
import de.j32.util.Util;
public class Data
{
public static void transfer(EntryProducer producer, EntryConsumer consumer)
{
- // TODO: It would be more 'beautoful' to have the EntryProducer be an
+ // TODO: It would be more 'beautiful' to have the EntryProducer be an
// Iterable, but this is simpler ...
producer.sendTo(consumer);
}
-package de.j32.pimstuff;
+package de.j32.jpim;
import java.io.IOException;
-import de.j32.pimstuff.conduit.Conduit;
-import de.j32.pimstuff.conduit.ConduitException;
-import de.j32.pimstuff.conduit.Registry;
-import de.j32.pimstuff.data.Addressbook;
+import de.j32.jpim.conduit.Conduit;
+import de.j32.jpim.conduit.ConduitException;
+import de.j32.jpim.conduit.Registry;
+import de.j32.jpim.data.Addressbook;
public class Main
{
-package de.j32.pimstuff.conduit;
+package de.j32.jpim.conduit;
public interface Conduit
{
-package de.j32.pimstuff.conduit;
+package de.j32.jpim.conduit;
public class ConduitException extends Exception
{
-package de.j32.pimstuff.conduit;
+package de.j32.jpim.conduit;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
-package de.j32.pimstuff.conduit;
+package de.j32.jpim.conduit;
public class ConfigurationException extends RuntimeException
{
-package de.j32.pimstuff.conduit;
+package de.j32.jpim.conduit;
import java.io.Closeable;
-import de.j32.pimstuff.data.EntryConsumer;
+import de.j32.jpim.data.EntryConsumer;
public interface Exporter extends Closeable, EntryConsumer
{}
-package de.j32.pimstuff.conduit;
+package de.j32.jpim.conduit;
import java.io.IOException;
import java.io.InputStream;
-package de.j32.pimstuff.conduit;
+package de.j32.jpim.conduit;
import java.io.IOException;
import java.io.OutputStream;
import org.xml.sax.SAXException;
-import de.j32.pimstuff.data.Attribute;
-import de.j32.pimstuff.data.Entry;
+import de.j32.jpim.data.Attribute;
+import de.j32.jpim.data.Entry;
import de.j32.util.SimpleXmlGenerator;
import de.j32.util.Util;
-package de.j32.pimstuff.conduit;
+package de.j32.jpim.conduit;
import java.io.IOException;
import java.io.InputStream;
import org.w3c.dom.Element;
import org.xml.sax.SAXException;
-import de.j32.pimstuff.data.Entry;
-import de.j32.pimstuff.data.EntryConsumer;
+import de.j32.jpim.data.Entry;
+import de.j32.jpim.data.EntryConsumer;
import de.j32.util.XmlUtil;
public class FritzAddressbookImporter implements Importer
-package de.j32.pimstuff.conduit;
+package de.j32.jpim.conduit;
import java.io.Closeable;
-import de.j32.pimstuff.data.EntryProducer;
+import de.j32.jpim.data.EntryProducer;
public interface Importer extends Closeable, EntryProducer
{}
-package de.j32.pimstuff.conduit;
+package de.j32.jpim.conduit;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
public static Conduit get(String k)
{
- return context_.getBean(k, Conduit.class);
+ return (Conduit) context_.getBean(k, Conduit.class);
}
}
-package de.j32.pimstuff.data;
+package de.j32.jpim.data;
import java.util.Iterator;
import java.util.LinkedList;
-package de.j32.pimstuff.data;
+package de.j32.jpim.data;
public class Attribute
{
-package de.j32.pimstuff.data;
+package de.j32.jpim.data;
import java.util.ArrayList;
import java.util.Iterator;
-package de.j32.pimstuff.data;
+package de.j32.jpim.data;
public interface EntryConsumer
{
-package de.j32.pimstuff.data;
+package de.j32.jpim.data;
public interface EntryProducer
{
-package de.j32.pimstuff.data;
+package de.j32.jpim.data;
import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
+import de.j32.jpim.data.Addressbook;
+import de.j32.jpim.data.Attribute;
+import de.j32.jpim.data.Entry;
+import de.j32.jpim.data.EntryConsumer;
import de.j32.util.Util;
public class AddressbookTest