Merge branch 'master' into f19

Conflicts:
	xmvn.spec
This commit is contained in:
Stanislav Ochotnicky 2013-05-24 14:49:21 +02:00
commit 0fcec66506
5 changed files with 65 additions and 53 deletions

1
.gitignore vendored
View File

@ -20,3 +20,4 @@
/xmvn-0.4.0.tar.xz
/xmvn-0.4.1.tar.xz
/xmvn-0.4.2.tar.xz
/xmvn-0.5.0.tar.xz

View File

@ -1,27 +0,0 @@
From bd88b6fbba3b251ea9b7a47488377e95e3004ab3 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Fri, 17 May 2013 07:19:54 +0200
Subject: [PATCH] Install MOJO fix
Don't attempt to install packages whict are not installable.
---
.../java/org/fedoraproject/maven/rpminstall/plugin/InstallMojo.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/xmvn-mojo/src/main/java/org/fedoraproject/maven/rpminstall/plugin/InstallMojo.java b/xmvn-mojo/src/main/java/org/fedoraproject/maven/rpminstall/plugin/InstallMojo.java
index 0047366..39e11d5 100644
--- a/xmvn-mojo/src/main/java/org/fedoraproject/maven/rpminstall/plugin/InstallMojo.java
+++ b/xmvn-mojo/src/main/java/org/fedoraproject/maven/rpminstall/plugin/InstallMojo.java
@@ -137,7 +137,8 @@ public class InstallMojo
packages.put( packageName, pkg );
}
- installProject( project, pkg, rule );
+ if ( pkg.isInstallable() )
+ installProject( project, pkg, rule );
}
Path installRoot = Paths.get( settings.getInstallRoot() );
--
1.8.1.4

View File

@ -1 +1 @@
ab84b57e1f85485dc2d4f266d45518fc xmvn-0.4.2.tar.xz
faabdb9e0aac0de78ae92ca810b8f2b9 xmvn-0.5.0.tar.xz

View File

@ -1,7 +0,0 @@
main is org.fedoraproject.maven.connector.Main from plexus.core
[plexus.core]
optionally ${maven.home}/lib/ext/*.jar
load ${maven.home}/lib/*.jar
optionally ${maven.home}/lib/maven/ext/*.jar
load ${maven.home}/lib/maven/*.jar

View File

@ -1,15 +1,11 @@
Name: xmvn
Version: 0.4.2
Release: 1.1%{?dist}
Version: 0.5.0
Release: 1%{?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
Source1: %{name}-classworlds.conf
# Backported upstream fix, will be available in 0.5.0
# https://github.com/mizdebsk/xmvn/commit/76f2d25c2b6ca4233bda9f5f9c8c8120d3164086
Patch0001: 0001-Install-MOJO-fix.patch
BuildRequires: maven-local
BuildRequires: beust-jcommander
@ -20,6 +16,7 @@ BuildRequires: plexus-containers-container-default
BuildRequires: plexus-utils
BuildRequires: xbean
BuildRequires: xml-commons-apis
BuildRequires: maven-dependency-plugin
Requires: maven
Requires: beust-jcommander
@ -44,30 +41,63 @@ This package provides %{summary}.
%prep
%setup -q
%patch0001 -p1
# Add cglib test dependency as a workaround for rhbz#911365
%pom_xpath_inject pom:project "<dependencies/>"
%pom_add_dep cglib:cglib::test
%pom_add_dep cglib:cglib::test %{name}-core
# remove dependency plugin, we provide apache-maven by symlink
%pom_remove_plugin :maven-dependency-plugin
# get mavenVersion that is expected
mver=$(sed -n '/<mavenVersion>/{s/.*>\(.*\)<.*/\1/;p}' \
xmvn-parent/pom.xml)
mkdir -p target/dependency/
ln -s %{_datadir}/maven target/dependency/apache-maven-$mver
%build
%mvn_file ":{xmvn-{core,connector}}" %{name}/@1 %{_datadir}/%{name}/lib/@1
%mvn_build -X
# let's use generated tarball to copy directory structure
# workaround for plexus-archiver bug
# https://github.com/sonatype/plexus-archiver/pull/9
sed -i '1s:^BZBZ:BZ:' target/*tar.bz2
tar --delay-directory-restore -xvf target/*tar.bz2
chmod -R +rwX %{name}-%{version}*
%install
%mvn_install
install -d -m 755 %{buildroot}%{_datadir}/%{name}/bin
install -d -m 755 %{buildroot}%{_datadir}/%{name}/lib/ext
install -p -m 644 %{SOURCE1} %{buildroot}%{_datadir}/%{name}/bin/m2.conf
cp -r %{name}-%version/* %{buildroot}%{_datadir}/%{name}/
ln -sf %{_datadir}/maven/bin/mvn %{buildroot}%{_datadir}/%{name}/bin/mvn
ln -sf %{_datadir}/maven/bin/mvnDebug %{buildroot}%{_datadir}/%{name}/bin/mvnDebug
ln -sf %{_datadir}/maven/bin/mvnyjp %{buildroot}%{_datadir}/%{name}/bin/mvnyjp
ln -sf %{_datadir}/maven/conf %{buildroot}%{_datadir}/%{name}/conf
ln -sf %{_datadir}/maven/boot %{buildroot}%{_datadir}/%{name}/boot
ln -sf %{_datadir}/maven/lib %{buildroot}%{_datadir}/%{name}/lib/maven
# /usr/bin/xmvn-resolve script
%jpackage_script org.fedoraproject.maven.tools.resolver.ResolverCli "" "" %{name}/%{name}-core:%{name}/%{name}-resolve:beust-jcommander:xml-commons-apis:plexus/containers-container-default:plexus/classworlds:plexus/utils:xbean/xbean-reflect:guava %{name}-resolve true
# helper scripts
install -d -m 755 %{buildroot}%{_bindir}
install -m 755 xmvn-tools/src/main/bin/tool-script \
%{buildroot}%{_datadir}/%{name}/bin/
for tool in subst resolve bisect;do
rm %{buildroot}%{_datadir}/%{name}/bin/%{name}-$tool
ln -s tool-script \
%{buildroot}%{_datadir}/%{name}/bin/%{name}-$tool
cat <<EOF >%{buildroot}%{_bindir}/%{name}-$tool
#!/bin/sh -e
exec %{_datadir}/%{name}/bin/%{name}-$tool "\${@}"
EOF
chmod +x %{buildroot}%{_bindir}/%{name}-$tool
done
# copy over maven lib directory
cp -r %{_datadir}/maven/lib/* %{buildroot}%{_datadir}/%{name}/lib/
# possibly recreate symlinks that can be automated with xmvn-subst
%{buildroot}%{_datadir}/%{name}/bin/%{name}-subst \
%{buildroot}%{_datadir}/%{name}/
# /usr/bin/xmvn script
cat <<EOF >%{buildroot}%{_bindir}/%{name}
@ -76,6 +106,15 @@ export M2_HOME="\${M2_HOME:-%{_datadir}/%{name}}"
exec mvn "\${@}"
EOF
# make sure our conf is identical to maven so yum won't freak out
cp -P %{_datadir}/maven/conf/settings.xml %{buildroot}%{_datadir}/%{name}/conf/
%pre
# we are changing symlink to dir, workaround RPM issues
for dir in conf boot;do
[ $1 -eq 1 ] && [ -L %{_datadir}/%{name}/$dir ] && \
rm -f %{_datadir}/%{name}/$dir || :
done
%files -f .mfiles
%doc LICENSE NOTICE
@ -87,9 +126,15 @@ EOF
%doc LICENSE NOTICE
%changelog
* Fri May 17 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.4.2-1.1
* Fri May 24 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.5.0-1
- Update to upstream version 0.5.0
* Fri May 17 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.4.2-3
- Add patch: install MOJO fix
* Wed Apr 17 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.4.2-2
- Update plexus-containers-container-default JAR location
* Tue Apr 9 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.4.2-1
- Update to upstream version 0.4.2