Return-Path: X-Original-To: apmail-continuum-commits-archive@www.apache.org Delivered-To: apmail-continuum-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 05A3E1190B for ; Fri, 16 May 2014 22:57:13 +0000 (UTC) Received: (qmail 80699 invoked by uid 500); 16 May 2014 11:48:53 -0000 Delivered-To: apmail-continuum-commits-archive@continuum.apache.org Received: (qmail 32201 invoked by uid 500); 16 May 2014 11:28:13 -0000 Mailing-List: contact commits-help@continuum.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@continuum.apache.org Delivered-To: mailing list commits@continuum.apache.org Received: (qmail 35806 invoked by uid 99); 16 May 2014 11:10:13 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 May 2014 11:10:13 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 May 2014 13:56:49 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 9831F238889B; Thu, 15 May 2014 13:56:24 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1594919 - in /continuum/trunk: ./ continuum-artifact-manager/ continuum-artifact-manager/src/ continuum-artifact-manager/src/main/ continuum-artifact-manager/src/main/java/ continuum-artifact-manager/src/main/java/org/ continuum-artifact-m... Date: Thu, 15 May 2014 13:56:24 -0000 To: commits@continuum.apache.org From: brett@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140515135624.9831F238889B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: brett Date: Thu May 15 13:56:23 2014 New Revision: 1594919 URL: http://svn.apache.org/r1594919 Log: [CONTINUUM-2149] globally apply wagon manager fix Was not present in build agents. Instead, replace the maven-artifact-manager JAR with our customised version Added: continuum/trunk/continuum-artifact-manager/ (with props) continuum/trunk/continuum-artifact-manager/pom.xml (with props) continuum/trunk/continuum-artifact-manager/src/ continuum/trunk/continuum-artifact-manager/src/main/ continuum/trunk/continuum-artifact-manager/src/main/java/ continuum/trunk/continuum-artifact-manager/src/main/java/org/ continuum/trunk/continuum-artifact-manager/src/main/java/org/apache/ continuum/trunk/continuum-artifact-manager/src/main/java/org/apache/maven/ continuum/trunk/continuum-artifact-manager/src/main/java/org/apache/maven/artifact/ continuum/trunk/continuum-artifact-manager/src/main/java/org/apache/maven/artifact/manager/ continuum/trunk/continuum-artifact-manager/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java - copied, changed from r1594589, continuum/trunk/continuum-core/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java Removed: continuum/trunk/continuum-core/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/pom.xml continuum/trunk/continuum-core/pom.xml continuum/trunk/continuum-data-management/data-management-cli/pom.xml continuum/trunk/continuum-notifiers/continuum-notifier-wagon/pom.xml continuum/trunk/continuum-release/pom.xml continuum/trunk/pom.xml Propchange: continuum/trunk/continuum-artifact-manager/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Thu May 15 13:56:23 2014 @@ -0,0 +1,2 @@ +*.iml +target Added: continuum/trunk/continuum-artifact-manager/pom.xml URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-artifact-manager/pom.xml?rev=1594919&view=auto ============================================================================== --- continuum/trunk/continuum-artifact-manager/pom.xml (added) +++ continuum/trunk/continuum-artifact-manager/pom.xml Thu May 15 13:56:23 2014 @@ -0,0 +1,85 @@ + + + 4.0.0 + + org.apache.continuum + continuum + 1.4.2-SNAPSHOT + + continuum-artifact-manager + Continuum :: Replacement Artifact Manager + + Patched DefaultWagonManager for compatibility with plexus-spring + + + + org.apache.maven + maven-artifact-manager + + + + org.apache.maven + maven-repository-metadata + + + org.codehaus.plexus + plexus-utils + + + org.apache.maven + maven-artifact + + + org.codehaus.plexus + plexus-container-default + + + org.apache.maven.wagon + wagon-provider-api + + + backport-util-concurrent + backport-util-concurrent + + + + + + org.apache.maven.plugins + maven-shade-plugin + 1.6 + + + package + + shade + + + + + + + org.apache.maven:maven-artifact-manager + + + + + org.apache.maven:maven-artifact-manager + + org/apache/maven/artifact/manager/DefaultWagonManager* + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + true + + + + + Propchange: continuum/trunk/continuum-artifact-manager/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Copied: continuum/trunk/continuum-artifact-manager/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java (from r1594589, continuum/trunk/continuum-core/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java) URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-artifact-manager/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java?p2=continuum/trunk/continuum-artifact-manager/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java&p1=continuum/trunk/continuum-core/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java&r1=1594589&r2=1594919&rev=1594919&view=diff ============================================================================== --- continuum/trunk/continuum-core/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java (original) +++ continuum/trunk/continuum-artifact-manager/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java Thu May 15 13:56:23 2014 @@ -41,13 +41,10 @@ import org.apache.maven.wagon.repository import org.apache.maven.wagon.repository.RepositoryPermissions; import org.codehaus.plexus.PlexusConstants; import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; -import org.codehaus.plexus.component.configurator.ComponentConfigurator; import org.codehaus.plexus.component.repository.exception.ComponentLifecycleException; import org.codehaus.plexus.component.repository.exception.ComponentLookupException; import org.codehaus.plexus.configuration.PlexusConfiguration; import org.codehaus.plexus.configuration.PlexusConfigurationException; -import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration; import org.codehaus.plexus.context.Context; import org.codehaus.plexus.context.ContextException; import org.codehaus.plexus.logging.AbstractLogEnabled; @@ -100,9 +97,6 @@ public class DefaultWagonManager //used LinkedMap to preserve the order. private Map mirrors = new LinkedHashMap(); - /** Map( String, XmlPlexusConfiguration ) with the repository id and the wagon configuration */ - private Map serverConfigurationMap = new HashMap(); - private Map serverWagonProviderMap = new HashMap(); private TransferListener downloadMonitor; @@ -134,8 +128,6 @@ public class DefaultWagonManager Wagon wagon = getWagon( protocol, repository.getId() ); - configureWagon( wagon, repository.getId(), protocol ); - return wagon; } @@ -250,8 +242,6 @@ public class DefaultWagonManager try { wagon = getWagon( protocol, repository.getId() ); - - configureWagon( wagon, repository ); } catch ( UnsupportedProtocolException e ) { @@ -469,8 +459,6 @@ public class DefaultWagonManager try { wagon = getWagon( protocol, repository.getId() ); - - configureWagon( wagon, repository ); } catch ( UnsupportedProtocolException e ) { @@ -1082,93 +1070,6 @@ public class DefaultWagonManager } } - /** - * Applies the server configuration to the wagon - * - * @param wagon the wagon to configure - * @param repository the repository that has the configuration - * @throws WagonConfigurationException wraps any error given during configuration of the wagon instance - */ - private void configureWagon( Wagon wagon, - ArtifactRepository repository ) - throws WagonConfigurationException - { - configureWagon( wagon, repository.getId(), repository.getProtocol() ); - } - - private void configureWagon( Wagon wagon, String repositoryId, String protocol ) - throws WagonConfigurationException - { - PlexusConfiguration config = serverConfigurationMap.get( repositoryId ); - if ( config != null ) - { - getLogger().warn( "Unsupported configuration: " + config + " for wagon " + protocol ); - } - } - - // TODO: Remove this, once the maven-shade-plugin 1.2 release is out, allowing configuration of httpHeaders in the components.xml - private PlexusConfiguration updateUserAgentForHttp( Wagon wagon, PlexusConfiguration config ) - { - if ( config == null ) - { - config = new XmlPlexusConfiguration( "configuration" ); - } - - if ( httpUserAgent != null ) - { - try - { - wagon.getClass().getMethod( "setHttpHeaders", new Class[]{ Properties.class } ); - - PlexusConfiguration headerConfig = config.getChild( "httpHeaders", true ); - PlexusConfiguration[] children = headerConfig.getChildren( "property" ); - boolean found = false; - - getLogger().debug( "Checking for pre-existing User-Agent configuration." ); - for ( int i = 0; i < children.length; i++ ) - { - PlexusConfiguration c = children[i].getChild( "name", false ); - if ( c != null && "User-Agent".equals( c.getValue( null ) ) ) - { - found = true; - break; - } - } - - if ( !found ) - { - getLogger().debug( "Adding User-Agent configuration." ); - XmlPlexusConfiguration propertyConfig = new XmlPlexusConfiguration( "property" ); - headerConfig.addChild( propertyConfig ); - - XmlPlexusConfiguration nameConfig = new XmlPlexusConfiguration( "name" ); - nameConfig.setValue( "User-Agent" ); - propertyConfig.addChild( nameConfig ); - - XmlPlexusConfiguration versionConfig = new XmlPlexusConfiguration( "value" ); - versionConfig.setValue( httpUserAgent ); - propertyConfig.addChild( versionConfig ); - } - else - { - getLogger().debug( "User-Agent configuration found." ); - } - } - catch ( SecurityException e ) - { - getLogger().debug( "setHttpHeaders method not accessible on wagon: " + wagon + "; skipping User-Agent configuration." ); - // forget it. this method is public, if it exists. - } - catch ( NoSuchMethodException e ) - { - getLogger().debug( "setHttpHeaders method not found on wagon: " + wagon + "; skipping User-Agent configuration." ); - // forget it. - } - } - - return config; - } - public void addConfiguration( String repositoryId, Xpp3Dom configuration ) { @@ -1177,22 +1078,7 @@ public class DefaultWagonManager throw new IllegalArgumentException( "arguments can't be null" ); } - final XmlPlexusConfiguration xmlConf = new XmlPlexusConfiguration( configuration ); - - for ( int i = 0; i < configuration.getChildCount(); i++ ) - { - Xpp3Dom domChild = configuration.getChild( i ); - if ( WAGON_PROVIDER_CONFIGURATION.equals( domChild.getName() ) ) - { - serverWagonProviderMap.put( repositoryId, domChild.getValue() ); - configuration.removeChild( i ); - break; - } - - i++; - } - - serverConfigurationMap.put( repositoryId, xmlConf ); + getLogger().warn( "Unsupported configuration: " + configuration + " for repository " + repositoryId ); } public void setDefaultRepositoryPermissions( RepositoryPermissions defaultRepositoryPermissions ) Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/pom.xml URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/pom.xml?rev=1594919&r1=1594918&r2=1594919&view=diff ============================================================================== --- continuum/trunk/continuum-buildagent/continuum-buildagent-core/pom.xml (original) +++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/pom.xml Thu May 15 13:56:23 2014 @@ -110,10 +110,6 @@ org.apache.maven - maven-artifact-manager - - - org.apache.maven maven-settings Modified: continuum/trunk/continuum-core/pom.xml URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/pom.xml?rev=1594919&r1=1594918&r2=1594919&view=diff ============================================================================== --- continuum/trunk/continuum-core/pom.xml (original) +++ continuum/trunk/continuum-core/pom.xml Thu May 15 13:56:23 2014 @@ -50,10 +50,6 @@ maven-settings - org.apache.maven - maven-artifact-manager - - org.apache.continuum continuum-notifier-api Modified: continuum/trunk/continuum-data-management/data-management-cli/pom.xml URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-data-management/data-management-cli/pom.xml?rev=1594919&r1=1594918&r2=1594919&view=diff ============================================================================== --- continuum/trunk/continuum-data-management/data-management-cli/pom.xml (original) +++ continuum/trunk/continuum-data-management/data-management-cli/pom.xml Thu May 15 13:56:23 2014 @@ -37,8 +37,8 @@ maven-artifact - org.apache.maven - maven-artifact-manager + org.apache.continuum + continuum-artifact-manager org.apache.maven Modified: continuum/trunk/continuum-notifiers/continuum-notifier-wagon/pom.xml URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-notifiers/continuum-notifier-wagon/pom.xml?rev=1594919&r1=1594918&r2=1594919&view=diff ============================================================================== --- continuum/trunk/continuum-notifiers/continuum-notifier-wagon/pom.xml (original) +++ continuum/trunk/continuum-notifiers/continuum-notifier-wagon/pom.xml Thu May 15 13:56:23 2014 @@ -33,8 +33,8 @@ maven-artifact - org.apache.maven - maven-artifact-manager + org.apache.continuum + continuum-artifact-manager org.apache.maven Modified: continuum/trunk/continuum-release/pom.xml URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-release/pom.xml?rev=1594919&r1=1594918&r2=1594919&view=diff ============================================================================== --- continuum/trunk/continuum-release/pom.xml (original) +++ continuum/trunk/continuum-release/pom.xml Thu May 15 13:56:23 2014 @@ -82,8 +82,8 @@ maven-artifact - org.apache.maven - maven-artifact-manager + org.apache.continuum + continuum-artifact-manager org.apache.maven.release Modified: continuum/trunk/pom.xml URL: http://svn.apache.org/viewvc/continuum/trunk/pom.xml?rev=1594919&r1=1594918&r2=1594919&view=diff ============================================================================== --- continuum/trunk/pom.xml (original) +++ continuum/trunk/pom.xml Thu May 15 13:56:23 2014 @@ -41,7 +41,7 @@ 8.1.7.v20120910 ${project.version} - + 2.2.1 2.5.6 2.3.14.2 @@ -251,6 +251,7 @@ xml-apis:xml-apis jtidy:jtidy jdom:jdom + org.apache.maven:maven-artifact-manager @@ -335,6 +336,7 @@ continuum-buildagent continuum-distributed continuum-builder + continuum-artifact-manager