[javapackages/0.2.x] Make sure to verify correct naming of jar/pom files
by Stanislav Ochotnicky
commit 9d78b7d4af48a741ffdbf1839aa472f5fda316bc
Author: Stanislav Ochotnicky <sochotnicky(a)redhat.com>
Date: Tue Nov 29 15:06:40 2011 +0100
Make sure to verify correct naming of jar/pom files
This used to pass without throwing error:
%add_maven_depmap JPP-%{name}.pom ant/%{name}.jar
scripts/maven_depmap.py | 26 +++++++++++++++++++++++---
1 files changed, 23 insertions(+), 3 deletions(-)
---
diff --git a/scripts/maven_depmap.py b/scripts/maven_depmap.py
index 43ecc84..cdc467a 100644
--- a/scripts/maven_depmap.py
+++ b/scripts/maven_depmap.py
@@ -57,6 +57,10 @@ class IncompatibleFilenames(Exception):
def __init__(self, pom_path, jar_path):
self.args=("Filenames of pom %s and jar %s does not match properly. Check that jar subdirectories match '.' in pom name." % (pom_path, jar_path),)
+class MissingJarFile(Exception):
+ def __init__(self):
+ self.args=("Jar seems to be missing in standard directories. Make sure you have installed it")
+
def _get_tag_under_parent(dom, parent, tag):
"""get first xml tag under parent tag within dom"""
tags = dom.getElementsByTagName(tag)
@@ -73,19 +77,35 @@ def _get_jpp_from_filename(pom_path, jar_path = None):
is "xbean-main". Therefore for jar name to be compatible it has be
in %{_javadir}/xbean/xbean-main.jar
"""
+ # this is not nice, because macros can change but handling these
+ # in rpm macros is ugly as hell
+ javadirs=["/usr/share/java", "/usr/share/java-jni", "/usr/lib/java",
+ "/usr/lib64/java"]
pomname = basename(pom_path)
if jar_path:
if not os.path.isfile(jar_path):
raise IOError("Jar path doesn't exist")
+ jarpart = None
+ for jdir in javadirs:
+ if jdir in jar_path:
+ javadir_re = re.compile(".*%s/" % jdir)
+ jarpart = re.sub(javadir_re, "", jar_path)
+ if not jarpart:
+ raise MissingJarFile()
+
if pomname[3] == '.':
- jpp_gid = "JPP/%s" % basename(dirname(jar_path))
- jpp_aid = basename(jar_path)[:-4]
+ if '/' not in jarpart:
+ raise IncompatibleFilenames(pom_path, jar_path)
+ jpp_gid = "JPP/%s" % dirname(jarpart)
+ jpp_aid = basename(jarpart)[:-4]
# we assert that jar and pom parts match
if not pomname == "JPP.%s-%s.pom" % (jpp_gid[4:], jpp_aid):
raise IncompatibleFilenames(pom_path, jar_path)
else:
+ if '/' in jarpart:
+ raise IncompatibleFilenames(pom_path, jar_path)
jpp_gid = "JPP"
- jpp_aid = basename(jar_path)[:-4]
+ jpp_aid = basename(jarpart)[:-4]
# we assert that jar and pom parts match
if not pomname == "JPP-%s.pom" % jpp_aid:
raise IncompatibleFilenames(pom_path, jar_path)
12 years, 4 months
[javapackages/0.2.x] Add default parameters for add_maven_depmap
by Stanislav Ochotnicky
commit 772ea1cc2d5a57e5da080950bbfbb7ad65922492
Author: Stanislav Ochotnicky <sochotnicky(a)redhat.com>
Date: Tue Nov 29 15:02:17 2011 +0100
Add default parameters for add_maven_depmap
Now when it is called without arguments it behaves as if it was calle as:
%add_maven_depmap JPP-%{name}.pom %{name}.jar
macros.fjava | 28 ++++++++++++++++++++--------
1 files changed, 20 insertions(+), 8 deletions(-)
---
diff --git a/macros.fjava b/macros.fjava
index 0c14779..9d52d92 100644
--- a/macros.fjava
+++ b/macros.fjava
@@ -42,24 +42,36 @@
#
%add_maven_depmap(f:a:) \
+# default values \
+%if %# == 0 \
+ _pompart="JPP-%{name}.pom" \
+ _jarpart="%{name}.jar" \
+%else \
+ _pompart="%1" \
+ _jarpart="%2" \
+%endif \
install -dm 755 $RPM_BUILD_ROOT/%{_mavendepmapfragdir}\
-_jpath="jar_missing_in_jar_paths" \
-if [ -f %{buildroot}/%{_javadir}/%2 ]; then \
- _jpath="%{buildroot}/%{_javadir}/%2" \
-elif [ -f %{buildroot}/%{_javajnidir}/%2 ]; then \
- _jpath="%{buildroot}/%{_javajnidir}/%2" \
-elif [ -f %{buildroot}/%{_jnidir}/%2 ]; then \
- _jpath="%{buildroot}/%{_jnidir}/%2" \
+_jpath="$_jarpart" \
+if [ -f %{buildroot}/%{_javadir}/$_jarpart ]; then \
+ _jpath="%{buildroot}/%{_javadir}/$_jarpart" \
+elif [ -f %{buildroot}/%{_javajnidir}/$_jarpart ]; then \
+ _jpath="%{buildroot}/%{_javajnidir}/$_jarpart" \
+elif [ -f %{buildroot}/%{_jnidir}/$_jarpart ]; then \
+ _jpath="%{buildroot}/%{_jnidir}/$_jarpart" \
fi \
python -m %{_datadir}/java-utils/maven_depmap %{-a} \\\
%{buildroot}%{_mavendepmapfragdir}/%{name}%{-f*:-%{-f*}} \\\
- %{buildroot}%{_mavenpomdir}/%1 \\\
+ %{buildroot}%{_mavenpomdir}/$_pompart \\\
%if %# == 2 \
"${_jpath}" \\\
%endif \
+%if %# == 0 \
+ "${_jpath}" \\\
+%endif \
\
%{nil}
#==============================================================================
+
12 years, 4 months
[maven-release] BR maven-enforcer-plugin.
by Alexander Kurtakov
commit f5ab2abac8ddaf6b51b46571ad225e546cbc2098
Author: Alexander Kurtakov < <akurtako(a)redhat.com>
Date: Tue Nov 29 12:31:05 2011 +0200
BR maven-enforcer-plugin.
maven-release.spec | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/maven-release.spec b/maven-release.spec
index 4ed9eb3..569bcfc 100644
--- a/maven-release.spec
+++ b/maven-release.spec
@@ -29,6 +29,7 @@ BuildRequires: maven-plugin-testing-harness
BuildRequires: plexus-containers-component-metadata
BuildRequires: plexus-utils
BuildRequires: maven-surefire-maven-plugin
+BuildRequires: maven-enforcer-plugin
BuildRequires: jaxen
Requires: java
12 years, 4 months
[joda-time] Adapt to current guidelines.
by Alexander Kurtakov
commit d58054c007bdde6b9ae327fba0c380b38a9b98ff
Author: Alexander Kurtakov < <akurtako(a)redhat.com>
Date: Tue Nov 29 12:24:09 2011 +0200
Adapt to current guidelines.
joda-time.spec | 36 ++++++++----------------------------
1 files changed, 8 insertions(+), 28 deletions(-)
---
diff --git a/joda-time.spec b/joda-time.spec
index 6f463b6..fda125b 100644
--- a/joda-time.spec
+++ b/joda-time.spec
@@ -2,7 +2,7 @@
Name: joda-time
Version: 1.6.2
-Release: 5.%{tzversion}%{?dist}
+Release: 6.%{tzversion}%{?dist}
Summary: Java date and time API
Group: Development/Libraries
@@ -12,7 +12,6 @@ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}-sr
Source1: ftp://elsie.nci.nih.gov/pub/%{tzversion}.tar.gz
# Remove maven toolchanins from pom.xml (not present in fedora yet)
Patch0: joda-time-remove-toolchains-from-pom.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: java-devel >= 1:1.6.0
@@ -22,10 +21,6 @@ BuildRequires: maven
Requires: java >= 1:1.6.0
Requires: jpackage-utils
-Requires(post): jpackage-utils
-Requires(postun): jpackage-utils
-
-
%description
Joda-Time provides a quality replacement for the Java date and time classes. The
design allows for multiple calendar systems, while still providing a simple API.
@@ -69,48 +64,33 @@ mvn-rpmbuild \
%install
-rm -rf %{buildroot}
-
# jars
install -d -m 0755 %{buildroot}%{_javadir}
-install -pm 644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
-ln -s %{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
+install -pm 644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
# pom
install -d -m 755 %{buildroot}%{_mavenpomdir}
install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
-%add_to_maven_depmap %{name} %{name} %{version} JPP %{name}
+%add_maven_depmap JPP-%{name}.pom %{name}.jar
# javadoc
-install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}-%{version}
-cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}-%{version}/
-ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
-
-%post
-%update_maven_depmap
-
-%postun
-%update_maven_depmap
-
-%clean
-rm -rf %{buildroot}
+install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
+cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}/
%files
-%defattr(-,root,root,-)
%doc LICENSE.txt RELEASE-NOTES.txt ToDo.txt
%{_javadir}/*
%{_mavenpomdir}/*
%{_mavendepmapfragdir}/*
%files javadoc
-%defattr(-,root,root,-)
%doc LICENSE.txt
-%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}
-
-
%changelog
+* Tue Nov 29 2011 Alexander Kurtakov <akurtako(a)redhat.com> 1.6.2-6.tzdata2011f
+- Adapt to current guidelines.
+
* Fri Apr 15 2011 Chris Spike <spike(a)fedoraproject.org> 1.6.2-5.tzdata2011f
- New tzdata (2011f)
- Fixed build for maven 3
12 years, 4 months
[maven-release] Update to latest upstream release.
by Alexander Kurtakov
commit 9232a376eecfd21f588e5b23c30c8109605ac61f
Author: Alexander Kurtakov < <akurtako(a)redhat.com>
Date: Tue Nov 29 12:12:45 2011 +0200
Update to latest upstream release.
Adapt to current guidelines.
.gitignore | 1 +
001-mavenrelease-skiptests.patch | 42 --------------------------------------
maven-release.spec | 32 +++++++---------------------
sources | 1 +
4 files changed, 10 insertions(+), 66 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index fe9925c..49ce2ef 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
maven-release-2.0.tar.xz
/maven-release-2.0.tar.xz
/maven-release-2.2.tar.xz
+maven-release-2.2.1-source-release.zip
diff --git a/maven-release.spec b/maven-release.spec
index c82f7ae..4ed9eb3 100644
--- a/maven-release.spec
+++ b/maven-release.spec
@@ -1,17 +1,12 @@
Name: maven-release
-Version: 2.2
-Release: 3%{?dist}
+Version: 2.2.1
+Release: 1%{?dist}
Summary: Release a project updating the POM and tagging in the SCM
Group: Development/Libraries
License: ASL 2.0
URL: http://maven.apache.org/plugins/maven-release-plugin/
-# tar creation instructions
-# svn export http://svn.apache.org/repos/asf/maven/release/tags/maven-release-2.2 maven-release-2.2
-# tar cfJ maven-release-2.2.tar.xz maven-release-2.2
-Source0: maven-release-2.2.tar.xz
-# Remove jmock needed for tests and set source to 1.4 to support assert stmt
-Patch0: 001-mavenrelease-skiptests.patch
+Source0: http://repo1.maven.org/maven2/org/apache/maven/release/%{name}/%{version}...
# Remove deps needed for tests, till jmock gets packaged
Patch1: 002-mavenrelease-fixbuild.patch
BuildArch: noarch
@@ -39,10 +34,6 @@ BuildRequires: jaxen
Requires: java
Requires: jpackage-utils
-Requires(post): jpackage-utils
-Requires(postun): jpackage-utils
-
-
%description
This plugin is used to release a project with Maven, saving a lot of
repetitive, manual work. Releasing a project is made in two steps:
@@ -54,7 +45,6 @@ Summary: Release a project updating the POM and tagging in the SCM
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: jpackage-utils
-BuildArch: noarch
%description manager
This package contains %{name}-manager needed by %{name}-plugin.
@@ -65,7 +55,6 @@ Summary: Release a project updating the POM and tagging in the SCM
Group: Development/Libraries
Requires: %{name}-manager = %{version}-%{release}
Requires: jpackage-utils
-BuildArch: noarch
%description plugin
This plugin is used to release a project with Maven, saving a lot of
@@ -80,7 +69,6 @@ Requires: %{name} = %{version}-%{release}
Requires: jpackage-utils
Obsoletes: %{name}-manager-javadoc <= 2.0-1
Obsoletes: %{name}-plugin-javadoc <= 2.0-1
-BuildArch: noarch
%description javadoc
This package contains the API documentation for %{name}.
@@ -88,7 +76,6 @@ This package contains the API documentation for %{name}.
%prep
%setup -q -n %{name}-%{version}
-%patch0 -p1
%patch1 -p1
cat > README << EOT
%{name}-%{version}
@@ -123,35 +110,32 @@ install -pm 644 %{name}-manager/pom.xml \
install -pm 644 %{name}-plugin/pom.xml \
$RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}-plugin.pom
-%add_maven_depmap JPP-%{name}.pom %{name}.jar
+%add_maven_depmap JPP-%{name}.pom
%add_maven_depmap JPP-%{name}-manager.pom %{name}-manager.jar
%add_maven_depmap JPP-%{name}-plugin.pom %{name}-plugin.jar
%files
-%defattr(-,root,root,-)
%doc README
%{_mavenpomdir}/JPP-%{name}.pom
%{_mavendepmapfragdir}/*
-
%files manager
-%defattr(-,root,root,-)
%{_javadir}/*manager*
%{_mavenpomdir}/JPP-%{name}-manager.pom
-
%files plugin
-%defattr(-,root,root,-)
%{_javadir}/*plugin*
%{_mavenpomdir}/JPP-%{name}-plugin.pom
-
%files javadoc
-%defattr(-,root,root,-)
%{_javadocdir}/%{name}
%changelog
+* Tue Nov 29 2011 Alexander Kurtakov <akurtako(a)redhat.com> 2.2.1-1
+- Update to latest upstream release.
+- Adapt to current guidelines.
+
* Tue Jul 26 2011 Guido Grazioli <guido.grazioli(a)gmail.com> - 2.2-3
- Reinclude maven-scm-test in BRs
diff --git a/sources b/sources
index 0bc1a45..cfe0cf1 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
1d135afb48bf3841f4ec4c9db5b57234 maven-release-2.2.tar.xz
+adfb662ff2b604e46b1466b369dce8a7 maven-release-2.2.1-source-release.zip
12 years, 4 months
[plexus-interactivity] Build with maven 3.
by Alexander Kurtakov
commit b0a89ac051c0327d8dde18a8a8310591ae4a1768
Author: Alexander Kurtakov < <akurtako(a)redhat.com>
Date: Tue Nov 29 10:52:06 2011 +0200
Build with maven 3.
Adapt to current guidelines.
plexus-interactivity.spec | 31 ++++++++++---------------------
1 files changed, 10 insertions(+), 21 deletions(-)
---
diff --git a/plexus-interactivity.spec b/plexus-interactivity.spec
index 47ad8ff..13a624a 100644
--- a/plexus-interactivity.spec
+++ b/plexus-interactivity.spec
@@ -33,7 +33,7 @@
Name: plexus-interactivity
Version: 1.0
-Release: 0.4.a6.7%{?dist}
+Release: 0.4.a6.8%{?dist}
Epoch: 0
Summary: Plexus Interactivity Handler Component
License: MIT
@@ -45,13 +45,10 @@ URL: http://plexus.codehaus.org/
# plexus-interactivity-1.0-alpha-6
Source0: plexus-interactivity-1.0-alpha-6-src.tar.xz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
BuildArch: noarch
BuildRequires: jpackage-utils >= 0:1.6
BuildRequires: ant >= 0:1.6
-BuildRequires: ant-nodeps
-BuildRequires: maven2
+BuildRequires: maven
BuildRequires: maven-compiler-plugin
BuildRequires: maven-javadoc-plugin
BuildRequires: maven-site-plugin
@@ -87,11 +84,7 @@ API documentation for %{name}.
%setup -q -n plexus-interactivity-1.0-alpha-6
%build
-export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
-mvn-jpp \
- -e \
- -Dmaven2.jpp.mode=true \
- -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
+mvn-rpmbuild -e \
-Dmaven.test.skip=true \
install javadoc:aggregate
@@ -115,9 +108,9 @@ install -pm 644 \
plexus-interactivity-jline/pom.xml \
$RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{parent}-interactivity-jline.pom
-%add_to_maven_depmap org.codehaus.plexus %{name} %{version} JPP/%{parent} %{subname}
-%add_to_maven_depmap org.codehaus.plexus %{name}-api %{version} JPP/%{parent} interactivity-api
-%add_to_maven_depmap org.codehaus.plexus %{name}-jline %{version} JPP/%{parent} interactivity-jline
+%add_maven_depmap JPP.%{parent}-%{subname}.pom
+%add_maven_depmap JPP.%{parent}-interactivity-api.pom plexus/interactivity-api.jar
+%add_maven_depmap JPP.%{parent}-interactivity-jline.pom plexus/interactivity-jline.jar
# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
@@ -128,24 +121,20 @@ cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
-%post
-%update_maven_depmap
-
-%postun
-%update_maven_depmap
-
%files
-%defattr(-,root,root,-)
%{_javadir}/*
%{_mavenpomdir}/*
%{_mavendepmapfragdir}/*
%files javadoc
-%defattr(-,root,root,-)
%doc %{_javadocdir}/*
%changelog
+* Tue Nov 29 2011 Alexander Kurtakov <akurtako(a)redhat.com> 0:1.0-0.4.a6.8
+- Build with maven 3.
+- Adapt to current guidelines.
+
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0:1.0-0.4.a6.7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
12 years, 4 months
[Bug 752571] New: Packaging Juli logging jar under the tomcat-lib
by Red Hat Bugzilla
Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.
Summary: Packaging Juli logging jar under the tomcat-lib
https://bugzilla.redhat.com/show_bug.cgi?id=752571
Summary: Packaging Juli logging jar under the tomcat-lib
Product: Fedora
Version: 16
Platform: All
OS/Version: Linux
Status: NEW
Severity: unspecified
Priority: high
Component: tomcat
AssignedTo: ivan.afonichev(a)gmail.com
ReportedBy: rgrunber(a)redhat.com
QAContact: extras-qa(a)fedoraproject.org
CC: akurtako(a)redhat.com,
java-sig-commits(a)lists.fedoraproject.org,
ivan.afonichev(a)gmail.com
Classification: Fedora
Story Points: ---
Type: ---
Currently tomcat-juli.jar is being packaged under tomcat itself, but it would
be ideal to have it packaged under tomcat-lib. The eclipse package will be
using Tomcat 7 Jasper, which requires tomcat-juli.jar so it would be great if
it could depend on just tomcat-{lib,el} as opposed to all of tomcat.
--
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
12 years, 4 months