Merge pull request #7 from Tillerino/modularMaven

Switched to maven project.
- Eclipse files have been removed from repository. jar and native dependencies have been removed from repository.
- Use maven goals "compile exec:exec" to run the project.
- Use maven goals "package shade:shade" to create a single jar file, which contains java, but not native dependencies. This jar file can then be used with jarsplice to create a fat jar. Natives will be extracted to /target/natives.
This commit is contained in:
Jeffrey Han 2014-09-11 17:03:17 -04:00
commit 54b5469b02
36 changed files with 97 additions and 115 deletions

View File

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="bin" path="src"/>
<classpathentry kind="src" output="bin" path="res"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/jl-1.0.1.jar" sourcepath="lib/src/jl-1.0.1-sources.zip">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/opsu/lib/docs/jl-1.0.1-docs.zip!/javadoc"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="lib/jorbis-0.0.17-2.jar" sourcepath="lib/src/jorbis-0.0.17-2-sources.jar"/>
<classpathentry kind="lib" path="lib/lwjgl-2.9.1.jar" sourcepath="lib/src/lwjgl-2.9.1-sources.zip">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/opsu/lib/docs/lwjgl-2.9.1-docs.zip!/javadoc"/>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="opsu/native"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="lib/slick.jar" sourcepath="lib/src/slick-sources.zip">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/opsu/lib/docs/slick-docs.zip!/javadoc"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="lib/zip4j-1.3.2.jar" sourcepath="lib/src/zip4j-1.3.2-sources.zip">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/opsu/lib/docs/zip4j-1.3.2-docs.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="bin"/>
</classpath>

3
.gitignore vendored
View File

@ -10,5 +10,8 @@
/.settings/
/bin/
.metadata
.classpath
.project
Thumbs.db
/target

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>opsu</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -1,68 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- WARNING: Eclipse auto-generated file.
Any modifications will be overwritten.
To include a user specific buildfile here, simply create one in the same
directory with the processing instruction <?eclipse.ant.import?>
as the first entry and export the buildfile again. --><project basedir="." default="build" name="opsu">
<property environment="env"/>
<property name="ECLIPSE_HOME" value="../../Programs/eclipse/"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.7"/>
<property name="source" value="1.7"/>
<path id="opsu.classpath">
<pathelement location="bin"/>
<pathelement location="lib/jl-1.0.1.jar"/>
<pathelement location="lib/jorbis-0.0.17-2.jar"/>
<pathelement location="lib/lwjgl-2.9.1.jar"/>
<pathelement location="lib/slick.jar"/>
<pathelement location="lib/zip4j-1.3.2.jar"/>
</path>
<target name="init">
<mkdir dir="bin"/>
<copy includeemptydirs="false" todir="bin">
<fileset dir="src">
<exclude name="**/*.launch"/>
<exclude name="**/*.java"/>
</fileset>
</copy>
<copy includeemptydirs="false" todir="bin">
<fileset dir="res">
<exclude name="**/*.launch"/>
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="bin"/>
</target>
<target depends="clean" name="cleanall"/>
<target depends="build-subprojects,build-project" name="build"/>
<target name="build-subprojects"/>
<target depends="init" name="build-project">
<echo message="${ant.project.name}: ${ant.file}"/>
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" includeantruntime="false" source="${source}" target="${target}">
<src path="src"/>
<src path="res"/>
<classpath refid="opsu.classpath"/>
</javac>
</target>
<target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects"/>
<target description="copy Eclipse compiler jars to ant lib directory" name="init-eclipse-compiler">
<copy todir="${ant.library.dir}">
<fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/>
</copy>
<unzip dest="${ant.library.dir}">
<patternset includes="jdtCompilerAdapter.jar"/>
<fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/>
</unzip>
</target>
<target description="compile project with Eclipse compiler" name="build-eclipse-compiler">
<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
<antcall target="build"/>
</target>
<target name="Opsu">
<java classname="itdelatrisu.opsu.Opsu" failonerror="true" fork="yes">
<classpath refid="opsu.classpath"/>
</java>
</target>
</project>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

93
pom.xml Normal file
View File

@ -0,0 +1,93 @@
<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>itdelatrisu</groupId>
<artifactId>opsu</artifactId>
<version>0.3.2</version>
<build>
<sourceDirectory>src</sourceDirectory>
<resources>
<resource>
<directory>res</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>com.googlecode.mavennatives</groupId>
<artifactId>maven-nativedependencies-plugin</artifactId>
<version>0.0.7</version>
<executions>
<execution>
<id>unpacknatives</id>
<phase>generate-resources</phase>
<goals>
<goal>copy</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<configuration>
<executable>java</executable>
<arguments>
<argument>-Djava.library.path="${project.build.directory}\natives"</argument>
<argument>-cp</argument>
<classpath />
<argument>itdelatrisu.opsu.Opsu</argument>
</arguments>
</configuration>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<configuration>
<artifactSet>
<excludes>
<exclude>*:*:natives*</exclude>
</excludes>
</artifactSet>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.lwjgl.lwjgl</groupId>
<artifactId>lwjgl</artifactId>
<version>2.9.1</version>
</dependency>
<dependency>
<groupId>org.slick2d</groupId>
<artifactId>slick2d-core</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.jcraft</groupId>
<artifactId>jorbis</artifactId>
<version>0.0.17</version>
</dependency>
<dependency>
<groupId>net.lingala.zip4j</groupId>
<artifactId>zip4j</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>javazoom</groupId>
<artifactId>jlayer</artifactId>
<version>1.0.1</version>
</dependency>
</dependencies>
</project>