Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

Building the Java Web Start Commerce Manager

Building the Java Web Start Commerce Manager

How Does Maven build the Java Web Start Commerce Manager?

Maven and ANT work together to build the Java Web Start Commerce Manager. Maven and Tycho handle the Java Web Start dependencies together. Maven handles the dependencies specified in the POM file, such as Elastic Path artifacts, while Tycho resolves the Eclipse dependencies defined in the feature.xml. During a build, the pom.xml and feature.xml dependencies are downloaded from their respective repositories. After resolving dependencies, paths to these dependencies are stored in the Java Web Start Commerce Manager's compiled classpaths. Classpaths are then handed to the Ant script to package the Java Web Start Commerce Manager for deployment.

Ant creates the Java Web Start deployment using information provided by Maven. The Java Web Start Ant script is located in the build.xml, which is launched through the Maven Antrun plugin. Once Ant is launched, it loops through the JARs located in the compiled classpaths and copies them to the target/plugins directory. Ant then runs through the target/plugins directory, unsigns and resigns the jars using the keystore information provided in the pom.xml. Resigning the plugins ensure every plugin is signed by the same signer, which is a requirement for Java Web Start security. After resigning the plugins, the placeholders in the JNLP file are replaced with information from the classpath and the properties defined in the pom.xml file.

Note: Keystore Notes

The keystore is only used for signing the JARs, which is a Java Web Start security requirement. Previous versions of Elastic Path required you to create your own keystore. Now Elastic Path provides prebuilt keystore to sign your jars with at EP_Source/com.elasticpath.cmclient/com.elasticpath.cmclient.platform.feature.jws

To build the Java Web Start Commerce Manager:

  1. Configure the following Java Web Start Commerce Manager properties in the pom.xml located at <EP_Source>\cmclient\com.elasticpath.cmclient.platform.feature.jws\POM.xml
    ...
    <properties>
    		<jws.keystore.alias>elasticpathjws</jws.keystore.alias>
    		<jws.keystore.pass>password1</jws.keystore.pass>
    		<jws.keystore.keypass>password1</jws.keystore.keypass>
    		<jws.keystore.location>src/main/resources/jwskeystore</jws.keystore.location>
    		<jws.codebase>http://demo.elasticpath.com/cmclient/</jws.codebase>
    </properties>
    ...
    Property Name Description

    jws.keystore.alias

    Java Keystore alias to use for JAR signing

    jws.keystore.pass

    Java Keystore password

    jws.keystore.location Java Keystore Location

    jws.codebase

    URL hosting the Java Web Start Deployment

  2. Open a command prompt, navigate to EP_Source/com.elasticpath.cmclient/com.elasticpath.cmclient.platform.feature.jws, and run:
    mvn install
    The application builds to a zip file (com.elasticpath.cmclient.platform.feature.jws-6.12.0-SNAPSHOT-bin.zip) located at EP_Source/com.elasticpath.cmclient/com.elasticpath.cmclient.platform.feature.jws/targetTo deploy the Java Web Start application, see Deploying Java Web Start Commerce Manager.
    Note:

    The Java Web Start Commerce Manager build may take up to half an hour to complete.