You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by nklein <no...@gmail.com> on 2009/12/09 19:24:43 UTC

Can't change packageName

I'm reading the Maven: Definitive Guide book to set up a project. In this
example from the book, I would like to change the packageName setting to
"XXX" as seen below:

mvn archetype:generate \
-DgroupId=org.sonatype.mavenbook \
-DartifactId=quickstart \
-Dversion=1.0-SNAPSHOT \
-DpackageName=org.XXX.mavenbook \
-DarchetypeGroupId=org.apache.maven.archetypes \
-DarchetypeArtifactId=maven-archetype-quickstart \
-DarchetypeVersion=1.0 \
-DinteractiveMode=false

But mvn produces the following output:

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO]
------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [archetype:generate] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] Setting property: classpath.resource.loader.class =>
'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [archetype:generate {execution: default-cli}]
[INFO] Generating project in Batch mode
[INFO] Archetype repository missing. Using the one from
[org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE] found in
catalog internal
[INFO]
----------------------------------------------------------------------------
[INFO] Using following parameters for creating OldArchetype:
maven-archetype-quickstart:1.0
[INFO]
----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: org.sonatype.mavenbook
[INFO] Parameter: packageName, Value: org.sonatype.mavenbook
[INFO] Parameter: package, Value: org.sonatype.mavenbook
[INFO] Parameter: artifactId, Value: quickstart
[INFO] Parameter: basedir, Value: c:\Temp
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] ********************* End of debug info from resources from generated
POM ***********************
[INFO] OldArchetype created in dir: c:\Temp\quickstart
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Wed Dec 09 10:22:44 PST 2009
[INFO] Final Memory: 8M/14M
[INFO]
------------------------------------------------------------------------

The packageName doesn't conform to the overridden value supplied on the
command line. Do I understand the purpose of the packageName correctly? I
thought it allowed users to override the default value to supply a project
specific value.

Thanks.
-- 
View this message in context: http://old.nabble.com/Can%27t-change-packageName-tp26715082p26715082.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Can't change packageName

Posted by Anders Hammar <an...@hammar.net>.
I'm not sure, but I think that the package property is archetype specific.
It's not listed on the archetype plugin doc site.
If you specify what archetype you're using maybe someone knows.

/Anders

On Thu, Dec 10, 2009 at 19:01, nklein <no...@gmail.com> wrote:

>
>
> Anders Hammar wrote:
> >
> > The book is wrong. "-DpackageName=org.XXX.mavenbook" should be
> > "-Dpackage=org.XXX.mavenbook".
> > Please help improving the book by creating a jira for this!
> > https://issues.sonatype.org/
> >
> > /Anders
> >
> >
>
> After updating this code to work with a Flex project (using
> org.sonatype.flexmojos), I still can't get the -Dpackage option to change
> the directory listing for ActionScript files. It seems to work fine with
> Java files. Is there any additional things that need to be performed to
> work
> with a Flex project?
>
> Thanks
> --
> View this message in context:
> http://old.nabble.com/Can%27t-change-packageName-tp26715082p26731862.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Can't change packageName

Posted by nklein <no...@gmail.com>.

Anders Hammar wrote:
> 
> The book is wrong. "-DpackageName=org.XXX.mavenbook" should be
> "-Dpackage=org.XXX.mavenbook".
> Please help improving the book by creating a jira for this!
> https://issues.sonatype.org/
> 
> /Anders
> 
> 

After updating this code to work with a Flex project (using
org.sonatype.flexmojos), I still can't get the -Dpackage option to change
the directory listing for ActionScript files. It seems to work fine with
Java files. Is there any additional things that need to be performed to work
with a Flex project?

Thanks
-- 
View this message in context: http://old.nabble.com/Can%27t-change-packageName-tp26715082p26731862.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Can't change packageName

Posted by Anders Hammar <an...@hammar.net>.
The book is wrong. "-DpackageName=org.XXX.mavenbook" should be
"-Dpackage=org.XXX.mavenbook".
Please help improving the book by creating a jira for this!
https://issues.sonatype.org/

/Anders

On Wed, Dec 9, 2009 at 19:24, nklein <no...@gmail.com> wrote:

>
> I'm reading the Maven: Definitive Guide book to set up a project. In this
> example from the book, I would like to change the packageName setting to
> "XXX" as seen below:
>
> mvn archetype:generate \
> -DgroupId=org.sonatype.mavenbook \
> -DartifactId=quickstart \
> -Dversion=1.0-SNAPSHOT \
> -DpackageName=org.XXX.mavenbook \
> -DarchetypeGroupId=org.apache.maven.archetypes \
> -DarchetypeArtifactId=maven-archetype-quickstart \
> -DarchetypeVersion=1.0 \
> -DinteractiveMode=false
>
> But mvn produces the following output:
>
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'archetype'.
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building Maven Default Project
> [INFO]    task-segment: [archetype:generate] (aggregator-style)
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Preparing archetype:generate
> [INFO] No goals needed for project - skipping
> [INFO] Setting property: classpath.resource.loader.class =>
> 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
> [INFO] Setting property: velocimacro.messages.on => 'false'.
> [INFO] Setting property: resource.loader => 'classpath'.
> [INFO] Setting property: resource.manager.logwhenfound => 'false'.
> [INFO] [archetype:generate {execution: default-cli}]
> [INFO] Generating project in Batch mode
> [INFO] Archetype repository missing. Using the one from
> [org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE] found in
> catalog internal
> [INFO]
>
> ----------------------------------------------------------------------------
> [INFO] Using following parameters for creating OldArchetype:
> maven-archetype-quickstart:1.0
> [INFO]
>
> ----------------------------------------------------------------------------
> [INFO] Parameter: groupId, Value: org.sonatype.mavenbook
> [INFO] Parameter: packageName, Value: org.sonatype.mavenbook
> [INFO] Parameter: package, Value: org.sonatype.mavenbook
> [INFO] Parameter: artifactId, Value: quickstart
> [INFO] Parameter: basedir, Value: c:\Temp
> [INFO] Parameter: version, Value: 1.0-SNAPSHOT
> [INFO] ********************* End of debug info from resources from
> generated
> POM ***********************
> [INFO] OldArchetype created in dir: c:\Temp\quickstart
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 1 second
> [INFO] Finished at: Wed Dec 09 10:22:44 PST 2009
> [INFO] Final Memory: 8M/14M
> [INFO]
> ------------------------------------------------------------------------
>
> The packageName doesn't conform to the overridden value supplied on the
> command line. Do I understand the purpose of the packageName correctly? I
> thought it allowed users to override the default value to supply a project
> specific value.
>
> Thanks.
> --
> View this message in context:
> http://old.nabble.com/Can%27t-change-packageName-tp26715082p26715082.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>