unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#31631] [PATCH] Some maven packages
@ 2018-05-28 20:49 Julien Lepiller
  2018-05-28 20:55 ` [bug#31631] [PATCH 01/10] gnu: Add maven-artifact Julien Lepiller
  2018-06-09 21:27 ` bug#31631: [PATCH] Some maven packages Julien Lepiller
  0 siblings, 2 replies; 12+ messages in thread
From: Julien Lepiller @ 2018-05-28 20:49 UTC (permalink / raw)
  To: 31631

Hi Guix,

here are 10 patches that add the first parts of Maven.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#31631] [PATCH 01/10] gnu: Add maven-artifact.
  2018-05-28 20:49 [bug#31631] [PATCH] Some maven packages Julien Lepiller
@ 2018-05-28 20:55 ` Julien Lepiller
  2018-05-28 20:55   ` [bug#31631] [PATCH 02/10] gnu: Add maven-model Julien Lepiller
                     ` (8 more replies)
  2018-06-09 21:27 ` bug#31631: [PATCH] Some maven packages Julien Lepiller
  1 sibling, 9 replies; 12+ messages in thread
From: Julien Lepiller @ 2018-05-28 20:55 UTC (permalink / raw)
  To: 31631

* gnu/packages/maven.scm (maven-artifact): New variable.
* gnu/packages/patches/maven-generate-component-xml.patch: New file.
* gnu/packages/patches/maven-generate-javax-inject-named.patch: New
file.
* gnu/local.mk (dist_patch_DATA): Add them.
---
 gnu/local.mk                                  |   2 +
 gnu/packages/maven.scm                        |  38 ++++
 .../maven-generate-component-xml.patch        | 171 ++++++++++++++++++
 .../maven-generate-javax-inject-named.patch   |  31 ++++
 4 files changed, 242 insertions(+)
 create mode 100644 gnu/packages/patches/maven-generate-component-xml.patch
 create mode 100644 gnu/packages/patches/maven-generate-javax-inject-named.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 4d9edc354..56833a251 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -914,6 +914,8 @@ dist_patch_DATA =						\
   %D%/packages/patches/mars-install.patch			\
   %D%/packages/patches/mars-sfml-2.3.patch			\
   %D%/packages/patches/maxima-defsystem-mkdir.patch		\
+  %D%/packages/patches/maven-generate-component-xml.patch		\
+  %D%/packages/patches/maven-generate-javax-inject-named.patch		\
   %D%/packages/patches/mcron-install.patch			\
   %D%/packages/patches/mcrypt-CVE-2012-4409.patch			\
   %D%/packages/patches/mcrypt-CVE-2012-4426.patch			\
diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm
index 81021f646..c414160b3 100644
--- a/gnu/packages/maven.scm
+++ b/gnu/packages/maven.scm
@@ -128,3 +128,41 @@ ease usage of the repository system.")))
     (synopsis "Maven repository connector implementation")
     (description "This package contains a repository connector implementation
 for repositories using URI-based layouts.")))
+
+(define-public maven-artifact
+  (package
+    (name "maven-artifact")
+    (version "3.5.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://archive.apache.org/dist/maven/"
+                                  "maven-3/" version "/source/"
+                                  "apache-maven-" version "-src.tar.gz"))
+              (sha256 (base32 "06by23fz207lkvsndq883irfcf4p77jzkgf7n2q7hzyw1hs4h5s7"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  (for-each delete-file (find-files "." "\\.jar$"))
+                  #t))
+              (patches
+                (search-patches "maven-generate-component-xml.patch"
+                                "maven-generate-javax-inject-named.patch"))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:jar-name "maven-artifact.jar"
+       #:source-dir "maven-artifact/src/main/java"
+       #:test-dir "maven-artifact/src/test"
+       #:main-class "org.apache.maven.artifact.versioning.ComparableVersion"))
+    (inputs
+     `(("java-plexus-utils" ,java-plexus-utils)
+       ("java-commons-lang3" ,java-commons-lang3)))
+    (native-inputs
+     `(("java-junit" ,java-junit)))
+    (home-page "https://maven.apache.org/")
+    (synopsis "Build system")
+    (description "Apache Maven is a software project management and comprehension
+tool.  This package contains the Maven Artifact classes, providing the
+@code{Artifact} interface, with its @code{DefaultArtifact} implementation.  The
+jar file is executable and provides a little tool to display how Maven parses
+and compares versions:")
+    (license license:asl2.0)))
diff --git a/gnu/packages/patches/maven-generate-component-xml.patch b/gnu/packages/patches/maven-generate-component-xml.patch
new file mode 100644
index 000000000..6cb23c785
--- /dev/null
+++ b/gnu/packages/patches/maven-generate-component-xml.patch
@@ -0,0 +1,171 @@
+From da9e282d834f0e2128501a8154128dc95b4c599d Mon Sep 17 00:00:00 2001
+From: Julien Lepiller <julien@lepiller.eu>
+Date: Sat, 9 Sep 2017 20:34:38 +0200
+Subject: [PATCH] Add a script to generate component.xml files.
+
+plexus-component-metadata is normally used for this task, but it
+depends on maven-core, which depends on maven-model-builder, which needs
+plexus-component-metadata. This script is meant to break this dependency
+cycle.
+---
+ components.sh | 132 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 132 insertions(+)
+ create mode 100755 components.sh
+
+diff --git a/components.sh b/components.sh
+new file mode 100755
+index 0000000..c6748bd
+--- /dev/null
++++ b/components.sh
+@@ -0,0 +1,148 @@
++## This script generates a rough plexus/components.xml file. It is meant to
++## replace plexus-component-metadata as it eventually has a recursive dependency
++## on itself.
++##
++## This script must be run in the source directory (usually src/main/java).
++
++# Finds the complete name from a class name.
++function find_role() {
++    role=$1
++    # Find role
++    case $role in
++      "SettingsWriter" | "SettingsReader")
++        role=org.apache.maven.settings.io.$role
++        ;;
++      "SecDispatcher")
++        role=org.sonatype.plexus.components.sec.dispatcher.$role
++        ;;
++      "SettingsDecrypter")
++        role=org.apache.maven.settings.crypto.$role
++        ;;
++      "SettingsBuilder")
++        role=org.apache.maven.settings.building.$role
++        ;;
++      "SettingsValidator")
++        role=org.apache.maven.settings.validation.$role
++        ;;
++      "LoggerFactory")
++        role=org.eclipse.aether.spi.log.$role
++        ;;
++      "RemoteRepositoryManager" | "VersionResolver" | "VersionRangeResolver" \
++      | "ArtifactResolver" | "RepositoryEventDispatcher" | "MetadataResolver" \
++      | "SyncContextFactory" | "MetadataGeneratorFactory" | "MetadatResolver" \
++      | "ArtifactDescriptorReader")
++        role=org.eclipse.aether.impl.$role
++        ;;
++      "ModelBuilder" | "ModelProcessor")
++        role=org.apache.maven.model.building.$role
++        ;;
++      "ModelValidator")
++        role=org.apache.maven.model.validation.$role
++        ;;
++      "ProfileInjector" | "ProfileSelector")
++        role=org.apache.maven.model.profile.$role
++        ;;
++      "ProfileActivator")
++        role=org.apache.maven.model.profile.activation.$role
++        ;;
++      "SuperPomProvider")
++        role=org.apache.maven.model.superpom.$role
++        ;;
++      "ReportConfigurationExpander" | "PluginConfigurationExpander" \
++      | "ReportingConverter" | "LifecycleBindingsInjector")
++        role=org.apache.maven.model.plugin.$role
++        ;;
++      "ModelLocator")
++        role=org.apache.maven.model.locator.$role
++        ;;
++      "ModelPathTranslator" | "PathTranslator" | "UrlNormalizer" | "ModelUrlNormalizer")
++        role=org.apache.maven.model.path.$role
++        ;;
++      "DependencyManagementInjector" | "PluginManagementInjector")
++        role=org.apache.maven.model.management.$role
++        ;;
++      "ModelWriter" | "ModelReader")
++        role=org.apache.maven.model.io.$role
++        ;;
++      "DependencyManagementImporter")
++        role=org.apache.maven.model.composition.$role
++        ;;
++      "ModelNormalizer")
++        role=org.apache.maven.model.normalization.$role
++        ;;
++      "ModelInterpolator")
++        role=org.apache.maven.model.interpolation.$role
++        ;;
++      "InheritanceAssembler")
++        role=org.apache.maven.model.inheritance.$role
++        ;;
++      *)
++        role=$role
++        ;;
++    esac
++    echo $role
++}
++
++function generate_xml() {
++echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
++echo "<component-set>"
++echo "<components>"
++
++for file in `find -name '*.java'`; do
++  annot=`grep "@Component" $file`
++  if [ "$?" == "0" ]; then
++    # We have a component!
++    role=$(echo $annot | sed 's|.*role = \(.*\).class.*|\1|')
++    role_hint=$(echo $annot | sed 's|.*hint = "\(.*\)" .*|\1|')
++    if [ "$role_hint" = "$annot" ]; then
++      role_hint=default
++    fi
++    implem=$(echo $file | sed -e 's|^\./||' -e 's|\.java||' -e 's|/|.|g')
++    role=$(find_role $role)
++
++    echo "<component>"
++    echo "  <role>$role</role>"
++    echo "  <role-hint>$role_hint</role-hint>"
++    echo "  <implementation>$implem</implementation>"
++    echo "  <description />"
++    echo "  <isolated-realm>false</isolated-realm>"
++    echo "  <requirements>"
++    reqn=1
++    cont=true
++    while [ "$cont" = "true" ]; do
++      requirement=$(grep "@Requirement" $file -A1 | head -n ${reqn} | tail -1)
++      ((reqn++))
++      property=$(grep "@Requirement" $file -A1 | head -n ${reqn} | tail -1)
++      if (echo $requirement | grep "@Requirement" >/dev/null); then
++        ((reqn++))
++        ((reqn++))
++        optional=$(echo $requirement | sed 's|.*optional = \(.*\) .*|\1|')
++        req_role=$(echo $requirement | sed 's|.*role = \(.*\).class .*|\1|')
++        if (echo $req_role | grep "@Requirement" >/dev/null); then
++          req_role=$(echo $property | sed 's|.*private \(.*\) .*|\1|')
++        fi
++        req_role=$(find_role $req_role)
++        req_name=$(echo $property | sed 's|[^ ]* [^ ]* \([^ ;]*\).*|\1|')
++        echo "    <requirement>"
++        echo "      <role>$req_role</role>"
++        echo "      <field-name>$req_name</field-name>"
++        if (echo $optional | grep "@Requirement" >/dev/null); then
++          :
++        else
++          echo "      <optional>$optional</optional>"
++        fi
++        echo "    </requirement>"
++      else
++        cont=false
++      fi
++    done
++    echo "  </requirements>"
++    echo "</component>"
++  fi
++done
++
++echo "</components>"
++echo "</component-set>"
++}
++
++(cd $1; generate_xml) > $2
+-- 
+2.14.1
+
diff --git a/gnu/packages/patches/maven-generate-javax-inject-named.patch b/gnu/packages/patches/maven-generate-javax-inject-named.patch
new file mode 100644
index 000000000..b8eba5ab9
--- /dev/null
+++ b/gnu/packages/patches/maven-generate-javax-inject-named.patch
@@ -0,0 +1,31 @@
+From 1d20c0e403f1a38d4aca830e0eb4db03ba43efd3 Mon Sep 17 00:00:00 2001
+From: Julien Lepiller <julien@lepiller.eu>
+Date: Tue, 19 Sep 2017 22:21:29 +0200
+Subject: [PATCH] Add sisu-maven-plugin replacement
+
+---
+ sisu.sh | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+ create mode 100755 sisu.sh
+
+diff --git a/sisu.sh b/sisu.sh
+new file mode 100755
+index 0000000..979f373
+--- /dev/null
++++ b/sisu.sh
+@@ -0,0 +1,12 @@
++## This script generates a rough javax.inject.Named file. It is meant to
++## replace sisu-maven-plugin as it eventually has a recursive dependency
++## on maven.
++##
++## This script must be run in the source directory (usually src/main/java).
++
++for file in `(cd $1; find -name '*.java')`; do
++  annot=`grep "^@Named" $1/$file`
++  if [ "$annot" != "" ]; then
++    echo $file | sed -e 's|^\./||' -e 's|\.java||' -e 's|/|.|g'
++  fi
++done > $2
+-- 
+2.14.1
+
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [bug#31631] [PATCH 02/10] gnu: Add maven-model.
  2018-05-28 20:55 ` [bug#31631] [PATCH 01/10] gnu: Add maven-artifact Julien Lepiller
@ 2018-05-28 20:55   ` Julien Lepiller
  2018-05-28 20:55   ` [bug#31631] [PATCH 03/10] gnu: Add maven-builder-support Julien Lepiller
                     ` (7 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Julien Lepiller @ 2018-05-28 20:55 UTC (permalink / raw)
  To: 31631

* gnu/packages/maven.scm (maven-model): New variable.
---
 gnu/packages/maven.scm | 50 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm
index c414160b3..fc0465632 100644
--- a/gnu/packages/maven.scm
+++ b/gnu/packages/maven.scm
@@ -166,3 +166,53 @@ tool.  This package contains the Maven Artifact classes, providing the
 jar file is executable and provides a little tool to display how Maven parses
 and compares versions:")
     (license license:asl2.0)))
+
+(define-public maven-model
+  (package
+    (inherit maven-artifact)
+    (name "maven-model")
+    (arguments
+     `(#:jar-name "maven-model.jar"
+       #:source-dir "maven-model/src/main/java"
+       #:test-dir "maven-model/src/test"
+       #:jdk ,icedtea-8
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'generate-models
+           (lambda* (#:key inputs #:allow-other-keys)
+             (define (modello-single-mode file version mode)
+               (invoke "java" "org.codehaus.modello.ModelloCli"
+                       file mode "maven-model/src/main/java" version
+                       "false" "true"))
+             (let ((file "maven-model/src/main/mdo/maven.mdo"))
+               (modello-single-mode file "4.0.0" "java")
+               (modello-single-mode file "4.0.0" "xpp3-reader")
+               (modello-single-mode file "4.0.0" "xpp3-writer")
+               (modello-single-mode file "4.0.0" "xpp3-extended-reader"))
+             #t)))))
+    (inputs
+     `(("java-commons-lang3" ,java-commons-lang3)
+       ("java-plexus-utils" ,java-plexus-utils)))
+    (native-inputs
+     `(("java-modello-core" ,java-modello-core)
+       ;; for modello:
+       ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus)
+       ("java-plexus-component-annotations" ,java-plexus-component-annotations)
+       ("java-guice" ,java-guice)
+       ("java-cglib" ,java-cglib)
+       ("java-asm" ,java-asm)
+       ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
+       ("java-javax-inject" ,java-javax-inject)
+       ("java-plexus-classworlds" ,java-plexus-classworlds)
+       ("java-guava" ,java-guava)
+       ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
+       ("java-sisu-build-api" ,java-sisu-build-api)
+       ;; modello plugins:
+       ("java-modello-plugins-java" ,java-modello-plugins-java)
+       ("java-modello-plugins-xml" ,java-modello-plugins-xml)
+       ("java-modello-plugins-xpp3" ,java-modello-plugins-xpp3)
+       ;; for tests
+       ("java-junit" ,java-junit)))
+    (description "Apache Maven is a software project management and comprehension
+tool.  This package contains the model for Maven @dfn{POM} (Project Object Model),
+so really just plain Java objects.")))
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [bug#31631] [PATCH 03/10] gnu: Add maven-builder-support.
  2018-05-28 20:55 ` [bug#31631] [PATCH 01/10] gnu: Add maven-artifact Julien Lepiller
  2018-05-28 20:55   ` [bug#31631] [PATCH 02/10] gnu: Add maven-model Julien Lepiller
@ 2018-05-28 20:55   ` Julien Lepiller
  2018-05-28 20:55   ` [bug#31631] [PATCH 04/10] gnu: Add maven-settings Julien Lepiller
                     ` (6 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Julien Lepiller @ 2018-05-28 20:55 UTC (permalink / raw)
  To: 31631

* gnu/packages/maven.scm (maven-builder-support): New variable.
---
 gnu/packages/maven.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm
index fc0465632..028f2b2aa 100644
--- a/gnu/packages/maven.scm
+++ b/gnu/packages/maven.scm
@@ -216,3 +216,32 @@ and compares versions:")
     (description "Apache Maven is a software project management and comprehension
 tool.  This package contains the model for Maven @dfn{POM} (Project Object Model),
 so really just plain Java objects.")))
+
+(define-public maven-builder-support
+  (package
+    (inherit maven-artifact)
+    (name "maven-builder-support")
+    (arguments
+     `(#:jar-name "maven-builder-support.jar"
+       #:source-dir "maven-builder-support/src/main/java"
+       #:jdk ,icedtea-8
+       #:test-dir "maven-builder-support/src/test"
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'fix-paths
+           (lambda _
+             (with-directory-excursion "maven-builder-support/src/test/java"
+               (substitute*
+                 '("org/apache/maven/building/FileSourceTest.java"
+                   "org/apache/maven/building/UrlSourceTest.java")
+                 (("target/test-classes") "maven-builder-support/src/test/resources")))
+             #t)))))
+    (inputs
+     `(("java-plexus-utils" ,java-plexus-utils)
+       ("java-commons-lang3" ,java-commons-lang3)))
+    (native-inputs
+     `(("java-junit" ,java-junit)
+       ("java-hamcrest-core" ,java-hamcrest-core)))
+    (description "Apache Maven is a software project management and comprehension
+tool.  This package contains a support library for descriptor builders (model,
+setting, toolchains)")))
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [bug#31631] [PATCH 04/10] gnu: Add maven-settings.
  2018-05-28 20:55 ` [bug#31631] [PATCH 01/10] gnu: Add maven-artifact Julien Lepiller
  2018-05-28 20:55   ` [bug#31631] [PATCH 02/10] gnu: Add maven-model Julien Lepiller
  2018-05-28 20:55   ` [bug#31631] [PATCH 03/10] gnu: Add maven-builder-support Julien Lepiller
@ 2018-05-28 20:55   ` Julien Lepiller
  2018-05-28 20:55   ` [bug#31631] [PATCH 05/10] gnu: Add maven-settings-builder Julien Lepiller
                     ` (5 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Julien Lepiller @ 2018-05-28 20:55 UTC (permalink / raw)
  To: 31631

* gnu/packages/maven.scm (maven-settings): New variable.
---
 gnu/packages/maven.scm | 47 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm
index 028f2b2aa..bb948e72c 100644
--- a/gnu/packages/maven.scm
+++ b/gnu/packages/maven.scm
@@ -245,3 +245,50 @@ so really just plain Java objects.")))
     (description "Apache Maven is a software project management and comprehension
 tool.  This package contains a support library for descriptor builders (model,
 setting, toolchains)")))
+
+(define-public maven-settings
+  (package
+    (inherit maven-artifact)
+    (name "maven-settings")
+    (arguments
+     `(#:jar-name "maven-settings.jar"
+       #:source-dir "maven-settings/src/main/java"
+       #:jdk ,icedtea-8
+       #:tests? #f; no tests
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'generate-models
+           (lambda* (#:key inputs #:allow-other-keys)
+             (define (modello-single-mode file version mode)
+               (invoke "java" "org.codehaus.modello.ModelloCli"
+                       file mode "maven-settings/src/main/java" version
+                       "false" "true"))
+             (let ((file "maven-settings/src/main/mdo/settings.mdo"))
+               (modello-single-mode file "1.1.0" "java")
+               (modello-single-mode file "1.1.0" "xpp3-reader")
+               (modello-single-mode file "1.1.0" "xpp3-writer"))
+             #t)))))
+    (inputs '())
+    (native-inputs
+     `(("java-modello-core" ,java-modello-core)
+       ;; for modello:
+       ;("container" ,java-plexus-container-default)
+       ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus)
+       ("java-plexus-component-annotations" ,java-plexus-component-annotations)
+       ("java-guice" ,java-guice)
+       ("java-cglib" ,java-cglib)
+       ("java-asm" ,java-asm)
+       ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
+       ("java-javax-inject" ,java-javax-inject)
+       ("java-plexus-classworlds" ,java-plexus-classworlds)
+       ("java-plexus-utils" ,java-plexus-utils)
+       ("java-guava" ,java-guava)
+       ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
+       ("java-sisu-build-api" ,java-sisu-build-api)
+       ;; modello plugins:
+       ("java-modello-plugins-java" ,java-modello-plugins-java)
+       ("java-modello-plugins-xml" ,java-modello-plugins-xml)
+       ("java-modello-plugins-xpp3" ,java-modello-plugins-xpp3)))
+    (description "Apache Maven is a software project management and comprehension
+tool.  This package contains strictly the model for Maven settings, that is
+simply plain java objects.")))
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [bug#31631] [PATCH 05/10] gnu: Add maven-settings-builder.
  2018-05-28 20:55 ` [bug#31631] [PATCH 01/10] gnu: Add maven-artifact Julien Lepiller
                     ` (2 preceding siblings ...)
  2018-05-28 20:55   ` [bug#31631] [PATCH 04/10] gnu: Add maven-settings Julien Lepiller
@ 2018-05-28 20:55   ` Julien Lepiller
  2018-05-28 20:55   ` [bug#31631] [PATCH 06/10] gnu: Add maven-model-builder Julien Lepiller
                     ` (4 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Julien Lepiller @ 2018-05-28 20:55 UTC (permalink / raw)
  To: 31631

* gnu/packages/maven.scm (maven-settings-builder): New variable.
---
 gnu/packages/maven.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm
index bb948e72c..64ee672be 100644
--- a/gnu/packages/maven.scm
+++ b/gnu/packages/maven.scm
@@ -292,3 +292,35 @@ setting, toolchains)")))
     (description "Apache Maven is a software project management and comprehension
 tool.  This package contains strictly the model for Maven settings, that is
 simply plain java objects.")))
+
+(define-public maven-settings-builder
+  (package
+    (inherit maven-artifact)
+    (name "maven-settings-builder")
+    (arguments
+     `(#:jar-name "maven-settings-builder.jar"
+       #:source-dir "maven-settings-builder/src/main/java"
+       #:jdk ,icedtea-8
+       #:test-dir "maven-settings-builder/src/test"
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'generate-components.xml
+           (lambda _
+             (mkdir-p "build/classes/META-INF/plexus")
+             (chmod "components.sh" #o755)
+             (invoke "./components.sh" "maven-settings-builder/src/main/java"
+                     "build/classes/META-INF/plexus/components.xml")
+             #t)))))
+    (inputs
+     `(("java-plexus-utils" ,java-plexus-utils)
+       ("java-plexus-component-annotations" ,java-plexus-component-annotations)
+       ("java-plexus-interpolation" ,java-plexus-interpolation)
+       ("java-plexus-sec-dispatcher" ,java-plexus-sec-dispatcher)
+       ("maven-builder-support" ,maven-builder-support)
+       ("maven-settings" ,maven-settings)
+       ("java-commons-lang3" ,java-commons-lang3)))
+    (native-inputs
+     `(("java-junit" ,java-junit)))
+    (description "Apache Maven is a software project management and comprehension
+tool.  This package contains the effective model builder, with profile activation,
+inheritance, interpolation, @dots{}")))
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [bug#31631] [PATCH 06/10] gnu: Add maven-model-builder.
  2018-05-28 20:55 ` [bug#31631] [PATCH 01/10] gnu: Add maven-artifact Julien Lepiller
                     ` (3 preceding siblings ...)
  2018-05-28 20:55   ` [bug#31631] [PATCH 05/10] gnu: Add maven-settings-builder Julien Lepiller
@ 2018-05-28 20:55   ` Julien Lepiller
  2018-05-28 20:55   ` [bug#31631] [PATCH 07/10] gnu: Add maven-resolver-impl Julien Lepiller
                     ` (3 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Julien Lepiller @ 2018-05-28 20:55 UTC (permalink / raw)
  To: 31631

* gnu/packages/maven.scm (maven-model-builder): New variable.
---
 gnu/packages/maven.scm | 55 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm
index 64ee672be..b9abc6d83 100644
--- a/gnu/packages/maven.scm
+++ b/gnu/packages/maven.scm
@@ -324,3 +324,58 @@ simply plain java objects.")))
     (description "Apache Maven is a software project management and comprehension
 tool.  This package contains the effective model builder, with profile activation,
 inheritance, interpolation, @dots{}")))
+
+(define-public maven-model-builder
+  (package
+    (inherit maven-artifact)
+    (name "maven-model-builder")
+    (arguments
+     `(#:jar-name "maven-model-builder.jar"
+       #:source-dir "maven-model-builder/src/main/java"
+       #:jdk ,icedtea-8
+       #:test-dir "maven-model-builder/src/test"
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'copy-resources
+           (lambda _
+             (copy-recursively "maven-model-builder/src/main/resources"
+                               "build/classes")
+             #t))
+         (add-before 'build 'generate-components.xml
+           (lambda _
+             (mkdir-p "build/classes/META-INF/plexus")
+             (chmod "components.sh" #o755)
+             (invoke "./components.sh" "maven-model-builder/src/main/java"
+                     "build/classes/META-INF/plexus/components.xml")
+             #t))
+         (add-before 'check 'fix-paths
+           (lambda _
+             (substitute* (find-files "maven-model-builder/src/test/java" ".*.java")
+               (("src/test") "maven-model-builder/src/test"))
+             #t)))))
+    (inputs
+     `(("model" ,maven-model)
+       ("artifact" ,maven-artifact)
+       ("support" ,maven-builder-support)
+       ("annotations" ,java-plexus-component-annotations)
+       ("utils" ,java-plexus-utils)
+       ("interpolation" ,java-plexus-interpolation)
+       ("lang3" ,java-commons-lang3)
+       ("guava" ,java-guava)))
+    (native-inputs
+     `(("java-junit" ,java-junit)
+       ("java-hamcrest-core" ,java-hamcrest-core)
+       ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus)
+       ("java-plexus-component-annotations" ,java-plexus-component-annotations)
+       ("guice" ,java-guice)
+       ("java-cglib" ,java-cglib)
+       ("java-asm" ,java-asm)
+       ("sisu-inject" ,java-eclipse-sisu-inject)
+       ("javax-inject" ,java-javax-inject)
+       ("xmlunit" ,java-xmlunit)
+       ("xmlunit" ,java-xmlunit-legacy)
+       ("xbean" ,java-geronimo-xbean-reflect)
+       ("classworlds" ,java-plexus-classworlds)))
+    (description "Apache Maven is a software project management and comprehension
+tool.  This package contains the effective model builder, with profile activation,
+inheritance, interpolation, @dots{}")))
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [bug#31631] [PATCH 07/10] gnu: Add maven-resolver-impl.
  2018-05-28 20:55 ` [bug#31631] [PATCH 01/10] gnu: Add maven-artifact Julien Lepiller
                     ` (4 preceding siblings ...)
  2018-05-28 20:55   ` [bug#31631] [PATCH 06/10] gnu: Add maven-model-builder Julien Lepiller
@ 2018-05-28 20:55   ` Julien Lepiller
  2018-05-28 20:55   ` [bug#31631] [PATCH 08/10] gnu: Add maven-repository-metadata Julien Lepiller
                     ` (2 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Julien Lepiller @ 2018-05-28 20:55 UTC (permalink / raw)
  To: 31631

* gnu/packages/maven.scm (maven-resolver-impl): New variable.
---
 gnu/packages/maven.scm | 60 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm
index b9abc6d83..649c9f962 100644
--- a/gnu/packages/maven.scm
+++ b/gnu/packages/maven.scm
@@ -129,6 +129,66 @@ ease usage of the repository system.")))
     (description "This package contains a repository connector implementation
 for repositories using URI-based layouts.")))
 
+(define-public maven-resolver-impl
+  (package
+    (inherit maven-resolver-api)
+    (name "maven-resolver-impl")
+    (arguments
+     `(#:jar-name "maven-resolver-impl.jar"
+       #:source-dir "maven-resolver-impl/src/main/java"
+       #:test-dir "maven-resolver-impl/src/test"
+       #:jdk ,icedtea-8
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'generate-sisu
+           (lambda _
+             (mkdir-p "build/classes/META-INF/sisu")
+             (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
+               (lambda _
+                 (display
+                   (string-append
+                     ;; Build this list by looking for files containing "@Named"
+                     "org.eclipse.aether.internal.impl.DefaultArtifactResolver\n"
+                     "org.eclipse.aether.internal.impl.DefaultTransporterProvider\n"
+                     "org.eclipse.aether.internal.impl.DefaultUpdatePolicyAnalyzer\n"
+                     "org.eclipse.aether.internal.impl.slf4j.Slf4jLoggerFactory\n"
+                     "org.eclipse.aether.internal.impl.DefaultRepositorySystem\n"
+                     "org.eclipse.aether.internal.impl.LoggerFactoryProvider\n"
+                     "org.eclipse.aether.internal.impl.DefaultFileProcessor\n"
+                     "org.eclipse.aether.internal.impl.DefaultLocalRepositoryProvider\n"
+                     "org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory\n"
+                     "org.eclipse.aether.internal.impl.DefaultDeployer\n"
+                     "org.eclipse.aether.internal.impl.DefaultMetadataResolver\n"
+                     "org.eclipse.aether.internal.impl.DefaultInstaller\n"
+                     "org.eclipse.aether.internal.impl.Maven2RepositoryLayoutFactory\n"
+                     "org.eclipse.aether.internal.impl.DefaultSyncContextFactory\n"
+                     "org.eclipse.aether.internal.impl.DefaultOfflineController\n"
+                     "org.eclipse.aether.internal.impl.EnhancedLocalRepositoryManagerFactory\n"
+                     "org.eclipse.aether.internal.impl.DefaultRepositoryLayoutProvider\n"
+                     "org.eclipse.aether.internal.impl.DefaultRemoteRepositoryManager\n"
+                     "org.eclipse.aether.internal.impl.DefaultRepositoryEventDispatcher\n"
+                     "org.eclipse.aether.internal.impl.DefaultRepositoryConnectorProvider\n"
+                     "org.eclipse.aether.internal.impl.DefaultUpdateCheckManager\n"
+                     "org.eclipse.aether.internal.impl.DefaultChecksumPolicyProvider\n"
+                     "org.eclipse.aether.internal.impl.DefaultDependencyCollector\n"))))
+             #t)))))
+    (inputs
+     `(("maven-resolver-api" ,maven-resolver-api)
+       ("maven-resolver-spi" ,maven-resolver-spi)
+       ("maven-resolver-util" ,maven-resolver-util)
+       ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
+       ("java-javax-inject" ,java-javax-inject)
+       ("java-guice" ,java-guice)
+       ("java-guava" ,java-guava)
+       ("java-cglib" ,java-cglib)
+       ("java-asm" ,java-asm)
+       ("jajva-aopalliance" ,java-aopalliance)
+       ("java-slf4j-api" ,java-slf4j-api)))
+    (native-inputs
+     `(("java-junit" ,java-junit)
+       ("java-hamcrest-core" ,java-hamcrest-core)
+       ("maven-resolver-test-util" ,maven-resolver-test-util)))))
+
 (define-public maven-artifact
   (package
     (name "maven-artifact")
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [bug#31631] [PATCH 08/10] gnu: Add maven-repository-metadata.
  2018-05-28 20:55 ` [bug#31631] [PATCH 01/10] gnu: Add maven-artifact Julien Lepiller
                     ` (5 preceding siblings ...)
  2018-05-28 20:55   ` [bug#31631] [PATCH 07/10] gnu: Add maven-resolver-impl Julien Lepiller
@ 2018-05-28 20:55   ` Julien Lepiller
  2018-05-28 20:55   ` [bug#31631] [PATCH 09/10] gnu: Add maven-shared-utils Julien Lepiller
  2018-05-28 20:55   ` [bug#31631] [PATCH 10/10] gnu: Add maven-resolver-provider Julien Lepiller
  8 siblings, 0 replies; 12+ messages in thread
From: Julien Lepiller @ 2018-05-28 20:55 UTC (permalink / raw)
  To: 31631

* gnu/packages/maven.scm (maven-repository-metadata): New variable.
---
 gnu/packages/maven.scm | 46 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm
index 649c9f962..fe9554146 100644
--- a/gnu/packages/maven.scm
+++ b/gnu/packages/maven.scm
@@ -439,3 +439,49 @@ inheritance, interpolation, @dots{}")))
     (description "Apache Maven is a software project management and comprehension
 tool.  This package contains the effective model builder, with profile activation,
 inheritance, interpolation, @dots{}")))
+
+(define-public maven-repository-metadata
+  (package
+    (inherit maven-artifact)
+    (name "maven-repository-metadata")
+    (arguments
+     `(#:jar-name "maven-repository-metadata.jar"
+       #:source-dir "maven-repository-metadata/src/main/java"
+       #:jdk ,icedtea-8
+       #:tests? #f; no tests
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'generate-models
+           (lambda* (#:key inputs #:allow-other-keys)
+             (define (modello-single-mode file version mode)
+               (invoke "java" "org.codehaus.modello.ModelloCli"
+                       file mode "maven-repository-metadata/src/main/java" version
+                       "false" "true"))
+             (let ((file "maven-repository-metadata/src/main/mdo/metadata.mdo"))
+               (modello-single-mode file "1.1.0" "java")
+               (modello-single-mode file "1.1.0" "xpp3-reader")
+               (modello-single-mode file "1.1.0" "xpp3-writer"))
+             #t)))))
+    (inputs '())
+    (native-inputs
+     `(("modello" ,java-modello-core)
+       ;; for modello:
+       ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus)
+       ("java-plexus-component-annotations" ,java-plexus-component-annotations)
+       ("java-guice" ,java-guice)
+       ("java-cglib" ,java-cglib)
+       ("java-asm" ,java-asm)
+       ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
+       ("java-javax-inject" ,java-javax-inject)
+       ("java-plexus-utils" ,java-plexus-utils)
+       ("java-plexus-classworlds" ,java-plexus-classworlds)
+       ("java-guava" ,java-guava)
+       ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
+       ("java-sisu-build-api" ,java-sisu-build-api)
+       ;; modello plugins:
+       ("java-modello-plugins-java" ,java-modello-plugins-java)
+       ("java-modello-plugins-xml" ,java-modello-plugins-xml)
+       ("java-modello-plugins-xpp3" ,java-modello-plugins-xpp3)))
+    (description "Apache Maven is a software project management and comprehension
+tool.  This package contains strictly the model for Maven Repository Metadata,
+so really just plain objects.")))
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [bug#31631] [PATCH 09/10] gnu: Add maven-shared-utils.
  2018-05-28 20:55 ` [bug#31631] [PATCH 01/10] gnu: Add maven-artifact Julien Lepiller
                     ` (6 preceding siblings ...)
  2018-05-28 20:55   ` [bug#31631] [PATCH 08/10] gnu: Add maven-repository-metadata Julien Lepiller
@ 2018-05-28 20:55   ` Julien Lepiller
  2018-05-28 20:55   ` [bug#31631] [PATCH 10/10] gnu: Add maven-resolver-provider Julien Lepiller
  8 siblings, 0 replies; 12+ messages in thread
From: Julien Lepiller @ 2018-05-28 20:55 UTC (permalink / raw)
  To: 31631

gnu/packages/maven.scm (maven-shared-utils): New variable.
---
 gnu/packages/maven.scm | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm
index fe9554146..f2ef42901 100644
--- a/gnu/packages/maven.scm
+++ b/gnu/packages/maven.scm
@@ -23,6 +23,7 @@
   #:use-module (guix utils)
   #:use-module (guix build-system ant)
   #:use-module (gnu packages)
+  #:use-module (gnu packages compression)
   #:use-module (gnu packages java))
 
 (define-public maven-resolver-api
@@ -189,6 +190,46 @@ for repositories using URI-based layouts.")))
        ("java-hamcrest-core" ,java-hamcrest-core)
        ("maven-resolver-test-util" ,maven-resolver-test-util)))))
 
+(define-public maven-shared-utils
+  (package
+    (name "maven-shared-utils")
+    (version "3.2.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://archive.apache.org/dist/maven/shared/"
+                                  "maven-shared-utils-" version "-source-release.zip"))
+              (sha256
+               (base32
+                "1kzmj68wwdcznb36hm6kfz57wbavw7g1rp236pz10znkjljn6rf6"))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:jar-name "maven-shared-utils.jar"
+       #:source-dir "src/main/java"
+       #:jdk ,icedtea-8
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'remove-cyclic-dep
+           (lambda _
+             (delete-file
+               "src/test/java/org/apache/maven/shared/utils/introspection/ReflectionValueExtractorTest.java")
+             #t)))))
+    (inputs
+     `(("java-jansi" ,java-jansi)
+       ("java-commons-io" ,java-commons-io)
+       ("java-jsr305" ,java-jsr305)
+       ("java-plexus-container-default" ,java-plexus-container-default)))
+    (native-inputs
+     `(("unzip" ,unzip)
+       ("java-junit" ,java-junit)
+       ("java-hamcrest-core" ,java-hamcrest-core)
+       ("java-commons-lang3" ,java-commons-lang3)))
+    (home-page "https://maven.apache.org/shared/maven-shared-utils/")
+    (synopsis "Plexus-util replacement for maven")
+    (description "This project aims to be a functional replacement for
+plexus-utils in Maven.  It is not a 100% API compatible replacement but a
+replacement with improvements.")
+    (license license:asl2.0)))
+
 (define-public maven-artifact
   (package
     (name "maven-artifact")
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [bug#31631] [PATCH 10/10] gnu: Add maven-resolver-provider.
  2018-05-28 20:55 ` [bug#31631] [PATCH 01/10] gnu: Add maven-artifact Julien Lepiller
                     ` (7 preceding siblings ...)
  2018-05-28 20:55   ` [bug#31631] [PATCH 09/10] gnu: Add maven-shared-utils Julien Lepiller
@ 2018-05-28 20:55   ` Julien Lepiller
  8 siblings, 0 replies; 12+ messages in thread
From: Julien Lepiller @ 2018-05-28 20:55 UTC (permalink / raw)
  To: 31631

* gnu/packages/maven.scm (maven-resolver-provider): New variable.
---
 gnu/packages/maven.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm
index f2ef42901..473847c04 100644
--- a/gnu/packages/maven.scm
+++ b/gnu/packages/maven.scm
@@ -526,3 +526,39 @@ inheritance, interpolation, @dots{}")))
     (description "Apache Maven is a software project management and comprehension
 tool.  This package contains strictly the model for Maven Repository Metadata,
 so really just plain objects.")))
+
+(define-public maven-resolver-provider
+  (package
+    (inherit maven-artifact)
+    (name "maven-resolver-provider")
+    (arguments
+     `(#:jar-name "maven-resolver-provider.jar"
+       #:source-dir "maven-resolver-provider/src/main/java"
+       #:test-dir "maven-resolver-provider/src/test"
+       #:jdk ,icedtea-8
+       #:tests? #f; dependency loop on maven-core (@Component RepositorySystem)
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'generate-sisu-named
+           (lambda _
+             (mkdir-p "build/classes/META-INF/sisu")
+             (chmod "./sisu.sh" #o755)
+             (invoke "./sisu.sh" "maven-resolver-provider/src/main/java"
+                     "build/classes/META-INF/sisu/javax.inject.Named")
+             #t)))))
+    (inputs
+     `(("maven-resolver-spi" ,maven-resolver-spi)
+       ("maven-resolver-api" ,maven-resolver-api)
+       ("maven-resolver-impl" ,maven-resolver-impl)
+       ("maven-resolver-util" ,maven-resolver-util)
+       ("maven-model" ,maven-model)
+       ("maven-model-builder" ,maven-model-builder)
+       ("maven-builder-support" ,maven-builder-support)
+       ("maven-repository-metadata" ,maven-repository-metadata)
+       ("java-plexus-utils" ,java-plexus-utils)
+       ("java-plexus-component-annotations" ,java-plexus-component-annotations)
+       ("java-commons-lang3" ,java-commons-lang3)
+       ("java-guice" ,java-guice)
+       ("java-guava" ,java-guava)
+       ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
+       ("java-javax-inject" ,java-javax-inject)))))
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* bug#31631: [PATCH] Some maven packages
  2018-05-28 20:49 [bug#31631] [PATCH] Some maven packages Julien Lepiller
  2018-05-28 20:55 ` [bug#31631] [PATCH 01/10] gnu: Add maven-artifact Julien Lepiller
@ 2018-06-09 21:27 ` Julien Lepiller
  1 sibling, 0 replies; 12+ messages in thread
From: Julien Lepiller @ 2018-06-09 21:27 UTC (permalink / raw)
  To: 31631-done

Le Mon, 28 May 2018 22:49:15 +0200,
Julien Lepiller <julien@lepiller.eu> a écrit :

> Hi Guix,
> 
> here are 10 patches that add the first parts of Maven.

Since there was no review in more than a week, pushed as
458687d58677518a3fd3e441d2cd94d9f964990a -
5aa4ea6a2baf3d25f920c4c706a1b6d99f68ae27.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-06-09 21:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-28 20:49 [bug#31631] [PATCH] Some maven packages Julien Lepiller
2018-05-28 20:55 ` [bug#31631] [PATCH 01/10] gnu: Add maven-artifact Julien Lepiller
2018-05-28 20:55   ` [bug#31631] [PATCH 02/10] gnu: Add maven-model Julien Lepiller
2018-05-28 20:55   ` [bug#31631] [PATCH 03/10] gnu: Add maven-builder-support Julien Lepiller
2018-05-28 20:55   ` [bug#31631] [PATCH 04/10] gnu: Add maven-settings Julien Lepiller
2018-05-28 20:55   ` [bug#31631] [PATCH 05/10] gnu: Add maven-settings-builder Julien Lepiller
2018-05-28 20:55   ` [bug#31631] [PATCH 06/10] gnu: Add maven-model-builder Julien Lepiller
2018-05-28 20:55   ` [bug#31631] [PATCH 07/10] gnu: Add maven-resolver-impl Julien Lepiller
2018-05-28 20:55   ` [bug#31631] [PATCH 08/10] gnu: Add maven-repository-metadata Julien Lepiller
2018-05-28 20:55   ` [bug#31631] [PATCH 09/10] gnu: Add maven-shared-utils Julien Lepiller
2018-05-28 20:55   ` [bug#31631] [PATCH 10/10] gnu: Add maven-resolver-provider Julien Lepiller
2018-06-09 21:27 ` bug#31631: [PATCH] Some maven packages Julien Lepiller

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).