[plexus-compiler] 02/05: Depend on libmaven3-core-java instead of libmaven2-core-java

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Fri Sep 1 08:16:18 UTC 2017


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository plexus-compiler.

commit d7dfe1715cb89ed979cc8997ba14e523759a4e9b
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Fri Sep 1 09:49:58 2017 +0200

    Depend on libmaven3-core-java instead of libmaven2-core-java
---
 debian/changelog                         |  1 +
 debian/control                           |  5 +--
 debian/maven.ignoreRules                 |  2 +
 debian/maven.rules                       |  3 ++
 debian/patches/maven-compatibility.patch | 73 ++++++++++++++++++++++++++++++++
 debian/patches/series                    |  1 +
 6 files changed, 82 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index b78a055..f29f3ff 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 plexus-compiler (2.8.2-3) UNRELEASED; urgency=medium
 
   * Team upload.
+  * Depend on libmaven3-core-java instead of libmaven2-core-java
   * Depend on libplexus-container-default1.5-java
     instead of libplexus-container-default-java
 
diff --git a/debian/control b/debian/control
index 4213acf..a426dcd 100644
--- a/debian/control
+++ b/debian/control
@@ -10,8 +10,7 @@ Build-Depends-Indep: default-jdk-doc,
                      libcommons-lang-java (>= 2.0),
                      libecj-java,
                      libmaven-javadoc-plugin-java,
-                     libmaven2-core-java,
-                     libmaven2-core-java-doc,
+                     libmaven3-core-java,
                      libplexus-component-metadata-java,
                      libplexus-container-default1.5-java,
                      libplexus-utils-java (>= 1.5.15),
@@ -25,7 +24,7 @@ Homepage: https://codehaus-plexus.github.io/plexus-compiler/
 Package: libplexus-compiler-java
 Architecture: all
 Depends: libcommons-lang-java (>= 2.6),
-         libmaven2-core-java,
+         libmaven3-core-java,
          libplexus-container-default1.5-java,
          libplexus-utils-java,
          ${misc:Depends}
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
index 74a357d..4543cf4 100644
--- a/debian/maven.ignoreRules
+++ b/debian/maven.ignoreRules
@@ -1,2 +1,4 @@
 
 org.apache.maven.plugins maven-gpg-plugin * * * *
+
+org.apache.maven maven-artifact-test * * * *
diff --git a/debian/maven.rules b/debian/maven.rules
index 65fc681..8a324cf 100644
--- a/debian/maven.rules
+++ b/debian/maven.rules
@@ -12,3 +12,6 @@ org.codehaus.plexus plexus-compilers pom s/.*/2.x/ * *
 org.codehaus.plexus plexus-component-metadata maven-plugin s/1.6/1.5.5/ * *
 org.codehaus.plexus plexus-container-default jar s/.*/1.5.5/ * *
 s/org.eclipse.jdt/org.eclipse.jdt.core.compiler/ ecj jar s/.*/debian/ * *
+
+org.apache.maven s/maven-artifact-manager/maven-compat/ * s/.*/3.x/ * *
+org.apache.maven maven-* * s/.*/3.x/ * *
diff --git a/debian/patches/maven-compatibility.patch b/debian/patches/maven-compatibility.patch
new file mode 100644
index 0000000..4056e85
--- /dev/null
+++ b/debian/patches/maven-compatibility.patch
@@ -0,0 +1,73 @@
+Description: Fixes the compatibility with Maven 3
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: no
+--- a/plexus-compiler-test/src/main/java/org/codehaus/plexus/compiler/AbstractCompilerTest.java
++++ b/plexus-compiler-test/src/main/java/org/codehaus/plexus/compiler/AbstractCompilerTest.java
+@@ -27,10 +27,16 @@
+ import org.apache.maven.artifact.Artifact;
+ import org.apache.maven.artifact.DefaultArtifact;
+ import org.apache.maven.artifact.handler.DefaultArtifactHandler;
+-import org.apache.maven.artifact.test.ArtifactTestCase;
++import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
++import org.apache.maven.artifact.repository.ArtifactRepository;
++import org.apache.maven.artifact.repository.DefaultArtifactRepository;
+ import org.apache.maven.artifact.versioning.VersionRange;
++import org.apache.maven.settings.Settings;
++import org.apache.maven.settings.io.xpp3.SettingsXpp3Reader;
+ 
++import org.codehaus.plexus.PlexusTestCase;
+ import org.codehaus.plexus.util.FileUtils;
++import org.codehaus.plexus.util.ReaderFactory;
+ 
+ import java.io.File;
+ import java.util.ArrayList;
+@@ -44,7 +50,7 @@
+  *
+  */
+ public abstract class AbstractCompilerTest
+-    extends ArtifactTestCase
++    extends PlexusTestCase
+ {
+     private boolean compilerDebug = false;
+ 
+@@ -52,6 +58,40 @@
+ 
+     private boolean forceJavacCompilerUse = false;
+ 
++    private ArtifactRepository localRepository;
++
++    protected File getLocalArtifactPath( Artifact artifact )
++    {
++        return new File( localRepository.getBasedir(), localRepository.pathOf( artifact ) );
++    }
++
++    protected void setUp()
++        throws Exception
++    {
++        super.setUp();
++
++        String localRepo = System.getProperty( "maven.repo.local" );
++
++        if ( localRepo == null )
++        {
++            File settingsFile = new File( System.getProperty( "user.home" ), ".m2/settings.xml" );
++            if ( settingsFile.exists() )
++            {
++                Settings settings = new SettingsXpp3Reader().read( ReaderFactory.newXmlReader( settingsFile ) );
++                localRepo = settings.getLocalRepository();
++            }
++        }
++        if ( localRepo == null )
++        {
++            localRepo = System.getProperty( "user.home" ) + "/.m2/repository";
++        }
++
++        ArtifactRepositoryLayout repositoryLayout = (ArtifactRepositoryLayout) getContainer().lookup(
++            ArtifactRepositoryLayout.ROLE, "default" );
++
++        localRepository = new DefaultArtifactRepository( "local", "file://" + localRepo, repositoryLayout );
++    }
++
+     protected abstract String getRoleHint();
+ 
+     protected void setCompilerDebug( boolean flag )
diff --git a/debian/patches/series b/debian/patches/series
index 30ad069..bcc58ab 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 fix_test_classpath.patch
 auto-adjust-language-level.patch
+maven-compatibility.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/plexus-compiler.git



More information about the pkg-java-commits mailing list