Skip to content

Commit

Permalink
FORGE-2186: Upgraded to Maven 3.2.5 and Aether 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Jan 22, 2015
1 parent 0d72a3f commit 4b69507
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 31 deletions.
23 changes: 9 additions & 14 deletions manager/resolver/maven/pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jboss.forge.furnace</groupId>
Expand All @@ -8,8 +9,8 @@
<artifactId>furnace-manager-resolver-maven</artifactId>
<name>Furnace - Manager Maven Resolver</name>
<properties>
<aether.version>0.9.0.M2</aether.version>
<maven.version>3.2.3</maven.version>
<aether.version>1.0.0.v20140518</aether.version>
<maven.version>3.2.5</maven.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -40,37 +41,31 @@
<groupId>org.apache.maven</groupId>
<artifactId>maven-aether-provider</artifactId>
<version>${maven.version}</version>
<exclusions>
<exclusion>
<groupId>org.eclipse.sisu</groupId>
<artifactId>org.eclipse.sisu.plexus</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>10.0.1</version>
<version>18.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.aether</groupId>
<artifactId>aether-connector-file</artifactId>
<artifactId>aether-connector-basic</artifactId>
<version>${aether.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.aether</groupId>
<artifactId>aether-connector-wagon</artifactId>
<artifactId>aether-transport-wagon</artifactId>
<version>${aether.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-http-lightweight</artifactId>
<version>2.4</version>
<version>2.8</version>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-file</artifactId>
<version>2.4</version>
<version>2.8</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import org.apache.maven.wagon.providers.http.LightweightHttpWagon;
import org.apache.maven.wagon.providers.http.LightweightHttpWagonAuthenticator;
import org.apache.maven.wagon.providers.http.LightweightHttpsWagon;
import org.eclipse.aether.connector.wagon.WagonProvider;
import org.eclipse.aether.transport.wagon.WagonProvider;

class ManualWagonProvider implements WagonProvider
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,16 @@
import org.eclipse.aether.DefaultRepositoryCache;
import org.eclipse.aether.DefaultRepositorySystemSession;
import org.eclipse.aether.RepositorySystem;
import org.eclipse.aether.connector.wagon.WagonProvider;
import org.eclipse.aether.connector.wagon.WagonRepositoryConnectorFactory;
import org.eclipse.aether.connector.basic.BasicRepositoryConnectorFactory;
import org.eclipse.aether.impl.DefaultServiceLocator;
import org.eclipse.aether.repository.Authentication;
import org.eclipse.aether.repository.LocalRepository;
import org.eclipse.aether.repository.RemoteRepository;
import org.eclipse.aether.repository.RepositoryPolicy;
import org.eclipse.aether.spi.connector.RepositoryConnectorFactory;
import org.eclipse.aether.spi.connector.transport.TransporterFactory;
import org.eclipse.aether.transport.wagon.WagonProvider;
import org.eclipse.aether.transport.wagon.WagonTransporterFactory;
import org.eclipse.aether.util.repository.AuthenticationBuilder;
import org.eclipse.aether.util.repository.DefaultMirrorSelector;
import org.eclipse.aether.util.repository.DefaultProxySelector;
Expand Down Expand Up @@ -205,7 +207,8 @@ public RepositorySystem getRepositorySystem()
locator.setServices(ModelBuilder.class, new DefaultModelBuilderFactory().newInstance());
// Installing Wagon to fetch from HTTP repositories
locator.setServices(WagonProvider.class, new ManualWagonProvider());
locator.addService(RepositoryConnectorFactory.class, WagonRepositoryConnectorFactory.class);
locator.addService(TransporterFactory.class, WagonTransporterFactory.class);
locator.addService(RepositoryConnectorFactory.class, BasicRepositoryConnectorFactory.class);
final RepositorySystem repositorySystem = locator.getService(RepositorySystem.class);
return repositorySystem;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ private DependencyNode traverseAddonGraph(String coords, RepositorySystem system
{
result = system.collectDependencies(session, collectRequest);
}
catch (DependencyCollectionException e)
catch (Exception e)
{
throw new RuntimeException(e);
}
Expand Down
8 changes: 5 additions & 3 deletions maven-plugin/pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jboss.forge.furnace</groupId>
Expand All @@ -11,12 +12,13 @@
<url>http://forge.jboss.org</url>

<prerequisites>
<maven>3.1</maven>
<!-- Minimum version is 3.2.5 because Aether has gone 1.0 since it -->
<maven>3.2.5</maven>
</prerequisites>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.maven>3.2.3</version.maven>
<version.maven>3.2.5</version.maven>
</properties>

<dependencies>
Expand Down
8 changes: 6 additions & 2 deletions test-harness/arquillian/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@

<artifactId>arquillian-forge-core</artifactId>
<name>Furnace - Arquillian Container Adapter - Core</name>
<properties>
<version.maven>3.2.5</version.maven>
</properties>


<dependencies>
<dependency>
Expand All @@ -33,12 +37,12 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.2.3</version>
<version>${version.maven}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-compat</artifactId>
<version>3.2.3</version>
<version>${version.maven}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.codehaus.plexus.ContainerConfiguration;
import org.codehaus.plexus.DefaultContainerConfiguration;
import org.codehaus.plexus.DefaultPlexusContainer;
import org.codehaus.plexus.PlexusConstants;
import org.codehaus.plexus.logging.console.ConsoleLoggerManager;
import org.jboss.forge.furnace.util.ClassLoaders;

Expand All @@ -19,7 +20,7 @@
*/
class PlexusContainer
{
private static org.codehaus.plexus.PlexusContainer plexusContainer;
private static org.codehaus.plexus.DefaultPlexusContainer plexusContainer;

public <T> T lookup(final Class<T> type)
{
Expand Down Expand Up @@ -49,25 +50,24 @@ public void shutdown()
}
}

private org.codehaus.plexus.PlexusContainer getPlexusContainer() throws Exception
private org.codehaus.plexus.DefaultPlexusContainer getPlexusContainer() throws Exception
{
if (plexusContainer == null)
{
plexusContainer = ClassLoaders.executeIn(Thread.currentThread().getContextClassLoader(),
new Callable<DefaultPlexusContainer>()
{

@Override
public DefaultPlexusContainer call() throws Exception
{
try
{
ContainerConfiguration config = new DefaultContainerConfiguration().setAutoWiring(true);
plexusContainer = new DefaultPlexusContainer(config);
ContainerConfiguration config = new DefaultContainerConfiguration().setAutoWiring(true).setClassPathScanning(PlexusConstants.SCANNING_INDEX);
DefaultPlexusContainer plexusContainer = new DefaultPlexusContainer(config);
ConsoleLoggerManager loggerManager = new ConsoleLoggerManager();
loggerManager.setThreshold("ERROR");
((DefaultPlexusContainer) plexusContainer).setLoggerManager(loggerManager);
return (DefaultPlexusContainer) plexusContainer;
plexusContainer.setLoggerManager(loggerManager);
return plexusContainer;
}
catch (Exception e)
{
Expand Down

0 comments on commit 4b69507

Please sign in to comment.