Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I add another answer because it's a long one, and it shows how I do to also generate a signed jar and a JNLP webstart file.</p> <p>So first I create a certificate to be able to sign the jar (you'll be asked to enter some info, I used "superpass" for the passwords, look where it is used in pom) :</p> <pre><code>cd src/main/java mkdir jnlp cd jnlp keytool -genkey -alias signFiles -keystore keystore.jks </code></pre> <p>And then I use this pom.xml (which has a parent pom but it doesn't contain anything related to javafx):</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt; &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; &lt;parent&gt; &lt;artifactId&gt;testfx&lt;/artifactId&gt; &lt;groupId&gt;ch.pgras&lt;/groupId&gt; &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt; &lt;/parent&gt; &lt;groupId&gt;ch.pgras&lt;/groupId&gt; &lt;artifactId&gt;hellofx&lt;/artifactId&gt; &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt; &lt;name&gt;hellofx&lt;/name&gt; &lt;url&gt;http://maven.apache.org&lt;/url&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;com.oracle&lt;/groupId&gt; &lt;artifactId&gt;javafx&lt;/artifactId&gt; &lt;version&gt;2.0&lt;/version&gt; &lt;systemPath&gt;${javafx.rt.jar}&lt;/systemPath&gt; &lt;scope&gt;system&lt;/scope&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;build&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;copy-dependencies&lt;/id&gt; &lt;phase&gt;package&lt;/phase&gt; &lt;configuration&gt; &lt;overWriteReleases&gt;false&lt;/overWriteReleases&gt; &lt;overWriteSnapshots&gt;false&lt;/overWriteSnapshots&gt; &lt;overWriteIfNewer&gt;true&lt;/overWriteIfNewer&gt; &lt;/configuration&gt; &lt;goals&gt; &lt;goal&gt;copy-dependencies&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt; &lt;version&gt;1.7&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;phase&gt;package&lt;/phase&gt; &lt;configuration&gt; &lt;target&gt; &lt;taskdef name="jfxdeploy" classname="com.sun.javafx.tools.ant.DeployFXTask" classpathref="maven.plugin.classpath"/&gt; &lt;taskdef name="jfxsignjar" classname="com.sun.javafx.tools.ant.FXSignJarTask" classpathref="maven.plugin.classpath"/&gt; &lt;jfxdeploy width="800" height="600" outdir="${project.build.directory}/deploy" outfile="${project.build.finalName}"&gt; &lt;info title="${project.name}"/&gt; &lt;application name="${project.name}" mainclass="webmap.WebMap"/&gt; &lt;resources&gt; &lt;fileset dir="${project.build.directory}" includes="*.jar"/&gt; &lt;fileset dir="${project.build.directory}/dependency" includes="*.jar"/&gt; &lt;/resources&gt; &lt;platform javafx="2.0"&gt; &lt;jvmarg value="-Xms64m"/&gt; &lt;jvmarg value="-Xmx256m"/&gt; &lt;/platform&gt; &lt;/jfxdeploy&gt; &lt;jfxsignjar destdir="${project.build.directory}/deploy" keystore="${project.basedir}/src/main/java/jnlp/keystore.jks" storepass="superpass" alias="signFiles" keypass="superpass"&gt; &lt;fileset dir="${project.build.directory}/deploy" includes="*.jar"/&gt; &lt;/jfxsignjar&gt; &lt;/target&gt; &lt;/configuration&gt; &lt;goals&gt; &lt;goal&gt;run&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;com.oracle.javafx&lt;/groupId&gt; &lt;artifactId&gt;ant-javafx&lt;/artifactId&gt; &lt;version&gt;2.0&lt;/version&gt; &lt;systemPath&gt;${ant.javafx.jar}&lt;/systemPath&gt; &lt;scope&gt;system&lt;/scope&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; </code></pre> <p></p> <p>finally I run mvn install, and the result will be in target/deploy...</p> <p>good luck :)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload