Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed all the plugins to use the new eclipse aether libraries for comp... #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import org.apache.maven.shared.filtering.MavenResourcesExecution
import org.codehaus.plexus.util.FileUtils
import org.gcontracts.annotations.Ensures
import org.gcontracts.annotations.Requires
import org.sonatype.aether.deployment.DeployRequest
import org.sonatype.aether.repository.RemoteRepository
import org.sonatype.aether.resolution.ArtifactDescriptorRequest
import org.eclipse.aether.deployment.DeployRequest
import org.eclipse.aether.repository.RemoteRepository
import org.eclipse.aether.resolution.ArtifactDescriptorRequest
import org.apache.maven.shared.filtering.DefaultMavenFileFilter.Wrapper
import java.util.jar.Attributes
import java.util.jar.Manifest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package com.github.goldin.plugins.ivy
import static com.github.goldin.plugins.common.GMojoUtils.*
import org.gcontracts.annotations.Ensures
import org.gcontracts.annotations.Requires
import org.sonatype.aether.RepositorySystemSession
import org.sonatype.aether.impl.ArtifactResolver
import org.sonatype.aether.resolution.ArtifactRequest
import org.sonatype.aether.resolution.ArtifactResult
import org.sonatype.aether.util.artifact.DefaultArtifact
import org.eclipse.aether.impl.ArtifactResolver
import org.eclipse.aether.RepositorySystemSession
import org.eclipse.aether.resolution.ArtifactRequest
import org.eclipse.aether.resolution.ArtifactResult
import org.eclipse.aether.artifact.DefaultArtifact


/**
Expand Down Expand Up @@ -46,8 +46,8 @@ class IvyArtifactResolver implements ArtifactResolver {
final extension = a.extension
// Artifact may have no "file" set if resolution fails and helper's "failOnError" is "false"
final artifact = ivyHelper.resolve( organisation, name, revision, extension, pattern )
final result = new ArtifactResult( request ) // org.sonatype.aether.resolution.ArtifactResult
result.artifact = new DefaultArtifact( organisation, name, extension, revision ) // org.sonatype.aether.util.artifact.DefaultArtifact
final result = new ArtifactResult( request ) // org.eclipse.aether.resolution.ArtifactResult
result.artifact = new DefaultArtifact( organisation, name, extension, revision ) // org.eclipse.aether.util.artifact.DefaultArtifact
if ( artifact.file )
{
result.artifact = result.artifact.setFile( artifact.file )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import org.apache.maven.plugins.annotations.LifecyclePhase
import org.apache.maven.plugins.annotations.Mojo
import org.apache.maven.plugins.annotations.Parameter
import org.apache.maven.plugins.annotations.ResolutionScope
import org.eclipse.aether.internal.impl.DefaultRepositorySystem
import org.gcontracts.annotations.Ensures
import org.gcontracts.annotations.Requires
import org.sonatype.aether.impl.internal.DefaultRepositorySystem


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ class Mail
String recipients
boolean sendForUnstable = true
boolean sendToIndividuals = true
boolean perModuleEmail = true
}
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ ${ new DescriptionTableMarkup( job, jobs, indent, newLine ).markup }
recipients( job.mail.recipients )
dontNotifyEveryUnstableBuild( ! job.mail.sendForUnstable )
sendToIndividuals( job.mail.sendToIndividuals )
perModuleEmail( job.mail.perModuleEmail )
}
}
}
Expand Down
14 changes: 5 additions & 9 deletions maven-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,28 +105,24 @@
</dependency>

<dependency>
<groupId>org.sonatype.aether</groupId>
<groupId>org.eclipse.aether</groupId>
<artifactId>aether-api</artifactId>
<version>${aether-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.sonatype.aether</groupId>
<groupId>org.eclipse.aether</groupId>
<artifactId>aether-util</artifactId>
<version>${aether-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.sonatype.aether</groupId>
<groupId>org.eclipse.aether</groupId>
<artifactId>aether-impl</artifactId>
<version>${aether-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.sonatype.aether</groupId>
<artifactId>aether-connector-wagon</artifactId>
<groupId>org.eclipse.aether</groupId>
<artifactId>aether-spi</artifactId>
<version>${aether-version}</version>
<scope>provided</scope>
</dependency>

<!-- ~~~~~~~~~~~~~~~~~~~~~~~ -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ import org.codehaus.plexus.DefaultPlexusContainer
import org.gcontracts.annotations.Ensures
import org.gcontracts.annotations.Requires
import org.slf4j.LoggerFactory
import org.sonatype.aether.RepositorySystem
import org.sonatype.aether.RepositorySystemSession
import org.sonatype.aether.repository.RemoteRepository
import org.sonatype.aether.resolution.ArtifactRequest
import org.eclipse.aether.RepositorySystem
import org.eclipse.aether.RepositorySystemSession
import org.eclipse.aether.repository.RemoteRepository
import org.eclipse.aether.resolution.ArtifactRequest
import org.springframework.util.ReflectionUtils
import java.lang.reflect.Field
import java.lang.reflect.Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ final class ConversionUtils

@Requires({ aetherDependency })
@Ensures ({ result })
static org.apache.maven.artifact.Artifact toMavenArtifact ( org.sonatype.aether.graph.Dependency aetherDependency )
static org.apache.maven.artifact.Artifact toMavenArtifact ( org.eclipse.aether.graph.Dependency aetherDependency )
{
aetherDependency.artifact.with {
toMavenArtifact( groupId, artifactId, version, aetherDependency.scope, extension, classifier, aetherDependency.optional, file )
Expand All @@ -65,10 +65,10 @@ final class ConversionUtils

@Requires({ mavenArtifact })
@Ensures ({ result })
static org.sonatype.aether.artifact.Artifact toAetherArtifact ( org.apache.maven.artifact.Artifact mavenArtifact )
static org.eclipse.aether.artifact.Artifact toAetherArtifact ( org.apache.maven.artifact.Artifact mavenArtifact )
{
mavenArtifact.with {
new org.sonatype.aether.util.artifact.DefaultArtifact(
new org.eclipse.aether.artifact.DefaultArtifact(
groupId, artifactId, classifier, type, version, null, file )
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class SilentLogger extends org.apache.log4j.Logger
implements org.apache.maven.plugin.logging.Log,
org.codehaus.plexus.logging.Logger,
org.apache.commons.logging.Log,
org.sonatype.aether.spi.log.Logger,
org.eclipse.aether.spi.log.Logger,
org.slf4j.Logger,
org.apache.ivy.util.MessageLogger
{
Expand Down
23 changes: 6 additions & 17 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<java-version>1.6</java-version>

<!-- http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.apache.maven%22%20AND%20a%3A%22maven-core%22 -->
<maven-version>3.0.5</maven-version>
<maven-version>3.2.1</maven-version>

<!-- http://evgenyg.artifactoryonline.com/evgenyg/plugins-releases/com/github/goldin/about-maven-plugin/ -->
<previous-plugins-version>0.3-beta-1</previous-plugins-version>
Expand All @@ -79,7 +79,7 @@
<ant-version>1.9.1</ant-version>

<!-- http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.sonatype.aether%22%20AND%20a%3A%22aether-api%22 -->
<aether-version>1.13.1</aether-version>
<aether-version>0.9.1.v20140329</aether-version>

<!-- http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.gcontracts%22%20AND%20a%3A%22gcontracts-core%22 -->
<gcontracts-version>1.2.12</gcontracts-version>
Expand Down Expand Up @@ -235,23 +235,12 @@
<groupId>org.codehaus.gmaven.runtime</groupId>
<artifactId>gmaven-runtime-2.0</artifactId>
<version>${gmaven-version}</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>${groovy-version}</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>${ant-version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
Expand All @@ -260,7 +249,7 @@

<plugins>

<plugin>
<!-- <plugin>
<groupId>com.github.goldin</groupId>
<artifactId>silencer-maven-plugin</artifactId>
<version>${previous-plugins-version}</version>
Expand All @@ -278,7 +267,7 @@
</configuration>
</execution>
</executions>
</plugin>
</plugin>-->

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- Enforcing Maven/Java versions -->
Expand Down Expand Up @@ -320,7 +309,7 @@
<!-- Displaying plugin versions checked -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<executions>
<execution>
<!-- <execution>
<id>display-versions</id>
<goals>
<goal>execute</goal>
Expand All @@ -344,7 +333,7 @@
}
</source>
</configuration>
</execution>
</execution>-->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- Compiling Groovy sources and tests -->
<!-- http://docs.codehaus.org/display/GMAVEN/Building+Groovy+Projects -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import static com.github.goldin.plugins.common.GMojoUtils.*
import com.github.goldin.plugins.common.SilentLogger
import com.github.goldin.plugins.common.BaseGroovyMojo
import org.apache.maven.LoggingRepositoryListener
import org.apache.maven.cli.AbstractMavenTransferListener
import org.apache.maven.lifecycle.internal.LifecycleModuleBuilder
import org.apache.maven.plugin.DefaultBuildPluginManager
import org.apache.maven.plugins.annotations.Component
Expand Down