Mojo Usages
2009-10-02

collect-files

This goal collects some files through a maven build.

The collected files can be from two sources :

  • files attached to a maven project (as the pom.xml, the jar, the war, ...)
  • extra files you can explicitly add to the files collector.

The collector can then :

  • copy the collected files into a directory (usage of the copyFiles and outputDirectory parameters)
  • copy paths of the collected files into a file (one file per line) (usage of the descriptionFile parameter)
  • do both (copy files and paths)

In a multi-module project, the behaviour is to collect datas from all projects in the reactor, and only keep all collected files in the root project.

See examples page.

send-email

This goal sends an email with a content coming from a file.

See examples page.

share-server-secret

This goal shares servers informations (from your settings.xml) into the maven build.

The main idea is to use the decrypt mecanism introduce in maven 2.1.0 and make other plugins use these informations without modifing any other plugin code.

To use the mojo :

  • you must first indicate the server configuration you want to use via the serverId configuration.
  • then tell the plugin which information you want to share and the name of properties where to store using the parameters :
    • usernameOut (to share the username of the server)
    • passwordOut (to share the password of the server)
    • privateKeyOut (to share the private key path of the server)
    • passphraseOut (to share the passphrase of the server)
  • After the execution of the mojo, the exported parameters will be available for other mojo via (for example the $username maven property).

See examples page.

check-auto-container

This mojo permits to test if all dependencies of a project are auto-contained in given repositories.

To use the mojo :

  • fill addCentralMaven to add central maven repository.
  • fill repositoriess to add more repositories to test.
  • use failIfNotSafe to fail build if there is some unsafe dependencies.

See examples page.

transform-project-version

This mojo permits to transform your project version and store the result in a model property.

Note that the version is not changed in your pom, but just computed.

See examples page.