Commit 27657dd9 authored by Philippe Merle's avatar Philippe Merle
Browse files

Added the new profile 'one-jar' which generates one jar containing all the dependencies.

This allows to produce self-contained FraSCAti-based applications.
Required by Nabil for the SOCEDA project.
parent ca14102d
......@@ -631,6 +631,69 @@
</build>
</profile>
<!-- To generate one jar with all dependencies type 'mvn -Pone-jar'. -->
<profile>
<id>one-jar</id>
<!-- Force to put OW2 FraSCAti Assembly Factory inside the one jar. -->
<dependencies>
<dependency>
<groupId>org.ow2.frascati</groupId>
<artifactId>frascati-assembly-factory</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Force to compile the SCA composite ${composite.file} because -->
<!-- the FraSCAti compiler is not embedded in the one jar and -->
<!-- then membranes must be generated before execution. -->
<plugin>
<groupId>org.ow2.frascati.mojo</groupId>
<artifactId>frascati-compiler-plugin</artifactId>
</plugin>
<!-- Generate one jar with all dependencies inside. -->
<plugin>
<groupId>org.dstovall</groupId>
<artifactId>onejar-maven-plugin</artifactId>
<version>1.4.5-20120905.025640-3</version>
<executions>
<execution>
<goals>
<goal>one-jar</goal>
</goals>
<configuration>
<mainClass>org.ow2.frascati.assembly.factory.ManifestLauncher</mainClass>
<manifestEntries>
<One-Jar-URL-Factory>com.simontuffs.onejar.JarClassLoader$OneJarURLFactory</One-Jar-URL-Factory>
<mainComposite>${composite.file}</mainComposite>
<mainService>${service.name}</mainService>
<mainMethod>${method.name}</mainMethod>
</manifestEntries>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<!-- Where to download onejar-maven-plugin -->
<pluginRepositories>
<pluginRepository>
<id>onejar-maven-plugin.googlecode.com</id>
<url>http://onejar-maven-plugin.googlecode.com/svn/mavenrepo-snapshot</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<!-- ============= -->
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment