Unable to run-applet default Griffon app - applet

With a new Griffon (v0.9.4) app, having nothing more done to it than to install plugins that will be needed for the project later, I am unable to griffon run-applet or run-webstart on the project. The error I get is JAR resources in JNLP file are not signed by same certificate
Here is the Launch File:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE jnlp SYSTEM "http://java.sun.com/dtd/JNLP-1.5.dtd">
<jnlp
version="0.1"
codebase="file:/C:/Users/[REDACTED]/Client/staging/"
href="applet.jnlp"
>
<information>
<title>Client 0.1</title>
<vendor>[REDACTED]</vendor>
<homepage href="http://localhost/Client"/>
<!--fallback description-->
<description>Client 0.1</description>
<description kind="one-line">Client 0.1</description>
<description kind="short">Client 0.1</description>
<description kind="tooltip">Client 0.1</description>
<!-- fallback icon -->
<icon href="griffon-icon-48x48.png" kind="default" width="48" height="48"/>
<!-- icon used for splash screen -->
<icon href="griffon.png" kind="default" width="391" height="123"/>
<!-- icon used in menu -->
<icon href="griffon-icon-16x16.png" kind="default" width="48" height="48"/>
<!-- icon used on desktop -->
<icon href="griffon-icon-32x32.png" kind="default" width="32" height="32"/>
<!-- to create shortcuts, uncomment this
<shortcut online="true">
<desktop/>
<menu submenu="Client"/>
</shortcut>
-->
<offline-allowed/>
</information>
<security>
<all-permissions/>
<!--<j2ee-application-client-permissions/>-->
</security>
<resources>
<property name="griffon.runmode" value="applet"/>
<property name="jnlp.packEnabled" value="true"/>
<j2se version="1.5+" />
<!-- auto-added jars follow, griffon-rt, app, and groovy -->
<jar href='griffon-rt-0.9.4.jar' main='true'/>
<jar href='Client.jar' main='false' />
<jar href='commons-0.2.jar'/>
<jar href='commons-beanutils-1.8.0.jar'/>
<jar href='commons-codec-1.3.jar'/>
<jar href='commons-collections-3.2.1.jar'/>
<jar href='commons-lang-2.4.jar'/>
<jar href='ezmorph-1.0.6.jar'/>
<jar href='griffon-i18n-addon-0.4.1.jar'/>
<jar href='griffon-jbusycomponent-addon-0.5.2.jar'/>
<jar href='griffon-jxlayer-addon-0.2.jar'/>
<jar href='griffon-miglayout-addon-0.3.jar'/>
<jar href='griffon-rest-addon-0.7.1.jar'/>
<jar href='groovy-all-1.8.2.jar'/>
<jar href='http-builder-0.5.1.jar'/>
<jar href='httpclient-4.0.3.jar'/>
<jar href='httpcore-4.0.1.jar'/>
<jar href='jbusycomponent-1.2.1.jar'/>
<jar href='jcl-over-slf4j-1.6.1.jar'/>
<jar href='json-lib-2.3-jdk15.jar'/>
<jar href='jul-to-slf4j-1.6.1.jar'/>
<jar href='jxlayer-3.0.4.jar'/>
<jar href='log4j-1.2.16.jar'/>
<jar href='miglayout-3.7.4.jar'/>
<jar href='multiplegradientpaint-1.0.jar'/>
<jar href='nekohtml-1.9.9.jar'/>
<jar href='org.springframework.beans-3.0.5.RELEASE.jar'/>
<jar href='org.springframework.context-3.0.5.RELEASE.jar'/>
<jar href='org.springframework.core-3.0.5.RELEASE.jar'/>
<jar href='signpost-commonshttp4-1.2.1.1.jar'/>
<jar href='signpost-core-1.2.1.1.jar'/>
<jar href='slf4j-api-1.6.1.jar'/>
<jar href='slf4j-log4j12-1.6.1.jar'/>
<jar href='swing-worker-1.1.jar'/>
<jar href='swingx-beaninfo-1.6.2-2.jar'/>
<jar href='swingx-core-1.6.2-2.jar'/>
<jar href='swingxbuilder-0.1.8.1.jar'/>
<jar href='timingframework-1.0.jar'/>
<jar href='xml-resolver-1.2.jar'/>
<!-- Add all extra jars below here, or the app may break -->
</resources>
<resources os='Windows' arch='x86'>
</resources>
<applet-desc
documentbase="file:/C:/Users/[REDACTED]/Client/staging/"
name="ClientApplet"
main-class="griffon.swing.SwingApplet"
width="320"
height="240">
<!-- params are ignored when referenced from web page for 6u10 -->
<!--<param name="key1" value="value1"/>-->
<!--<param name="key2" value="value2"/>-->
</applet-desc>
</jnlp>
Here is the Exception:
JNLPException[category: Launch File Error : Exception: null : LaunchDesc:
<jnlp spec="1.0+" codebase="file:/C:/Users/[REDACTED]/Client/staging/" version="0.1" href="file:/C:/Users/[REDACTED]/Client/staging/applet.jnlp">
<information>
<title>Client 0.1</title>
<vendor>[REDACTED]</vendor>
<homepage href="http://localhost/Client"/>
<description>Client 0.1</description>
<description kind="short">Client 0.1</description>
<description kind="one-line">Client 0.1</description>
<description kind="tooltip">Client 0.1</description>
<icon href="file:/C:/Users/[REDACTED]/Client/staging/griffon-icon-48x48.png" height="48" width="48" kind="default"/>
<icon href="file:/C:/Users/[REDACTED]/Client/staging/griffon.png" height="123" width="391" kind="default"/>
<icon href="file:/C:/Users/[REDACTED]/Client/staging/griffon-icon-16x16.png" height="48" width="48" kind="default"/>
<icon href="file:/C:/Users/[REDACTED]/Client/staging/griffon-icon-32x32.png" height="32" width="32" kind="default"/>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<update check="timeout" policy="always"/>
<resources>
<property name="griffon.runmode" value="applet"/>
<java version="1.5+"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/griffon-rt-0.9.4.jar" download="eager" main="true"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/Client.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/commons-0.2.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/commons-beanutils-1.8.0.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/commons-codec-1.3.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/commons-collections-3.2.1.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/commons-lang-2.4.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/ezmorph-1.0.6.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/griffon-i18n-addon-0.4.1.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/griffon-jbusycomponent-addon-0.5.2.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/griffon-jxlayer-addon-0.2.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/griffon-miglayout-addon-0.3.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/griffon-rest-addon-0.7.1.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/groovy-all-1.8.2.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/http-builder-0.5.1.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/httpclient-4.0.3.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/httpcore-4.0.1.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/jbusycomponent-1.2.1.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/jcl-over-slf4j-1.6.1.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/json-lib-2.3-jdk15.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/jul-to-slf4j-1.6.1.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/jxlayer-3.0.4.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/log4j-1.2.16.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/miglayout-3.7.4.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/multiplegradientpaint-1.0.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/nekohtml-1.9.9.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/org.springframework.beans-3.0.5.RELEASE.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/org.springframework.context-3.0.5.RELEASE.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/org.springframework.core-3.0.5.RELEASE.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/signpost-commonshttp4-1.2.1.1.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/signpost-core-1.2.1.1.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/slf4j-api-1.6.1.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/slf4j-log4j12-1.6.1.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/swing-worker-1.1.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/swingx-beaninfo-1.6.2-2.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/swingx-core-1.6.2-2.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/swingxbuilder-0.1.8.1.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/timingframework-1.0.jar" download="eager" main="false"/>
<jar href="file:/C:/Users/[REDACTED]/Client/staging/xml-resolver-1.2.jar" download="eager" main="false"/>
</resources>
<applet-desc name="ClientApplet" main-class="griffon.swing.SwingApplet" documentbase="file:/C:/Users/[REDACTED]/Client/staging/" width="320" height="240"/>
</jnlp> ]
at com.sun.javaws.LaunchDownload.checkSignedResourcesHelper(LaunchDownload.java:1798)
at com.sun.javaws.LaunchDownload.checkSignedResources(LaunchDownload.java:1508)
at com.sun.javaws.Launcher.prepareResources(Launcher.java:1231)
at com.sun.javaws.Launcher.prepareAllResources(Launcher.java:620)
at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:326)
at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:198)
at com.sun.javaws.Launcher.launch(Launcher.java:115)
at com.sun.javaws.Main.launchApp(Main.java:417)
at com.sun.javaws.Main.continueInSecureThread(Main.java:249)
at com.sun.javaws.Main$1.run(Main.java:111)
at java.lang.Thread.run(Unknown Source)
I'm not really sure where to begin looking for how to fix this, but I would think that it should be able to work out-of-the-box.

Looks like one of those dependencies comes with its own signature and the packaging process does not remove it. This could probably be a bug in the $GRIFFON_HOME/scripts/Package.groovy

Different extensions can use different code signing certificates. Presuming that the Jars must stay signed by whoever signs them now, move those Jars into their own extension(s). See the component-desc Element for further details.
As an aside, there are a number of suspect aspects to the JNLP file shown. Make sure you validate it using JaNeLA.

Related

Eclipse RCP 4 java web start - Nothing happens after equinox starts up

I'm trying to get the Eclipse RCP application I developed to work with java web start. I've followed several guides and came up with a setup that should work (apparently not since I'm making this post).
My web start structure looks like this: http://i.imgur.com/QJBy90g.png (Cant post images because of my reputation)
The plugins directory contains all my jars, and the features directory contains all my jnlp files. APPLICATION.JNLP is the jnlp file I use start everything up.
Content of APPLICATION.JNLP:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="file://localhost/home/imas/Desktop/POWER/" href="APPLICATION.JNLP" >
<information>
<title>Shipping app - ws</title>
<vendor>Imas</vendor>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<application-desc main-class="org.eclipse.equinox.launcher.WebStartMain">
<argument>-clearPersistedState</argument>
<argument>-consoleLog</argument>
<argument>-noexit</argument>
</application-desc>
<resources>
<j2se version="1.7+"/>
<jar href="plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar"/>
<extension name="wrapper feature" href="features/com.vangenechten.shipping.wrapperfeature_1.0.0.201603310945.jnlp" />
<!-- OSGI setup -->
<property name="osgi.instance.area" value="#user.home/Desktop/POWER/configuration"/>
<property name="osgi.configuration.area" value="#user.home/Desktop/POWER/configuration"/>
<property name="eclipse.application"/>
<property name="osgi.debug" value="true"/>
<property name="osgi.clean" value="true"/>
<property name="eclipse.application" value="org.eclipse.e4.ui.workbench.swt.E4Application"/>
<property name="osgi.bundles.defaultStartLevel" value="4"/>
<property name="eclipse.product" value="com.vangenechten.shipping.product"/>
<property name="osgi.console" value=""/>
<property name="osgi.bundles" value="org.eclipse.core.runtime#2:start,org.eclipse.equinox.event#3:start,org.eclipse.equinox.ds#3:start"/>
</resources>
Content of wrapper feature jnlp:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="file://localhost/home/imas/Desktop/POWER/">
<information>
<title>Wrapperfeature</title>
<vendor>VANGENECHTEN</vendor>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<component-desc/>
<resources>
<j2se version="1.7+" />
</resources>
<resources>
<extension href="features/com.vangenechten.shipping.feature_1.0.0.201603310945.jnlp" />
<jar href="plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar"/>
</resources>
Content of the feature jnlp:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="file://localhost/home/imas/Desktop/POWER/">
<information>
<title>Feature</title>
<vendor>VANGENECHTEN</vendor>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<component-desc/>
<resources>
<j2se version="1.7+" />
</resources>
<resources>
<extension href="features/org.eclipse.rcp_4.5.1.v20150904-0015.jnlp" />
<jar href="plugins/com.vangenechten.shipping_1.0.0.201603291126.jar"/>
</resources>
Content of rcp jnlp:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="file://localhost/home/imas/Desktop/POWER/">
<information>
<title>Eclipse RCP</title>
<vendor>Eclipse.org</vendor>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<component-desc/>
<resources>
<j2se version="1.7+" />
</resources>
<resources>
<extension href="features/org.eclipse.e4.rcp_1.4.0.v20150903-1804.jnlp" />
<jar href="plugins/org.eclipse.help_3.6.0.v20130326-1254.jar"/>
<jar href="plugins/org.eclipse.ui_3.107.0.v20150507-1945.jar"/>
<jar href="plugins/org.eclipse.ui.workbench_3.107.0.v20150825-2206.jar"/>
<jar href="plugins/org.eclipse.update.configurator_3.3.300.v20140518-1928.jar"/>
<jar href="plugins/org.eclipse.rcp_4.5.1.v20150904-0015.jar"/>
</resources>
<resources os="Mac">
<jar href="plugins/org.eclipse.ui.cocoa_1.1.100.v20150315-1253.jar"/>
</resources>
Content of rcp 4 jnlp:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="file://localhost/home/imas/Desktop/POWER/">
<information>
<title>Eclipse e4 Rich Client Platform</title>
<vendor>Eclipse.org</vendor>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<component-desc/>
<resources>
<j2se version="1.7+" />
</resources>
<resources>
<jar href="plugins/org.eclipse.e4.core.services_2.0.0.v20150403-1912.jar"/>
<jar href="plugins/org.eclipse.e4.ui.workbench.swt_0.13.0.v20150504-0621.jar"/>
<jar href="plugins/org.eclipse.e4.core.commands_0.11.0.v20150422-0725.jar"/>
<jar href="plugins/org.eclipse.e4.ui.bindings_0.11.0.v20150422-0725.jar"/>
<jar href="plugins/org.eclipse.e4.ui.model.workbench_1.1.100.v20150407-1430.jar"/>
<jar href="plugins/org.eclipse.e4.ui.services_1.2.0.v20150422-0725.jar"/>
<jar href="plugins/org.eclipse.e4.ui.workbench.renderers.swt_0.13.0.v20150901-1347.jar"/>
<jar href="plugins/org.eclipse.e4.ui.workbench_1.3.0.v20150531-1948.jar"/>
<jar href="plugins/org.eclipse.e4.ui.css.core_0.11.0.v20150511-1937.jar"/>
<jar href="plugins/org.eclipse.e4.ui.css.swt_0.12.0.v20150511-1003.jar"/>
<jar href="plugins/org.apache.batik.css_1.7.0.v201011041433.jar"/>
<jar href="plugins/org.w3c.css.sac_1.3.1.v200903091627.jar"/>
<jar href="plugins/org.apache.batik.util_1.7.0.v201011041433.jar"/>
<jar href="plugins/org.w3c.dom.svg_1.1.0.v201011041433.jar"/>
<jar href="plugins/org.w3c.dom.smil_1.0.1.v200903091627.jar"/>
<jar href="plugins/org.w3c.dom.events_3.0.0.draft20060413_v201105210656.jar"/>
<jar href="plugins/javax.inject_1.0.0.v20091030.jar"/>
<jar href="plugins/javax.annotation_1.2.0.v201401042248.jar"/>
<jar href="plugins/org.eclipse.e4.core.di_1.5.0.v20150421-2214.jar"/>
<jar href="plugins/org.eclipse.e4.core.contexts_1.4.0.v20150828-0818.jar"/>
<jar href="plugins/org.apache.batik.util.gui_1.7.0.v200903091627.jar"/>
<jar href="plugins/javax.xml_1.3.4.v201005080400.jar"/>
<jar href="plugins/org.eclipse.e4.core.di.extensions_0.13.0.v20150421-2214.jar"/>
<jar href="plugins/org.eclipse.e4.ui.css.swt.theme_0.10.0.v20150422-0725.jar"/>
<jar href="plugins/org.eclipse.e4.ui.di_1.1.0.v20150422-0725.jar"/>
<jar href="plugins/org.eclipse.e4.ui.widgets_1.1.0.v20150427-1751.jar"/>
</resources>
<resources os="Mac">
<jar href="plugins/org.eclipse.e4.ui.workbench.renderers.swt.cocoa_0.11.300.v20150507-1945.jar"/>
</resources>
<resources>
<jar href="plugins/org.eclipse.equinox.common_3.7.0.v20150402-1709.jar"/>
<jar href="plugins/org.eclipse.equinox.ds_1.4.300.v20150423-1356.jar"/>
<jar href="plugins/org.eclipse.equinox.event_1.3.100.v20140115-1647.jar"/>
<jar href="plugins/org.eclipse.core.commands_3.7.0.v20150422-0725.jar"/>
<jar href="plugins/org.eclipse.core.contenttype_3.5.0.v20150421-2214.jar"/>
<jar href="plugins/org.eclipse.core.databinding_1.5.0.v20150422-0725.jar"/>
<jar href="plugins/org.eclipse.core.databinding.beans_1.3.0.v20150422-0725.jar"/>
<jar href="plugins/org.eclipse.core.databinding.observable_1.5.0.v20150422-0725.jar"/>
<jar href="plugins/org.eclipse.core.databinding.property_1.5.0.v20150422-0725.jar"/>
<jar href="plugins/org.eclipse.core.expressions_3.5.0.v20150421-2214.jar"/>
<jar href="plugins/org.eclipse.core.jobs_3.7.0.v20150330-2103.jar"/>
<jar href="plugins/org.eclipse.core.runtime_3.11.1.v20150903-1804.jar"/>
<jar href="plugins/org.eclipse.equinox.app_1.3.300.v20150423-1356.jar"/>
<jar href="plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar"/>
<jar href="plugins/com.ibm.icu_54.1.1.v201501272100.jar"/>
<jar href="plugins/org.eclipse.equinox.preferences_3.5.300.v20150408-1437.jar"/>
<jar href="plugins/org.eclipse.equinox.registry_3.6.0.v20150318-1503.jar"/>
<jar href="plugins/org.eclipse.equinox.simpleconfigurator_1.1.100.v20150423-1455.jar"/>
<jar href="plugins/org.eclipse.osgi_3.10.101.v20150820-1432.jar"/>
<jar href="plugins/org.eclipse.osgi.compatibility.state_1.0.100.v20150402-1551.jar"/>
<jar href="plugins/org.eclipse.osgi.services_3.5.0.v20150519-2006.jar"/>
</resources>
<resources os="Solaris" arch="sparc">
<jar href="plugins/org.eclipse.equinox.launcher.gtk.solaris.sparc_1.1.300.v20150602-1417.jar"/>
</resources>
<resources os="Solaris" arch="x86">
<jar href="plugins/org.eclipse.equinox.launcher.gtk.solaris.x86_1.1.300.v20150602-1417.jar"/>
</resources>
<resources os="Mac" arch="x86_64">
<jar href="plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.300.v20150602-1417.jar"/>
</resources>
<resources os="Linux" arch="ppc">
<jar href="plugins/org.eclipse.equinox.launcher.gtk.linux.ppc_1.1.300.v20150602-1417.jar"/>
</resources>
<resources os="Linux" arch="ppc64">
<jar href="plugins/org.eclipse.equinox.launcher.gtk.linux.ppc64_1.0.300.v20150602-1417.jar"/>
</resources>
<resources os="Linux" arch="ppc64le">
<jar href="plugins/org.eclipse.equinox.launcher.gtk.linux.ppc64le_1.0.300.v20150602-1417.jar"/>
</resources>
<resources os="Linux" arch="x86">
<jar href="plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.300.v20150602-1417.jar"/>
</resources>
<resources os="Linux" arch="s390x">
<jar href="plugins/org.eclipse.equinox.launcher.gtk.linux.s390x_1.1.300.v20150602-1417.jar"/>
</resources>
<resources os="Linux" arch="s390">
<jar href="plugins/org.eclipse.equinox.launcher.gtk.linux.s390_1.1.300.v20150602-1417.jar"/>
</resources>
<resources os="Linux" arch="x86_64">
<jar href="plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.300.v20150602-1417.jar"/>
</resources>
<resources os="AIX" arch="ppc">
<jar href="plugins/org.eclipse.equinox.launcher.gtk.aix.ppc_1.1.200.v20150602-1417.jar"/>
</resources>
<resources os="AIX" arch="ppc64">
<jar href="plugins/org.eclipse.equinox.launcher.gtk.aix.ppc64_1.1.200.v20150602-1417.jar"/>
</resources>
<resources os="HP-UX" arch="ia64">
<jar href="plugins/org.eclipse.equinox.launcher.gtk.hpux.ia64_1.0.200.v20150602-1417.jar"/>
</resources>
<resources os="Windows" arch="x86">
<jar href="plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.300.v20150602-1417.jar"/>
</resources>
<resources os="Windows" arch="x86_64">
<jar href="plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.300.v20150602-1417.jar"/>
</resources>
<resources>
<jar href="plugins/org.eclipse.swt_3.104.1.v20150825-0743.jar"/>
<jar href="plugins/org.eclipse.swt.gtk.linux.x86_3.104.1.v20150825-0743.jar"/>
</resources>
<resources os="Windows" arch="x86">
<jar href="plugins/org.eclipse.swt.win32.win32.x86_3.104.1.v20150825-0743.jar"/>
</resources>
<resources os="Windows" arch="x86_64">
<jar href="plugins/org.eclipse.swt.win32.win32.x86_64_3.104.1.v20150825-0743.jar"/>
</resources>
<resources os="Linux" arch="x86">
<jar href="plugins/org.eclipse.swt.gtk.linux.x86_3.104.1.v20150825-0743.jar"/>
</resources>
<resources os="Linux" arch="s390x">
<jar href="plugins/org.eclipse.swt.gtk.linux.s390x_3.104.1.v20150825-0743.jar"/>
</resources>
<resources os="Linux" arch="s390">
<jar href="plugins/org.eclipse.swt.gtk.linux.s390_3.104.1.v20150825-0743.jar"/>
</resources>
<resources os="Solaris" arch="sparc">
<jar href="plugins/org.eclipse.swt.gtk.solaris.sparc_3.104.1.v20150825-0743.jar"/>
</resources>
<resources os="Solaris" arch="x86">
<jar href="plugins/org.eclipse.swt.gtk.solaris.x86_3.104.1.v20150825-0743.jar"/>
</resources>
<resources os="Linux" arch="ppc">
<jar href="plugins/org.eclipse.swt.gtk.linux.ppc_3.104.1.v20150825-0743.jar"/>
</resources>
<resources os="Linux" arch="ppc64">
<jar href="plugins/org.eclipse.swt.gtk.linux.ppc64_3.104.1.v20150825-0743.jar"/>
</resources>
<resources os="Linux" arch="ppc64le">
<jar href="plugins/org.eclipse.swt.gtk.linux.ppc64le_3.104.1.v20150825-0743.jar"/>
</resources>
<resources os="Linux" arch="x86_64">
<jar href="plugins/org.eclipse.swt.gtk.linux.x86_64_3.104.1.v20150825-0743.jar"/>
</resources>
<resources os="Mac" arch="x86_64">
<jar href="plugins/org.eclipse.swt.cocoa.macosx.x86_64_3.104.1.v20150825-0743.jar"/>
</resources>
<resources os="AIX" arch="ppc">
<jar href="plugins/org.eclipse.swt.gtk.aix.ppc_3.104.1.v20150825-0743.jar"/>
</resources>
<resources os="AIX" arch="ppc64">
<jar href="plugins/org.eclipse.swt.gtk.aix.ppc64_3.104.1.v20150825-0743.jar"/>
</resources>
<resources os="HP-UX" arch="ia64">
<jar href="plugins/org.eclipse.swt.gtk.hpux.ia64_3.104.1.v20150825-0743.jar"/>
</resources>
<resources>
<jar href="plugins/org.eclipse.equinox.util_1.0.500.v20130404-1337.jar"/>
<jar href="plugins/org.eclipse.jface_3.11.0.v20150602-1400.jar"/>
<jar href="plugins/org.eclipse.jface.databinding_1.7.0.v20150406-2148.jar"/>
<jar href="plugins/org.eclipse.e4.ui.workbench3_0.13.0.v20150422-0725.jar"/>
<jar href="plugins/org.apache.felix.gogo.command_0.10.0.v201209301215.jar"/>
<jar href="plugins/org.apache.felix.gogo.runtime_0.10.0.v201209301036.jar"/>
<jar href="plugins/org.apache.felix.gogo.shell_0.10.0.v201212101605.jar"/>
<jar href="plugins/org.eclipse.equinox.console_1.1.100.v20141023-1406.jar"/>
<jar href="plugins/org.eclipse.e4.ui.workbench.addons.swt_1.2.0.v20150512-1414.jar"/>
<jar href="plugins/org.eclipse.equinox.bidi_0.10.0.v20130327-1442.jar"/>
<jar href="plugins/org.eclipse.e4.ui.dialogs_1.0.0.v20150513-0856.jar"/>
<jar href="plugins/org.apache.commons.jxpath_1.3.0.v200911051830.jar"/>
<jar href="plugins/org.eclipse.e4.emf.xpath_0.1.100.v20150513-0856.jar"/>
<jar href="plugins/org.eclipse.e4.core.di.annotations_1.4.0.v20150528-1451.jar"/>
<jar href="plugins/org.eclipse.emf.ecore_2.11.1.v20150805-0538.jar"/>
<jar href="plugins/org.eclipse.emf.common_2.11.0.v20150805-0538.jar"/>
<jar href="plugins/org.eclipse.emf.ecore.change_2.11.0.v20150805-0538.jar"/>
<jar href="plugins/org.eclipse.emf.ecore.xmi_2.11.1.v20150805-0538.jar"/>
</resources>
<resources os="gtk">
<jar href="plugins/org.eclipse.e4.ui.swt.gtk_1.0.1.v20150708-1529.jar"/>
</resources>
NOTE: I put the gtk linux x 86 version of org.eclipse.swt directly as a resource (without os="Linux" arch="x86") because I would receive no class def found errors. For some reason web start wouldn't load the jar, so I added it directly (Shouldn't be an issue in production, since the application will run on raspberry pi's).
Now when I start javaws with APPLICATION.JNLP I get no error, but the application doesn't start. Below a screenshot of the javaws console
Screenshot of console -> http://i.imgur.com/J0t2zCv.png
NOTE Console doesn't say anything about an error. Normally when there is an error it is showed in the console and written to a log file.
After running the jnlp file, the following folders are added to the configuration folder -> org.eclipse.runtime, org.eclipse.equinox.rcp, org.eclipse.osgi and org.eclipse.update
Any help would be appreciated!

Adding jars to ant classpath in gwt

I am newbie to gwt and ant. Earlier I was working with maven/spring playFramework/sbt.
I would like to add some external jars to my gwt project like:
gwt3bootstrap
hibernate
mysql connector etc.
I've added jars to my lib folder in project:
- gwtbootstrap3-0.9.1.jar
- gwtbootstrap3-extras-0.9.1.jar
But I am getting an error on console:
Runing CodeServer with parameters: [-noprecompile, -port, 42543, -sourceLevel, 1.7, -bindAddress, 127.0.0.1, -launcherDir, /home/danielo/eclipseGwt/StockWatcher/war, -logLevel, INFO, com.google.gwt.sample.stockwatcher.StockWatcher]
Super Dev Mode starting up
workDir: /tmp/gwt-codeserver-6966154251496651044.tmp
Loading inherited module 'com.google.gwt.sample.stockwatcher.StockWatcher'
Loading inherited module 'com.github.gwtbootstrap.Bootstrap'
[ERROR] Unable to find 'com/github/gwtbootstrap/Bootstrap.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
Loading modules
com.google.gwt.sample.stockwatcher.StockWatcher
Loading inherited module 'com.google.gwt.sample.stockwatcher.StockWatcher'
Loading inherited module 'com.github.gwtbootstrap.Bootstrap'
[ERROR] Unable to find 'com/github/gwtbootstrap/Bootstrap.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
[ERROR] shell failed in doStartup method
MyProject.gwt.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.6.2//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.6.2/distro-source/core/src/gwt-module.dtd">
<module rename-to='stockwatcher'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.standard.Standard' />
<inherits name="com.github.gwtbootstrap.Bootstrap" />
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- Other module inherits -->
<!-- Specify the app entry point class. -->
<entry-point class='com.google.gwt.sample.stockwatcher.client.StockWatcher' />
</module>
build.xml:
<?xml version="1.0" encoding="utf-8" ?>
<project name="StockWatcher" default="build" basedir=".">
<!-- Configure path to GWT SDK -->
<property name="gwt.sdk" location="/path/to/gwt.sdk" />
<path id="project.class.path">
<pathelement location="war/WEB-INF/classes" />
<pathelement location="${gwt.sdk}/gwt-user.jar" />
<fileset dir="${gwt.sdk}" includes="gwt-dev*.jar" />
<!-- Add any additional non-server libs (such as JUnit) -->
<fileset dir="war/WEB-INF/lib" includes="**/*.jar" />
</path>
<target name="libs" description="Copy libs to WEB-INF/lib">
<mkdir dir="war/WEB-INF/lib" />
<copy todir="war/WEB-INF/lib" file="${gwt.sdk}/gwt-servlet.jar" />
<!-- Add any additional server libs that need to be copied -->
</target>
<target name="javac" depends="libs" description="Compile java source">
<mkdir dir="war/WEB-INF/classes" />
<javac srcdir="src" includes="**" encoding="utf-8" destdir="war/WEB-INF/classes" source="1.5" target="1.5" nowarn="true" debug="true" debuglevel="lines,vars,source">
<classpath refid="project.class.path" />
</javac>
<copy todir="war/WEB-INF/classes">
<fileset dir="src" excludes="**/*.java" />
</copy>
</target>
<target name="gwtc" depends="javac" description="GWT compile to JavaScript">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
<classpath>
<pathelement location="src" />
<path refid="project.class.path" />
</classpath>
<!-- add jvmarg -Xss16M or similar if you see a StackOverflowError -->
<jvmarg value="-Xmx256M" />
<!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
<arg value="com.google.gwt.sample.stockwatcher.StockWatcher" />
</java>
</target>
<target name="devmode" depends="javac" description="Run development mode">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.DevMode">
<classpath>
<pathelement location="src" />
<path refid="project.class.path" />
</classpath>
<jvmarg value="-Xmx256M" />
<arg value="-startupUrl" />
<arg value="StockWatcher.html" />
<!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
<arg value="com.google.gwt.sample.stockwatcher.StockWatcher" />
</java>
</target>
<target name="javac.tests" depends="javac" description="Compiles test code">
<javac srcdir="test" includes="**" encoding="utf-8" source="1.5" target="1.5" nowarn="true" debug="true" debuglevel="lines,vars,source">
<classpath location="path_to_the_junit_jar" />
<classpath refid="project.class.path" />
</javac>
</target>
<target name="test.dev" depends="javac.tests" description="Run development mode tests">
<mkdir dir="reports/htmlunit.dev" />
<junit fork="yes" printsummary="yes" haltonfailure="yes">
<jvmarg line="-Xmx256m" />
<sysproperty key="gwt.args" value="-logLevel WARN" />
<sysproperty key="java.awt.headless" value="true" />
<classpath>
<pathelement location="src" />
<pathelement location="test" />
<path refid="project.class.path" />
<pathelement location="path_to_the_junit_jar" />
</classpath>
<batchtest todir="reports/htmlunit.dev">
<fileset dir="test">
<include name="**/*Test.java" />
</fileset>
</batchtest>
<formatter type="plain" />
<formatter type="xml" />
</junit>
</target>
<target name="test.prod" depends="javac.tests" description="Run production mode tests">
<mkdir dir="reports/htmlunit.prod" />
<junit fork="yes" printsummary="yes" haltonfailure="yes">
<jvmarg line="-Xmx256m" />
<sysproperty key="gwt.args" value="-prod -logLevel WARN -out www-test" />
<sysproperty key="java.awt.headless" value="true" />
<classpath>
<pathelement location="src" />
<pathelement location="test" />
<path refid="project.class.path" />
<pathelement location="path_to_the_junit_jar" />
</classpath>
<batchtest todir="reports/htmlunit.prod">
<fileset dir="test">
<include name="**/*Test.java" />
</fileset>
</batchtest>
<formatter type="plain" />
<formatter type="xml" />
</junit>
</target>
<target name="test" description="Run development and production mode tests">
<antcall target="test.dev" />
<antcall target="test.prod" />
</target>
<target name="hosted" depends="devmode" description="Run development mode (NOTE: the 'hosted' target is deprecated)" />
<target name="build" depends="gwtc" description="Build this project" />
<target name="war" depends="build" description="Create a war file">
<zip destfile="StockWatcher.war" basedir="war" />
</target>
<target name="clean" description="Cleans this project">
<delete dir="war/WEB-INF/classes" failonerror="false" />
<delete dir="war/stockwatcher" failonerror="false" />
</target>
</project>
I've also tried to add this jars using in eclipse RMB on project -> Properties -> Java Build Path -> Libraries tab -> Add External JARs
But it dosn't helped me.
Please give me some help.
I have search many forum posts with the same issue, but couldn't resolve it on my own.
just use gwtBootstrap3 and you have to download the jar for it! here the link
than you have to declare the pathelement in your build.xml
<path id="project.class.path">
<pathelement location="war/WEB-INF/classes" />
<pathelement location="${gwt.sdk}/gwt-user.jar" />
<pathelement location="yourpathtojar/gwtbootstrap3-0.9.1.jar" />
<fileset dir="${gwt.sdk}" includes="gwt-dev*.jar" />
<!-- Add any additional non-server libs (such as JUnit) -->
<fileset dir="war/WEB-INF/lib" includes="**/*.jar" />
</path>
if you use a maven project instead you can follow this example

GWTP Compile Error Rest-Dispatch

I am having trouble with GWTP Rest-Dispatch, when I include the Rest-Dispatch configurations (as stated in the wiki) these compiler errors: http://pastebin.com/eWNg2c94 (compile log)
I have no idea what is causing this, I am using Ivy dependency manager (IvyDE eclipse). I have verified all the gwtp-rest dependencies exist. I am using both Dispatchers (Rpc/Rest) here is my applications gwt module configuration.
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to="ims">
<!-- Inherit the core Web Toolkit stuff -->
<inherits name="com.google.gwt.user.User" />
<inherits name="com.google.gwt.logging.Logging"/>
<set-property name="gwt.logging.consoleHandler" value="DISABLED"/>
<set-property name="gwt.logging.popupHandler" value="DISABLED" />
<extend-property name="locale" values="en"></extend-property>
<!-- Core module inherits -->
<inherits name="nz.co.doltech.framework.module.Framework" />
<inherits name="nz.co.doltech.ims.Resources" />
<!-- Theme module inherits -->
<inherits name="nz.co.doltech.framework.themes.SyrenaTheme"/>
<!-- GXT -->
<!--stylesheet src="reset.css" /-->
<!--inherits name='com.sencha.gxt.ui.GXT' /-->
<!-- GXT Theme -->
<!-- <inherits name='com.sencha.gxt.theme.blue.Blue'/> -->
<!-- <inherits name='com.sencha.gxt.theme.gray.Gray' /> -->
<!--inherits name="com.sencha.gxt.theme.neptune.Theme" /-->
<!-- Library module inherits -->
<inherits name="com.gwtplatform.dispatch.rest.DispatchRest"/>
<inherits name="com.gwtplatform.dispatch.rpc.DispatchRpc"/>
<inherits name="com.gwtplatform.mvp.Mvp"/>
<inherits name="com.google.gwt.uibinder.UiBinder"/>
<inherits name="com.google.gwt.query.Query"/>
<inherits name="org.gwtbootstrap3.GwtBootstrap3CDN"/>
<inherits name="nz.co.doltech.framework.extensions.gwtbootstrap3.datepicker.Datepicker"/>
<inherits name="org.atmosphere.gwt.Client"/>
<replace-with class="org.atmosphere.gwt.client.impl.IEHTMLFileCometTransport">
<when-type-is class="org.atmosphere.gwt.client.impl.CometTransport"/>
<any>
<when-property-is name="user.agent" value="ie6"/>
<when-property-is name="user.agent" value="ie8"/>
<when-property-is name="user.agent" value="ie9"/>
</any>
</replace-with>
<!-- Framework module inherits -->
<inherits name="nz.co.doltech.framework.libraries.maydu.validation.ValidationLibrary" />
<inherits name="nz.co.doltech.framework.libraries.chosen.Chosen" />
<!-- Module entry point -->
<entry-point class="nz.co.doltech.ims.client.Application"/>
<extend-configuration-property name="gin.ginjector.modules"
value="nz.co.doltech.ims.client.gin.ClientModule" />
<set-configuration-property name="gwtp.bootstrapper"
value="nz.co.doltech.ims.client.BootstrapperImpl"/>
<set-configuration-property name="gwtp.prebootstrapper"
value="nz.co.doltech.ims.client.BootstrapperImpl.PreBootstrapperImpl"/>
<extend-configuration-property name="document.compatMode" value="BackCompat" />
<!-- Specify the paths for translatable code -->
<source path="client" />
<source path="shared" />
<generate-with class="com.google.gwt.uibinder.rebind.FixedUiBinderGenerator">
<when-type-assignable class="com.google.gwt.uibinder.client.UiBinder"/>
</generate-with>
<!-- RPC Serialization Ignores -->
<extend-configuration-property name="rpc.blacklist" value="javax.*"/>
<extend-configuration-property name="rpc.blacklist" value="com.google.gwt.user.client.ui.*"/>
<extend-configuration-property name="rpc.blacklist" value="com.google.gwt.query.client.*"/>
<extend-configuration-property name="rpc.blacklist" value="com.google.gwt.aria.client.*"/>
<extend-configuration-property name="rpc.blacklist" value="com.google.gwt.dom.client.*"/>
<extend-configuration-property name="rpc.blacklist" value="com.google.gwt.validation.client.*"/>
<extend-configuration-property name="rpc.blacklist" value="nz.co.doltech.framework.extensions.gwtbootstrap3.client.*"/>
<extend-configuration-property name="rpc.blacklist" value="nz.co.doltech.framework.libraries.maydu.validation.client.*"/>
<extend-configuration-property name="rpc.blacklist" value="nz.co.doltech.framework.themes.syrena.ui.*"/>
</module>
My ANT build script:
<!--
================================
Build Application Binaries
================================
-->
<target name="javac" depends="tests" description="Compile java source">
<mkdir dir="war/WEB-INF/classes" />
<javac srcdir="src" includes="**" encoding="utf-8" destdir="war/WEB-INF/classes" source="1.7" target="1.7"
nowarn="true" debug="true" debuglevel="lines,vars,source" includeantruntime="false">
<classpath refid="project.class.path" />
<classpath refid="tomcat.libs"/>
</javac>
<copy todir="war/WEB-INF/classes">
<fileset dir="src" excludes="**/*.java" />
<fileset dir="resources" excludes="**/*.java" />
<fileset dir="database" excludes="**/*.java" />
</copy>
</target>
<target name="gwtc" depends="javac" description="GWT compile to JavaScript">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler" maxmemory="512m">
<classpath>
<pathelement location="src"/>
<path refid="project.class.path"/>
</classpath>
<arg value="-war"/>
<arg value="war"/>
<!--arg value="-strict" /-->
<!-- Logging level arguments -->
<!--arg value="-logLevel" />
<arg value="ERROR" /-->
<!-- Optimization arguments -->
<!--arg value="-XenableClosureCompiler"/>
<arg value="-XdisableClassMetadata"/-->
<!-- add jvmarg -Xss16M or similar if you see a StackOverflowError -->
<jvmarg value="-Xmx512M"/>
<!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
<arg value="nz.co.doltech.framework.module.Framework"/>
<arg value="nz.co.doltech.framework.login.Login"/>
<arg value="nz.co.doltech.ims.Ims"/>
</java>
</target>
<target name="build" depends="gwtc" description="Build web application entry point"/>
If anyone else has had similar problems I would really really appreciate the help.
You are not using MvpWithEntryPoint but your own entry point, so you need to tell GIN to load the generated modules. Can you make sure your Ginjector looks like the one described here: https://github.com/ArcBees/GWTP/wiki/Rest-Dispatch#installing-with-your-own-ginjector
MOre specifically, in the #GinModules you need to add this argument: properties = {"gin.ginjector.modules"} and the following method to your interface: RestDispatch getRestDispatch();

Ant / Eclipse complains about artifact:dependencies

I need to use XML to JSON lib in my war.
I followed a tutorial explaining that dependencies are required in the project.
But when I add the following in my ant build.xml (the file used to create the war), Eclipse complains about the artifact:dependencies, seems like it does not like the :.I have the following error message:
The prefix artifact for element artifact:dependencies is not bound...
<artifact:dependencies filesetId="dependency.fileset"
sourcesFilesetId="sources.dependency.fileset"
javadocFilesetId="javadoc.dependency.fileset"
versionsId="dependency.versions">
<!-- DEPENCIES GO HERE -->
</artifact:dependencies>
Any idea ?
UPDATE
I have the same problem trying to define an in-memory pom with:
<artifact:pom id="mypom" groupId="org.acme" artifactId="project1" version="1.0">
<dependency groupId="junit" artifactId="junit" version="4.1"/>
<dependency groupId="org.codehaus.plexus" artifactId="plexus-utils" version="1.5.5"/>
<license name="apache" url="http://www.apache.org"/>
</artifact:pom>
The prefix artifact for element artifact:pom is not bound...
UPDATE 2
I installed maven-ant jar in ant/lib and change the build.xml so it contains the definition of the artifact stuff but I have an error message while running it.
<project name="test" default="install" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<artifact:dependencies pathId="dependency.classpath">
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>2.3</version>
<type>jar</type>
<classifier>jdk15</classifier>
<scope>compile</scope>
</dependency>
...
The error message Eclipse gave is:
BUILD FAILED
D:\J2EE\workspace\Test\build.xml:3: Problem: failed to create task or type antlib:org.apache.maven.artifact.ant:dependencies
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
No types or tasks have been defined in this namespace yet
This appears to be an antlib declaration.
Action: Check that the implementing library exists in one of:
-D:\eclipse\plugins\org.apache.ant_1.8.2.v20110505-1300\lib
-C:\Documents and Settings\luc\.ant\lib
-a directory added on the command line with the -lib argument
The maven-ant jar does exist in -D:\eclipse\plugins\org.apache.ant_1.8.2.v20110505-1300\lib
UPDATE 3
This is the build.xml file I'm using.
<!--
<project name="Monitoring" default="install" xmlns:artifact="urn:maven-artifact-ant" xmlns:test="urn:test-tasks">
-->
<project name="Monitoring" default="install" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<!-- project-specific variables -->
<property environment="env" />
<property name="project_home" value="D:\J2EE\workspace\Monitoring"/>
<property name="webapp.dir" value="${project_home}/target" />
<property name="jboss.dir" value="D:\J2EE\jboss\standalone\deployments" />
<property name="package.name" value="monitoring.war" />
<property name="lib.dir" value="${project_home}/lib" />
<property name="src.dir" value="${project_home}/src" />
<property name="resources.dir" value="${project_home}/resources" />
<property name="dest.dir" value="${project_home}/target" />
<property name="package.file" value="${dest.dir}/${package.name}" />
<!-- put everything in a temp folder with the right structure during the build -->
<property name="temp.dir" value="${project_home}/temp" />
<property name="temp.dir.web-inf" value="${temp.dir}/WEB-INF" />
<property name="temp.dir.lib" value="${temp.dir.web-inf}/lib" />
<property name="temp.dir.classes" value="${temp.dir.web-inf}/classes" />
<property name="temp.dir.meta-inf" value="${temp.dir}/META-INF" />
<path id="build.class.path">
<fileset dir="${env.JAVA_HOME}/lib">
<include name="**/*.jar" />
</fileset>
<fileset dir="D:\ant\lib">
<include name="**/*.jar" />
</fileset>
</path>
<target name="deps">
<artifact:dependencies pathId="dependency.classpath">
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>2.3</version>
<type>jar</type>
<classifier>jdk15</classifier>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xom</groupId>
<artifactId>xom</artifactId>
<version>1.1</version>
</dependency>
</artifact:dependencies>
</target>
<target name="clean" depends="deps">
<delete>
<fileset dir="${dest.dir}" includes="**/*"/>
</delete>
<delete dir="${temp.dir}" />
<delete dir="${temp.dir.classes}" />
<delete dir="${temp.dir.meta-inf}" />
<delete dir="${temp.dir.web-inf}" />
</target>
<target name="prepare" depends="clean">
<mkdir dir="${dest.dir}" />
<mkdir dir="${temp.dir}" />
<mkdir dir="${temp.dir.lib}" />
<mkdir dir="${temp.dir.meta-inf}" />
<mkdir dir="${temp.dir.web-inf}" />
<mkdir dir="${temp.dir.classes}" />
</target>
<!-- COMPILE -->
<target name="compile" depends="prepare">
<echo>=== COMPILE ===</echo>
<echo>Compiling ${src.dir} files ...</echo>
<javac debug="on" srcdir="${src.dir}" destdir="${temp.dir.classes}" includes="**/*" includeantruntime="false">
<classpath refid="build.class.path" />
<classpath refid="dependency.classpath" />
</javac>
</target>
<!-- PACKAGE -->
<target name="package" depends="compile">
<echo>=== PACKAGE ===</echo>
<!-- copy the config files -->
<copy file="${resources.dir}/web.xml" tofile="${temp.dir.web-inf}/web.xml" overwrite="true" />
<copy file="${resources.dir}/manifest.mf" tofile="${temp.dir.meta-inf}/manifest.mf" overwrite="true" />
<copy todir="${temp.dir.classes}">
<fileset dir="${src.dir}">
<include name="**/*.xml"/>
<include name="**/*.xsl"/>
</fileset>
</copy>
<!-- the ant war task. with all resources in place, create the war file -->
<war destfile="${package.file}" webxml="${temp.dir.web-inf}/web.xml" basedir="${temp.dir}">
<lib dir="${lib.dir}" />
<classes dir="${temp.dir.classes}" />
</war>
</target>
<!-- INSTALL -->
<target name="install" depends="package">
<echo>=== INSTALL ===</echo>
<copy file="${package.file}" tofile="${webapp.dir}/${package.name}" overwrite="true" />
<copy file="${package.file}" tofile="${jboss.dir}/${package.name}" overwrite="true" />
</target>
</project>
It was working well before I added all the dependencies stuff... still cannot find out the pb here. Any help would be very welcome.
It looks like you're making use of Maven Ant Tasks. To do this you'll need a copy of the jar from the download area here.
Once (or if) you've got that, you'll need to modify your buildfile to use it.
The main things that are needed are to define the artifact namespace, and add the typedef for the ant-lib:
<project name="foo" default="foo" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<path id="maven-ant-tasks.classpath" path="lib/maven-ant-tasks-2.1.3.jar" />
<typedef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="antlib:org.apache.maven.artifact.ant"
classpathref="maven-ant-tasks.classpath" />
I had the same error message but the cause was different.
Going to Window -> Preferences -> Ant -> Runtime and setting Ant Home solved my problem.
So for anyone that above solution doesn't work, check if "Ant Home" is pointing to the right direction

How to conditionally include manifest options when making a JAR in ANT

I am using ANT to manage multiple projects. I have a build-common.xml script that individual projects include. Some projects are libraries, others are programs. For the programs, I would like to include
<manifest>
<attribute name="Main-Class" value="${main.class}"/>
</manifest>
in the <jar> tag. For libraries, I would like to have an empty jar tag as follows.
<target name="jar" depends="compile" description="generate a jar">
<mkdir dir="${build}/jar" />
<property name="jarfile" value="${jar}/${ant.project.name}.jar" />
<jar jarfile="${jarfile}" basedir="${classes}">
</jar>
</target>
Is there a way I can include the manifest attribute Main-Class only if the property main.class is defined?
Thanks!
Use conditional targets:
<target name="jar-mkdir" depends="compile" description="generate a jar">
<mkdir dir="${build}/jar" />
<property name="jarfile" value="${jar}/${ant.project.name}.jar" />
</target>
<target name="jar-main" depends="compile" description="generate a jar" if="main.class">
<jar jarfile="${jarfile}" basedir="${classes}">
<manifest>
<attribute name="Main-Class" value="${main.class}"/>
</manifest>
</jar>
</target>
<target name="jar-nomain" depends="compile" description="generate a jar" unless="main.class">
<jar jarfile="${jarfile}" basedir="${classes}">
</jar>
</target>
<target name="jar" depends="compile, jar-mkdir, jar-main, jar-nomain" description="generate a jar">
</target>
This will run jar-main (and add the manifest) only when main.class is present. When it is not present jar-nomain will run.