Upgrading JAM

Upgrading from JAM 2.0

General steps in upgrading build files from JAM 2.0 to 2.1:

  1. Download and Setup JAM 2.1
  2. Set the JAM_HOME environmental variable to the newly installed JAM 2.1 base directory.
  3. The JAM 2.1 plugin goal names have changed from javagen to jam. Confirm the new plugin is working by typing: maven -P jam
  4. Update the build section of your POM (project.xml) to reflect the resources and unit test layout of your project. Resource copying is now handled by the generated resources target found in classpath.xml. For guidance refer to the many examples and to the POM specification.
  5. The location of generated JAM files has moved from basedir to src/jam. If you don't wish to migrate these files, you can change this setting (maven.jam.generate.dir) in the JAM plugin.
  6. Generate props-maven.xml and classpath.xml files by typing: maven jam, remove the old files from the basedir and update your import statements.
  7. Import the new props-maven.xml generated property file which replaces the old props-module.xml file. Your property imports should be in the correct relative sequence:
    <import file="${basedir}/src/jam/props-maven.xml"/>
    <import file="${jam.home}/props-global.xml"/>
    <import file="${basedir}/src/jam/classpath.xml"/> 
  8. Check your overridden standard targets against the default declarations to insure you have the correct dependencies. Many support targets found in the depends clause have been added, deprecated or renamed in JAM 2.1. Standard targets are located at the top of the file in JAM 2.1 modules.