Giter Club home page Giter Club logo

Comments (8)

pron avatar pron commented on May 20, 2024

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.

rodlogic avatar rodlogic commented on May 20, 2024

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.

pron avatar pron commented on May 20, 2024

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.

rodlogic avatar rodlogic commented on May 20, 2024

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.

pron avatar pron commented on May 20, 2024

Try upgrading to capsule 0.4.0. This seems like a bug that has been fixed.

from capsule.

pron avatar pron commented on May 20, 2024

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.

pron avatar pron commented on May 20, 2024

Added a working demo (full capsule -- i.e. embedded dependencies -- only): https://github.com/puniverse/capsule-demo

from capsule.

pron avatar pron commented on May 20, 2024

That example now has an assembly for a capsule with external dependencies, too.

from capsule.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.