You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Campbell, Jeff" <Je...@intuit.com> on 2008/05/22 00:19:12 UTC

[archetype plugin] Cannot use "-DarchetypeRepository" if you have in your settings.xml file

I'm using the following command to create a new archetype project (only
the relevant portion of the command is below):

 

mvn archetype:generate -DarchetypeRepository=http://somehost.com/mvnrepo
........

 

But, because I have the following in my settings.xml file, I cannot
access the repository specified by the "-DarchetypeRepository":

 

    <mirrors>

        <mirror>

            <id>my.nexus</id>

            <name> Nexus Mirror</name>

            <url>http://somehost:8081/nexus/content/groups/public</url>

            <mirrorOf>*</mirrorOf>

        </mirror>

    </mirrors>

 

 

What can I do... besides remove the mirrors section all together, or
list every single mirror that I have (I really like have all our
developers with a simple entry in the settings.xml file and the mirrors
configured in Nexus, but I don't want to have to add every possible repo
that might have some archetype in nexus.... Hence the reason to use the
-DarchetypeRepository)?

 

Jeff


Re: [archetype plugin] Cannot use "-DarchetypeRepository" if you have in your settings.xml file

Posted by "Kaizer H. Sogiawala" <ka...@gmail.com>.
Hi Jeff,

You can try using -DarchetypeCatalog=http://somehost.com/mvnrepo.
Assuming that this URL has the archetype-catalog.xml file, it will
give you the same results as using -DarchetypeRepository.

Thanks!
-- 
Kaizer H. Sogiawala
.. The greatest trick the Devil ever pulled was convincing the world
that he didn't exist ..

On Wed, May 21, 2008 at 3:19 PM, Campbell, Jeff
<Je...@intuit.com> wrote:
> I'm using the following command to create a new archetype project (only
> the relevant portion of the command is below):
>
>
>
> mvn archetype:generate -DarchetypeRepository=http://somehost.com/mvnrepo
> ........
>
>
>
> But, because I have the following in my settings.xml file, I cannot
> access the repository specified by the "-DarchetypeRepository":
>
>
>
>    <mirrors>
>
>        <mirror>
>
>            <id>my.nexus</id>
>
>            <name> Nexus Mirror</name>
>
>            <url>http://somehost:8081/nexus/content/groups/public</url>
>
>            <mirrorOf>*</mirrorOf>
>
>        </mirror>
>
>    </mirrors>
>
>
>
>
>
> What can I do... besides remove the mirrors section all together, or
> list every single mirror that I have (I really like have all our
> developers with a simple entry in the settings.xml file and the mirrors
> configured in Nexus, but I don't want to have to add every possible repo
> that might have some archetype in nexus.... Hence the reason to use the
> -DarchetypeRepository)?
>
>
>
> Jeff
>
>

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