[javapackages] Created tag 0.2.3
by Stanislav Ochotnicky
The lightweight tag '0.2.3' was created pointing to:
538db5c... Add exploded OSGi bundles provides generation.
12 years, 10 months
[javapackages] Created tag 0.2.2
by Stanislav Ochotnicky
The lightweight tag '0.2.2' was created pointing to:
4bd4aff... Fix rpm macro expansion problem when not on separate line
12 years, 10 months
[javapackages] Add exploded OSGi bundles provides generation.
by Alexander Kurtakov
commit d8448da5a7e9f5f831a57ec4ecc51b46b8d49e74
Author: Alexander Kurtakov <akurtako(a)redhat.com>
Date: Wed Jun 29 13:09:02 2011 +0300
Add exploded OSGi bundles provides generation.
Add requires generator - disabled for now.
depgenerators/fileattrs/osgi.attr | 3 +-
depgenerators/osgi.prov | 24 +++++++---
depgenerators/osgi.req | 88 +++++++++++++++++++++++++++++++++++++
3 files changed, 106 insertions(+), 9 deletions(-)
---
diff --git a/depgenerators/fileattrs/osgi.attr b/depgenerators/fileattrs/osgi.attr
index 78ae38b..31690bd 100644
--- a/depgenerators/fileattrs/osgi.attr
+++ b/depgenerators/fileattrs/osgi.attr
@@ -1,3 +1,4 @@
%__osgi_provides %{_rpmconfigdir}/osgi.prov
-%__osgi_path ^.*\.jar
+#%__osgi_requires %{_rpmconfigdir}/osgi.req
+%__osgi_path ^(.*\.jar|((%{_libdir}|%{_datadir}).*/MANIFEST.MF))
diff --git a/depgenerators/osgi.prov b/depgenerators/osgi.prov
old mode 100644
new mode 100755
index 9bb70de..2548adf
--- a/depgenerators/osgi.prov
+++ b/depgenerators/osgi.prov
@@ -58,19 +58,27 @@ class TagBuilder:
paths = map (lambda x: x.rstrip (), filelist.readlines ())
for path in paths:
self.get_osgi_provide (path)
-
+
+
+ def handle_manifest(self, manifest):
+ provideInfo = OsgiProvideInfo()
+ for line in manifest.readlines():
+ if line.startswith("Bundle-SymbolicName:"):
+ provideInfo.setSymbolicName(line.split(':')[1].strip())
+ if line.startswith("Bundle-Version:"):
+ provideInfo.setVersion(line.split(':')[1].strip())
+
+ provideInfo.printProvide()
+
def get_osgi_provide (self, path):
if not os.path.islink(path):
+ if path.endswith("META-INF/MANIFEST.MF"):
+ manifest = open(path)
+ self.handle_manifest(manifest)
if zipfile.is_zipfile(path):
jarfile = ZipFile(path)
manifest = jarfile.open("META-INF/MANIFEST.MF")
- provideInfo = OsgiProvideInfo()
- for line in manifest.readlines():
- if line.startswith("Bundle-SymbolicName:"):
- provideInfo.setSymbolicName(line.split(':')[1].strip())
- if line.startswith("Bundle-Version:"):
- provideInfo.setVersion(line.split(':')[1].strip())
- provideInfo.printProvide()
+ self.handle_manifest(manifest)
if __name__ == "__main__":
diff --git a/depgenerators/osgi.req b/depgenerators/osgi.req
new file mode 100755
index 0000000..0ad2a75
--- /dev/null
+++ b/depgenerators/osgi.req
@@ -0,0 +1,88 @@
+#!/usr/bin/python
+
+# Copyright (c) 2011, Red Hat, Inc
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice, this
+# list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of the <ORGANIZATION> nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors: Alexander Kurtakov <akurtako(a)redhat.com>
+
+import sys
+import os.path
+import zipfile
+from zipfile import ZipFile
+
+class TagBuilder:
+
+ def __init__ (self, filelist=None):
+ if filelist == None:
+ filelist = sys.stdin
+ paths = map (lambda x: x.rstrip (), filelist.readlines ())
+ for path in paths:
+ self.get_osgi_require (path)
+
+ def parse_manifest (self, manifest):
+ headers = {}
+ DELIM = ": "
+ name = None
+ for line in manifest.readlines():
+ split = line.split(DELIM)
+ if not name:
+ name = split[0].strip()
+ headers[name]= split[1].strip()
+ else:
+ if len(split) < 2:
+ headers[name] = headers[name]+line.strip()
+ else:
+ name = split[0].strip()
+ headers[name]= split[1].strip()
+ return headers
+
+ def split_bundle_name (self, bundles):
+ bundlenames = []
+ for bundle in bundles.split(','):
+ if ")" in bundle or "]" in bundle >0:
+ continue
+ if ";" in bundle:
+ bundlenames.append(bundle.split(";")[0].strip())
+ else:
+ bundlenames.append(bundle)
+
+ return bundlenames
+
+
+
+ def get_osgi_require (self, path):
+ if not os.path.islink(path):
+ if zipfile.is_zipfile(path):
+ jarfile = ZipFile(path)
+ manifest = jarfile.open("META-INF/MANIFEST.MF")
+ headers = self.parse_manifest(manifest)
+ if headers.get("Require-Bundle"):
+ for bundle in self.split_bundle_name(headers.get("Require-Bundle")):
+ print "osgi(%s)" %(bundle)
+
+if __name__ == "__main__":
+ builder = TagBuilder ()
12 years, 10 months
[javapackages/0.2.x] Add exploded OSGi bundles provides generation.
by Alexander Kurtakov
commit 538db5c1433196c999697d2c0c5769d87c6f1b09
Author: Alexander Kurtakov <akurtako(a)redhat.com>
Date: Wed Jun 29 13:09:02 2011 +0300
Add exploded OSGi bundles provides generation.
Add requires generator - disabled for now.
depgenerators/fileattrs/osgi.attr | 3 +-
depgenerators/osgi.prov | 24 +++++++---
depgenerators/osgi.req | 88 +++++++++++++++++++++++++++++++++++++
3 files changed, 106 insertions(+), 9 deletions(-)
---
diff --git a/depgenerators/fileattrs/osgi.attr b/depgenerators/fileattrs/osgi.attr
index 78ae38b..31690bd 100644
--- a/depgenerators/fileattrs/osgi.attr
+++ b/depgenerators/fileattrs/osgi.attr
@@ -1,3 +1,4 @@
%__osgi_provides %{_rpmconfigdir}/osgi.prov
-%__osgi_path ^.*\.jar
+#%__osgi_requires %{_rpmconfigdir}/osgi.req
+%__osgi_path ^(.*\.jar|((%{_libdir}|%{_datadir}).*/MANIFEST.MF))
diff --git a/depgenerators/osgi.prov b/depgenerators/osgi.prov
old mode 100644
new mode 100755
index 9bb70de..2548adf
--- a/depgenerators/osgi.prov
+++ b/depgenerators/osgi.prov
@@ -58,19 +58,27 @@ class TagBuilder:
paths = map (lambda x: x.rstrip (), filelist.readlines ())
for path in paths:
self.get_osgi_provide (path)
-
+
+
+ def handle_manifest(self, manifest):
+ provideInfo = OsgiProvideInfo()
+ for line in manifest.readlines():
+ if line.startswith("Bundle-SymbolicName:"):
+ provideInfo.setSymbolicName(line.split(':')[1].strip())
+ if line.startswith("Bundle-Version:"):
+ provideInfo.setVersion(line.split(':')[1].strip())
+
+ provideInfo.printProvide()
+
def get_osgi_provide (self, path):
if not os.path.islink(path):
+ if path.endswith("META-INF/MANIFEST.MF"):
+ manifest = open(path)
+ self.handle_manifest(manifest)
if zipfile.is_zipfile(path):
jarfile = ZipFile(path)
manifest = jarfile.open("META-INF/MANIFEST.MF")
- provideInfo = OsgiProvideInfo()
- for line in manifest.readlines():
- if line.startswith("Bundle-SymbolicName:"):
- provideInfo.setSymbolicName(line.split(':')[1].strip())
- if line.startswith("Bundle-Version:"):
- provideInfo.setVersion(line.split(':')[1].strip())
- provideInfo.printProvide()
+ self.handle_manifest(manifest)
if __name__ == "__main__":
diff --git a/depgenerators/osgi.req b/depgenerators/osgi.req
new file mode 100755
index 0000000..0ad2a75
--- /dev/null
+++ b/depgenerators/osgi.req
@@ -0,0 +1,88 @@
+#!/usr/bin/python
+
+# Copyright (c) 2011, Red Hat, Inc
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice, this
+# list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of the <ORGANIZATION> nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors: Alexander Kurtakov <akurtako(a)redhat.com>
+
+import sys
+import os.path
+import zipfile
+from zipfile import ZipFile
+
+class TagBuilder:
+
+ def __init__ (self, filelist=None):
+ if filelist == None:
+ filelist = sys.stdin
+ paths = map (lambda x: x.rstrip (), filelist.readlines ())
+ for path in paths:
+ self.get_osgi_require (path)
+
+ def parse_manifest (self, manifest):
+ headers = {}
+ DELIM = ": "
+ name = None
+ for line in manifest.readlines():
+ split = line.split(DELIM)
+ if not name:
+ name = split[0].strip()
+ headers[name]= split[1].strip()
+ else:
+ if len(split) < 2:
+ headers[name] = headers[name]+line.strip()
+ else:
+ name = split[0].strip()
+ headers[name]= split[1].strip()
+ return headers
+
+ def split_bundle_name (self, bundles):
+ bundlenames = []
+ for bundle in bundles.split(','):
+ if ")" in bundle or "]" in bundle >0:
+ continue
+ if ";" in bundle:
+ bundlenames.append(bundle.split(";")[0].strip())
+ else:
+ bundlenames.append(bundle)
+
+ return bundlenames
+
+
+
+ def get_osgi_require (self, path):
+ if not os.path.islink(path):
+ if zipfile.is_zipfile(path):
+ jarfile = ZipFile(path)
+ manifest = jarfile.open("META-INF/MANIFEST.MF")
+ headers = self.parse_manifest(manifest)
+ if headers.get("Require-Bundle"):
+ for bundle in self.split_bundle_name(headers.get("Require-Bundle")):
+ print "osgi(%s)" %(bundle)
+
+if __name__ == "__main__":
+ builder = TagBuilder ()
12 years, 10 months
[javapackages/0.2.x] Bail if maven_depmap is improperly called on pom without jar
by Stanislav Ochotnicky
commit 3a4c926153d7d497a5148e4907b56574f27d1071
Author: Stanislav Ochotnicky <sochotnicky(a)redhat.com>
Date: Wed Jun 29 11:27:08 2011 +0200
Bail if maven_depmap is improperly called on pom without jar
Pom without artifact path makes sense only when packaging type is
"pom" otherwise we raise exception.
Also improve previous exception a bit so that it's more descriptive
and shows which files have problems.
scripts/maven_depmap.py | 24 ++++++++++++++++++------
1 files changed, 18 insertions(+), 6 deletions(-)
---
diff --git a/scripts/maven_depmap.py b/scripts/maven_depmap.py
index f029141..6d9386b 100644
--- a/scripts/maven_depmap.py
+++ b/scripts/maven_depmap.py
@@ -48,9 +48,13 @@ class Fragment:
self.local_gid = local_gid
self.local_aid = local_aid
+class PackagingTypeMissingFile(Exception):
+ def __init__(self, pom_path):
+ self.args=("Packaging type is not 'pom' and no artifact path has been provided for pom %s" % pom_path,)
+
class IncompatibleFilenames(Exception):
- def __init__(self):
- self.args=("Filenames of pom and jar does not match properly. Check that jar subdirectories match '.' in pom name.",)
+ 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),)
def _get_tag_under_parent(dom, parent, tag):
"""get first xml tag under parent tag within dom"""
@@ -75,13 +79,13 @@ def _get_jpp_from_filename(pom_path, jar_path = None):
jpp_aid = basename(jar_path)[:-4]
# we assert that jar and pom parts match
if not pomname == "JPP.%s-%s.pom" % (jpp_gid[4:], jpp_aid):
- raise IncompatibleFilenames()
+ raise IncompatibleFilenames(pom_path, jar_path)
else:
jpp_gid = "JPP"
jpp_aid = basename(jar_path)[:-4]
# we assert that jar and pom parts match
if not pomname == "JPP-%s.pom" % jpp_aid:
- raise IncompatibleFilenames()
+ raise IncompatibleFilenames(pom_path, jar_path)
else:
if pomname[3] == ".":
match = re.match('JPP\.([^-]*?)-.*', pomname)
@@ -102,6 +106,13 @@ def parse_pom(pom_file, jar_file = None):
return None
project = projects[0]
+ proj_packaging = _get_tag_under_parent(dom, project, 'packaging')
+ # if project packaging is undefined => jar
+ # only "pom" packaging type can be without jar_file path otherwise
+ # we bail
+ if not jar_file:
+ if not proj_packaging or proj_packaging.firstChild.nodeValue != "pom":
+ raise PackagingTypeMissingFile(pom_path)
proj_version = _get_tag_under_parent(dom, project, 'version')
proj_gid = _get_tag_under_parent(dom, project, 'groupId')
@@ -195,6 +206,7 @@ if __name__ == "__main__":
if fragment:
output_fragment(fragment_path, fragment, append_deps)
else:
- print "Unknown error while generating fragment. Send bugreport \
- to https://fedorahosted.org/javapackages/"
+ print "Problem parsing pom file. Is it valid maven pom? Send bugreport \
+ to https://fedorahosted.org/javapackages/ and attach %s to \
+ this bugreport" % pom_path
sys.exit(1)
12 years, 10 months
[javapackages] Bail if maven_depmap is improperly called on pom without jar
by Stanislav Ochotnicky
commit 3fad4c74cfaed71460259b79cd63851c097c43fa
Author: Stanislav Ochotnicky <sochotnicky(a)redhat.com>
Date: Wed Jun 29 11:27:08 2011 +0200
Bail if maven_depmap is improperly called on pom without jar
Pom without artifact path makes sense only when packaging type is
"pom" otherwise we raise exception.
Also improve previous exception a bit so that it's more descriptive
and shows which files have problems.
scripts/maven_depmap.py | 24 ++++++++++++++++++------
1 files changed, 18 insertions(+), 6 deletions(-)
---
diff --git a/scripts/maven_depmap.py b/scripts/maven_depmap.py
index f029141..6d9386b 100644
--- a/scripts/maven_depmap.py
+++ b/scripts/maven_depmap.py
@@ -48,9 +48,13 @@ class Fragment:
self.local_gid = local_gid
self.local_aid = local_aid
+class PackagingTypeMissingFile(Exception):
+ def __init__(self, pom_path):
+ self.args=("Packaging type is not 'pom' and no artifact path has been provided for pom %s" % pom_path,)
+
class IncompatibleFilenames(Exception):
- def __init__(self):
- self.args=("Filenames of pom and jar does not match properly. Check that jar subdirectories match '.' in pom name.",)
+ 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),)
def _get_tag_under_parent(dom, parent, tag):
"""get first xml tag under parent tag within dom"""
@@ -75,13 +79,13 @@ def _get_jpp_from_filename(pom_path, jar_path = None):
jpp_aid = basename(jar_path)[:-4]
# we assert that jar and pom parts match
if not pomname == "JPP.%s-%s.pom" % (jpp_gid[4:], jpp_aid):
- raise IncompatibleFilenames()
+ raise IncompatibleFilenames(pom_path, jar_path)
else:
jpp_gid = "JPP"
jpp_aid = basename(jar_path)[:-4]
# we assert that jar and pom parts match
if not pomname == "JPP-%s.pom" % jpp_aid:
- raise IncompatibleFilenames()
+ raise IncompatibleFilenames(pom_path, jar_path)
else:
if pomname[3] == ".":
match = re.match('JPP\.([^-]*?)-.*', pomname)
@@ -102,6 +106,13 @@ def parse_pom(pom_file, jar_file = None):
return None
project = projects[0]
+ proj_packaging = _get_tag_under_parent(dom, project, 'packaging')
+ # if project packaging is undefined => jar
+ # only "pom" packaging type can be without jar_file path otherwise
+ # we bail
+ if not jar_file:
+ if not proj_packaging or proj_packaging.firstChild.nodeValue != "pom":
+ raise PackagingTypeMissingFile(pom_path)
proj_version = _get_tag_under_parent(dom, project, 'version')
proj_gid = _get_tag_under_parent(dom, project, 'groupId')
@@ -195,6 +206,7 @@ if __name__ == "__main__":
if fragment:
output_fragment(fragment_path, fragment, append_deps)
else:
- print "Unknown error while generating fragment. Send bugreport \
- to https://fedorahosted.org/javapackages/"
+ print "Problem parsing pom file. Is it valid maven pom? Send bugreport \
+ to https://fedorahosted.org/javapackages/ and attach %s to \
+ this bugreport" % pom_path
sys.exit(1)
12 years, 10 months
[Bug 715842] New: FTBFS jetty-6.1.26-5.fc15
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: FTBFS jetty-6.1.26-5.fc15
https://bugzilla.redhat.com/show_bug.cgi?id=715842
Summary: FTBFS jetty-6.1.26-5.fc15
Product: Fedora
Version: rawhide
Platform: All
URL: http://linux.dell.com/files/fedora/FixBuildRequires/mo
ck-results/
OS/Version: Linux
Status: NEW
Keywords: Triaged
Severity: high
Priority: high
Component: jetty
AssignedTo: jjohnstn(a)redhat.com
ReportedBy: ftbfs(a)fedoraproject.org
QAContact: extras-qa(a)fedoraproject.org
CC: jjohnstn(a)redhat.com, overholt(a)redhat.com,
java-sig-commits(a)lists.fedoraproject.org
Blocks: 713919
Classification: Fedora
Story Points: ---
jetty-6.1.26-5.fc15.src.rpm Failed To Build From Source against the rawhide
tree. See http://fedoraproject.org/wiki/FTBFS for more information.
If you believe this is actually a bug in another package, do NOT change the
component in this bug or close this bug. Instead, add the appropriate bug
number from the other package to the "Depends on" line in this bug. If the
other package does not yet have a bug created that you think matches, please
create one. Doing so helps us properly track bugs and their dependencies, just
as we track package dependencies. (If you close this bug, and the other
package is not fixed before the next FTBFS run, a new bug will get created.
Please follow the above advice to avoid such duplication.)
--
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, 10 months
[maven-dependency-plugin] BR/R maven-shared-file-management.
by Alexander Kurtakov
commit 29ec35882ffbf7e530335f96f958d510246b452f
Author: Alexander Kurtakov <akurtako(a)redhat.com>
Date: Tue Jun 28 23:06:16 2011 +0300
BR/R maven-shared-file-management.
maven-dependency-plugin.spec | 19 ++++++++-----------
1 files changed, 8 insertions(+), 11 deletions(-)
---
diff --git a/maven-dependency-plugin.spec b/maven-dependency-plugin.spec
index 29d692d..1b19529 100644
--- a/maven-dependency-plugin.spec
+++ b/maven-dependency-plugin.spec
@@ -1,6 +1,6 @@
Name: maven-dependency-plugin
Version: 2.2
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Plugin to manipulate, copy and unpack local and remote artifacts
Group: Development/Libraries
@@ -12,25 +12,27 @@ BuildArch: noarch
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: plexus-utils
-BuildRequires: ant-nodeps
+BuildRequires: ant
BuildRequires: asm2
BuildRequires: maven
BuildRequires: maven-install-plugin
BuildRequires: maven-compiler-plugin
BuildRequires: maven-plugin-plugin
BuildRequires: maven-resources-plugin
-BuildRequires: maven-surefire-maven-plugin
+BuildRequires: maven-surefire-plugin
BuildRequires: maven-surefire-provider-junit
BuildRequires: maven-jar-plugin
BuildRequires: maven-javadoc-plugin
BuildRequires: maven-shared-dependency-analyzer
BuildRequires: maven-shared-dependency-tree
BuildRequires: maven-shared-common-artifact-filters
+BuildRequires: maven-shared-file-management
Requires: maven
Requires: jpackage-utils
Requires: java
Requires: maven-shared-common-artifact-filters
Requires: maven-shared-dependency-analyzer
+Requires: maven-shared-file-management
Requires(post): jpackage-utils
Requires(postun): jpackage-utils
@@ -78,23 +80,18 @@ install -Dpm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
install -dm 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}/
-%post
-%update_maven_depmap
-
-%postun
-%update_maven_depmap
-
%files
-%defattr(-,root,root,-)
%{_javadir}/*
%{_mavenpomdir}/*
%{_mavendepmapfragdir}/*
%files javadoc
-%defattr(-,root,root,-)
%{_javadocdir}/%{name}
%changelog
+* Tue Jun 28 2011 Alexander Kurtakov <akurtako(a)redhat.com> 2.2-2
+- BR/R maven-shared-file-management.
+
* Tue Apr 26 2011 Alexander Kurtakov <akurtako(a)redhat.com> 2.2-1
- Update to 2.2 final release.
12 years, 10 months
[jetty] Adapt build for maven 3.x.
by Alexander Kurtakov
commit d45248bf96cd4c566eef4793c0a408f84f10ab1e
Author: Alexander Kurtakov <akurtako(a)redhat.com>
Date: Tue Jun 28 22:51:37 2011 +0300
Adapt build for maven 3.x.
jetty-depmap.xml | 23 ++++++++++++++++++++
jetty-plugin-fix-site.patch | 48 -------------------------------------------
jetty.spec | 47 ++++++++++++++++--------------------------
3 files changed, 41 insertions(+), 77 deletions(-)
---
diff --git a/jetty-depmap.xml b/jetty-depmap.xml
index 2c6e256..0f7c2be 100644
--- a/jetty-depmap.xml
+++ b/jetty-depmap.xml
@@ -141,6 +141,18 @@
</dependency>
<dependency>
<maven>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-tools-api</artifactId>
+ <version>2.0</version>
+ </maven>
+ <jpp>
+ <groupId>JPP/maven-plugin-tools</groupId>
+ <artifactId>api</artifactId>
+ <version>2.7</version>
+ </jpp>
+ </dependency>
+ <dependency>
+ <maven>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-apacheds</artifactId>
<version>1.0-alpha-1</version>
@@ -160,4 +172,15 @@
<version>6.1.20</version>
</maven>
</dependency>
+ <dependency>
+ <maven>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-descriptor</artifactId>
+ <version>2.0.6</version>
+ </maven>
+ <jpp>
+ <groupId>JPP/maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ </jpp>
+ </dependency>
</dependencies>
diff --git a/jetty.spec b/jetty.spec
index 671081a..9b5a8ea 100644
--- a/jetty.spec
+++ b/jetty.spec
@@ -42,7 +42,7 @@
Name: jetty
Version: 6.1.26
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: The Jetty Webserver and Servlet Container
Group: Applications/Internet
@@ -55,8 +55,6 @@ Source3: jetty.logrotate
Source4: %{name}-depmap.xml
Patch0: disable-modules.patch
Patch1: jetty-util-pom.patch
-Patch4: jetty-plugin-fix-site.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: fedora-usermgmt-devel
@@ -92,6 +90,8 @@ BuildRequires: geronimo-jta
BuildRequires: geronimo-parent-poms
BuildRequires: apache-commons-parent
BuildRequires: derby
+BuildRequires: tomcat6-lib
+BuildRequires: maven-skins
Requires: chkconfig
Requires: jpackage-utils >= 0:1.6
@@ -147,7 +147,6 @@ find . -name "*.class" -exec rm {} \;
%patch0 -b .sav
%patch1 -b .sav
-%patch4 -b .sav
cp %{SOURCE1} djetty
@@ -163,8 +162,9 @@ sed -i "s|<groupId>org.codehaus.mojo</groupId>||g" modules/naming/pom.xml
sed -i "s|dependency-maven-plugin|maven-dependency-plugin|g" modules/naming/pom.xml
sed -i "s|<groupId>org.codehaus.mojo</groupId>||g" modules/annotations/pom.xml
sed -i "s|dependency-maven-plugin|maven-dependency-plugin|g" modules/annotations/pom.xml
+sed -i "s|jcl104-over-slf4j|slf4j-jcl|g" modules/jsp-2.0/pom.xml
-sed -i "s|mvn|mvn-jpp|g" distribution/jetty-assembly/pom.xml
+sed -i "s|mvn|mvn-rpmbuild|g" distribution/jetty-assembly/pom.xml
sed -i "s|zip \$D/\$N|zip \$D/\$N/\$N|g" bin/build_release_bundles.sh
@@ -173,12 +173,9 @@ sed -i "s|# look for JETTY_HOME|export JETTY_HOME=/usr/share/jetty|g" bin/jetty-
%build
sed -i -e "s|/usr/share|%{_datadir}|g" djetty
-export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
-
-mvn-jpp \
+mvn-rpmbuild \
-e \
- -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
- -Dmaven2.jpp.depmap.file=%{SOURCE4} \
+ -Dmaven.local.depmap.file=%{SOURCE4} \
-Dmaven.test.skip=true \
-DupdateReleaseInfo=true \
install
@@ -196,21 +193,20 @@ mvn-jpp \
sh bin/build_release_bundles.sh .
%install
-rm -rf $RPM_BUILD_ROOT
# dirs
install -dm 755 $RPM_BUILD_ROOT%{_bindir}
install -dm 755 $RPM_BUILD_ROOT%{_initrddir}
install -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
install -dm 755 $RPM_BUILD_ROOT%{_javadir}/%{name}
-install -dm 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
-install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP.jetty-jetty.pom
-install -pm 644 modules/util/pom.xml $RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP.jetty-jetty-util.pom
+install -dm 755 $RPM_BUILD_ROOT%{_mavenpomdir}
+install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.jetty-jetty.pom
+install -pm 644 modules/util/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.jetty-jetty-util.pom
%add_to_maven_depmap org.mortbay.jetty jetty %{version} JPP/jetty jetty
%add_to_maven_depmap org.mortbay.jetty jetty-util %{version} JPP/jetty jetty-util
-install -dm 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
+install -dm 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
install -dm 755 $RPM_BUILD_ROOT%{confdir}
install -dm 755 $RPM_BUILD_ROOT%{homedir}
install -dm 755 $RPM_BUILD_ROOT%{logdir}
@@ -229,9 +225,7 @@ ln -s %{homedir}/bin/jetty.sh $RPM_BUILD_ROOT%{_bindir}/%{name}
install -pm 755 %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/%{name}
install -pm 755 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
echo '# Placeholder configuration file. No default is provided.' > $RPM_BUILD_ROOT%{confdir}/jetty.conf
-ln -s %{homedir}/lib/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}-%{version}.jar
ln -s %{homedir}/lib/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}.jar
-ln -s %{homedir}/lib/%{name}-util-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}-util-%{version}.jar
ln -s %{homedir}/lib/%{name}-util-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}-util.jar
( cat << EO_RC
JAVA_HOME=/usr/lib/jvm/java
@@ -245,7 +239,7 @@ EO_RC
) > $RPM_BUILD_ROOT%{homedir}/.jettyrc
# javadoc
-mv $RPM_BUILD_ROOT%{homedir}/jxr/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
+mv $RPM_BUILD_ROOT%{homedir}/jxr/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
# manual
install -dm 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
@@ -309,9 +303,6 @@ build-jar-repository . tomcat6-servlet-2.5-api
rm -fr servlet-api-*.jar
popd
-%clean
-rm -rf $RPM_BUILD_ROOT
-
%pre
# Add the "jetty" user and group
%__fe_groupadd %jtuid -r %username &>/dev/null || :
@@ -338,15 +329,12 @@ if [ $1 = 0 ]; then
fi
%files
-%defattr(-,root,root,-)
%{_bindir}/*
%dir %{_javadir}/%{name}
%{_javadir}/%{name}/%{name}.jar
-%{_javadir}/%{name}/%{name}-%{version}.jar
%{_javadir}/%{name}/%{name}-util.jar
-%{_javadir}/%{name}/%{name}-util-%{version}.jar
-%{_datadir}/maven2
-%{_mavendepmapfragdir}
+%{_mavenpomdir}/*
+%{_mavendepmapfragdir}/*
%config(noreplace) %{confdir}
%dir %{jettylibdir}
%dir %{jettycachedir}
@@ -363,14 +351,15 @@ fi
%{_sysconfdir}/logrotate.d/%{name}
%files javadoc
-%defattr(-,root,root,-)
-%doc %{_javadocdir}/%{name}-%{version}
+%doc %{_javadocdir}/%{name}
%files manual
-%defattr(-,root,root,-)
%doc %{_docdir}/%{name}-%{version}
%changelog
+* Tue Jun 28 2011 Alexander Kurtakov <akurtako(a)redhat.com> 6.1.26-7
+- Adapt build for maven 3.x.
+
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 6.1.26-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
12 years, 10 months
[maven/f15] (4 commits) ...Process fragments in alphabetical order
by Stanislav Ochotnicky
Summary of changes:
bdbc16d... Process fragments directly instead of maven2-depmap.xml (*)
a170a2a... Resolve poms also from /usr/share/maven-poms (*)
3b2966e... Fix handling of fallback default_poms (*)
1d63307... Process fragments in alphabetical order (*)
(*) This commit already existed in another branch; no separate mail sent
12 years, 10 months