Don't inject manifest if it does not already exist

- Resolves: rhbz#1021484
This commit is contained in:
Mikolaj Izdebski 2013-10-23 10:47:57 +02:00
parent a03f63d0f7
commit 26e24780d8
2 changed files with 37 additions and 1 deletions

View File

@ -0,0 +1,28 @@
From 30a4d3786f2b9ac9b0669db51fbf138a3ee3a674 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Tue, 22 Oct 2013 15:56:45 +0200
Subject: [PATCH] Don't inject manifest if it does not already exist
---
.../org/fedoraproject/maven/installer/impl/DefaultInstaller.java | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/xmvn-core/src/main/java/org/fedoraproject/maven/installer/impl/DefaultInstaller.java b/xmvn-core/src/main/java/org/fedoraproject/maven/installer/impl/DefaultInstaller.java
index f1cf72d..51c2d4e 100644
--- a/xmvn-core/src/main/java/org/fedoraproject/maven/installer/impl/DefaultInstaller.java
+++ b/xmvn-core/src/main/java/org/fedoraproject/maven/installer/impl/DefaultInstaller.java
@@ -144,10 +144,7 @@ public class DefaultInstaller
{
Manifest mf = jis.getManifest();
if ( mf == null )
- {
- mf = new Manifest();
- mf.getMainAttributes().putValue( "Manifest-Version", "1.0" );
- }
+ return artifact;
putAttribute( mf, ArtifactUtils.MF_KEY_GROUPID, artifact.getGroupId(), null );
putAttribute( mf, ArtifactUtils.MF_KEY_ARTIFACTID, artifact.getArtifactId(), null );
--
1.8.1.4

View File

@ -1,12 +1,15 @@
Name: xmvn
Version: 1.2.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Local Extensions for Apache Maven
License: ASL 2.0
URL: http://mizdebsk.fedorapeople.org/xmvn
BuildArch: noarch
Source0: https://fedorahosted.org/released/%{name}/%{name}-%{version}.tar.xz
# Backported from upstream commit 30a4d37
Patch0001: 0001-Don-t-inject-manifest-if-it-does-not-already-exist.patch
BuildRequires: maven >= 3.1.0
BuildRequires: maven-local
BuildRequires: beust-jcommander
@ -33,6 +36,7 @@ This package provides %{summary}.
%prep
%setup -q
%patch0001 -p1
# remove dependency plugin maven-binaries execution
# we provide apache-maven by symlink
@ -142,6 +146,10 @@ end
%doc LICENSE NOTICE
%changelog
* Wed Oct 23 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.2.0-2
- Don't inject manifest if it does not already exist
- Resolves: rhbz#1021484
* Fri Oct 18 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.2.0-1
- Update to upstream version 1.2.0