60 likes | 182 Views
AutoDeploy Parse. Developer checks out main project's project.xml. Developer runs 'maven parseproject' to download project and all dependencies. Developer modifies dependency projects and main project as needed. Developer commits changes to update all file versions.
E N D
AutoDeploy Parse • Developer checks out main project's project.xml. • Developer runs 'maven parseproject' to download project and all dependencies. • Developer modifies dependency projects and main project as needed. • Developer commits changes to update all file versions. • Developer cleans projects by running 'maven -Dgoal=clean multiproject:goal.
AutoDeploy Catalog • Developer runs 'maven ccscm:catalog'. • Cvs status command is run against entire project and redirected to a file. • Maven plugin parses status file using Java Perl-style regular expressions (Apache Oro library). • Maven plugin writes self-referencing xml file catalog using JDOM with: • Tag name (if provided) • File names, versions, sizes, md5, and modtime info • Cvs repository information such as the server, repository, and module • This step is optional if continuing.
AutoDeploy Version • Developer runs 'maven -DccScm.project.version=3.4 ccscm:version-project'. • Maven plugin writes the project.xml file with a new version number for project: • Use map for version • Increment previous version • User specified version • Maven plugin checks in the project.xml file and get the Cvs version. • Maven plugin rewrites the file catalog the same as in the previous slide. • Maven plugin checks in the file catalog. • All the project files will be tagged by the Maven plugin if one is provided.
AutoDeploy Map • Developer runs 'maven ccscm:createmap'. • Maven plugin gets the file catalog version from a user property or from Cvs status. • Maven plugin parses project.xml file using Java JDOM library. • Determines current project name and version; writes to 'last' project map section. • Creates 'projects' map section for project with more project info, the file catalog version, and the name, group, and version for all dependencies. • 'Last' map section is used for higher level projects to grab the last build of a dependency. • The map can be used recursively through all dependencies if the dependencies were mapped as well.
AutoDeploy Parent • On parent projects, we run the version step using the map to get the 'last' version of dependencies: 'maven -DccScm.use.map=yes ccscm:version-project' • If parent project is also to be versioned, need to run version and mapping step without using map first to update last map for project itself. • Three ways to version(highest to lowest level of priority): • ccScm.dep.ver.{artifactId} • ccScm.map.file • ccScm.project.version • Setting ccScm.dep.ver.{artifactId} property for project name overrides the version from the mapping, so the version and mapping step for the parent is no longer necessary.