Don't install POM files for Tycho projects
This commit is contained in:
parent
f3dd9430d4
commit
271ff42609
@ -1,7 +1,7 @@
|
||||
From a2f918fe86c91e1a76d198e824118d5ba474808c Mon Sep 17 00:00:00 2001
|
||||
From 969d50782dbf912f40c6979f15c25684404d3b38 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/2] Copy core dependencies to lib/core in assembly
|
||||
Subject: [PATCH 1/3] Copy core dependencies to lib/core in assembly
|
||||
|
||||
---
|
||||
xmvn-core/pom.xml | 15 +++++++++++++++
|
||||
@ -34,5 +34,5 @@ index e792f6a..b0ef6b5 100644
|
||||
</build>
|
||||
</project>
|
||||
--
|
||||
2.5.0
|
||||
2.7.4
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 3b214255464d5baca5ee26a897cd9afca53e52c3 Mon Sep 17 00:00:00 2001
|
||||
From 530df7f2f2f6751a06862955fafbe319f86a3808 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/2] Try to procect builddep MOJO against patological cases
|
||||
Subject: [PATCH 2/3] Try to procect builddep MOJO against patological cases
|
||||
|
||||
- Clone model before processing it to avoid
|
||||
UnsupportedOperationException (rhbz#1276729).
|
||||
@ -50,5 +50,5 @@ index 8bbdf5f..dd6a8f5 100644
|
||||
String compatVersion = resolution[1];
|
||||
String namespace = resolution[2];
|
||||
--
|
||||
2.5.0
|
||||
2.7.4
|
||||
|
||||
|
42
0003-Don-t-install-POM-files-for-Tycho-projects.patch
Normal file
42
0003-Don-t-install-POM-files-for-Tycho-projects.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From 84ee943dbe1c474aa7559242080d9f66b315b77d 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/3] 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.7.4
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
Name: xmvn
|
||||
Version: 2.5.0
|
||||
Release: 10%{?dist}
|
||||
Release: 11%{?dist}
|
||||
Summary: Local Extensions for Apache Maven
|
||||
License: ASL 2.0
|
||||
URL: http://mizdebsk.fedorapeople.org/xmvn
|
||||
@ -18,6 +18,7 @@ Source0: https://fedorahosted.org/released/%{name}/%{name}-%{version}.tar
|
||||
|
||||
Patch0: 0001-Copy-core-dependencies-to-lib-core-in-assembly.patch
|
||||
Patch1: 0002-Try-to-procect-builddep-MOJO-against-patological-cas.patch
|
||||
Patch2: 0003-Don-t-install-POM-files-for-Tycho-projects.patch
|
||||
|
||||
BuildRequires: maven-lib >= 3.3.9-2
|
||||
BuildRequires: maven-local
|
||||
@ -170,6 +171,7 @@ This package provides %{summary}.
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%mvn_package ":xmvn{,-it}" __noinstall
|
||||
|
||||
@ -342,6 +344,9 @@ cp -P %{_datadir}/maven/bin/m2.conf %{buildroot}%{_datadir}/%{name}/bin/
|
||||
%doc LICENSE NOTICE
|
||||
|
||||
%changelog
|
||||
* Mon Jul 04 2016 Michael Simacek <msimacek@redhat.com> - 2.5.0-11
|
||||
- Don't install POM files for Tycho projects
|
||||
|
||||
* Thu Jun 30 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5.0-10
|
||||
- Full xmvn should require full maven
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user