[java-sig-commits] [maven2] Fix installation of pom files for artifact jars
Stanislav Ochotnicky
sochotni at fedoraproject.org
Fri Dec 10 12:07:29 UTC 2010
commit b4c602f9f044598544cff3d68710f68b9447ea0f
Author: Stanislav Ochotnicky <sochotnicky at redhat.com>
Date: Fri Dec 10 12:59:16 2010 +0100
Fix installation of pom files for artifact jars
For most jars we accidentaly installed main maven pom instead of
specific pom file for that jar module. This patch should fix this. It
also uses pushd/popd to be more error-resilient and clear.
maven2.spec | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/maven2.spec b/maven2.spec
index 6a9ed21..fa9014c 100644
--- a/maven2.spec
+++ b/maven2.spec
@@ -3,7 +3,7 @@
Name: maven2
Version: 2.2.1
-Release: 15%{?dist}
+Release: 16%{?dist}
Summary: Java project management and project comprehension tool
Group: Development/Build Tools
@@ -428,19 +428,19 @@ for file in \
maven-plugin-descriptor/target/maven-plugin-descriptor-%{version}.jar; do \
FNAME=`basename $file`
- FNAME_NO_EXT=`echo "$FNAME" | sed -e s:.jar$::g`
+ FNAME_NO_EXT=`basename $file .jar`
DIR=`dirname $file`
UNVER_NAME=`basename $file | sed -e s:-%{version}::g`
UNVER_NAME_WITH_NO_EXT=`echo $FNAME_NO_EXT | sed -e s:-%{version}::g`
ARTIFACT=`basename \`dirname $DIR\``
- OLDPWD=`pwd`
- cd $DIR
+
+ pushd $DIR
install -m 644 $FNAME $RPM_BUILD_ROOT%{_javadir}/%{name}/
ln -s $FNAME $RPM_BUILD_ROOT%{_javadir}/%{name}/$UNVER_NAME
- install -m 644 ../../pom.xml $RPM_BUILD_ROOT%{_datadir}/%{name}/poms/JPP.%{name}-$UNVER_NAME_WITH_NO_EXT.pom
+ install -m 644 ../pom.xml $RPM_BUILD_ROOT%{_datadir}/%{name}/poms/JPP.%{name}-$UNVER_NAME_WITH_NO_EXT.pom
%add_to_maven_depmap org.apache.maven $ARTIFACT %{version} JPP/%{name} $UNVER_NAME_WITH_NO_EXT
- cd $OLDPWD
+ popd
done
# maven-reporting-api
@@ -504,6 +504,9 @@ rm -rf $RPM_BUILD_ROOT
%doc
%changelog
+* Fri Dec 10 2010 Stanislav Ochotnicky <sochotnicky at redhat.com> - 2.2.1-16
+- Fix installation of pom files for artifact jars
+
* Mon Nov 22 2010 Stanislav Ochotnicky <sochotnicky at redhat.com> - 2.2.1-15
- Add apache-commons-parent to BR/R
- Rename BRs from jakarta-commons to apache-commons
More information about the java-sig-commits
mailing list