Using Maven to Build a Java Web Start Application

I am new to almost all related things, but would like to create a Java Web Start application using Maven. I also need to repackage a specific .jar (commons-httpclient-3.1.jar), or it will not sign with JarSigner (looks like a normal problem when I googled). Maybe I could use this Maven plugin, but I don’t even know how to set up the Maven repository.

I (possibly) need:

  • configure the Maven repository to be able to use the above plugin,
  • configure jnlp assembly using the plugin,
  • use the three .jars that we developed (already built using Maven) and install along with the dependencies (such as slf4j-api-1.6.1.jar, spring-security-core-3.0.7. RELEASE.jar and about a dozen others ),
  • also unzip and repackage a specific .jar (repack using jar.exe, not zip since it does not work).

I prefer examples of links to large pieces of documentation. :) Thanks in advance!

+6
source share
2 answers

you can use maven plugin for web start

Alternatively, you can create a war with the internal jnlp file (manually created)

You can even create a servlet that will create jnlp (with things like getting all the banks in some lib directory) and dynamically return it to the client.

The plugin should be in the maven repository, but I never tested it ...

+2
source

You probably guessed it, but the plugin repositories refer to a separate configuration in your pom in the regular installation repositories.

eg.

<pluginRepositories> <pluginRepository> <id>central</id> <name>Maven Plugin Repository</name> <url>http://repo1.maven.org/maven2</url> <layout>default</layout> <snapshots> <enabled>false</enabled> </snapshots> <releases> <updatePolicy>never</updatePolicy> </releases> </pluginRepository> </pluginRepositories> 

See here http://maven.apache.org/guides/introduction/introduction-to-the-pom.html

0
source

Source: https://habr.com/ru/post/904987/


All Articles