Using the org.clerezza.internal.process Utility

How to use the utility

The bundle org.clerezza.internal.process implements a utility to desnapshotize and snapshotize projects. In this document the term project will refer to a maven project. A maven project is defined in a pom.xml file. This utility is available as a jar file having a name of this format:

org.clerezza.internal.process-<version>-jar-with-dependencies.jar

To create this utility program, download and build the org.clerezza.internal.process project. In the target directory you'll find the resulted utility program.

The syntax for executing operations with this utility is:

java -jar org.clerezza.internal.process-<version>-jar-with-dependencies.jar <command> <arguments>

If in doubt, calling a command without arguments gives usage instructions.

How to Desnapshotize projects

To desnapshotize projects, use the desnapshotize command. The desnapshotize command takes a list of maven project directories (containing a pom.xml file) to desnapshotize. The first project in the list is interpreted as the parent project (where the dependency management is expected to be located).

Usage:

  • java -jar org.clerezza.internal.process-<version>-jar-with-dependencies.jar desnapshotize <path-to-parent> (<path-to-target-project>)+ ...

Example to desnapshotize org.clerezza.app.ldap.wwf:

  • java -jar org.clerezza.internal.process-0.1-SNAPSHOT-jar-with-dependencies.jar desnapshotize ../../org.clerezza.cms.parent/ ../../org.clerezza.app.ldap.wwf/

Usually we need to desnapshotize multiple projects.

Example to desnapshotize org.clerezza.app.ldap.wwf and org.clerezza.cms.htmlcleaner:

  • java -jar org.clerezza.internal.process-0.1-SNAPSHOT-jar-with-dependencies.jar desnapshotize ../../org.clerezza.cms.parent/ ../../org.clerezza.app.ldap.wwf/ ../../org.clerezza.cms.htmlcleaner

Desnapshotizing aggregated projects

The most common task is to desnapshotize most projects to make a new release. Some of those projects may be aggregated (their pom combines multiple project into one aggregated project using <module> tags). In such cases it is tedious to write the list of all projects to desnapshotize. Therefore there is a command to desnapshotize an aggregated projects. So in order to desnapshotize a large number of projects, it may be beneficial to define an aggregated project with all the projects that you want to desnapshotize. The first <module> in the pom file is interpreted as the parent project (where the dependency management is specified).

Usage:

  • java -jar org.clerezza.internal.process-<version>-jar-with-dependencies.jar desnapshotizePom <path-to-pom-file>

Example:

  • java -jar org.clerezza.internal.process-0.1-SNAPSHOT-jar-with-dependencies.jar desnapshotizePom ../../pom.xml

How to Snapshotize Projects

The command to snapshotize projects takes two arguments. The first is a path to a directory where all projects are located. The second is a path to a pom file of the project to snapshotize. If the pom specifies an aggregated project, then all it's sub-projects are snapshotized. The command also snapshotizes the parents of the snapshotized project and adapts the dependency management specification in the parent project. Furthermore all projects that depend on a snapshotized project are snapshotized recursively.

Usage:

  • java -jar org.clerezza.internal.process-<version>-jar-with-dependencies.jar snapshotizePom <path-to-root-of-all-projects> <path-to-pom-file>

Example to snapshotize org.clerezza.app.treecreeper.core:

  • java -jar org.clerezza.internal.process-0.1-SNAPSHOT-jar-with-dependencies.jar snapshotizePom ../../ ../../org.clerezza.app.treecreeper.core/pom.xml

Labels