You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@archiva.apache.org by Edderd <ej...@summitbid.com> on 2008/11/12 14:20:35 UTC

archiva.xml or settings.xml

I've set up a new archiva repository wth the standard internal and snapshot
repos. It's working generally, but I believe I'm confused as to whether I
should configure it in my userhome/.m2/settings.xml or
userhome/.m2/archiva.xml. 

I installed it using docs from the book Java Power Tools which documented
the configuration using the settings.xml, and did not mention archiva.xml. 

I've always used settings.xml for all maven configurations in the past so
I'm a bit confused.

Can someone please advise me on the correct file to use and perhaps some
pointers to any resources discussing the difference? 

Thanks. 
-- 
View this message in context: http://www.nabble.com/archiva.xml-or-settings.xml-tp20460201p20460201.html
Sent from the archiva-users mailing list archive at Nabble.com.


Solved: archiva.xml or settings.xml

Posted by Edderd <ej...@summitbid.com>.
I think I got it, and you were correct about the mirrors descriptor in the
main settings.xml. I had only the internal repository listed and not the
snapshots repository. 

I had this: 
<mirror>
        <id>internal</id>
        <mirrorOf>*</mirrorOf>
        <url>http://localhost:8090/archiva/repository/internal</url>
        <name>Archiva Managed Internal Repository</name>
      </mirror>    

I added this: 
   
      <mirror>
        <id>snapshots</id>
        <mirrorOf>*</mirrorOf>
        <url>http://localhost:8090/archiva/repository/snapshots</url>
        <name>Archiva Managed Snapshot Repository</name>
      </mirror>    

I also added a proxy connector to check daily, but I don't think I need it,
but I don't fully understand what a proxy connector is for in this context. 

Thanks.


Wendy Smoak-3 wrote:
> 
> On Wed, Nov 12, 2008 at 2:55 PM, Edderd <ej...@summitbid.com> wrote:
> 
>> I'm running archiva as a standalone non appserver, and it's 1.1.3. It's a
>> jetty bundle (I had to modify the server port to 8090 so it didn't
>> collide
>> with my tomcat instance).
>>
>> I have since found that if I add a remote repository, the xml metadata is
>> added to the $ARCHIVA_HOME/conf/archiva.xml file, so I believe I'm
>> starting
>> to understand.
> 
> Ok.  If you also have a ~/.m2/archiva.xml file, it would be best to remove
> it.
> 
>> I'm familiar with using the settings.xml for maven, since that is
>> historically where I made local settings for plugins and repositories.
>> Must
>> I now remove any reference to remote repositories in that file?
> 
> If you want Maven to *only* access your Archiva instance, you'll
> probably want to configure repositories and mirrors in your
> settings.xml .  See if this helps, and ask if you need more info:
> http://maven.apache.org/guides/mini/guide-mirror-settings.html
> 
>> Another thing I still need to learn is how to enable one of my remote
>> repositories
>> Grails.org Snapshot Repository
>> Identifier      grails.snapshots
>> Name    Grails.org Snapshot Repository
>> URL     http://snapshots.repository.codehaus.org/
>> Type    Maven 2.x Repository
>>
>> for an archetype plugin snapshot. The archetype maven command returns:
>>
>> The desired archetype does not exist
>> (org.grails:grails-maven-archetype:1.0-SNAPSHOT)
>>
>> There's no ui control, so I'm guessing I need to edit the archiva.xml.
> 
> I'm not sure what you mean by enabling the repository.  Perhaps you
> need to add a proxy connector?
> 
> You might also be running into the default once per day check for
> updates.  Try adding -U on the command line to force Maven to check
> again.
> 
> -- 
> Wendy
> 
> 

-- 
View this message in context: http://www.nabble.com/archiva.xml-or-settings.xml-tp20460201p20471297.html
Sent from the archiva-users mailing list archive at Nabble.com.


Re: archiva.xml or settings.xml

Posted by Wendy Smoak <ws...@gmail.com>.
On Wed, Nov 12, 2008 at 2:55 PM, Edderd <ej...@summitbid.com> wrote:

> I'm running archiva as a standalone non appserver, and it's 1.1.3. It's a
> jetty bundle (I had to modify the server port to 8090 so it didn't collide
> with my tomcat instance).
>
> I have since found that if I add a remote repository, the xml metadata is
> added to the $ARCHIVA_HOME/conf/archiva.xml file, so I believe I'm starting
> to understand.

Ok.  If you also have a ~/.m2/archiva.xml file, it would be best to remove it.

> I'm familiar with using the settings.xml for maven, since that is
> historically where I made local settings for plugins and repositories. Must
> I now remove any reference to remote repositories in that file?

If you want Maven to *only* access your Archiva instance, you'll
probably want to configure repositories and mirrors in your
settings.xml .  See if this helps, and ask if you need more info:
http://maven.apache.org/guides/mini/guide-mirror-settings.html

> Another thing I still need to learn is how to enable one of my remote
> repositories
> Grails.org Snapshot Repository
> Identifier      grails.snapshots
> Name    Grails.org Snapshot Repository
> URL     http://snapshots.repository.codehaus.org/
> Type    Maven 2.x Repository
>
> for an archetype plugin snapshot. The archetype maven command returns:
>
> The desired archetype does not exist
> (org.grails:grails-maven-archetype:1.0-SNAPSHOT)
>
> There's no ui control, so I'm guessing I need to edit the archiva.xml.

I'm not sure what you mean by enabling the repository.  Perhaps you
need to add a proxy connector?

You might also be running into the default once per day check for
updates.  Try adding -U on the command line to force Maven to check
again.

-- 
Wendy

Re: archiva.xml or settings.xml

Posted by Edderd <ej...@summitbid.com>.
Hi Wendy, 

I'm running archiva as a standalone non appserver, and it's 1.1.3. It's a
jetty bundle (I had to modify the server port to 8090 so it didn't collide
with my tomcat instance).  

I have since found that if I add a remote repository, the xml metadata is
added to the $ARCHIVA_HOME/conf/archiva.xml file, so I believe I'm starting
to understand. 

I'm familiar with using the settings.xml for maven, since that is
historically where I made local settings for plugins and repositories. Must
I now remove any reference to remote repositories in that file?


Another thing I still need to learn is how to enable one of my remote
repositories
Grails.org Snapshot Repository
Identifier 	grails.snapshots
Name 	Grails.org Snapshot Repository
URL 	http://snapshots.repository.codehaus.org/
Type 	Maven 2.x Repository

for an archetype plugin snapshot. The archetype maven command returns:

The desired archetype does not exist
(org.grails:grails-maven-archetype:1.0-SNAPSHOT)

There's no ui control, so I'm guessing I need to edit the archiva.xml. 

I'll do some more research on that one. 

Thanks. 



Wendy Smoak-3 wrote:
> 
> On Wed, Nov 12, 2008 at 6:20 AM, Edderd <ej...@summitbid.com> wrote:
>> I've set up a new archiva repository wth the standard internal and
>> snapshot
>> repos. It's working generally, but I believe I'm confused as to whether I
>> should configure it in my userhome/.m2/settings.xml or
>> userhome/.m2/archiva.xml.
> 
> What version?  Is it running as the standalone Jetty bundle or did you
> deploy the war to an appserver?
> 
> The archiva.xml file is for the Archiva configuration -- the path to
> the managed repositories on disk, the consumers, the proxy connectors,
> etc.  If running standalone it should be in $ARCHIVA_HOME/conf.  If
> that file doesn't exist it will use ~/.m2/archiva.xml.
> 
> The ~/.m2/settings.xml file is for developer-specific Maven configuration.
> 
> -- 
> Wendy
> 
> 

-- 
View this message in context: http://www.nabble.com/archiva.xml-or-settings.xml-tp20460201p20469982.html
Sent from the archiva-users mailing list archive at Nabble.com.


Re: archiva.xml or settings.xml

Posted by Wendy Smoak <ws...@gmail.com>.
On Wed, Nov 12, 2008 at 6:20 AM, Edderd <ej...@summitbid.com> wrote:
> I've set up a new archiva repository wth the standard internal and snapshot
> repos. It's working generally, but I believe I'm confused as to whether I
> should configure it in my userhome/.m2/settings.xml or
> userhome/.m2/archiva.xml.

What version?  Is it running as the standalone Jetty bundle or did you
deploy the war to an appserver?

The archiva.xml file is for the Archiva configuration -- the path to
the managed repositories on disk, the consumers, the proxy connectors,
etc.  If running standalone it should be in $ARCHIVA_HOME/conf.  If
that file doesn't exist it will use ~/.m2/archiva.xml.

The ~/.m2/settings.xml file is for developer-specific Maven configuration.

-- 
Wendy

Re: archiva.xml or settings.xml

Posted by Marco Huber <mh...@project-team.de>.
Hi Edderd,

as far as I know is the settings.xml only for maven. The archiva.xml  
contains the
configuration of your whole archiva instance. If you have no  
archiva.xml under ~/.m2 it
will use the configuration under your archiva installation folder.

Maybe take a look in the documentation under "Configuration Files".

Hope that helps.
Marco

Zitat von Edderd <ej...@summitbid.com>:

>
> Ok, I believe that the difference is that archiva.xml is used if archiva is
> set up as a standalone repository.
>
> I think the distinction is that If it's not standalone, it's deployed as a
> web app on Tomcat, for instance, as opposed to running standalone, it runs
> as a service controlled by the init.d scripts (Ubuntu)
>
> Sound right?
>
> Mine is running as a service on an Ubuntu linux box (controlled via
> /etc/init.d/archiva) so I guess that makes it standalone, and therefore I
> think I need to use the archiva.xml to configure it...
>
> Am I understanding this correctly?
>
> If so, I need to migrate my configurations from settings.xml to archiva.xml.
>
> Are there any hooks that I need to add to my settings.xml to reference the
> archiva.xml file?
>
> Am I on the right track?
>
> Thanks.
>
>
>
> Edderd wrote:
>>
>> I've set up a new archiva repository wth the standard internal and
>> snapshot repos. It's working generally, but I believe I'm confused as to
>> whether I should configure it in my userhome/.m2/settings.xml or
>> userhome/.m2/archiva.xml.
>>
>> I installed it using docs from the book Java Power Tools which documented
>> the configuration using the settings.xml, and did not mention archiva.xml.
>>
>> I've always used settings.xml for all maven configurations in the past so
>> I'm a bit confused.
>>
>> Can someone please advise me on the correct file to use and perhaps some
>> pointers to any resources discussing the difference?
>>
>> Thanks.
>>
>
> --
> View this message in context:   
> http://www.nabble.com/archiva.xml-or-settings.xml-tp20460201p20460707.html
> Sent from the archiva-users mailing list archive at Nabble.com.
>
>




Re: archiva.xml or settings.xml

Posted by Edderd <ej...@summitbid.com>.
Ok, I believe that the difference is that archiva.xml is used if archiva is
set up as a standalone repository.  

I think the distinction is that If it's not standalone, it's deployed as a
web app on Tomcat, for instance, as opposed to running standalone, it runs
as a service controlled by the init.d scripts (Ubuntu)

Sound right? 

Mine is running as a service on an Ubuntu linux box (controlled via
/etc/init.d/archiva) so I guess that makes it standalone, and therefore I
think I need to use the archiva.xml to configure it...

Am I understanding this correctly?

If so, I need to migrate my configurations from settings.xml to archiva.xml. 

Are there any hooks that I need to add to my settings.xml to reference the
archiva.xml file?

Am I on the right track?

Thanks. 



Edderd wrote:
> 
> I've set up a new archiva repository wth the standard internal and
> snapshot repos. It's working generally, but I believe I'm confused as to
> whether I should configure it in my userhome/.m2/settings.xml or
> userhome/.m2/archiva.xml. 
> 
> I installed it using docs from the book Java Power Tools which documented
> the configuration using the settings.xml, and did not mention archiva.xml. 
> 
> I've always used settings.xml for all maven configurations in the past so
> I'm a bit confused.
> 
> Can someone please advise me on the correct file to use and perhaps some
> pointers to any resources discussing the difference? 
> 
> Thanks. 
> 

-- 
View this message in context: http://www.nabble.com/archiva.xml-or-settings.xml-tp20460201p20460707.html
Sent from the archiva-users mailing list archive at Nabble.com.