Fix build with current maven-jar-plugin

This commit is contained in:
Michael Simacek 2016-06-03 15:20:39 +02:00
parent bb4067a8bd
commit 34161bf0e1
2 changed files with 53 additions and 23 deletions

View File

@ -0,0 +1,44 @@
From 0c505777f861779eb499c3ad06dbef2ef8f6118a Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Thu, 2 Jun 2016 13:17:13 +0200
Subject: [PATCH] Fix build with current jar-plugin
---
main/pom.xml | 8 ++++++++
pom.xml | 1 -
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/main/pom.xml b/main/pom.xml
index a23ce9e..70c9a0d 100644
--- a/main/pom.xml
+++ b/main/pom.xml
@@ -17,6 +17,14 @@
<build>
<plugins>
<plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
<groupId>com.keyboardsamurais.maven</groupId>
<artifactId>maven-timestamp-plugin</artifactId>
</plugin>
diff --git a/pom.xml b/pom.xml
index 4982e47..1b257bc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -102,7 +102,6 @@
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
- <useDefaultManifestFile>true</useDefaultManifestFile>
<archive>
<index>true</index>
<addMavenDescriptor>false</addMavenDescriptor>
--
2.5.5

View File

@ -31,18 +31,18 @@
Summary: A library for instantiating Java objects
Name: objenesis
Version: 2.1
Release: 3%{dist}
Release: 4%{dist}
License: ASL 2.0
URL: http://objenesis.org/
Source0: https://github.com/easymock/%{name}/archive/%{version}.tar.gz
Patch1: 0001-Fix-build-with-current-jar-plugin.patch
BuildRequires: maven-local
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-release-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-remote-resources-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-shade-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-site-plugin)
BuildRequires: mvn(org.apache.maven.wagon:wagon-ssh-external)
BuildArch: noarch
@ -76,17 +76,10 @@ BuildArch: noarch
This package contains the API documentation for %{name}.
# Skipped till xsite avilable in fedora
#%%package manual
#Group: Documentation
#Summary: Documents for %%{name}
#
#%%description manual
#This package contains the %%{name} manual.
%prep
%setup -q
%setup -q
%patch1 -p1
# Enable generation of pom.properties (rhbz#1017850)
%pom_xpath_remove pom:addMavenDescriptor
@ -99,16 +92,6 @@ This package contains the API documentation for %{name}.
# tests are skipped because of missing dependency spring-osgi-test
%mvn_build -- -Dyear=2009 -Dmaven.test.skip=true
# Below is for manual (requires xsite), skipped
#pushd website
#mvn-jpp -e \
# -s ${M2SETTINGS} \
# -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
# -Dmaven2.jpp.depmap.file=%%{SOURCE1} \
# antrun:run
#popd
%install
%mvn_install
@ -121,6 +104,9 @@ This package contains the API documentation for %{name}.
%changelog
* Fri Jun 03 2016 Michael Simacek <msimacek@redhat.com> - 2.1-4
- Fix build with current maven-jar-plugin
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild