[jboss-as7-dev] Maven Repository Dependencies

Paul Gier pgier at redhat.com
Tue Feb 1 09:07:56 EST 2011


Max is correct that it's considered kind of an anti-pattern since it
will cause the repo to be added to the build of anyone who depends on
the artifact.  However, there isn't a good alternative.  Using
settings.xml is ok if you only ever use one set of repos for all your
projects, but it sucks if you have to regularly switch settings.

So for now I think the best solution is to include the repos in the
POMs, and the folks at Sonatype seems to think this is reasonable also
[1].  User's will have to use their own mirror settings to override
repos in the dependency POMs.  Longer term this should be fixed by
MNG-3056 [2].

[1]https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-6.CentralSyncRequirement
[2]http://jira.codehaus.org/browse/MNG-3056

On 01/25/2011 10:36 AM, Jason T. Greene wrote:
> CC'ing Paul
> 
> Paul,
> 
> You need to subscribe to jboss-as7-dev before replying...
> 
> Everyone,
> 
> The most recent thing I heard from Paul, is that pom.xml is the most
> practical way to solve the problem, and that the concerns previously
> raised about doing that are exaggerated.
> 
> I'll let him clarify.
> 
> On 1/25/11 10:33 AM, Max Andersen wrote:
>> Adding repositories into pom.XML is an antipattern since it gets
>> included in those who depend on it.
>>
>> You can put a settings.XML into your repo and use mvn -s settings.XML
>> when building.
>>
>> Sent from a mobile device
>>
>> On 25/01/2011, at 13.44, Darran Lofthouse<darran.lofthouse at jboss.com> 
>> wrote:
>>
>>> I was speaking to David yesterday and said I would raise a thread to see
>>> if there is a consistent approach that could be used for defining which
>>> repositories to use to download the dependencies for JBoss AS and the
>>> other smaller components.
>>>
>>> Personally I have had problems in the past trying to work with a single
>>> central configuration for repositories so I have been trying to avoid a
>>> central configuration as much as possible.
>>>
>>> For the actual AS build the repositories have been defined in the
>>> pom.xml so I was proposing a similar change for other modules that
>>> require some dependency from our Nexus repos e.g.
>>>
>>> https://github.com/darranl/jboss-dmr/commit/3b47d97410cdfd25845f1ff2399e1c96b7115811
>>>
>>>
>>> Does this make sense for all the smaller projects where required or do
>>> we still want changes to be made to a local settings.xml just to be able
>>> to build?
>>>
>>> Regards,
>>> Darran Lofthouse.
>>> _______________________________________________
>>> jboss-as7-dev mailing list
>>> jboss-as7-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>
>> _______________________________________________
>> jboss-as7-dev mailing list
>> jboss-as7-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
> 
> 




More information about the jboss-as7-dev mailing list