Update to upstream version 3.0.0
This commit is contained in:
parent
b657e313cb
commit
5fe6dc0434
1
.gitignore
vendored
1
.gitignore
vendored
@ -41,3 +41,4 @@
|
|||||||
/xmvn-2.3.2.tar.xz
|
/xmvn-2.3.2.tar.xz
|
||||||
/xmvn-2.4.0.tar.xz
|
/xmvn-2.4.0.tar.xz
|
||||||
/xmvn-2.5.0.tar.xz
|
/xmvn-2.5.0.tar.xz
|
||||||
|
/xmvn-3.0.0.tar.xz
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
From a2f918fe86c91e1a76d198e824118d5ba474808c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
|
||||||
Date: Wed, 28 Oct 2015 22:26:44 +0100
|
|
||||||
Subject: [PATCH 1/4] Copy core dependencies to lib/core in assembly
|
|
||||||
|
|
||||||
---
|
|
||||||
xmvn-core/pom.xml | 15 +++++++++++++++
|
|
||||||
1 file changed, 15 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/xmvn-core/pom.xml b/xmvn-core/pom.xml
|
|
||||||
index e792f6a..b0ef6b5 100644
|
|
||||||
--- a/xmvn-core/pom.xml
|
|
||||||
+++ b/xmvn-core/pom.xml
|
|
||||||
@@ -128,6 +128,21 @@
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
+ <plugin>
|
|
||||||
+ <artifactId>maven-dependency-plugin</artifactId>
|
|
||||||
+ <executions>
|
|
||||||
+ <execution>
|
|
||||||
+ <id>copy-dependencies</id>
|
|
||||||
+ <phase>package</phase>
|
|
||||||
+ <goals>
|
|
||||||
+ <goal>copy-dependencies</goal>
|
|
||||||
+ </goals>
|
|
||||||
+ <configuration>
|
|
||||||
+ <includeScope>runtime</includeScope>
|
|
||||||
+ </configuration>
|
|
||||||
+ </execution>
|
|
||||||
+ </executions>
|
|
||||||
+ </plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</project>
|
|
||||||
--
|
|
||||||
2.9.3
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
|||||||
From 3b214255464d5baca5ee26a897cd9afca53e52c3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
|
||||||
Date: Thu, 26 Nov 2015 14:18:48 +0100
|
|
||||||
Subject: [PATCH 2/4] Try to procect builddep MOJO against patological cases
|
|
||||||
|
|
||||||
- Clone model before processing it to avoid
|
|
||||||
UnsupportedOperationException (rhbz#1276729).
|
|
||||||
- Guard against NullPointerException.
|
|
||||||
- Inject a deep copy of resolutions to avoid
|
|
||||||
ConcurrentModificationException.
|
|
||||||
---
|
|
||||||
.../xmvn/connector/aether/XMvnMojoExecutionListener.java | 2 +-
|
|
||||||
.../src/main/java/org/fedoraproject/xmvn/mojo/BuilddepMojo.java | 5 ++++-
|
|
||||||
2 files changed, 5 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/xmvn-connector-aether/src/main/java/org/fedoraproject/xmvn/connector/aether/XMvnMojoExecutionListener.java b/xmvn-connector-aether/src/main/java/org/fedoraproject/xmvn/connector/aether/XMvnMojoExecutionListener.java
|
|
||||||
index 16f30db..7adfe44 100644
|
|
||||||
--- a/xmvn-connector-aether/src/main/java/org/fedoraproject/xmvn/connector/aether/XMvnMojoExecutionListener.java
|
|
||||||
+++ b/xmvn-connector-aether/src/main/java/org/fedoraproject/xmvn/connector/aether/XMvnMojoExecutionListener.java
|
|
||||||
@@ -222,7 +222,7 @@ public class XMvnMojoExecutionListener
|
|
||||||
for ( BeanProperty<Object> property : new BeanProperties( mojo.getClass() ) )
|
|
||||||
{
|
|
||||||
if ( property.getName().equals( "resolutions" ) )
|
|
||||||
- property.set( mojo, Collections.unmodifiableList( resolutions ) );
|
|
||||||
+ property.set( mojo, Collections.unmodifiableList( new ArrayList<>( resolutions ) ) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
diff --git a/xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/BuilddepMojo.java b/xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/BuilddepMojo.java
|
|
||||||
index 8bbdf5f..dd6a8f5 100644
|
|
||||||
--- a/xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/BuilddepMojo.java
|
|
||||||
+++ b/xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/BuilddepMojo.java
|
|
||||||
@@ -139,7 +139,7 @@ public class BuilddepMojo
|
|
||||||
Set<Artifact> artifacts = new LinkedHashSet<>();
|
|
||||||
for ( MavenProject project : reactorProjects )
|
|
||||||
{
|
|
||||||
- Model model = project.getModel();
|
|
||||||
+ Model model = project.getModel().clone();
|
|
||||||
String modelId = model.getLocation( "" ).getSource().getModelId();
|
|
||||||
BuildDependencyVisitor visitor = new BuildDependencyVisitor( modelId );
|
|
||||||
modelProcessor.processModel( model, visitor );
|
|
||||||
@@ -149,6 +149,9 @@ public class BuilddepMojo
|
|
||||||
Set<NamespacedArtifact> deps = new LinkedHashSet<>();
|
|
||||||
for ( String[] resolution : resolutions )
|
|
||||||
{
|
|
||||||
+ if ( resolution == null )
|
|
||||||
+ continue;
|
|
||||||
+
|
|
||||||
Artifact artifact = new DefaultArtifact( resolution[0] );
|
|
||||||
String compatVersion = resolution[1];
|
|
||||||
String namespace = resolution[2];
|
|
||||||
--
|
|
||||||
2.9.3
|
|
||||||
|
|
@ -1,42 +0,0 @@
|
|||||||
From 077ea8168a80eab45417ec40e48084998df8681e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
|
||||||
Date: Mon, 4 Jul 2016 11:57:34 +0200
|
|
||||||
Subject: [PATCH 3/4] Don't install POM files for Tycho projects
|
|
||||||
|
|
||||||
---
|
|
||||||
.../java/org/fedoraproject/xmvn/mojo/InstallMojo.java | 19 +++++++++++--------
|
|
||||||
1 file changed, 11 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/InstallMojo.java b/xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/InstallMojo.java
|
|
||||||
index fd76421..d6c95c8 100644
|
|
||||||
--- a/xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/InstallMojo.java
|
|
||||||
+++ b/xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/InstallMojo.java
|
|
||||||
@@ -218,14 +218,17 @@ public class InstallMojo
|
|
||||||
if ( mainArtifactPath != null )
|
|
||||||
deployArtifact( mainArtifact, type, project.getModel() );
|
|
||||||
|
|
||||||
- Artifact rawPomArtifact =
|
|
||||||
- new DefaultArtifact( mainArtifact.getGroupId(), mainArtifact.getArtifactId(), "pom",
|
|
||||||
- mainArtifact.getClassifier(), mainArtifact.getVersion() );
|
|
||||||
- File rawPomFile = project.getFile();
|
|
||||||
- Path rawPomPath = rawPomFile != null ? rawPomFile.toPath() : null;
|
|
||||||
- logger.debug( "Raw POM path: {}", rawPomPath );
|
|
||||||
- rawPomArtifact = rawPomArtifact.setPath( rawPomPath );
|
|
||||||
- deployArtifact( rawPomArtifact, type, project.getModel() );
|
|
||||||
+ if ( !isTychoProject( project ) )
|
|
||||||
+ {
|
|
||||||
+ Artifact rawPomArtifact =
|
|
||||||
+ new DefaultArtifact( mainArtifact.getGroupId(), mainArtifact.getArtifactId(), "pom",
|
|
||||||
+ mainArtifact.getClassifier(), mainArtifact.getVersion() );
|
|
||||||
+ File rawPomFile = project.getFile();
|
|
||||||
+ Path rawPomPath = rawPomFile != null ? rawPomFile.toPath() : null;
|
|
||||||
+ logger.debug( "Raw POM path: {}", rawPomPath );
|
|
||||||
+ rawPomArtifact = rawPomArtifact.setPath( rawPomPath );
|
|
||||||
+ deployArtifact( rawPomArtifact, type, project.getModel() );
|
|
||||||
+ }
|
|
||||||
|
|
||||||
Set<Artifact> attachedArtifacts = new LinkedHashSet<>();
|
|
||||||
for ( org.apache.maven.artifact.Artifact mavenArtifact : project.getAttachedArtifacts() )
|
|
||||||
--
|
|
||||||
2.9.3
|
|
||||||
|
|
@ -1,101 +0,0 @@
|
|||||||
From 9de9f15cd6d0f362a396ec0fe9499278495ec9d1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Mat Booth <mat.booth@redhat.com>
|
|
||||||
Date: Sat, 14 Jan 2017 15:36:45 +0000
|
|
||||||
Subject: [PATCH 4/4] Allow xmvn to install files who names whitespace
|
|
||||||
|
|
||||||
Eclipse plugins may be installed as "dir-shaped" bundles, which means
|
|
||||||
that they will be installed as exploded directory trees instead of
|
|
||||||
ordinary jar files. If such a bundle contains a file that has a space
|
|
||||||
in its name, then this will cause RPM build failure due to RPM mis-
|
|
||||||
interpreting the descriptor line as two separate paths instead of a
|
|
||||||
single path containing a space.
|
|
||||||
|
|
||||||
This change adds quoting to paths that contain whitespace when writing
|
|
||||||
the descriptor.
|
|
||||||
---
|
|
||||||
.../org/fedoraproject/xmvn/tools/install/File.java | 15 ++++++++++-
|
|
||||||
.../xmvn/tools/install/JavaPackageTest.java | 31 +++++++++++++++++++++-
|
|
||||||
2 files changed, 44 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/File.java b/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/File.java
|
|
||||||
index 1f4c4ea..7710aa4 100644
|
|
||||||
--- a/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/File.java
|
|
||||||
+++ b/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/File.java
|
|
||||||
@@ -1,5 +1,5 @@
|
|
||||||
/*-
|
|
||||||
- * Copyright (c) 2014-2015 Red Hat, Inc.
|
|
||||||
+ * Copyright (c) 2014-2017 Red Hat, Inc.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
@@ -161,9 +161,22 @@ public abstract class File
|
|
||||||
sb.append( ' ' );
|
|
||||||
}
|
|
||||||
|
|
||||||
+ // Paths containing whitespace (e.g. one of [ \t\n\v\f\r]) must be quoted in the descriptor
|
|
||||||
+ boolean needsQuote = targetPath.toString().matches( ".*\\s+.*" );
|
|
||||||
+
|
|
||||||
+ if ( needsQuote )
|
|
||||||
+ {
|
|
||||||
+ sb.append( '"' );
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
sb.append( '/' );
|
|
||||||
sb.append( targetPath );
|
|
||||||
|
|
||||||
+ if ( needsQuote )
|
|
||||||
+ {
|
|
||||||
+ sb.append( '"' );
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
return sb.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/xmvn-tools/xmvn-install/src/test/java/org/fedoraproject/xmvn/tools/install/JavaPackageTest.java b/xmvn-tools/xmvn-install/src/test/java/org/fedoraproject/xmvn/tools/install/JavaPackageTest.java
|
|
||||||
index b0e6a56..2e791d7 100644
|
|
||||||
--- a/xmvn-tools/xmvn-install/src/test/java/org/fedoraproject/xmvn/tools/install/JavaPackageTest.java
|
|
||||||
+++ b/xmvn-tools/xmvn-install/src/test/java/org/fedoraproject/xmvn/tools/install/JavaPackageTest.java
|
|
||||||
@@ -1,5 +1,5 @@
|
|
||||||
/*-
|
|
||||||
- * Copyright (c) 2014-2015 Red Hat, Inc.
|
|
||||||
+ * Copyright (c) 2014-2017 Red Hat, Inc.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
@@ -60,4 +60,33 @@ public class JavaPackageTest
|
|
||||||
new MetadataStaxReader().read( installRoot.resolve( metadataPath ).toString(), true );
|
|
||||||
assertEquals( "test-uuid", actualMetadata.getUuid() );
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ @Test
|
|
||||||
+ public void testSpacesInFileNames() throws Exception
|
|
||||||
+ {
|
|
||||||
+ JavaPackage pkg = new JavaPackage( "space-test",
|
|
||||||
+ Paths.get( "usr/share/maven-metadata/space-test.xml" ) );
|
|
||||||
+ pkg.addFile( new RegularFile(
|
|
||||||
+ Paths.get(
|
|
||||||
+ "usr/share/eclipse/droplets/space-test/plugins/space-test_1.0.0/META-INF/MANIFEST.MF" ),
|
|
||||||
+ new byte[0] ) );
|
|
||||||
+ pkg.addFile( new RegularFile(
|
|
||||||
+ Paths.get(
|
|
||||||
+ "usr/share/eclipse/droplets/space-test/plugins/space-test_1.0.0/file with spaces" ),
|
|
||||||
+ new byte[0] ) );
|
|
||||||
+ pkg.addFile( new RegularFile(
|
|
||||||
+ Paths.get(
|
|
||||||
+ "usr/share/eclipse/droplets/space-test/plugins/space-test_1.0.0/other\twhitespace" ),
|
|
||||||
+ new byte[0] ) );
|
|
||||||
+ pkg.addFile( new RegularFile(
|
|
||||||
+ Paths.get(
|
|
||||||
+ "usr/share/eclipse/droplets/space-test/plugins/space-test_1.0.0/other\u000Bwhitespace" ),
|
|
||||||
+ new byte[0] ) );
|
|
||||||
+ assertDescriptorEquals( pkg,
|
|
||||||
+ "%attr(0644,root,root) /usr/share/eclipse/droplets/space-test/plugins/space-test_1.0.0/META-INF/MANIFEST.MF",
|
|
||||||
+ "%attr(0644,root,root) \"/usr/share/eclipse/droplets/space-test/plugins/space-test_1.0.0/file with spaces\"",
|
|
||||||
+ "%attr(0644,root,root) \"/usr/share/eclipse/droplets/space-test/plugins/space-test_1.0.0/other\twhitespace\"",
|
|
||||||
+ "%attr(0644,root,root) \"/usr/share/eclipse/droplets/space-test/plugins/space-test_1.0.0/other\u000Bwhitespace\"",
|
|
||||||
+ "%attr(0644,root,root) /usr/share/maven-metadata/space-test.xml" );
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.9.3
|
|
||||||
|
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
00a2b136cded37439222ea8631324fdd xmvn-2.5.0.tar.xz
|
SHA512 (xmvn-3.0.0.tar.xz) = 00cb77a9eaf3521c1aaaa615a8dba258c6993e3c308659213c5dbee953bf6bab1832654e94fc5eee471e8c6fbfe5ec10f7b8755d89a59c864fb5061ed251a1ef
|
||||||
|
143
xmvn.spec
143
xmvn.spec
@ -9,8 +9,8 @@
|
|||||||
%bcond_without gradle
|
%bcond_without gradle
|
||||||
|
|
||||||
Name: xmvn
|
Name: xmvn
|
||||||
Version: 2.5.0
|
Version: 3.0.0
|
||||||
Release: 23%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Local Extensions for Apache Maven
|
Summary: Local Extensions for Apache Maven
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: https://fedora-java.github.io/xmvn/
|
URL: https://fedora-java.github.io/xmvn/
|
||||||
@ -18,12 +18,7 @@ BuildArch: noarch
|
|||||||
|
|
||||||
Source0: https://github.com/fedora-java/xmvn/releases/download/%{version}/xmvn-%{version}.tar.xz
|
Source0: https://github.com/fedora-java/xmvn/releases/download/%{version}/xmvn-%{version}.tar.xz
|
||||||
|
|
||||||
Patch0: 0001-Copy-core-dependencies-to-lib-core-in-assembly.patch
|
BuildRequires: maven >= 3.5.0
|
||||||
Patch1: 0002-Try-to-procect-builddep-MOJO-against-patological-cas.patch
|
|
||||||
Patch2: 0003-Don-t-install-POM-files-for-Tycho-projects.patch
|
|
||||||
Patch3: 0004-Allow-xmvn-to-install-files-who-names-whitespace.patch
|
|
||||||
|
|
||||||
BuildRequires: maven >= 3.4.0
|
|
||||||
BuildRequires: maven-local
|
BuildRequires: maven-local
|
||||||
BuildRequires: beust-jcommander
|
BuildRequires: beust-jcommander
|
||||||
BuildRequires: cglib
|
BuildRequires: cglib
|
||||||
@ -36,15 +31,17 @@ BuildRequires: objectweb-asm
|
|||||||
BuildRequires: modello
|
BuildRequires: modello
|
||||||
BuildRequires: xmlunit
|
BuildRequires: xmlunit
|
||||||
BuildRequires: apache-ivy
|
BuildRequires: apache-ivy
|
||||||
BuildRequires: sisu-mojos
|
|
||||||
BuildRequires: junit
|
BuildRequires: junit
|
||||||
BuildRequires: easymock
|
BuildRequires: easymock
|
||||||
BuildRequires: maven-invoker
|
BuildRequires: maven-invoker
|
||||||
|
BuildRequires: plexus-containers-container-default
|
||||||
|
BuildRequires: plexus-containers-component-annotations
|
||||||
|
BuildRequires: plexus-containers-component-metadata
|
||||||
%if %{with gradle}
|
%if %{with gradle}
|
||||||
BuildRequires: gradle >= 2.5
|
BuildRequires: gradle >= 2.5
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Requires: xmvn-minimal = %{version}-%{release}
|
Requires: %{name}-minimal = %{version}-%{release}
|
||||||
Requires: maven >= 3.4.0
|
Requires: maven >= 3.4.0
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -56,20 +53,19 @@ creating RPM packages containing Maven artifacts.
|
|||||||
%package minimal
|
%package minimal
|
||||||
Summary: Dependency-reduced version of XMvn
|
Summary: Dependency-reduced version of XMvn
|
||||||
Requires: maven-lib >= 3.4.0
|
Requires: maven-lib >= 3.4.0
|
||||||
Requires: xmvn-api = %{version}-%{release}
|
Requires: %{name}-api = %{version}-%{release}
|
||||||
Requires: xmvn-connector-aether = %{version}-%{release}
|
Requires: %{name}-connector-aether = %{version}-%{release}
|
||||||
Requires: xmvn-core = %{version}-%{release}
|
Requires: %{name}-core = %{version}-%{release}
|
||||||
|
|
||||||
Requires: apache-commons-cli
|
Requires: apache-commons-cli
|
||||||
Requires: apache-commons-lang3
|
Requires: apache-commons-lang3
|
||||||
Requires: atinject
|
Requires: atinject
|
||||||
Requires: google-guice
|
Requires: google-guice
|
||||||
Requires: guava
|
Requires: guava
|
||||||
|
Requires: maven-lib
|
||||||
Requires: maven-resolver-api
|
Requires: maven-resolver-api
|
||||||
Requires: maven-resolver-impl
|
Requires: maven-resolver-impl
|
||||||
Requires: maven-resolver-spi
|
Requires: maven-resolver-spi
|
||||||
Requires: maven-resolver-util
|
Requires: maven-resolver-util
|
||||||
Requires: maven-shared-utils
|
|
||||||
Requires: maven-wagon-provider-api
|
Requires: maven-wagon-provider-api
|
||||||
Requires: plexus-cipher
|
Requires: plexus-cipher
|
||||||
Requires: plexus-classworlds
|
Requires: plexus-classworlds
|
||||||
@ -93,19 +89,12 @@ This package provides XMvn parent POM.
|
|||||||
|
|
||||||
%package api
|
%package api
|
||||||
Summary: XMvn API
|
Summary: XMvn API
|
||||||
|
Obsoletes: %{name}-launcher < 3.0.0
|
||||||
|
|
||||||
%description api
|
%description api
|
||||||
This package provides XMvn API module which contains public interface
|
This package provides XMvn API module which contains public interface
|
||||||
for functionality implemented by XMvn Core.
|
for functionality implemented by XMvn Core.
|
||||||
|
|
||||||
%package launcher
|
|
||||||
Summary: XMvn Launcher
|
|
||||||
|
|
||||||
%description launcher
|
|
||||||
This package provides XMvn Launcher module, which provides a way of
|
|
||||||
launching XMvn running in isolated class realm and locating XMVn
|
|
||||||
services.
|
|
||||||
|
|
||||||
%package core
|
%package core
|
||||||
Summary: XMvn Core
|
Summary: XMvn Core
|
||||||
|
|
||||||
@ -115,12 +104,12 @@ functionality of XMvn such as resolution of artifacts from system
|
|||||||
repository.
|
repository.
|
||||||
|
|
||||||
%package connector-aether
|
%package connector-aether
|
||||||
Summary: XMvn Connector for Eclipse Aether
|
Summary: XMvn Connector for Maven Resolver
|
||||||
|
|
||||||
%description connector-aether
|
%description connector-aether
|
||||||
This package provides XMvn Connector for Eclipse Aether, which
|
This package provides XMvn Connector for Maven Resolver, which
|
||||||
provides integration of Eclipse Aether with XMvn. It provides an
|
provides integration of Maven Resolver with XMvn. It provides an
|
||||||
adapter which allows XMvn resolver to be used as Aether workspace
|
adapter which allows XMvn resolver to be used as Maven workspace
|
||||||
reader.
|
reader.
|
||||||
|
|
||||||
%if %{with gradle}
|
%if %{with gradle}
|
||||||
@ -197,10 +186,14 @@ This package provides %{summary}.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
|
||||||
%patch1 -p1
|
# Bisect IT has no chances of working in local, offline mode, without
|
||||||
%patch2 -p1
|
# network access - it needs to access remote repositories.
|
||||||
%patch3 -p1
|
find -name BisectIntegrationTest.java -delete
|
||||||
|
|
||||||
|
# Resolver IT won't work either - it tries to execute JAR file, which
|
||||||
|
# relies on Class-Path in manifest, which is forbidden in Fedora...
|
||||||
|
find -name ResolverIntegrationTest.java -delete
|
||||||
|
|
||||||
%pom_remove_plugin -r :maven-site-plugin
|
%pom_remove_plugin -r :maven-site-plugin
|
||||||
|
|
||||||
@ -210,33 +203,49 @@ This package provides %{summary}.
|
|||||||
%pom_disable_module xmvn-connector-gradle
|
%pom_disable_module xmvn-connector-gradle
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{without its}
|
# Upstream code quality checks, not relevant when building RPMs
|
||||||
%pom_disable_module xmvn-it
|
%pom_remove_plugin -r :apache-rat-plugin
|
||||||
%endif
|
%pom_remove_plugin -r :maven-checkstyle-plugin
|
||||||
|
%pom_remove_plugin -r :jacoco-maven-plugin
|
||||||
|
# FIXME pom macros don't seem to support submodules in profile
|
||||||
|
%pom_remove_plugin :jacoco-maven-plugin xmvn-it
|
||||||
|
|
||||||
# remove dependency plugin maven-binaries execution
|
# remove dependency plugin maven-binaries execution
|
||||||
# we provide apache-maven by symlink
|
# we provide apache-maven by symlink
|
||||||
%pom_xpath_remove "pom:executions/pom:execution[pom:id[text()='maven-binaries']]"
|
%pom_xpath_remove "pom:executions/pom:execution[pom:id[text()='maven-binaries']]"
|
||||||
|
|
||||||
|
# Don't put Class-Path attributes in manifests
|
||||||
|
%pom_remove_plugin :maven-jar-plugin xmvn-tools
|
||||||
|
|
||||||
# get mavenVersion that is expected
|
# get mavenVersion that is expected
|
||||||
|
maven_home=$(readlink -f $(dirname $(readlink $(which mvn)))/..)
|
||||||
mver=$(sed -n '/<mavenVersion>/{s/.*>\(.*\)<.*/\1/;p}' \
|
mver=$(sed -n '/<mavenVersion>/{s/.*>\(.*\)<.*/\1/;p}' \
|
||||||
xmvn-parent/pom.xml)
|
xmvn-parent/pom.xml)
|
||||||
mkdir -p target/dependency/
|
mkdir -p target/dependency/
|
||||||
cp -aL %{_datadir}/maven target/dependency/apache-maven-$mver
|
cp -aL ${maven_home} target/dependency/apache-maven-$mver
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# ITs require artifacts to be insalled in local repo
|
%if %{with its}
|
||||||
%mvn_build -s -j -g install
|
%mvn_build -s -j -- -Prun-its
|
||||||
|
%else
|
||||||
|
%mvn_build -s -j
|
||||||
|
%endif
|
||||||
|
|
||||||
tar --delay-directory-restore -xvf target/*tar.bz2
|
tar --delay-directory-restore -xvf target/*tar.bz2
|
||||||
chmod -R +rwX %{name}-%{version}*
|
chmod -R +rwX %{name}-%{version}*
|
||||||
# These are installed as doc
|
# These are installed as doc
|
||||||
rm -Rf %{name}-%{version}*/{AUTHORS,README,LICENSE,NOTICE}
|
rm -f %{name}-%{version}*/{AUTHORS-XMVN,README-XMVN.md,LICENSE,NOTICE,NOTICE-XMVN}
|
||||||
|
# Not needed - we use JPackage launcher scripts
|
||||||
|
rm -Rf %{name}-%{version}*/lib/{installer,resolver,subst,bisect}/
|
||||||
|
# Irrelevant Maven launcher scripts
|
||||||
|
rm -f %{name}-%{version}*/bin/{mvn.cmd,mvnDebug.cmd,mvn-script}
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%mvn_install
|
%mvn_install
|
||||||
|
|
||||||
|
maven_home=$(readlink -f $(dirname $(readlink $(which mvn)))/..)
|
||||||
|
|
||||||
install -d -m 755 %{buildroot}%{_datadir}/%{name}
|
install -d -m 755 %{buildroot}%{_datadir}/%{name}
|
||||||
cp -r %{name}-%{version}*/* %{buildroot}%{_datadir}/%{name}/
|
cp -r %{name}-%{version}*/* %{buildroot}%{_datadir}/%{name}/
|
||||||
|
|
||||||
@ -244,23 +253,19 @@ for cmd in mvn mvnDebug mvnyjp; do
|
|||||||
cat <<EOF >%{buildroot}%{_datadir}/%{name}/bin/$cmd
|
cat <<EOF >%{buildroot}%{_datadir}/%{name}/bin/$cmd
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
export _FEDORA_MAVEN_HOME="%{_datadir}/%{name}"
|
export _FEDORA_MAVEN_HOME="%{_datadir}/%{name}"
|
||||||
exec %{_datadir}/maven/bin/$cmd "\${@}"
|
exec ${maven_home}/bin/$cmd "\${@}"
|
||||||
EOF
|
EOF
|
||||||
chmod 755 %{buildroot}%{_datadir}/%{name}/bin/$cmd
|
chmod 755 %{buildroot}%{_datadir}/%{name}/bin/$cmd
|
||||||
done
|
done
|
||||||
|
|
||||||
# helper scripts
|
# helper scripts
|
||||||
install -d -m 755 %{buildroot}%{_bindir}
|
%jpackage_script org.fedoraproject.xmvn.tools.bisect.BisectCli "" "-Dxmvn.home=%{_datadir}/%{name}" xmvn/xmvn-bisect:beust-jcommander:maven-invoker:plexus/utils xmvn-bisect
|
||||||
for tool in subst resolve bisect install;do
|
%jpackage_script org.fedoraproject.xmvn.tools.install.cli.InstallerCli "" "" xmvn/xmvn-install:xmvn/xmvn-api:xmvn/xmvn-core:beust-jcommander:slf4j/api:slf4j/simple:objectweb-asm/asm xmvn-install
|
||||||
cat <<EOF >%{buildroot}%{_bindir}/%{name}-$tool
|
%jpackage_script org.fedoraproject.xmvn.tools.resolve.ResolverCli "" "" xmvn/xmvn-resolve:xmvn/xmvn-api:xmvn/xmvn-core:beust-jcommander xmvn-resolve
|
||||||
#!/bin/sh -e
|
%jpackage_script org.fedoraproject.xmvn.tools.subst.SubstCli "" "" xmvn/xmvn-subst:xmvn/xmvn-api:xmvn/xmvn-core:beust-jcommander xmvn-subst
|
||||||
exec %{_datadir}/%{name}/bin/%{name}-$tool "\${@}"
|
|
||||||
EOF
|
|
||||||
chmod +x %{buildroot}%{_bindir}/%{name}-$tool
|
|
||||||
done
|
|
||||||
|
|
||||||
# copy over maven lib directory
|
# copy over maven lib directory
|
||||||
cp -r %{_datadir}/maven/lib/* %{buildroot}%{_datadir}/%{name}/lib/
|
cp -r ${maven_home}/lib/* %{buildroot}%{_datadir}/%{name}/lib/
|
||||||
|
|
||||||
# possibly recreate symlinks that can be automated with xmvn-subst
|
# possibly recreate symlinks that can be automated with xmvn-subst
|
||||||
%{name}-subst -s -R %{buildroot} %{buildroot}%{_datadir}/%{name}/
|
%{name}-subst -s -R %{buildroot} %{buildroot}%{_datadir}/%{name}/
|
||||||
@ -273,14 +278,15 @@ ln -s %{name} %{buildroot}%{_bindir}/mvn-local
|
|||||||
|
|
||||||
# make sure our conf is identical to maven so yum won't freak out
|
# make sure our conf is identical to maven so yum won't freak out
|
||||||
install -d -m 755 %{buildroot}%{_datadir}/%{name}/conf/
|
install -d -m 755 %{buildroot}%{_datadir}/%{name}/conf/
|
||||||
cp -P %{_datadir}/maven/conf/settings.xml %{buildroot}%{_datadir}/%{name}/conf/
|
cp -P ${maven_home}/conf/settings.xml %{buildroot}%{_datadir}/%{name}/conf/
|
||||||
cp -P %{_datadir}/maven/bin/m2.conf %{buildroot}%{_datadir}/%{name}/bin/
|
cp -P ${maven_home}/bin/m2.conf %{buildroot}%{_datadir}/%{name}/bin/
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%{_bindir}/mvn-local
|
%{_bindir}/mvn-local
|
||||||
|
|
||||||
%files minimal
|
%files minimal
|
||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
|
%dir %{_datadir}/%{name}
|
||||||
%dir %{_datadir}/%{name}/bin
|
%dir %{_datadir}/%{name}/bin
|
||||||
%dir %{_datadir}/%{name}/lib
|
%dir %{_datadir}/%{name}/lib
|
||||||
%{_datadir}/%{name}/lib/*.jar
|
%{_datadir}/%{name}/lib/*.jar
|
||||||
@ -290,23 +296,17 @@ cp -P %{_datadir}/maven/bin/m2.conf %{buildroot}%{_datadir}/%{name}/bin/
|
|||||||
%{_datadir}/%{name}/bin/mvn
|
%{_datadir}/%{name}/bin/mvn
|
||||||
%{_datadir}/%{name}/bin/mvnDebug
|
%{_datadir}/%{name}/bin/mvnDebug
|
||||||
%{_datadir}/%{name}/bin/mvnyjp
|
%{_datadir}/%{name}/bin/mvnyjp
|
||||||
%{_datadir}/%{name}/bin/xmvn
|
|
||||||
%{_datadir}/%{name}/boot
|
%{_datadir}/%{name}/boot
|
||||||
%{_datadir}/%{name}/conf
|
%{_datadir}/%{name}/conf
|
||||||
|
|
||||||
%files parent-pom -f .mfiles-xmvn-parent
|
%files parent-pom -f .mfiles-xmvn-parent
|
||||||
%doc LICENSE NOTICE
|
%doc LICENSE NOTICE
|
||||||
|
|
||||||
%files launcher -f .mfiles-xmvn-launcher
|
|
||||||
%dir %{_datadir}/%{name}/lib
|
|
||||||
%{_datadir}/%{name}/lib/core
|
|
||||||
|
|
||||||
%files core -f .mfiles-xmvn-core
|
%files core -f .mfiles-xmvn-core
|
||||||
|
|
||||||
%files api -f .mfiles-xmvn-api
|
%files api -f .mfiles-xmvn-api
|
||||||
%dir %{_javadir}/%{name}
|
|
||||||
%doc LICENSE NOTICE
|
%doc LICENSE NOTICE
|
||||||
%doc AUTHORS README
|
%doc AUTHORS README.md
|
||||||
|
|
||||||
%files connector-aether -f .mfiles-xmvn-connector-aether
|
%files connector-aether -f .mfiles-xmvn-connector-aether
|
||||||
|
|
||||||
@ -315,45 +315,30 @@ cp -P %{_datadir}/maven/bin/m2.conf %{buildroot}%{_datadir}/%{name}/bin/
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files connector-ivy -f .mfiles-xmvn-connector-ivy
|
%files connector-ivy -f .mfiles-xmvn-connector-ivy
|
||||||
%dir %{_datadir}/%{name}/lib
|
|
||||||
%{_datadir}/%{name}/lib/ivy
|
|
||||||
|
|
||||||
%files mojo -f .mfiles-xmvn-mojo
|
%files mojo -f .mfiles-xmvn-mojo
|
||||||
|
|
||||||
%files tools-pom -f .mfiles-xmvn-tools
|
%files tools-pom -f .mfiles-xmvn-tools
|
||||||
|
|
||||||
%files resolve -f .mfiles-xmvn-resolve
|
%files resolve -f .mfiles-xmvn-resolve
|
||||||
%attr(755,-,-) %{_bindir}/%{name}-resolve
|
%{_bindir}/%{name}-resolve
|
||||||
%dir %{_datadir}/%{name}/bin
|
|
||||||
%dir %{_datadir}/%{name}/lib
|
|
||||||
%{_datadir}/%{name}/bin/%{name}-resolve
|
|
||||||
%{_datadir}/%{name}/lib/resolver
|
|
||||||
|
|
||||||
%files bisect -f .mfiles-xmvn-bisect
|
%files bisect -f .mfiles-xmvn-bisect
|
||||||
%attr(755,-,-) %{_bindir}/%{name}-bisect
|
%{_bindir}/%{name}-bisect
|
||||||
%dir %{_datadir}/%{name}/bin
|
|
||||||
%dir %{_datadir}/%{name}/lib
|
|
||||||
%{_datadir}/%{name}/bin/%{name}-bisect
|
|
||||||
%{_datadir}/%{name}/lib/bisect
|
|
||||||
|
|
||||||
%files subst -f .mfiles-xmvn-subst
|
%files subst -f .mfiles-xmvn-subst
|
||||||
%attr(755,-,-) %{_bindir}/%{name}-subst
|
%{_bindir}/%{name}-subst
|
||||||
%dir %{_datadir}/%{name}/bin
|
|
||||||
%dir %{_datadir}/%{name}/lib
|
|
||||||
%{_datadir}/%{name}/bin/%{name}-subst
|
|
||||||
%{_datadir}/%{name}/lib/subst
|
|
||||||
|
|
||||||
%files install -f .mfiles-xmvn-install
|
%files install -f .mfiles-xmvn-install
|
||||||
%attr(755,-,-) %{_bindir}/%{name}-install
|
%{_bindir}/%{name}-install
|
||||||
%dir %{_datadir}/%{name}/bin
|
|
||||||
%dir %{_datadir}/%{name}/lib
|
|
||||||
%{_datadir}/%{name}/bin/%{name}-install
|
|
||||||
%{_datadir}/%{name}/lib/installer
|
|
||||||
|
|
||||||
%files javadoc
|
%files javadoc
|
||||||
%doc LICENSE NOTICE
|
%doc LICENSE NOTICE
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jun 21 2017 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.0.0-1
|
||||||
|
- Update to upstream version 3.0.0
|
||||||
|
|
||||||
* Wed Apr 19 2017 Michael Simacek <msimacek@redhat.com> - 2.5.0-23
|
* Wed Apr 19 2017 Michael Simacek <msimacek@redhat.com> - 2.5.0-23
|
||||||
- Update spec for maven 3.5.0
|
- Update spec for maven 3.5.0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user