Skip to content
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

java8 APPLICATION_TEMPLATE.jnlp generation support #12

Closed
solomax opened this issue Oct 7, 2015 · 6 comments
Closed

java8 APPLICATION_TEMPLATE.jnlp generation support #12

solomax opened this issue Oct 7, 2015 · 6 comments
Assignees
Milestone

Comments

@solomax
Copy link
Contributor

solomax commented Oct 7, 2015

Hello,

previously there was an issue http://jira.codehaus.org/browse/MWEBSTART-266 with the patch attached
(to correctly work with latest java main jar should contain JNLP-INF/APPLICATION_TEMPLATE.jnlp with all parameters replaced with '*')
I tried to clone your repo to try to fix it myself but failed :(
can you point me to the right direction or maybe fix the issue?

additional problem I'm facing is forking, maybe you know how can 'no-fork' mode can be implemented

Thanks in advance, and sorry I was unable to provide the patch :(

@solomax solomax changed the title java8 jarsigner support java8 APPLICATION_TEMPLATE.jnlp generation support Oct 7, 2015
@ekpeters
Copy link

ekpeters commented Nov 2, 2015

You arn't be the only one looking for an automated way to create and sign APPLICATION_TEMPLATE.jnlp files. Was there a patch at one time that did this, and if so where can it be found today?

@solomax
Copy link
Contributor Author

solomax commented Nov 3, 2015

Actually there were patches .....
And I was able to find notices about them, but unfortunately no patches itself :(

@ekpeters
Copy link

ekpeters commented Nov 4, 2015

:S Not good.

I've seen http://stackoverflow.com/a/20071821 which happily gives a way that one can (supposedly) sign a template, but it makes the assumption that the jar files have static names. Unfortunately, all the programs we assemble here are versioned - Solutions dependent on static names are not possible.

Yesterday, I wrote a simple maven plugin to find the correct jar file, generate the jnlp template from the jnlp file, insert the template into the jar, and then sign the jar. Fantastic as that is, webstart is griping about unsigned content and I don't see anything wrong or unsigned with the jar file - The error given by webstart is sadly lacking in detail, so I don't see any path forward by troubleshooting the error.

@tchemit tchemit added this to the 1.0-beta-8 milestone Feb 26, 2016
@tchemit tchemit self-assigned this Feb 26, 2016
@jimbogithub
Copy link

Here's the patch I use:

webstart-maven-plugin-1.0-beta-7-LM-406.patch.txt

This includes a new JnlpInfMojo assigned to a jnlp-inf goal. You run that goal before the main goal (jnlp-single in my case) as shown here:

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>webstart-maven-plugin</artifactId>
            <version>1.0-beta-7-LM-406</version>
            <executions>
                <execution>
                    <!-- Step 1 of 2: Prepare APPLICATION_TEMPLATE.JNLP -->
                    <!-- The application_template.vm must be manually kept in sync with template.vm but with $$ variables replaced with
                        a single * (at least until we do a resource filter to automate if possible). -->
                    <id>generate-jnlp-template-for-signing</id>
                    <phase>prepare-package</phase>
                    <goals>
                        <goal>jnlp-inf</goal>
                    </goals>
                    <configuration>
                        <jnlp>
                            <inputTemplate>application_template.vm</inputTemplate>
                            <outputFile>../classes/JNLP-INF/APPLICATION_TEMPLATE.JNLP</outputFile>
                            <mainClass>com.xxx.Application</mainClass>
                        </jnlp>
                        <filenameMapping>legacy</filenameMapping>
                        <makeArchive>false</makeArchive>
                        <!-- Have to include this setting here to ensure it appears in the APPLICATION_TEMPLATE.JNLP -->
                        <pack200>
                            <enabled>true</enabled>
                        </pack200>
                    </configuration>
                </execution>
            </executions>
        </plugin>


                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>webstart-maven-plugin</artifactId>
                    <executions>
                        <execution>
                            <!-- Step 2 of 2: Sign and pack. -->
                            <id>generate-DEV-jnlp-and-sign</id>
                            <phase>package</phase>
                            <goals>
                                <goal>jnlp-single</goal>
                            </goals>
                            ...
                        <execution>
                    <executions>
                <plugin>

It requires a second copy of the template.vm (default name = application_template.vm) that is a copy of the former with wildcards introduced where required.

So this may be pretty specific to my needs but might help.

tchemit added a commit that referenced this issue Feb 19, 2018
Issuse #12 (Integrate Application files inside main jar)
@tchemit
Copy link
Contributor

tchemit commented Feb 19, 2018

Some stuff has be done about this point, @solomax is it ok with you? do you need more stuff to be done ? If not could you close this issue ? thanks.

@solomax
Copy link
Contributor Author

solomax commented Feb 20, 2018

Right now I'm not using this plugin, using manual jnlp/webstart generation

@solomax solomax closed this as completed Feb 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants