Ignore any system dependencies in Tycho projects

This commit is contained in:
Mikolaj Izdebski 2014-12-04 12:17:33 +01:00
parent 5d5a66554a
commit 27e6857c01
6 changed files with 59 additions and 5 deletions

View File

@ -1,7 +1,7 @@
From 2464fdd561a5c91adb23ef41b736baca5d2e8c61 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Tue, 9 Sep 2014 15:26:16 +0200
Subject: [PATCH 1/4] Avoid installing the same attached artifact twice
Subject: [PATCH 1/5] Avoid installing the same attached artifact twice
---
xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/InstallMojo.java | 5 ++++-

View File

@ -1,7 +1,7 @@
From 9ff89ed35810a8dce70258c409510c647e2d2334 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Mon, 15 Sep 2014 12:50:21 +0200
Subject: [PATCH 2/4] Fix installation of attached Eclipse artifacts
Subject: [PATCH 2/5] Fix installation of attached Eclipse artifacts
---
xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/InstallMojo.java | 2 +-

View File

@ -1,7 +1,7 @@
From f1c21784c270c4fd952bbc4773500982bb12d195 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Tue, 28 Oct 2014 16:55:25 +0100
Subject: [PATCH 3/4] Fix conversion of Ivy to XMvn artifacts
Subject: [PATCH 3/5] Fix conversion of Ivy to XMvn artifacts
Classifiers could be lost is some cases when converting Ivy artifact
to XMvn artifact.

View File

@ -1,7 +1,7 @@
From 85c42732a35cdc274c4b4ab0652f7f6c0da6f3ab Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Wed, 26 Nov 2014 14:10:51 +0100
Subject: [PATCH 4/4] Use topmost repository namespace during installation
Subject: [PATCH 4/5] Use topmost repository namespace during installation
Resolves: rhbz#1166743
---

View File

@ -0,0 +1,49 @@
From 280f1d580f9aa1e995ebeb5ab5f6b136714d1767 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Thu, 4 Dec 2014 12:16:04 +0100
Subject: [PATCH 5/5] Ignore any system dependencies in Tycho projects
---
.../main/java/org/fedoraproject/xmvn/mojo/InstallMojo.java | 12 +-----------
1 file changed, 1 insertion(+), 11 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 9b04d27..b59ae8b 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
@@ -59,8 +59,6 @@ public class InstallMojo
{
private static final Set<String> TYCHO_PACKAGING_TYPES = new LinkedHashSet<>();
- private static final Set<String> TYCHO_P2_CLASSIFIERS = new LinkedHashSet<>();
-
static
{
TYCHO_PACKAGING_TYPES.add( "eclipse-plugin" );
@@ -69,14 +67,6 @@ public class InstallMojo
TYCHO_PACKAGING_TYPES.add( "eclipse-update-site" );
TYCHO_PACKAGING_TYPES.add( "eclipse-application" );
TYCHO_PACKAGING_TYPES.add( "eclipse-repository" );
-
- for ( String packaging : TYCHO_PACKAGING_TYPES )
- TYCHO_P2_CLASSIFIERS.add( "p2." + packaging );
- }
-
- private static boolean isTychoInjectedDependency( Dependency dependency )
- {
- return TYCHO_P2_CLASSIFIERS.contains( dependency.getGroupId() );
}
private static boolean isTychoProject( MavenProject project )
@@ -120,7 +110,7 @@ public class InstallMojo
for ( Dependency dependency : project.getModel().getDependencies() )
{
// Ignore dependencies injected by Tycho
- if ( isTychoProject( project ) && isTychoInjectedDependency( dependency ) )
+ if ( isTychoProject( project ) )
continue;
if ( dependency.getScope() != null && dependency.getScope().equals( "system" ) )
--
1.9.3

View File

@ -4,7 +4,7 @@
Name: xmvn
Version: 2.1.0
Release: 6%{?dist}
Release: 7%{?dist}
Summary: Local Extensions for Apache Maven
License: ASL 2.0
URL: http://mizdebsk.fedorapeople.org/xmvn
@ -16,6 +16,7 @@ Patch0: 0001-Avoid-installing-the-same-attached-artifact-twice.patch
Patch1: 0002-Fix-installation-of-attached-Eclipse-artifacts.patch
Patch2: 0003-Fix-conversion-of-Ivy-to-XMvn-artifacts.patch
Patch3: 0004-Use-topmost-repository-namespace-during-installation.patch
Patch4: 0005-Ignore-any-system-dependencies-in-Tycho-projects.patch
BuildRequires: maven >= 3.2.1-10
BuildRequires: maven-local
@ -149,6 +150,7 @@ This package provides %{summary}.
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%mvn_package :xmvn __noinstall
@ -298,6 +300,9 @@ end
%doc LICENSE NOTICE
%changelog
* Thu Dec 4 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.1.0-7
- Ignore any system dependencies in Tycho projects
* Wed Nov 26 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.1.0-6
- Use topmost repository namespace during installation
- Resolves: rhbz#1166743