Well, in the spirit of contribution, I wrote out a nice little POM file for my copy of JZY3D.
See below:
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>jzy3d</groupId>
<artifactId>jzy3d</artifactId>
<version>0.9-SNAPSHOT</version>
<name>jzy3d</name>
<description>A Java API for 3d charts</description>
<repositories>
<repository>
<id>swt-repo</id>
<url>
https://swt-repo.googlecode.com/svn/repo/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.jogamp.gluegen</groupId>
<artifactId>gluegen-rt-main</artifactId>
<version>2.0-rc11</version>
</dependency>
<dependency>
<groupId>org.jogamp.jogl</groupId>
<artifactId>jogl-all-main</artifactId>
<version>2.0-rc11</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
<dependency>
<groupId>org.eclipse.swt</groupId>
<artifactId>org.eclipse.swt.gtk.linux.x86_64</artifactId>
<version>4.2.1</version>
</dependency>
<dependency>
<groupId>net.sf.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>2.1</version>
</dependency>
<!--
The next dep was installed locally by adding a POM to its project and executing 'mvn install'.
-->
<dependency>
<groupId>convexhull</groupId>
<artifactId>convexhull</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<!--
The next dep is contained in the jzy3d project and was installed locally:
mvn install:install-file \
-DgroupId=org.jzyio \
-DartifactId=jzyio \
-Dversion=0.1 \
-Dpackaging=jar \
-Dfile=./lib/misc/org.jzyio-0.1.jar
-->
<dependency>
<groupId>org.jzyio</groupId>
<artifactId>jzyio</artifactId>
<version>0.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<testSourceDirectory>src/tests</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/api</source>
<source>src/bridge</source>
<source>src/glredbook</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<!-- TODO: Change to 1.7 -->
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>org/jzy3d/junit/ChartTest.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</project>
I was kind of surprised this works actually amazingly well, but there's a couple issues you have to solve locally.
Firstly, the convexhull code is not available on any Maven repository. So, I just downloaded it and dropped the following POM into its root directory:
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>convexhull</groupId>
<artifactId>convexhull</artifactId>
<version>1.0-SNAPSHOT</version>
<name>convexhull</name>
<repositories>
</repositories>
<dependencies>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals><goal>add-source</goal></goals>
<configuration>
<sources>
<source>convexhull/src/convexhull</source>
<source>convexhull/src/io</source>
<source>convexhull/src/utils</source>
<source>convexhull/src/algorithms</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
Then run 'mvn clean install' and it is available locally as 1.0-SNAPSHOT in your repo.
Okay, let's see, so that left only one minor problem, which is that the jzyio library is also not available, um, anywhere. I couldn't even find the source code.
So I installed it locally from lib/misc using this command:
mvn install:install-file \
-DgroupId=org.jzyio \
-DartifactId=jzyio \
-Dversion=0.1 \
-Dpackaging=jar \
-Dfile=./lib/misc/org.jzyio-0.1.jar
Then I was able to run 'mvn clean install -DskipTests=true' on my jzy3d with the new POM and I get it in my local repository.
Finally, I can then depend on the newly installed jzy3d jar with this XML in some other project:
<dependency>
<groupId>jzy3d</groupId>
<artifactId>jzy3d</artifactId>
<version>0.9-SNAPSHOT</version>
</dependency>
Developing in Eclipse, I was then able to create a test file based off one of the examples, and right click > Run As > Java Application, and it actually works!
Alright, well my work here is done for now. I'd love it if the JZY3D maintainer could pull this POM file into the project.
One would just need to solve the above issues in order to deploy it to a repository. My suggested solutions would be pulling the convexhull code into the jzy3d source tree (if the license allows) or it could be deployed using the POM I listed.
And I also suggest something similar for jzyio, which is a very small set of code. Why not fold it into the jzy3d code base?
Cheers.
--Jeremy