diff --git a/elytron/pom.xml b/elytron/pom.xml index 86650c283bf..90de1a8fe79 100644 --- a/elytron/pom.xml +++ b/elytron/pom.xml @@ -391,6 +391,16 @@ test + + com.google.guava + guava + test + + + org.apache.commons + commons-lang3 + test + diff --git a/model-test/src/main/java/org/jboss/as/model/test/MavenUtil.java b/model-test/src/main/java/org/jboss/as/model/test/MavenUtil.java index dcda64b191d..27046ad537c 100644 --- a/model-test/src/main/java/org/jboss/as/model/test/MavenUtil.java +++ b/model-test/src/main/java/org/jboss/as/model/test/MavenUtil.java @@ -19,9 +19,11 @@ import java.util.concurrent.ConcurrentHashMap; import org.apache.maven.repository.internal.DefaultArtifactDescriptorReader; +import org.apache.maven.repository.internal.DefaultModelCacheFactory; import org.apache.maven.repository.internal.DefaultVersionRangeResolver; import org.apache.maven.repository.internal.DefaultVersionResolver; import org.apache.maven.repository.internal.MavenRepositorySystemUtils; +import org.apache.maven.repository.internal.ModelCacheFactory; import org.apache.maven.repository.internal.SnapshotMetadataGeneratorFactory; import org.apache.maven.repository.internal.VersionsMetadataGeneratorFactory; import org.eclipse.aether.AbstractRepositoryListener; @@ -281,8 +283,6 @@ private RepositorySystemSession newRepositorySystemSession() { return this.session; } DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession(); - - LocalRepository localRepo = new LocalRepository(mavenSettings.getLocalRepository().toString()); session.setLocalRepositoryManager(REPOSITORY_SYSTEM.newLocalRepositoryManager(session, localRepo)); @@ -295,6 +295,11 @@ public void transferFailed(TransferEvent event) { super.transferFailed(event); } }); + + // these properties are needed by Maven to correctly parse poms when resolving nested dependencies + session.setSystemProperty("java.version", System.getProperty("java.version")); + session.setSystemProperty("java.home", System.getProperty("java.home")); + this.session = session; return session; } @@ -312,11 +317,14 @@ static RepositorySystem newRepositorySystem() { */ DefaultServiceLocator locator = new DefaultServiceLocator(); + + locator.addService(ArtifactDescriptorReader.class, DefaultArtifactDescriptorReader.class); locator.addService(VersionResolver.class, DefaultVersionResolver.class); locator.addService(VersionRangeResolver.class, DefaultVersionRangeResolver.class); locator.addService(MetadataGeneratorFactory.class, SnapshotMetadataGeneratorFactory.class); locator.addService(MetadataGeneratorFactory.class, VersionsMetadataGeneratorFactory.class); + locator.addService(ModelCacheFactory.class, DefaultModelCacheFactory.class); locator.setErrorHandler(new MyErrorHandler()); locator.addService(RepositoryConnectorFactory.class, BasicRepositoryConnectorFactory.class); diff --git a/pom.xml b/pom.xml index dd6cc55501d..ae85ae6f763 100644 --- a/pom.xml +++ b/pom.xml @@ -196,8 +196,8 @@ 4.5.14 4.4.16 2.23.1 - 3.5.4 - 1.1.1 + 3.9.9 + 1.9.22 2.14.0 2.3 1.79 diff --git a/testsuite/shared/pom.xml b/testsuite/shared/pom.xml index bbff05368bd..9c124bf8fd8 100644 --- a/testsuite/shared/pom.xml +++ b/testsuite/shared/pom.xml @@ -67,6 +67,15 @@ shrinkwrap-impl-base + + com.google.guava + guava + + + org.apache.commons + commons-lang3 + + org.jboss.logging jboss-logging