-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an example Maven file #2
Comments
This might take some time, but I'm more than happy to accept contributions. I want this to become a community-run project. |
This is a start, but doesn't work. I am placing all the jar deps in a lib/ folder. Does capsule expects all the jars to be unpacked in the main jar? <assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>capsule</id>
<formats>
<format>jar</format>
</formats>
<baseDirectory>/</baseDirectory>
<dependencySets>
<dependencySet>
<outputDirectory>/</outputDirectory>
<includes>
<include>co.paralleluniverse:capsule:jar</include>
</includes>
<unpack>true</unpack>
<unpackOptions>
<includes>
<include>Capsule.class</include>
</includes>
</unpackOptions>
<scope>runtime</scope>
</dependencySet>
<dependencySet>
<outputDirectory>/lib</outputDirectory>
<useProjectArtifact>true</useProjectArtifact>
<unpack>false</unpack>
<scope>runtime</scope>
</dependencySet>
</dependencySets>
</assembly> <plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version><!--$NO-MVN-MAN-VER$-->
<configuration>
<archive>
<manifest>
<mainClass>Capsule</mainClass>
<classpathPrefix>lib</classpathPrefix>
<addClasspath>true</addClasspath>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
<manifestEntries>
<Application-Class>com.MYCOMPANY.MYPRODUCT.app.AppService</Application-Class>
<Extract-Capsule>false</Extract-Capsule>
<Min-Java-Version>1.7.0</Min-Java-Version>
<JVM-Args></JVM-Args>
<System-Properties></System-Properties>
</manifestEntries>
</archive>
<descriptors>
<descriptor>src/main/assembly/capsule.xml</descriptor>
</descriptors>
</configuration>
</plugin> |
Thank you! |
I tried removing the lib folder and this is what I get:
|
Try upgrading to capsule 0.4.0. This seems like a bug that has been fixed. |
Also, why is |
Added a working demo (full capsule -- i.e. embedded dependencies -- only): https://github.com/puniverse/capsule-demo |
That example now has an assembly for a capsule with external dependencies, too. |
For us non-Gradle users, it would be helpful to have an example of how to use this in Maven.
The text was updated successfully, but these errors were encountered: