Author: tchemit Date: 2009-10-09 09:21:10 +0200 (Fri, 09 Oct 2009) New Revision: 603 Modified: trunk/src/main/java/org/nuiton/helper/plugin/ShareServerSecretPlugin.java trunk/src/site/apt/mojo-usages.apt Log: fix javadoc + improve documentation Modified: trunk/src/main/java/org/nuiton/helper/plugin/ShareServerSecretPlugin.java =================================================================== --- trunk/src/main/java/org/nuiton/helper/plugin/ShareServerSecretPlugin.java 2009-10-03 08:58:29 UTC (rev 602) +++ trunk/src/main/java/org/nuiton/helper/plugin/ShareServerSecretPlugin.java 2009-10-09 07:21:10 UTC (rev 603) @@ -17,6 +17,7 @@ * <pre> * usernameOut * passwordOut + * privateKeyOut * passphraseOut * </pre> * @@ -60,7 +61,7 @@ /** * The name of the property where to export the username of the server. * <p/> - * <b>Note:</> If not set - then no export of the username of the server. + * <b>Note:</b> If not set - then no export of the username of the server. * * @parameter * @since 1.1.0 @@ -69,9 +70,9 @@ /** * The name of the property where to export the password of the server. * <p/> - * <b>Note:</> If not set - then no export of the password of the server. + * <b>Note:</b> If not set - then no export of the password of the server. * <p/> - * <b>Note:</> If the password is crypted (since maven 2.1.0) then decrypt it. + * <b>Note:</b> If the password is crypted (since maven 2.1.0) then decrypt it. * * @parameter * @since 1.1.0 @@ -80,9 +81,9 @@ /** * The name of the property where to export the passphrase of the server. * <p/> - * <b>Note:</> If not set - then no export of the passphrase of the server. + * <b>Note:</b> If not set - then no export of the passphrase of the server. * <p/> - * <b>Note:</> If the passphrase is crypted (since maven 2.1.0) then decrypt it. + * <b>Note:</b> If the passphrase is crypted (since maven 2.1.0) then decrypt it. * * @parameter * @since 1.1.0 @@ -91,7 +92,7 @@ /** * The name of the property where to export the private key of the server. * <p/> - * <b>Note:</> If not set - then no export of the private key of the server. + * <b>Note:</b> If not set - then no export of the private key of the server. * * @parameter * @since 1.1.0 @@ -111,7 +112,10 @@ * @since 1.1.0 */ protected SecDispatcher sec; - private boolean exportUsername, exportPassword, exportPassphrase, exportPrivateKey; + private boolean exportUsername; + private boolean exportPassword; + private boolean exportPassphrase; + private boolean exportPrivateKey; @Override protected boolean init() throws Exception { Modified: trunk/src/site/apt/mojo-usages.apt =================================================================== --- trunk/src/site/apt/mojo-usages.apt 2009-10-03 08:58:29 UTC (rev 602) +++ trunk/src/site/apt/mojo-usages.apt 2009-10-09 07:21:10 UTC (rev 603) @@ -27,10 +27,59 @@ projects in the reactor, and only keep all collected files in the root project. +------------------------------------------------------------------------------ +<plugin> + <groupId>org.nuiton</groupId> + <artifactId>maven-helper-plugin</artifactId> + <executions> + <execution> + <id>collect-files</id> + <goals> + <goal>collect-files</goal> + </goals> + <phase>install</phase> + <configuration> + <extraFiles>LICENSE.txt</extraFiles> + <descriptionFile>target/collects.txt</descriptionFile> + </configuration> + </execution> + + </executions> +</plugin> +------------------------------------------------------------------------------ + send-email This goal sends an email with a content coming from a file. +------------------------------------------------------------------------------ +<plugin> + <groupId>org.nuiton</groupId> + <artifactId>maven-helper-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>send-email</goal> + </goals> + <phase>validate</phase> + </execution> + </executions> + <configuration> + <!-- for a multi-module just run on root project --> + <runOnce>true</runOnce> + + <emailTitle>Title of email</emailTitle> + <emailContentFile>target/emailContent.txt</emailContentFile> + <mailSender> + <email>noreply@noway.fr</email> + </mailSender> + <toAddresses> + <item>receiver@noway.com</item> + </toAddresses> + <smtpHost>smtp</smtpHost> + </configuration> +</plugin> +------------------------------------------------------------------------------ share-server-secret This goal shares servers informations (from your <settings.xml>) @@ -52,8 +101,31 @@ * <<passwordOut>> (to share the password of the server) - * <<passphraseOut>> (to share to passphrase 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). +------------------------------------------------------------------------------ +<plugin> + <groupId>org.nuiton</groupId> + <artifactId>maven-helper-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>share-server-secret</goal> + </goals> + <phase>package</phase> + <configuration> + <serverId>yourServerId</serverId> + <privateKeyOut>privateKey</privateKeyOut> + <passwordOut>password</passwordOut> + <usernameOut>username</usernameOut> + <passphraseOut>passphrase</passphraseOut> + </configuration> + </execution> + </executions> +</plugin> +------------------------------------------------------------------------------