mirror of https://github.com/apache/maven.git
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:
parent
34e167076d
commit
3715ac2a6c
|
@ -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() );
|
||||
|
|
Loading…
Reference in New Issue