This is an automated email from the git hooks/post-receive script. ebourg-guest pushed a commit to branch master in repository gradle.
commit 4e18ef00aca807462ea61de5bcefeeb6c0b4cc37 Author: Emmanuel Bourg <[email protected]> Date: Thu Mar 3 11:48:07 2016 +0100 Fixed the CycleDetectedException when installing Maven artifacts (Closes: #810817) --- debian/changelog | 2 ++ debian/patches/eclipse-aether.diff | 16 +++++++---- debian/patches/maven-3.3-compatibility.patch | 42 ++++++++++++++++++++++++++-- 3 files changed, 53 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8fc0679..084c833 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ gradle (2.10-2) UNRELEASED; urgency=medium * Team upload. + * Fixed the CycleDetectedException when installing Maven artifacts. + Thanks to Mikolaj Izdebski for the patch. (Closes: #810817) * Removed disable_java9.diff (no longer required) * Removed 26_disable_commitid.diff (not required) * Replaced disable_release_notes.diff with a task exclusion parameter diff --git a/debian/patches/eclipse-aether.diff b/debian/patches/eclipse-aether.diff index ef6361c..11e165e 100644 --- a/debian/patches/eclipse-aether.diff +++ b/debian/patches/eclipse-aether.diff @@ -179,25 +179,31 @@ Last-Update: 2015-09-30 import java.io.File; import java.io.FileReader; -@@ -60,7 +60,7 @@ +@@ -60,9 +60,8 @@ protected AbstractMavenPublishAction(File pomFile, List<File> wagonJars) { container = newPlexusContainer(wagonJars); - session = new MavenRepositorySystemSession(); + session = MavenRepositorySystemUtils.newSession(); session.setTransferListener(new LoggingMavenTransferListener()); - session.getConfigProperties().put("maven.metadata.legacy", "true"); +- session.getConfigProperties().put("maven.metadata.legacy", "true"); -@@ -70,7 +70,7 @@ + Model pom = parsePom(pomFile); + pomArtifact = new DefaultArtifact(pom.getGroupId(), pom.getArtifactId(), "pom", pom.getVersion()).setFile(pomFile); +@@ -70,7 +69,11 @@ } public void setLocalMavenRepositoryLocation(File localMavenRepository) { - session.setLocalRepositoryManager(new SimpleLocalRepositoryManager(localMavenRepository)); -+ session.setLocalRepositoryManager(new org.eclipse.aether.internal.impl.DefaultRepositorySystem().newLocalRepositoryManager(session, new LocalRepository(localMavenRepository))); ++ try { ++ session.setLocalRepositoryManager(new org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory().newInstance(session, new LocalRepository(localMavenRepository))); ++ } catch (org.eclipse.aether.repository.NoLocalRepositoryManagerException e) { ++ throw UncheckedException.throwAsUncheckedException(e); ++ } } public void setMainArtifact(File file) { -@@ -126,7 +126,7 @@ +@@ -126,7 +129,7 @@ // This is a workaround for https://issues.gradle.org/browse/GRADLE-3324. // Somehow the ArrayList 'result' in `org.sonatype.aether.impl.internal.Utils#sortMetadataGeneratorFactories` ends up // being a list of nulls on windows and IBM's 1.6 JDK. diff --git a/debian/patches/maven-3.3-compatibility.patch b/debian/patches/maven-3.3-compatibility.patch index e510e3d..629b7ae 100644 --- a/debian/patches/maven-3.3-compatibility.patch +++ b/debian/patches/maven-3.3-compatibility.patch @@ -3,7 +3,23 @@ Author: Emmanuel Bourg <[email protected]> Forwarded: no --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle -@@ -117,6 +117,7 @@ +@@ -105,8 +105,13 @@ + dependency "org.codehaus.plexus:plexus-utils:2.0.6@jar" + dependency "org.codehaus.plexus:plexus-interpolation:1.14@jar" + dependency "org.codehaus.plexus:plexus-component-annotations-1.5" +- dependency "org.codehaus.plexus:plexus-container-default-1.5" +- dependency "org.codehaus.plexus:plexus-classworlds:2.4@jar" ++ dependency "org.codehaus.plexus:plexus-classworlds2" ++ ++ dependency "org.eclipse.sisu:sisu-plexus" ++ dependency "org.eclipse.sisu:sisu-inject" ++ dependency "org.google.inject:guice" ++ dependency "javax.inject:atinject-jsr330-api" ++ dependency "aopalliance:aopalliance" + + //sonatype plexus + dependency "org.sonatype.plexus:plexus-cipher" +@@ -117,6 +122,7 @@ dependency "org.apache.maven:maven3-compat" dependency "org.apache.maven:maven3-model-builder" dependency "org.apache.maven:maven3-model" @@ -11,7 +27,7 @@ Forwarded: no //somewhat core: dependency "org.apache.maven:maven3-artifact" -@@ -135,6 +136,8 @@ +@@ -135,6 +141,8 @@ dependency "org.eclipse.aether:eclipse-aether-spi" dependency "org.eclipse.aether:eclipse-aether-util" dependency 'org.eclipse.aether:eclipse-aether-connector-basic' @@ -20,3 +36,25 @@ Forwarded: no } libraries.spock = [ +--- a/subprojects/maven/src/main/groovy/org/gradle/api/publication/maven/internal/action/AbstractMavenPublishAction.java ++++ b/subprojects/maven/src/main/groovy/org/gradle/api/publication/maven/internal/action/AbstractMavenPublishAction.java +@@ -115,7 +115,7 @@ + classRealm.addURL(jar.toURI().toURL()); + } + } +- return new DefaultPlexusContainer(new DefaultContainerConfiguration().setRealm(classRealm)); ++ return new DefaultPlexusContainer(new DefaultContainerConfiguration().setRealm(classRealm).setClassPathScanning("index").setAutoWiring(true)); + } catch (PlexusContainerException e) { + throw UncheckedException.throwAsUncheckedException(e); + } catch (MalformedURLException e) { +--- a/subprojects/build-init/src/main/groovy/org/gradle/buildinit/plugins/internal/maven/MavenProjectsCreator.java ++++ b/subprojects/build-init/src/main/groovy/org/gradle/buildinit/plugins/internal/maven/MavenProjectsCreator.java +@@ -55,7 +55,7 @@ + private Set<MavenProject> createNow(Settings settings, File pomFile) throws PlexusContainerException, PlexusConfigurationException, ComponentLookupException, MavenExecutionRequestPopulationException, ProjectBuildingException { + ContainerConfiguration containerConfiguration = new DefaultContainerConfiguration() + .setClassWorld(new ClassWorld("plexus.core", ClassWorld.class.getClassLoader())) +- .setName("mavenCore"); ++ .setName("mavenCore").setClassPathScanning("index").setAutoWiring(true); + + DefaultPlexusContainer container = new DefaultPlexusContainer(containerConfiguration); + ProjectBuilder builder = container.lookup(ProjectBuilder.class); -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/gradle.git _______________________________________________ pkg-java-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

