[maven-dependency-tree-2] 01/01: Initial packaging

Kai-Chung Yan seamlik-guest at moszumanska.debian.org
Sat Mar 10 05:32:05 GMT 2018


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

seamlik-guest pushed a commit to branch master
in repository maven-dependency-tree-2.

commit 1ca211b018a0b80f91c14655096848ee125c8c8d
Author: 殷啟聰 | Kai-Chung Yan <seamlikok at gmail.com>
Date:   Sat Mar 10 13:31:49 2018 +0800

    Initial packaging
---
 debian/changelog                            |  5 ++
 debian/compat                               |  1 +
 debian/control                              | 29 ++++++++++
 debian/copyright                            | 16 ++++++
 debian/libmaven-dependency-tree-2-java.docs |  1 +
 debian/libmaven-dependency-tree-2-java.poms |  1 +
 debian/maven.ignoreRules                    |  5 ++
 debian/maven.properties                     |  2 +
 debian/maven.rules                          |  4 ++
 debian/patches/aether.patch                 | 82 +++++++++++++++++++++++++++++
 debian/patches/maven-3.patch                | 37 +++++++++++++
 debian/patches/series                       |  2 +
 debian/rules                                |  7 +++
 debian/source/format                        |  1 +
 debian/watch                                |  2 +
 15 files changed, 195 insertions(+)

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..a549df3
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+maven-dependency-tree-2 (2.2-1) UNRELEASED; urgency=medium
+
+  * Initial release. (Closes: #892519)
+
+ -- Kai-Chung Yan (殷啟聰) <seamlikok at gmail.com>  Sat, 10 Mar 2018 13:31:13 +0800
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..9d60796
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+11
\ No newline at end of file
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..d4103e4
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,29 @@
+Source: maven-dependency-tree-2
+Section: java
+Priority: optional
+Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
+Uploaders: Kai-Chung Yan (殷啟聰) <seamlikok at gmail.com>
+Build-Depends:
+ debhelper (>= 11),
+ default-jdk-headless,
+ junit4,
+ libjmock-java,
+ libmaven-resolver-java,
+ libmaven3-core-java,
+ libplexus-component-metadata-java,
+ maven-debian-helper (>= 2.0)
+Standards-Version: 4.1.3
+Vcs-Git: https://anonscm.debian.org/git/pkg-java/maven-dependency-tree-2.git
+Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/maven-dependency-tree-2.git
+Homepage: https://maven.apache.org/shared/maven-dependency-tree
+
+Package: libmaven-dependency-tree-2-java
+Architecture: all
+Depends: ${maven:Depends}, ${misc:Depends}
+Recommends: ${maven:OptionalDepends}
+Description: Tree-based API for resolution of Maven project dependencies (2.x)
+ Apache Maven is a software project management and comprehension tool. Based
+ on the concept of a project object model (POM), Maven can manage a project's
+ build, reporting and documentation from a central piece of information.
+ .
+ This package provides the 2.x version of Maven Dependency Tree.
\ No newline at end of file
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..006cd48
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,16 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0
+Upstream-Name: Maven Dependency Tree
+Source: https://archive.apache.org/dist/maven/shared
+
+Files: *
+Copyright: The Apache Software Foundation
+License: Apache-2.0
+
+Files: debian/*
+Copyright: 2018, Kai-Chung Yan (殷啟聰) <seamlikok at gmail.com>
+License: Apache-2.0
+
+
+License: Apache-2.0
+ On Debian systems, the complete text of the Apache License Version 2.0,
+ can be found in /usr/share/common-licenses/Apache-2.0.
\ No newline at end of file
diff --git a/debian/libmaven-dependency-tree-2-java.docs b/debian/libmaven-dependency-tree-2-java.docs
new file mode 100644
index 0000000..132d13f
--- /dev/null
+++ b/debian/libmaven-dependency-tree-2-java.docs
@@ -0,0 +1 @@
+NOTICE
\ No newline at end of file
diff --git a/debian/libmaven-dependency-tree-2-java.poms b/debian/libmaven-dependency-tree-2-java.poms
new file mode 100644
index 0000000..16663d8
--- /dev/null
+++ b/debian/libmaven-dependency-tree-2-java.poms
@@ -0,0 +1 @@
+pom.xml --no-parent --java-lib --no-usj-versionless
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
new file mode 100644
index 0000000..2355724
--- /dev/null
+++ b/debian/maven.ignoreRules
@@ -0,0 +1,5 @@
+org.apache.maven         maven-project                * * * *
+org.apache.maven.plugins maven-invoker-plugin         * * * *
+org.apache.maven.plugins maven-javadoc-plugin         * * * *
+org.apache.maven.shared  maven-plugin-testing-harness * * * *
+org.apache.rat           apache-rat-plugin            * * * *
diff --git a/debian/maven.properties b/debian/maven.properties
new file mode 100644
index 0000000..97fa3c8
--- /dev/null
+++ b/debian/maven.properties
@@ -0,0 +1,2 @@
+# Tests also need patching to work with Maven 3, so I'm leaving them be.
+maven.test.skip=true
\ No newline at end of file
diff --git a/debian/maven.rules b/debian/maven.rules
new file mode 100644
index 0000000..ad767e3
--- /dev/null
+++ b/debian/maven.rules
@@ -0,0 +1,4 @@
+org.apache.maven                             s/maven-core/maven-compat/         * s/.*/3.x/      * *
+s/org\..*\.aether/org.apache.maven.resolver/ s/aether-api/maven-resolver-api/   * s/.*/debian/   * *
+s/org\..*\.aether/org.apache.maven.resolver/ s/aether-util/maven-resolver-util/ * s/.*/debian/   * *
+org.apache.maven.shared                      maven-dependency-tree              * s/.*/2\.x/     * *
diff --git a/debian/patches/aether.patch b/debian/patches/aether.patch
new file mode 100644
index 0000000..fcbcbe4
--- /dev/null
+++ b/debian/patches/aether.patch
@@ -0,0 +1,82 @@
+Description: Use Maven Resolver for Aether code
+ Debian only has Maven 3 which uses Maven Resolver as the sole Aether
+ implementation. This patch makes all Aether usage redirect to Maven
+ Resolver.
+Author: Kai-Chung Yan (殷啟聰)
+--- a/src/main/java/org/apache/maven/shared/dependency/graph/internal/Maven3DependencyGraphBuilder.java
++++ b/src/main/java/org/apache/maven/shared/dependency/graph/internal/Maven3DependencyGraphBuilder.java
+@@ -36,8 +36,8 @@
+ import org.codehaus.plexus.component.annotations.Component;
+ import org.codehaus.plexus.component.annotations.Requirement;
+ import org.codehaus.plexus.logging.AbstractLogEnabled;
+-import org.sonatype.aether.graph.Dependency;
+-import org.sonatype.aether.version.VersionConstraint;
++import org.eclipse.aether.graph.Dependency;
++import org.eclipse.aether.version.VersionConstraint;
+ 
+ import java.util.ArrayList;
+ import java.util.Collection;
+@@ -144,7 +144,7 @@
+         return result;
+     }
+ 
+-    private List<org.sonatype.aether.graph.Dependency> getReactorDependencies( Collection<MavenProject> reactorProjects,
++    private List<org.eclipse.aether.graph.Dependency> getReactorDependencies( Collection<MavenProject> reactorProjects,
+                                                                                List<?> dependencies )
+     {
+         Set<ArtifactKey> reactorProjectsIds = new HashSet<ArtifactKey>();
+@@ -157,7 +157,7 @@
+         for ( Object untypedDependency : dependencies )
+         {
+             Dependency dependency = (Dependency) untypedDependency;
+-            org.sonatype.aether.artifact.Artifact depArtifact = dependency.getArtifact();
++            org.eclipse.aether.artifact.Artifact depArtifact = dependency.getArtifact();
+ 
+             ArtifactKey key =
+                 new ArtifactKey( depArtifact.getGroupId(), depArtifact.getArtifactId(), depArtifact.getVersion() );
+@@ -173,7 +173,7 @@
+ 
+     private Artifact getDependencyArtifact( Dependency dep )
+     {
+-        org.sonatype.aether.artifact.Artifact artifact = dep.getArtifact();
++        org.eclipse.aether.artifact.Artifact artifact = dep.getArtifact();
+ 
+         return factory.createDependencyArtifact( artifact.getGroupId(), artifact.getArtifactId(),
+                                                  VersionRange.createFromVersion( artifact.getVersion() ),
+@@ -181,7 +181,7 @@
+                                                  artifact.getClassifier(), dep.getScope(), dep.isOptional() );
+     }
+ 
+-    private DependencyNode buildDependencyNode( DependencyNode parent, org.sonatype.aether.graph.DependencyNode node,
++    private DependencyNode buildDependencyNode( DependencyNode parent, org.eclipse.aether.graph.DependencyNode node,
+                                                 Artifact artifact, ArtifactFilter filter )
+     {
+         DefaultDependencyNode current =
+@@ -191,7 +191,7 @@
+                                        getVersionSelectedFromRange( node.getVersionConstraint() ) );
+ 
+         List<DependencyNode> nodes = new ArrayList<DependencyNode>( node.getChildren().size() );
+-        for ( org.sonatype.aether.graph.DependencyNode child : node.getChildren() )
++        for ( org.eclipse.aether.graph.DependencyNode child : node.getChildren() )
+         {
+             Artifact childArtifact = getDependencyArtifact( child.getDependency() );
+ 
+@@ -212,17 +212,6 @@
+         {
+             return null;
+         }
+-
+-        StringBuilder sb = new StringBuilder();
+-        for ( org.sonatype.aether.version.VersionRange range : constraint.getRanges() )
+-        {
+-            if ( sb.length() > 0 )
+-            {
+-                sb.append( ',' );
+-            }
+-            sb.append( range );
+-        }
+-
+-        return sb.toString();
++        return constraint.getRange().toString();
+     }
+ }
diff --git a/debian/patches/maven-3.patch b/debian/patches/maven-3.patch
new file mode 100644
index 0000000..1ff4ab1
--- /dev/null
+++ b/debian/patches/maven-3.patch
@@ -0,0 +1,37 @@
+Description: Compatibility with Maven 3
+ Debian only has Maven 3.
+Author: Kai-Chung Yan (殷啟聰)
+--- a/src/main/java/org/apache/maven/shared/dependency/tree/DefaultDependencyTreeBuilder.java
++++ b/src/main/java/org/apache/maven/shared/dependency/tree/DefaultDependencyTreeBuilder.java
+@@ -122,10 +122,6 @@
+ 
+             return listener.getRootNode();
+         }
+-        catch ( ArtifactResolutionException exception )
+-        {
+-            throw new DependencyTreeBuilderException( "Cannot build project dependency tree", exception );
+-        }
+         catch ( InvalidDependencyVersionException e )
+         {
+             throw new DependencyTreeBuilderException( "Invalid dependency version for artifact "
+@@ -143,7 +139,7 @@
+     public DependencyNode buildDependencyTree( MavenProject project )
+         throws DependencyTreeBuilderException
+     {
+-        return buildDependencyTree( project, project.getProjectBuilderConfiguration().getLocalRepository(), factory,
++        return buildDependencyTree( project, null, factory,
+                                     metadataSource, null, collector );
+     }
+ 
+--- a/src/main/java/org/apache/maven/shared/dependency/tree/DependencyTreeResolutionListener.java
++++ b/src/main/java/org/apache/maven/shared/dependency/tree/DependencyTreeResolutionListener.java
+@@ -534,4 +534,9 @@
+             premanagedScope = null;
+         }
+     }
++
++    @Override
++    public void manageArtifactSystemPath(Artifact artifact, Artifact replacement) {
++        throw new UnsupportedOperationException("Maven Dependency Tree 2 is not fully compatible with Maven 3.");
++    }
+ }
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..8055315
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+aether.patch
+maven-3.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..30039ad
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,7 @@
+#!/usr/bin/make -f
+
+%:
+	dh $@
+
+get-orig-source:
+	uscan --download-current-version --force-download --repack --compression xz
\ No newline at end of file
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..46ebe02
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
\ No newline at end of file
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..97db668
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=4
+https://archive.apache.org/dist/maven/shared maven-dependency-tree at ANY_VERSION@-source-release at ARCHIVE_EXT@
\ No newline at end of file

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/maven-dependency-tree-2.git



More information about the pkg-java-commits mailing list