----------------------------------------------- 5 Steps for a Maven Calm project on Google Code ----------------------------------------------- 1. Create a Google Code project; by default maven-calm uses svn as code repository, but you can use also git and simply override the POM property 'maven.release.scm.provider' (not tested yet :-\) 2. Create the following folder structure: + svn + trunk + m2 + releases + snapshots + site 3. Create your calm-enabled POM in /svn/trunk using the following parent (current maven-calm version is 1.0-beta-21): ---- your project's groupId your Google Project name your name your project's version-SNAPSHOT com.sourcesense.maven maven-calm [maven_calm_version] 4. Define the following repository ... maven-calm-releases http://maven-calm.googlecode.com/svn/m2/releases 5. Define the following SCM configuration (it uses a standard SVN layout by default) ${maven.release.scm.connection} ${maven.release.scm.developerConnection} ${maven.release.scm.url} That's it! Need an example? Look at the latest sourcesense-parent POM http://repository.sourcesense.com/nexus/content/groups/public/com/sourcesense/maven/sourcesense-parent/1.0.24/ ------- Use it! ------- TODO : there's a bug in the maven-site-plugin: you must have src/site/resources/css/site.css as a non-empty file, otherwise it will fail during the site-deploy execution (HTTP Error 400.. bah) TODO : at the moment the content in /svn/m2/site is not shown as correct HTML - mvn clean deploy site site-deploy [Will deploy a snapshot artifact in your repository and the site in /svn/m2/site] - mvn release:prepare release:perform [ Will - prompt you the version to tag and the next SNAPSHOT version to set on the trunk - create the tag with the prompted version - build and deploy the artifact on the releases repository (/svn/m2/releases) - Deploy the site - ... any other goal defined in - Update the version on the trunk - Update your local copy with the new trunk ] --------------------- If it's a webapp .... --------------------- - mvn clean package jetty:run [Runs your webapp locally; you can alternatively use jetty:run-war or jetty:run-exploded] - mvn clean package -P tomcat [Builds an Apache Tomcat 6.0.20 distribution in your target directory; this can be very handy in order to provide production-ready bundles of your application] - mvn clean integration-test -Pselenium [the Selenium tests must be in a **/selenium/** package] - mvn clean package cargo:deployer-redeploy [Will use the maven.j2ee-deploy.** property set to deploy your webapp on a remote Tomcat Manager] ------------ Customize it ------------ To see the properties that you can override you can just see the pom.xml definition of maven-calm! http://maven-calm.googlecode.com/svn/m2/releases/com/sourcesense/maven/maven-calm/1.0-beta-21/maven-calm-1.0-beta-21.pom Using property overriding you can: - Customize the behavior by setting different property values, i.e. by defining install deploy site-deploy cargo:deployer-redeploy you can deploy your webapp on a remote Tomcat Manager instance during the release process (see mvn release:prepare release:perform) - Overriding plugin versions (see plugin.**.version property set in the pom) - Override any other plugin configuration property (i.e. eclipse.downloadSources = false)