Comments (8)
This might take some time, but I'm more than happy to accept contributions. I want this to become a community-run project.
from capsule.
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>
from capsule.
Thank you!
By default, Capsule adds only those jars at the root of the capsule to the classpath. Either put them there, or add lib
to the App-Class-Path
manifest attribute.
from capsule.
I tried removing the lib folder and this is what I get:
CAPSULE: Launching app app.AppService
CAPSULE: /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/bin/java -Dcapsule.log=verbose -Dcapsule.jar=/work/trunk-all/app/target -classpath /work/trunk-all/app/target/app-5.4-SNAPSHOT-capsule.jar app.AppService
Error: Could not find or load main class
from capsule.
Try upgrading to capsule 0.4.0. This seems like a bug that has been fixed.
from capsule.
Also, why is Extract-Capsule
set to false
? Aren't the dependencies embedded? If you're using embedded dependencies, don't set Extract-Capsule
(or set it to true
, which is the default).
from capsule.
Added a working demo (full capsule -- i.e. embedded dependencies -- only): https://github.com/puniverse/capsule-demo
from capsule.
That example now has an assembly for a capsule with external dependencies, too.
from capsule.
Related Issues (20)
- Guide for obfuscating with Allatori or ProGuard with Gradle? HOT 1
- Capsule depends on JDK internal APIs that have been removed from JDK9 HOT 2
- Can't restrict away from Java 9 using javaVersion manifest value HOT 6
- Repeated JVM command line options are not preserved
- hyphenated paths cause errors (probably java.nio path parsing...)
- Add classpath with system property
- [JDK9] Illegal reflective access warning HOT 3
- Override Args
- Capsule cache should support multiple versions of an application/CAPSULE_ID
- Could not determine artifacts for us.kirchmeier.capsule
- website http://capsule.io/ is down HOT 1
- how about a new release?
- PAT_JAVA_VERSION_LINE fails to recognize Zulu openjdk 10.0.2
- Version string produced by Java 10 and later is not recognised
- Capsule hangs when try to lock app directory
- Using Capsule with Spark yields ConcurrentModificationException on terminating the application HOT 1
- Some potential NullPointerException bugs HOT 1
- Capsule docs web site is gone HOT 4
- CAPSULE EXCEPTION: Could not parse version: 11.0.9.1 while processing attribute Min-Update-Version: {} HOT 2
- Fails to find version when JAVA_TOOL_OPTIONS is set
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from capsule.