1. Get Maven
sudo apt-get install maven2Set JAVA_HOME to Jigsaw, so that Maven uses Jigsaw:
export JAVA_HOME=~/dev/jigsaw/build/linux-i586/jdk-module-image
2. Adjusting the paths for Maven
Create new directories:
mkdir -p ~/dev/worldclock/panel/src/main/java
mkdir -p ~/dev/worldclock/application/src/main/java
Move the files:
mv /home/ludovic/dev/worldclock/panel/src/lh.worldclock.panel ~/dev/worldclock/panel/src/main/java
mv /home/ludovic/dev/worldclock/panel/resources ~/dev/worldclock/panel/src/main/
mv /home/ludovic/dev/worldclock/application/src/lh.worldclock.panel ~/dev/worldclock/application/src/main/java
mv /home/ludovic/dev/worldclock/application/resources ~/dev/worldclock/application/src/main/
3. Add the poms
Panel ( gedit ~/dev/worldclock/panel/pom.xml & ):
Application ( gedit ~/dev/worldclock/application/pom.xml & ):<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>lh.worldclock</groupId>
<artifactId>panel</artifactId>
<packaging>jar</packaging>
<version>0.7-SNAPSHOT</version>
<name>Worldclock Panel</name>
<url>https://worldclock-application.dev.java.net/</url>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"(somehow using <compilerArgument> -L ../modules</compilerArgument> does not work)
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>lh.worldclock</groupId>
<artifactId>application</artifactId>
<packaging>jar</packaging>
<version>0.7-SNAPSHOT</version>
<name>Worldclock Application</name>
<url>https://worldclock-application.dev.java.net/</url>
<dependencies>
<dependency>
<groupId>lh.worldclock</groupId>
<artifactId>panel</artifactId>
<version>0.7-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArguments>
<version />
<L>../modules</L>
</compilerArguments>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
4. Recreate the library
rm -rf ~/dev/worldclock/modules5. Compile and add to the library
$JIG/bin/jmod create -L ~/dev/worldclock/modules
Panel:
cd ~/dev/worldclock/panelApplication:
mvn install
$JIG/bin/jmod -L ~/dev/worldclock/modules install ~/dev/worldclock/panel/build -r ~/dev/worldclock/panel/src/main/resources lh.worldclock.panel
cd ~/dev/worldclock/application6. Run
mvn install
$JIG/bin/jmod -L ~/dev/worldclock/modules install ~/dev/worldclock/application/build -r ~/dev/worldclock/application/resources lh.worldclock.application
$JIG/bin/java -L ~/dev/worldclock/modules -m lh.worldclock.application
No comments:
Post a Comment