Update to upstream version 2.1.1

This commit is contained in:
Mikolaj Izdebski 2015-01-05 18:00:19 +01:00
parent e4f3810306
commit 8dd3489a73
9 changed files with 7 additions and 240 deletions

1
.gitignore vendored
View File

@ -33,3 +33,4 @@
/xmvn-2.0.0.tar.xz
/xmvn-2.0.1.tar.xz
/xmvn-2.1.0.tar.xz
/xmvn-2.1.1.tar.xz

View File

@ -1,30 +0,0 @@
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/5] Avoid installing the same attached artifact twice
---
xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/InstallMojo.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
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 28c9231..4018777 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
@@ -213,9 +213,12 @@ public class InstallMojo
rawPomArtifact = rawPomArtifact.setPath( rawPomPath );
deployArtifact( rawPomArtifact, type, project.getModel() );
+ Set<Artifact> attachedArtifacts = new LinkedHashSet<>();
for ( org.apache.maven.artifact.Artifact mavenArtifact : project.getAttachedArtifacts() )
+ attachedArtifacts.add( aetherArtifact( mavenArtifact ) );
+
+ for ( Artifact attachedArtifact : attachedArtifacts )
{
- Artifact attachedArtifact = aetherArtifact( mavenArtifact );
Path attachedArtifactPath = attachedArtifact.getPath();
logger.debug( "Installing attached artifact {}", attachedArtifact );
logger.debug( "Artifact file is {}", attachedArtifactPath );
--
1.9.3

View File

@ -1,25 +0,0 @@
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/5] Fix installation of attached Eclipse artifacts
---
xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/InstallMojo.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 4018777..9b04d27 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
@@ -230,7 +230,7 @@ public class InstallMojo
continue;
}
- deployArtifact( attachedArtifact, null, project.getModel() );
+ deployArtifact( attachedArtifact, type, project.getModel() );
}
}
}
--
1.9.3

View File

@ -1,32 +0,0 @@
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/5] Fix conversion of Ivy to XMvn artifacts
Classifiers could be lost is some cases when converting Ivy artifact
to XMvn artifact.
Resolves: rhbz#1127804
---
.../main/java/org/fedoraproject/xmvn/connector/ivy/IvyResolver.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xmvn-connector-ivy/src/main/java/org/fedoraproject/xmvn/connector/ivy/IvyResolver.java b/xmvn-connector-ivy/src/main/java/org/fedoraproject/xmvn/connector/ivy/IvyResolver.java
index d14e5f6..8c6a277 100644
--- a/xmvn-connector-ivy/src/main/java/org/fedoraproject/xmvn/connector/ivy/IvyResolver.java
+++ b/xmvn-connector-ivy/src/main/java/org/fedoraproject/xmvn/connector/ivy/IvyResolver.java
@@ -133,9 +133,9 @@ public class IvyResolver
ModuleRevisionId revision = artifact.getModuleRevisionId();
String groupId = revision.getOrganisation();
- String artifactId = revision.getName();
+ String artifactId = artifact.getName();
String extension = artifact.getExt();
- String classifier = revision.getExtraAttribute( "classifier" );
+ String classifier = artifact.getExtraAttribute( "classifier" );
String version = revision.getRevision();
String type = artifact.getType();
--
1.9.3

View File

@ -1,26 +0,0 @@
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/5] Use topmost repository namespace during installation
Resolves: rhbz#1166743
---
.../fedoraproject/xmvn/tools/install/impl/DefaultArtifactInstaller.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/impl/DefaultArtifactInstaller.java b/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/impl/DefaultArtifactInstaller.java
index 8512c0e..270ddc4 100644
--- a/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/impl/DefaultArtifactInstaller.java
+++ b/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/impl/DefaultArtifactInstaller.java
@@ -151,7 +151,7 @@ public class DefaultArtifactInstaller
}
// Namespace
- am.setNamespace( repoPaths.iterator().next().getRepository().getNamespace() );
+ am.setNamespace( repo.getNamespace() );
// UUID
am.setUuid( UUID.randomUUID().toString() );
--
1.9.3

View File

@ -1,49 +0,0 @@
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

@ -1,62 +0,0 @@
From de6669c12a7e9bf8a9a813b2423e9c39179d64e5 Mon Sep 17 00:00:00 2001
From: Mat Booth <mat.booth@redhat.com>
Date: Tue, 9 Dec 2014 16:24:57 +0000
Subject: [PATCH] Add fully qualified osgi version to install plan when tycho
detected.
---
.../main/java/org/fedoraproject/xmvn/mojo/InstallMojo.java | 11 +++++++----
1 file changed, 7 insertions(+), 4 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 b59ae8b..ee2dafd 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
@@ -140,13 +140,16 @@ public class InstallMojo
}
}
- private void deployArtifact( Artifact artifact, String type, Model model )
+ private void deployArtifact( Artifact artifact, String type, MavenProject project )
throws MojoExecutionException
{
+ Model model = project.getModel();
DeploymentRequest request = new DeploymentRequest();
request.setArtifact( artifact );
if ( type != null )
request.addProperty( "type", type );
+ if ( isTychoProject(project) )
+ request.addProperty( "qualifiedVersion", model.getProperties().getProperty( "qualifiedVersion" ) );
for ( Dependency dependency : model.getDependencies() )
{
@@ -192,7 +195,7 @@ public class InstallMojo
String type = project.getPackaging();
if ( mainArtifactPath != null )
- deployArtifact( mainArtifact, type, project.getModel() );
+ deployArtifact( mainArtifact, type, project );
Artifact rawPomArtifact =
new DefaultArtifact( mainArtifact.getGroupId(), mainArtifact.getArtifactId(), "pom",
@@ -201,7 +204,7 @@ public class InstallMojo
Path rawPomPath = rawPomFile != null ? rawPomFile.toPath() : null;
logger.debug( "Raw POM path: {}", rawPomPath );
rawPomArtifact = rawPomArtifact.setPath( rawPomPath );
- deployArtifact( rawPomArtifact, type, project.getModel() );
+ deployArtifact( rawPomArtifact, type, project );
Set<Artifact> attachedArtifacts = new LinkedHashSet<>();
for ( org.apache.maven.artifact.Artifact mavenArtifact : project.getAttachedArtifacts() )
@@ -220,7 +223,7 @@ public class InstallMojo
continue;
}
- deployArtifact( attachedArtifact, type, project.getModel() );
+ deployArtifact( attachedArtifact, type, project );
}
}
}
--
1.9.3

View File

@ -1 +1 @@
f02fb3d6dc26cdeefc6ff9e6843e7189 xmvn-2.1.0.tar.xz
a1b3f52a2d3a8f8c0c5c26fab35bc63f xmvn-2.1.1.tar.xz

View File

@ -3,8 +3,8 @@
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^osgi\\($
Name: xmvn
Version: 2.1.0
Release: 8%{?dist}
Version: 2.1.1
Release: 1%{?dist}
Summary: Local Extensions for Apache Maven
License: ASL 2.0
URL: http://mizdebsk.fedorapeople.org/xmvn
@ -12,13 +12,6 @@ BuildArch: noarch
Source0: https://fedorahosted.org/released/%{name}/%{name}-%{version}.tar.xz
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
Patch5: 0006-Add-fully-qualified-osgi-version-to-install-plan-whe.patch
BuildRequires: maven >= 3.2.1-10
BuildRequires: maven-local
BuildRequires: beust-jcommander
@ -147,12 +140,6 @@ This package provides %{summary}.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%mvn_package :xmvn __noinstall
@ -302,6 +289,9 @@ end
%doc LICENSE NOTICE
%changelog
* Mon Jan 5 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.1.1-1
- Update to upstream version 2.1.1
* Wed Dec 10 2014 Michal Srb <msrb@redhat.com> - 2.1.0-8
- Add fully qualified osgi version to install plan when tycho detected
- Resolves: rhbz#1172225