Thanks for the reply.

Is it confirmed that this is an embedder bug?  Even if it is, is there
anything that could be done in m2eclipse to fix or work around it?

As for your comments regarding repos in poms, I am not sure I
understand. In a fresh install, if the repos are in the pom and in
source control, then there isn't a problem since the internal repos
would be defined in the pom. No changes to user settings.xml are needed.
If they are an employee of the corp, they have access to the internal
network and thus access to the internal repos. No need to copy
setting.xml files between developers. No fuss, no mess. Nice and easy.

If any repos change (public or internal), then the only thing that need
be changed is the parent POM file. The change in repos should get
inherited to all projects and developers working on those projects.  If
you put this information in the settings.xml you have to share the
changes will all developers.  I don't see this AT ALL as having
everything controlled in one place. This seems to much more spread out
and hard to manage.

Further, maybe some projects want to use a different internal
repository. How is that project supposed to share which repository it is
to use with the dev team?  What happens if the internal repos changes
(ie: go from Archiva to Nexus or some other management sytem?). If the
repos are stored in the pom, the change need only be done in one place,
and all developers then see that change once they get the new pom from
source control.  If this info is in settings.xml, you have to somehow
share the settings.xml with the rest of your team.  Repositories seem to
be a project concept not a user one and thus belong in the pom not
settings.

Or am I completely missing something regarding how maven works?  I am
still quite new to it and would really like to get the correct
understanding.

Are you saying the settings.xml is stored in source control? If so, then
can maven reference it without hardcoding the path to the settings.xml
file?  And how would you do this without submitting things like your
username and password to source control?

---
Todd Thiessen

-----Original Message-----
From: Brian E. Fox [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 13, 2008 11:05 AM
To: [email protected]
Subject: RE: [m2eclipse-user] Using an internal central repository
without changing settings.xml

Hi Todd,
Regarding why it's not working, I'm betting on a bug in the maven
embedder used by M2e since it should work.

Regarding putting repos into poms...this is a longer debate. The
recommended practice is as igor stated, to use settings.xml instead of
the pom. Particularly in a corp scenario, you will most likely want to
declare a corp repo in your corp pom. The trouble is however is how does
a fresh install find that corp pom without already knowing about the
corp repo? It leads you to a chicken or egg issue in the beginning.
Futher, specifying the urls in the poms makes it much harder to migrate
over time as machine names or ips change. All previously released poms
would no longer work.

If you're using a repo manager like Nexus, we recommend you specify
Nexus as a mirror in the settings and then control all other repos in
Nexus. This lets you control the entire environment from a single
location and there's minimal change to settings over time (really no
change unless you move Nexus).

-----Original Message-----
From: Todd Thiessen [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 11, 2008 4:26 PM
To: [email protected]
Subject: RE: [m2eclipse-user] Using an internal central repository
without changing settings.xml

If adding repository information to a pom is not recommend, how is one
supposed to get access to artifacts that are not in central?  It either
has to go in the pom or central needs to be mirrored to something in the
settings.xml file which actually does contain all the artifacts that
your project may need.

Settings.xml though is no better since all developers on your team must
share the same mirror definitions. This makes build environments very
unportable.  You can at least store poms in source control and other
members of your team will automatically have the new repository
definition.

On a side note, I will look into creating a bug report. Let me know
if/when you have duplicated the problem.


---
Todd Thiessen

-----Original Message-----
From: Igor Fedorenko [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 11, 2008 3:55 PM
To: [email protected]
Subject: Re: [m2eclipse-user] Using an internal central repository
without changing settings.xml

There is a chance version of maven embedder used by m2e does not
properly handle project-specific repository definitions. I will try to
reproduce this problem myself, but if you could create a bugreport in
JIRA [1] with sample project and steps to reproduce, this would
certainly help.

Also, adding repository definition to pom.xml files is generally not
recommended. This makes projects harder to move from one build
environment to another.

--
Regards,
Igor

Todd Thiessen wrote:
> I've overridden the central repo in my pom.  ie:
> 
>   <repositories>
>     <repository>
>       <id>central</id>
>       <url>http://localhost:8081/nexus/content/groups/public</url>
>     </repository>
>   </repositories>
>   <pluginRepositories>
>     <pluginRepository>
>       <id>central</id>
>       <url>http://localhost:8081/nexus/content/groups/public</url>
>     </pluginRepository>
>   </pluginRepositories>
> 
> But for some reason, m2e still downloads some of the artifacts from 
> the maven central repo.  Not all of them however.  When running the 
> project from m2e within eclipse I get as output (partial).
> 
> url = _http://localhost:8081/nexus/content/groups/public_
> Downloading: 
> _http://localhost:8081/nexus/content/groups/public/org/apache/maven/pl
> ugins/maven-resources-plugin/2.2/maven-resources-plugin-2.2.pom_
> 
> url = _http://repo1.maven.org/maven2_
> Downloading: 
> _http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-plugins/
> 1/maven-plugins-1.pom_
> 
> 
> However, if I execute the same build from the command line, all 
> downloads go to my central repo, which is what I would expect.  ie:
> 
> Downloading: 
> _http://localhost:8081/nexus/content/groups/public/org/apache/maven/pl
> ugins/maven-resources-plugin/2.2/maven-resources-plugin-2.2.pom_
> 
> Downloading: 
> _http://localhost:8081/nexus/content/groups/public/org/apache/maven/pl
> ugins/maven-plugins/1/maven-plugins-1.pom_
> 
> ---
> /Todd Thiessen/
> 


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to