Skip to content

Commit

Permalink
configure MavenDependencyResolver from settings.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
maschmid committed Sep 20, 2011
1 parent 34cb754 commit 1bd8f76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions settings.xml
Expand Up @@ -3,6 +3,7 @@
<profile>
<id>jboss-public-repository</id>
<activation>
<activeByDefault>true</activeByDefault>
<property>
<name>jboss-public-repository</name>
<value>!false</value>
Expand Down
Expand Up @@ -92,10 +92,12 @@ public static Collection<JavaArchive> solderLibraryWithTransitives() {

private static Collection<JavaArchive> getLib(String artifact, boolean strictFilter) {
if (!libs.containsKey(artifact)) {
MavenDependencyResolver res = DependencyResolvers.use(MavenDependencyResolver.class).loadReposFromPom("pom.xml")
MavenDependencyResolver res = DependencyResolvers.use(MavenDependencyResolver.class)
.configureFrom("../../settings.xml")
.loadReposFromPom("pom.xml")
.artifact(artifact);
libs.put(artifact, strictFilter ? res.resolveAs(JavaArchive.class, new StrictFilter()) : res.resolveAs(JavaArchive.class));
}
return libs.get(artifact);
}
}
}

0 comments on commit 1bd8f76

Please sign in to comment.