Author: maksimkaszynski
Date: 2008-05-12 12:53:25 -0400 (Mon, 12 May 2008)
New Revision: 8531
Modified:
trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/CreateSkinMojo.java
Log:
added more documentation to Mojo
Modified:
trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/CreateSkinMojo.java
===================================================================
---
trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/CreateSkinMojo.java 2008-05-12
16:46:06 UTC (rev 8530)
+++
trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/CreateSkinMojo.java 2008-05-12
16:53:25 UTC (rev 8531)
@@ -24,8 +24,24 @@
import org.apache.velocity.VelocityContext;
/**
+ * This mojo is intended to create new skin add-on.
+ * If mojo is executed within project, new resources are added to the project, and
existing resource config is modified to include new files.
+ * Otherwise, a new project is created.
+ * <b>Usage</b> <tt>mvn cdk:add-skin -Dname=<skinName>
-Dpackage=<skinPackage>. </tt><br/>
+ * This adds new skin named <skinName> to project resources/META-INF/skins
folder.<br/>
+ * Skin resources - XCSS files are placed in
<skinPackage>.<skinName> package within project resources
directory.<br/>
+ *
+ * Plug-in can also create new project. Mandatory parameters are groupId and
artifactId.<br/>
+ * <b>Example</b> <tt>mvn cdk:add-skin -DgroupId=<groupId>
-DartifactId=<artifactId> -Dversion=<version>
-Dpackage=<packageName>
-Dname=<skinName></tt><br/>
+ * If <em>version</em> is not specified, it is set to
1.0-SNAPSHOT<br/>
+ * If <em>name</em> is not specified, it is set same as
artifactId.<br/>
+ * If <em>package</em> is not specified, it is set same as
groupId.<br/>
+ *
+ *
* @goal add-skin
* @requiresProject false
+ *
+ *
* @author Maksim Kaszynski
*
@@ -51,47 +67,59 @@
private static final String POM_XML_TEMPLATE = TEMPLATES_PREFIX +
"pom/pom.xml";
/**
+ * POM file of executed project - if it exists, then plugin is executed within existing
project, otherwise plugin will create new one.
* @parameter expression="${project.file}"
+ * @readonly
*/
private File pom;
/**
+ * Artifact ID for newly-created project.
+ * If not set, and no project exists, an exception will be thrown.
* @parameter expression="${artifactId}"
*/
private String artifactId;
/**
+ * Group ID for newly-created project.
+ * If not set, and no project exists, an exception will be thrown.
* @parameter expression="${groupId}"
*/
private String groupId;
/**
+ * Name of newly added skin. If not set explicitly but project exists, project arifactId
will be used.
* @parameter expression="${name}"
default-value="${project.artifactId}"
*/
private String skinName;
/**
+ * Name of the base package of newly added skin. If not set explicitly but project
exists, project groupId will be used.
* @parameter expression="${package}"
default-value="${project.groupId}"
*/
private String packageName;
/**
+ * Version of newly generated project. Default is 1.0-SNAPSHOT
* @parameter expression="${version}" default-value="1.0-SNAPSHOT"
*/
private String version;
/**
* @parameter expression="${plugin.artifactId}"
+ * @readonly
*/
private String pluginArtifactId;
/**
* @parameter expression="${plugin.groupId}"
+ * @readonly
*/
private String pluginGroupId;
/**
* @parameter expression="${plugin.version}"
+ * @readonly
*/
private String pluginVersion;
@@ -101,7 +129,10 @@
/** @component */
private org.apache.maven.artifact.resolver.ArtifactResolver resolver;
- /**@parameter expression="${localRepository}" */
+ /**
+ * @parameter expression="${localRepository}"
+ * @readonly
+ * */
private org.apache.maven.artifact.repository.ArtifactRepository localRepository;
Show replies by date