Rename pimstuff -> jpim and move to Maven
Stefan Bund [Wed, 29 Sep 2010 19:12:31 +0000 (21:12 +0200)]
37 files changed:
.gitignore
build.xml [deleted file]
conduits.xml
libs/README.txt [deleted file]
libs/commons-logging [deleted submodule]
libs/junit [deleted submodule]
libs/spring [deleted submodule]
pom.xml [new file with mode: 0644]
src/main/java/de/j32/avmfritz/FritzBox.java [moved from src/de/j32/avmfritz/FritzBox.java with 100% similarity]
src/main/java/de/j32/avmfritz/LoginXML.java [moved from src/de/j32/avmfritz/LoginXML.java with 100% similarity]
src/main/java/de/j32/httplib/HttpGETRequest.java [moved from src/de/j32/httplib/HttpGETRequest.java with 100% similarity]
src/main/java/de/j32/httplib/HttpPOSTRequest.java [moved from src/de/j32/httplib/HttpPOSTRequest.java with 100% similarity]
src/main/java/de/j32/httplib/HttpRequest.java [moved from src/de/j32/httplib/HttpRequest.java with 100% similarity]
src/main/java/de/j32/httplib/HttpResponse.java [moved from src/de/j32/httplib/HttpResponse.java with 100% similarity]
src/main/java/de/j32/jpim/Data.java [moved from src/de/j32/pimstuff/Data.java with 75% similarity]
src/main/java/de/j32/jpim/Main.java [moved from src/de/j32/pimstuff/Main.java with 71% similarity]
src/main/java/de/j32/jpim/conduit/Conduit.java [moved from src/de/j32/pimstuff/conduit/Conduit.java with 81% similarity]
src/main/java/de/j32/jpim/conduit/ConduitException.java [moved from src/de/j32/pimstuff/conduit/ConduitException.java with 90% similarity]
src/main/java/de/j32/jpim/conduit/Config.java [moved from src/de/j32/pimstuff/conduit/Config.java with 97% similarity]
src/main/java/de/j32/jpim/conduit/ConfigurationException.java [moved from src/de/j32/pimstuff/conduit/ConfigurationException.java with 85% similarity]
src/main/java/de/j32/jpim/conduit/Exporter.java [moved from src/de/j32/pimstuff/conduit/Exporter.java with 54% similarity]
src/main/java/de/j32/jpim/conduit/FritzAddressbookConduit.java [moved from src/de/j32/pimstuff/conduit/FritzAddressbookConduit.java with 98% similarity]
src/main/java/de/j32/jpim/conduit/FritzAddressbookExporter.java [moved from src/de/j32/pimstuff/conduit/FritzAddressbookExporter.java with 96% similarity]
src/main/java/de/j32/jpim/conduit/FritzAddressbookImporter.java [moved from src/de/j32/pimstuff/conduit/FritzAddressbookImporter.java with 95% similarity]
src/main/java/de/j32/jpim/conduit/Importer.java [moved from src/de/j32/pimstuff/conduit/Importer.java with 54% similarity]
src/main/java/de/j32/jpim/conduit/Registry.java [moved from src/de/j32/pimstuff/conduit/Registry.java with 78% similarity]
src/main/java/de/j32/jpim/data/Addressbook.java [moved from src/de/j32/pimstuff/data/Addressbook.java with 95% similarity]
src/main/java/de/j32/jpim/data/Attribute.java [moved from src/de/j32/pimstuff/data/Attribute.java with 90% similarity]
src/main/java/de/j32/jpim/data/Entry.java [moved from src/de/j32/pimstuff/data/Entry.java with 98% similarity]
src/main/java/de/j32/jpim/data/EntryConsumer.java [moved from src/de/j32/pimstuff/data/EntryConsumer.java with 71% similarity]
src/main/java/de/j32/jpim/data/EntryProducer.java [moved from src/de/j32/pimstuff/data/EntryProducer.java with 73% similarity]
src/main/java/de/j32/util/Filter.java [moved from src/de/j32/util/Filter.java with 100% similarity]
src/main/java/de/j32/util/FilteredIterator.java [moved from src/de/j32/util/FilteredIterator.java with 100% similarity]
src/main/java/de/j32/util/SimpleXmlGenerator.java [moved from src/de/j32/util/SimpleXmlGenerator.java with 100% similarity]
src/main/java/de/j32/util/Util.java [moved from src/de/j32/util/Util.java with 100% similarity]
src/main/java/de/j32/util/XmlUtil.java [moved from src/de/j32/util/XmlUtil.java with 100% similarity]
src/test/java/de/j32/jpim/data/AddressbookTest.java [moved from tests/de/j32/pimstuff/data/AddressbookTest.java with 94% similarity]

index c91a3a5..5379b2f 100644 (file)
@@ -1,3 +1,2 @@
-/bin/
 /config.xml
-*.class
+/target/
diff --git a/build.xml b/build.xml
deleted file mode 100644 (file)
index ecc9433..0000000
--- a/build.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?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>
index 49ad034..3cadccf 100644 (file)
@@ -2,7 +2,7 @@
 <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>
 
diff --git a/libs/README.txt b/libs/README.txt
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/libs/commons-logging b/libs/commons-logging
deleted file mode 160000 (submodule)
index 6fb36bd..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 6fb36bd41f967baf1e314ffbcb3af81a0799258d
diff --git a/libs/junit b/libs/junit
deleted file mode 160000 (submodule)
index f728fcc..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit f728fccc23a159c0cd9037c5cfd779b726880afd
diff --git a/libs/spring b/libs/spring
deleted file mode 160000 (submodule)
index 51cae33..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 51cae333d72082426093c9dd91ff4d2c4e1ef813
diff --git a/pom.xml b/pom.xml
new file mode 100644 (file)
index 0000000..3bbffae
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,106 @@
+<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>
similarity index 75%
rename from src/de/j32/pimstuff/Data.java
rename to src/main/java/de/j32/jpim/Data.java
index 5df5e94..6a53e89 100644 (file)
@@ -1,20 +1,20 @@
-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);
     }
similarity index 71%
rename from src/de/j32/pimstuff/Main.java
rename to src/main/java/de/j32/jpim/Main.java
index 6214c7f..18d31bf 100644 (file)
@@ -1,11 +1,11 @@
-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
 {
similarity index 81%
rename from src/de/j32/pimstuff/conduit/Conduit.java
rename to src/main/java/de/j32/jpim/conduit/Conduit.java
index 43dd734..22b6924 100644 (file)
@@ -1,4 +1,4 @@
-package de.j32.pimstuff.conduit;
+package de.j32.jpim.conduit;
 
 public interface Conduit
 {
@@ -1,4 +1,4 @@
-package de.j32.pimstuff.conduit;
+package de.j32.jpim.conduit;
 
 public class ConduitException extends Exception
 {
similarity index 97%
rename from src/de/j32/pimstuff/conduit/Config.java
rename to src/main/java/de/j32/jpim/conduit/Config.java
index 4af9b6c..5b5ce79 100644 (file)
@@ -1,4 +1,4 @@
-package de.j32.pimstuff.conduit;
+package de.j32.jpim.conduit;
 
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
similarity index 54%
rename from src/de/j32/pimstuff/conduit/Exporter.java
rename to src/main/java/de/j32/jpim/conduit/Exporter.java
index 9eee042..06a997f 100644 (file)
@@ -1,8 +1,8 @@
-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
 {}
@@ -1,4 +1,4 @@
-package de.j32.pimstuff.conduit;
+package de.j32.jpim.conduit;
 
 import java.io.IOException;
 import java.io.OutputStream;
@@ -6,8 +6,8 @@ import java.io.UnsupportedEncodingException;
 
 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;
 
@@ -1,4 +1,4 @@
-package de.j32.pimstuff.conduit;
+package de.j32.jpim.conduit;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -7,8 +7,8 @@ import org.w3c.dom.Document;
 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
similarity index 54%
rename from src/de/j32/pimstuff/conduit/Importer.java
rename to src/main/java/de/j32/jpim/conduit/Importer.java
index 66a4727..40d4ff2 100644 (file)
@@ -1,8 +1,8 @@
-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
 {}
similarity index 78%
rename from src/de/j32/pimstuff/conduit/Registry.java
rename to src/main/java/de/j32/jpim/conduit/Registry.java
index d373601..c0e74f5 100644 (file)
@@ -1,4 +1,4 @@
-package de.j32.pimstuff.conduit;
+package de.j32.jpim.conduit;
 
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.support.FileSystemXmlApplicationContext;
@@ -10,7 +10,7 @@ public class Registry
 
     public static Conduit get(String k)
     {
-        return context_.getBean(k, Conduit.class);
+        return (Conduit) context_.getBean(k, Conduit.class);
     }
 
 }
similarity index 95%
rename from src/de/j32/pimstuff/data/Addressbook.java
rename to src/main/java/de/j32/jpim/data/Addressbook.java
index 9e31ea1..46a003f 100644 (file)
@@ -1,4 +1,4 @@
-package de.j32.pimstuff.data;
+package de.j32.jpim.data;
 
 import java.util.Iterator;
 import java.util.LinkedList;
similarity index 90%
rename from src/de/j32/pimstuff/data/Attribute.java
rename to src/main/java/de/j32/jpim/data/Attribute.java
index 7153973..ce4c7ad 100644 (file)
@@ -1,4 +1,4 @@
-package de.j32.pimstuff.data;
+package de.j32.jpim.data;
 
 public class Attribute
 {
similarity index 98%
rename from src/de/j32/pimstuff/data/Entry.java
rename to src/main/java/de/j32/jpim/data/Entry.java
index 9f96731..5eda18a 100644 (file)
@@ -1,4 +1,4 @@
-package de.j32.pimstuff.data;
+package de.j32.jpim.data;
 
 import java.util.ArrayList;
 import java.util.Iterator;
@@ -1,4 +1,4 @@
-package de.j32.pimstuff.data;
+package de.j32.jpim.data;
 
 public interface EntryConsumer
 {
@@ -1,4 +1,4 @@
-package de.j32.pimstuff.data;
+package de.j32.jpim.data;
 
 public interface EntryProducer
 {
@@ -1,4 +1,4 @@
-package de.j32.pimstuff.data;
+package de.j32.jpim.data;
 
 import static org.junit.Assert.assertEquals;
 
@@ -6,6 +6,10 @@ import org.junit.After;
 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