Maven: Difference between revisions
Mraynsford (talk | contribs) (Created page with '__TOC__ JogAmp now contains support for Maven. As of <tt>2.0-rc11</tt>, packages are pushed to [http://search.maven.org/#search|ga|1|jogamp Maven Central]. === Add dependencie…') |
Mraynsford (talk | contribs) |
||
Line 28: | Line 28: | ||
Maven will pull all of the dependencies the next time you attempt to build the project. | Maven will pull all of the dependencies the next time you attempt to build the project. | ||
Additionally, for <tt>joal</tt> and <tt>jocl</tt> support: | |||
<code> | |||
<dependencies> | |||
<dependency> | |||
<groupId>org.jogamp.jocl</groupId> | |||
<artifactId>jocl-main</artifactId> | |||
<version>2.0.2-rc12</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.jogamp.joal</groupId> | |||
<artifactId>joal-main</artifactId> | |||
<version>2.0.2-rc12</version> | |||
</dependency> | |||
</dependencies> | |||
</code> | |||
An example project is available in the <tt>maven</tt> subdirectory of the <tt>jogl-demos</tt> project | An example project is available in the <tt>maven</tt> subdirectory of the <tt>jogl-demos</tt> project |
Revision as of 13:23, 11 July 2013
JogAmp now contains support for Maven. As of 2.0-rc11, packages are pushed to Maven Central.
Add dependencies on the correct packages
If you don't know which packages you want, you almost certainly want to use the jogl-all-main and gluegen-rt-main packages, as these automatically set up the correct dependencies on the native jar files for all platforms.
As an example, if your project uses JOGL 2.0.2-rc12:
<dependencies>
<dependency>
<groupId>org.jogamp.gluegen</groupId>
<artifactId>gluegen-rt-main</artifactId>
<version>2.0.2-rc12</version>
</dependency>
<dependency>
<groupId>org.jogamp.jogl</groupId>
<artifactId>jogl-all-main</artifactId>
<version>2.0.2-rc12</version>
</dependency>
</dependencies>
Maven will pull all of the dependencies the next time you attempt to build the project.
Additionally, for joal and jocl support:
<dependencies>
<dependency>
<groupId>org.jogamp.jocl</groupId>
<artifactId>jocl-main</artifactId>
<version>2.0.2-rc12</version>
</dependency>
<dependency>
<groupId>org.jogamp.joal</groupId>
<artifactId>joal-main</artifactId>
<version>2.0.2-rc12</version>
</dependency>
</dependencies>
An example project is available in the maven subdirectory of the jogl-demos project [1].
The jogamp.org test repository (optional)
Bleeding edge, experimental packages will continue to be made available from the Jogamp Test Repository. Most users won't need this, but it can be used by adding a new profile in your ~/.m2/settings.xml file that specifies the repository:
<?xml version="1.0" encoding="UTF-8"?>
<settings
xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<profile>
<id>jogamp</id>
<repositories>
<repository>
<id>jogamp-remote</id>
<name>jogamp test mirror</name>
<url>http://www.jogamp.org/deployment/maven/</url>
<layout>default</layout>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>jogamp</activeProfile>
</activeProfiles>
</settings>
Maven will then check this repository for packages in addition to Maven Central when resolving dependencies.
Please note that packages on the jogamp test repository are subject to unannounced changes at any moment and may break existing code at any time! Do not use for production code!