default to group ID for package

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@234150 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-08-21 05:41:30 +00:00
parent 34e167076d
commit 3715ac2a6c
1 changed files with 7 additions and 2 deletions

View File

@ -87,8 +87,7 @@ public class MavenArchetypeMojo
private String version;
/**
* @parameter expression="${packageName}" alias="package" default-value="com.mycompany.app"
* @required
* @parameter expression="${packageName}" alias="package"
*/
private String packageName;
@ -125,6 +124,12 @@ public class MavenArchetypeMojo
" already exists - please run from a clean directory" );
}
if ( packageName == null )
{
getLog().info( "Defaulting package to group ID: " + groupId );
packageName = groupId;
}
// TODO: context mojo more appropriate?
Map map = new HashMap();
map.put( "outputDirectory", outputDirectory.getAbsolutePath() );