Basic customization and deployment lab
|
Time Estimates for Completion
|
Create and deploy a simple Creo Elements/Direct Model Manager customization from a Java development.
Set up a Java development environment to customize Creo Elements/Direct Model Manager, then create and deploy a simple customization. This lab is a prerequisite to the other customization labs.
|
Description:
|
1 minute
|
Lab exercise:
|
2-3 hours
|
Description
Most Creo Elements/Direct Model Manager customizations consist of XML and/or Java code. Creo Elements/Direct Model Manager includes tools for building and deploying these customizations using Rapid Deployment. These tools are integrated into a Java development environment.
Try the exercise below to set up your Java development environment to create and deploy Creo Elements/Direct Model Manager customizations.
Lab Exercise
In this lab you will set up a Java development environment for customizing Creo Elements/Direct Model Manager, and then create and deploy a simple customization.
Prerequisites
Basic Java programming experience.
The high-level steps for creating and deploying a simple Creo Elements/Direct Model Manager customization are:
Set up the development environment
You will need to use a Java development environment to package and deploy your Creo Elements/Direct Model Manager customizations, even if you only customize xml files. You may use any Java Integrated Development Environment (IDE). Creo Elements/Direct developers use the Netbeans 11.0 IDE. If you are using a different IDE, you can follow the instructions for NetBeans and make the similar customizations in your IDE.
Make a change
Create a change that you can deploy in Creo Elements/Direct Model Manager.
1. In NetBeans, execute the Run Main Project script.
2. Log in to Creo Elements/Direct Model Manager and choose > . Note the Build Number and that there isn't an item called Build Name.
3. Close Creo Elements/Direct Model Manager.
4. In NetBeans, edit dev.properties. Add ",Build Name=Acme" to the build.string.
You can add as many comma-separated name-value pairs as you like. Each pair will be displayed on a line in alphabetical order.
5. Execute the Build Main Project script.
6. Execute the Run Main Project script. Log in to Creo Elements/Direct Model Manager and choose > . Note that the Build Number has been incremented and the Build Name (Acme) is displayed.
The build number is maintained by Ant and is incremented each time the build script recompiles your code.
7. Close Creo Elements/Direct Model Manager.
Create a deployment package
Create a deployment package with the new build name and deploy it on the local system.
1. In dev.properties
◦ set mm.force.update to true
◦ set sds.host to your fully qualified machine name (e.g. mypc.acme.com)
2. Execute the Build and Package Project script. This will build and install the package on the local machine. The packager takes several minutes to run.
3. Start Creo Elements/Direct Model Manager from the Windows Start menu. Creo Elements/Direct Model Manager checks for updates. Download the updated version. If you are prompted for a configuration, select the one with your customization (e.g. acme).
4. In Creo Elements/Direct Model Manager, choose > . Note that the new Build Name appears in the deployed version.
Deploy to another Software Distribution Server
Deploy the customization to another Software Distribution Server.
1. In dev.properties
◦ Set sds.host to the fully qualified name of the Software Distribution Server.
2. Execute the Build Main Project script. This will produce a zip file in your working directory.
3. Move the SoftwareDistributionServer.zip file to the SD Server and unzip it at the top of the install directory.
4. Install Creo Elements/Direct Model Manager from the SD Server.
5. Start Creo Elements/Direct Model Manager from the Windows Start menu. Creo Elements/Direct Model Manager checks for updates. Download the updated version. If you are prompted for a configuration, select the one with your customization (e.g. acme).
6. Check the build name to ensure that the customized version is being used.
7. In dev.properties
◦ Set sds.host back to the fully qualified name of your machine so it's ready for regular customization development.