[javapackages] Install shade-jar and its manpage
by Mikolaj Izdebski
commit b3ced57360cc0d07e2c00f9d337e540b47382d31
Author: Mikolaj Izdebski <mizdebsk(a)redhat.com>
Date: Wed Dec 4 14:18:31 2013 +0100
Install shade-jar and its manpage
build | 2 ++
install | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/build b/build
index 23cbb90..8a23526 100755
--- a/build
+++ b/build
@@ -78,6 +78,7 @@ expand bin/jvmjar
expand bin/mvn-local
expand bin/mvn-rpmbuild
expand bin/rebuild-jar-repository
+expand bin/shade-jar
expand bin/xmvn-builddep
expand etc/java.conf
expand etc/macros.jpackage
@@ -110,3 +111,4 @@ manpage pom_xpath_set
manpage build-classpath
manpage build-jar-repository
manpage rebuild-jar-repository
+manpage shade-jar
diff --git a/install b/install
index d0b941a..fd24e97 100755
--- a/install
+++ b/install
@@ -110,6 +110,7 @@ inst_exec target/diff-jars "${bindir}"
inst_exec target/find-jar "${bindir}"
inst_exec target/jvmjar "${bindir}"
inst_exec target/rebuild-jar-repository "${bindir}"
+inst_exec target/shade-jar "${bindir}"
inst_exec target/xmvn-builddep "${bindir}"
link "${bindir}/abs2rel" "${javadir}-utils/abs2rel.sh"
@@ -128,6 +129,7 @@ inst_data target/build-classpath.1 "${mandir}/man1"
inst_data target/build-jar-repository.1 "${mandir}/man1"
inst_data man/diff-jars.1 "${mandir}/man1"
inst_data target/rebuild-jar-repository.1 "${mandir}/man1"
+inst_data target/shade-jar.1 "${mandir}/man1"
inst_data target/abs2rel.1 "${mandir}/man1"
inst_data target/find-jar.1 "${mandir}/man1"
inst_data target/pom_add_dep.7 "${mandir}/man7"
10 years, 5 months
[javapackages] Add manpage for shade-jar
by Mikolaj Izdebski
commit b91af6ea2c699a80c64fa82bfc2c47ad82304680
Author: Mikolaj Izdebski <mizdebsk(a)redhat.com>
Date: Wed Dec 4 14:18:20 2013 +0100
Add manpage for shade-jar
man/shade-jar.txt | 39 +++++++++++++++++++++++++++++++++++++++
1 files changed, 39 insertions(+), 0 deletions(-)
---
diff --git a/man/shade-jar.txt b/man/shade-jar.txt
new file mode 100644
index 0000000..b119afc
--- /dev/null
+++ b/man/shade-jar.txt
@@ -0,0 +1,39 @@
+shade-jar(1)
+============
+:doctype: manpage
+:man source: JAVAPACKAGES
+:man manual: Java Packages Tools
+
+NAME
+----
+shade-jar - rename Java namespace in JAR file
+
+SYNOPSIS
+--------
+*bin/shade-jar* *orig-namespace* *shaded-namespace* *in-jar* *out-jar*
+
+DESCRIPTION
+-----------
+
+*shade-jar* utility is means for changing JAR file namespaces.
+Basically it replaces all occurences of given pattern with a given
+replacement. The replacament is performed on class file names and
+inside the class files themselves. This is commonly known as
+_shading_.
+
+EXAMPLES
+--------
+*shade-jar org.apache.log4j com.example.shaded.log4j
+/usr/share/java/log4j.jar lib/shaded-log4j.jar* will replace all
+occurences of *org.apache.log4j* in JAR file
+*/usr/share/java/log4j.jar* with *com.example.shaded.log4j* and store
+the resulting JAR in *lib/shaded-log4j.jar*.
+
+AUTHOR
+------
+Written by Mikolaj Izdebski.
+
+REPORTING BUGS
+--------------
+Bugs should be reported through Red Hat Bugzilla at
+http://bugzilla.redhat.com/.
10 years, 5 months
[javapackages] Implement shade-jar
by Mikolaj Izdebski
commit 9751eb99ddf5a5bb43b709589ecc8c057319f988
Author: Mikolaj Izdebski <mizdebsk(a)redhat.com>
Date: Wed Dec 4 13:55:00 2013 +0100
Implement shade-jar
bin/shade-jar | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 58 insertions(+), 0 deletions(-)
---
diff --git a/bin/shade-jar b/bin/shade-jar
new file mode 100755
index 0000000..a892906
--- /dev/null
+++ b/bin/shade-jar
@@ -0,0 +1,58 @@
+#!/bin/sh -e
+# Copyright (c) 2013 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:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. 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.
+# 3. Neither the name of Red Hat 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 COPYRIGHT HOLDERS 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 COPYRIGHT
+# OWNER 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: Mikolaj Izdebski <mizdebsk(a)redhat.com>
+
+if [ $# -ne 4 ]; then
+ echo "Usage: $0 orig-namespace shaded-namespace in.jar out.jar" >&2
+ echo "For example: $0 org.apache.log4j com.example.shaded.log4j \\" >&2
+ echo " /usr/share/java/log4j.jar lib/shaded-log4j.jar" >&2
+ exit 1
+fi
+
+if [ ! -x /bin/objectweb-asm3-processor ]; then
+ echo "$0: Unable to execute objectweb-asm3-processor." >&2
+ echo "$0: Make sure that objectweb-asm3 is installed." >&2
+ exit 1
+fi
+
+tmp=$(mktemp -d)
+trap "rm -rf ${tmp}" 0
+
+objectweb-asm3-processor code singlexml -in "${3}" -out "${tmp}/classes.zip" 2>/dev/null
+(
+ cd "${tmp}"
+ jar xf classes.zip classes.xml
+ sed -i -e "s|${1//.//}|${2//.//}|g" -e "s|${1//./\\.}|${2//./\\.}|g" classes.xml
+ jar cf classes.zip classes.xml
+)
+objectweb-asm3-processor singlexml code -in "${tmp}/classes.zip" -out "${4}" 2>/dev/null
+
+exit 0
10 years, 5 months
[jetty] Update to upstream version 9.1.0
by Michael Šimáček
commit 4c447fff7f529bf1f7ead1770b8d847f8945ddcd
Author: Michael Simacek <msimacek(a)redhat.com>
Date: Thu Nov 28 10:41:54 2013 +0100
Update to upstream version 9.1.0
.gitignore | 1 +
jetty.spec | 95 ++++++++++++++++++++++++++++++++++++------------------------
sources | 2 +-
3 files changed, 59 insertions(+), 39 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index a7de52f..efb9ea7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,4 @@ jetty-6.1.26-src.zip
/jetty-9.0.4.v20130625.tar.gz
/jetty-9.0.5.v20130815.tar.gz
/jetty-9.0.6.v20130930.tar.gz
+/jetty-9.1.0.v20131115.tar.gz
diff --git a/jetty.spec b/jetty.spec
index fbe2718..f36ec33 100644
--- a/jetty.spec
+++ b/jetty.spec
@@ -41,7 +41,7 @@
%global appdir %{jettylibdir}/webapps
-%global addver v20130930
+%global addver v20131115
# Conditionals to help breaking eclipse <-> jetty dependency cycle
# when bootstrapping for new architectures
@@ -54,7 +54,7 @@
%endif
Name: jetty
-Version: 9.0.6
+Version: 9.1.0
Release: 1%{?dist}
Summary: Java Webserver and Servlet Container
@@ -72,8 +72,11 @@ Patch4: 0004-Modify-dependencies.patch
BuildRequires: geronimo-annotation
BuildRequires: geronimo-jaspic-spec
-BuildRequires: geronimo-jta
+BuildRequires: jboss-transaction-1.2-api
+BuildRequires: jboss-websocket-1.0-api
+BuildRequires: glassfish-annotation-api
BuildRequires: geronimo-parent-poms
+BuildRequires: glassfish-servlet-api
BuildRequires: glassfish-el
BuildRequires: glassfish-el-api
BuildRequires: glassfish-jsp
@@ -89,6 +92,7 @@ BuildRequires: maven-dependency-plugin
BuildRequires: maven-enforcer-plugin
BuildRequires: maven-shade-plugin
BuildRequires: maven-war-plugin
+BuildRequires: exec-maven-plugin
BuildRequires: objectweb-asm
BuildRequires: slf4j
BuildRequires: systemd-units
@@ -116,6 +120,7 @@ BuildRequires: jetty-toolchain
BuildRequires: jetty-assembly-descriptors
BuildRequires: jetty-test-policy
BuildRequires: jetty-artifact-remote-resources
+BuildRequires: jetty-schemas
BuildArch: noarch
@@ -145,6 +150,10 @@ Requires: jetty-websocket-common = %{version}-%{release}
Requires: jetty-websocket-server = %{version}-%{release}
Requires: jetty-websocket-servlet = %{version}-%{release}
+# Jetty needs newer version of servlet-api than the default provider
+# and requires generator omits version so it needs to be added explicitly
+Requires: glassfish-servlet-api
+
Requires(pre): shadow-utils
Requires(post): systemd-units, systemd-sysv
Requires(preun): systemd-units
@@ -330,12 +339,6 @@ Summary: servlets module for Jetty
%description servlets
%{extdesc} %{summary}.
-%package overlay-deployer
-Summary: overlay-deployer module for Jetty
-
-%description overlay-deployer
-%{extdesc} %{summary}.
-
%if %{with spring}
%package spring
Summary: spring module for Jetty
@@ -412,6 +415,24 @@ Summary: websocket-servlet module for Jetty
%description websocket-servlet
%{extdesc} %{summary}.
+%package websocket-mux-extension
+Summary: websocket-mux-extension module for Jetty
+
+%description websocket-mux-extension
+%{extedesc} %{summary}.
+
+%package javax-websocket-client-impl
+Summary: javax-websocket-client-impl module for Jetty
+
+%description javax-websocket-client-impl
+%{extedesc} %{summary}.
+
+%package javax-websocket-server-impl
+Summary: javax-websocket-server-impl module for Jetty
+
+%description javax-websocket-server-impl
+%{extedesc} %{summary}.
+
%if %{with nosql}
%package nosql
Summary: nosql module for Jetty
@@ -470,7 +491,7 @@ License: (ASL 2.0 or EPL) and MIT
%prep
%setup -q -n %{jettyname}-%{version}.%{addver}
-for f in $(find . -name "*.?ar"); do rm $f; done
+find . -name "*.?ar" -exec rm {} \;
find . -name "*.class" -exec rm {} \;
%patch0 -p1 -b .sav
@@ -479,6 +500,23 @@ find . -name "*.class" -exec rm {} \;
# Use proper groupId for apache ant
%pom_xpath_replace "pom:groupId[text()='ant']" "<groupId>org.apache.ant</groupId>" jetty-ant/pom.xml
+%pom_remove_dep "javax.transaction:javax.transaction-api" jetty-plus
+%pom_remove_dep "javax.transaction:javax.transaction-api" jetty-maven-plugin
+%pom_remove_dep "javax.transaction:javax.transaction-api"
+%pom_remove_dep "javax.transaction:javax.transaction-api" jetty-distribution
+%pom_add_dep "org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec" jetty-plus
+%pom_add_dep "org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec" jetty-maven-plugin
+%pom_add_dep "org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec"
+%pom_add_dep "org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec" jetty-distribution
+%pom_remove_dep "org.glassfish:javax.el" jetty-jsp
+%pom_remove_dep "org.glassfish:javax.el" jetty-distribution
+%pom_add_dep "org.glassfish.web:javax.el" jetty-jsp
+%pom_add_dep "org.glassfish.web:javax.el" jetty-distribution
+%pom_remove_dep "org.eclipse.jetty.toolchain:jetty-jsp-jdt" jetty-distribution
+
+%pom_remove_plugin ":clirr-maven-plugin" jetty-websocket
+%pom_remove_plugin ":maven-eclipse-plugin" jetty-osgi
+
# Disable test and example artifacts
# they need more dependencies then we have time for right now :-)
# and also xmvn currently doesn't support .war
@@ -615,7 +653,6 @@ rm -f %{buildroot}%{homedir}/bin/*cygwin*
# copy previously extracted configuration
cp jetty-distribution/target/distribution/etc/* %{buildroot}%{homedir}/etc/
-chmod +x %{buildroot}%{homedir}/bin/jetty-xinetd.sh
chmod +x djetty
mv djetty %{buildroot}%{_bindir}/djetty
ln -s %{homedir}/bin/jetty.sh %{buildroot}%{_bindir}/%{name}
@@ -645,7 +682,7 @@ build-jar-repository %{buildroot}%{homedir}/lib/jsp glassfish-el-api \
glassfish-el taglibs-core taglibs-standard glassfish-jsp \
glassfish-jsp-api ecj
-ln -sf $(build-classpath geronimo-jta) \
+ln -sf $(build-classpath jboss-transaction-1.2-api) \
%{buildroot}%{homedir}/lib/jndi/
for module in jetty-annotations jetty-client jetty-continuation jetty-deploy \
@@ -697,24 +734,6 @@ rm %{buildroot}%{homedir}/*.txt %{buildroot}%{homedir}/*.html
# See: https://bugzilla.redhat.com/show_bug.cgi?id=845993
ln -sf %{rundir} %{buildroot}%{homedir}/work
-# Resources directory ought to be in /etc.
-# See: https://bugzilla.redhat.com/show_bug.cgi?id=596611
-mv %{buildroot}/%{homedir}/resources %{buildroot}/%{confdir}
-
-
-# RPM cannot replace symlink with a directory, workaround this bug.
-# See: https://bugzilla.redhat.com/show_bug.cgi?id=447156
-%pretrans -p <lua>
-if (posix.stat("%{homedir}/resources", "type") == "directory") then
- posix.unlink("%{homedir}/resources/jetty-logging.properties")
- posix.unlink("%{homedir}/resources/log4j.properties")
- posix.rmdir("%{homedir}/resources")
-end
-if (posix.stat("%{confdir}/resources", "type") == "link") then
- posix.unlink("%{confdir}/resources")
-end
-
-
%pre
# Add the "jetty" user and group
getent group %username &>/dev/null || groupadd -r -g %jtuid %username || :
@@ -722,9 +741,6 @@ getent passwd %username &>/dev/null || useradd -r -u %jtuid -g %username \
-d %homedir -M -s /sbin/nologin %username || :
%post
-if [ ! -e %{homedir}/resources ]; then
- ln -s %{confdir}/resources %{homedir}/resources
-fi
%systemd_post jetty.service
%preun
@@ -755,7 +771,6 @@ fi
%dir %{jettylibdir}
%dir %{jettycachedir}
%{homedir}
-%ghost %{homedir}/resources
%attr(755, jetty, jetty) %{logdir}
%attr(755, jetty, jetty) %{tempdir}
%ghost %dir %attr(755, jetty, jetty) %{rundir}
@@ -765,7 +780,7 @@ fi
%dir %{_javadir}/%{name}
%files project -f .mfiles-project
-%doc NOTICE.txt README.txt VERSION.txt LICENSE-eplv10-aslv20.html LICENSE-CONTRIBUTOR
+%doc NOTICE.txt README.TXT VERSION.txt LICENSE-eplv10-aslv20.html LICENSE-CONTRIBUTOR
%files annotations -f .mfiles-jetty-annotations
%files ant -f .mfiles-jetty-ant
@@ -791,21 +806,22 @@ fi
%files server -f .mfiles-jetty-server
%files servlet -f .mfiles-jetty-servlet
%files servlets -f .mfiles-jetty-servlets
-%files overlay-deployer -f .mfiles-jetty-overlay-deployer
%files start -f .mfiles-jetty-start
%files util -f .mfiles-jetty-util
-%doc NOTICE.txt README.txt VERSION.txt LICENSE-eplv10-aslv20.html LICENSE-CONTRIBUTOR
+%doc NOTICE.txt README.TXT VERSION.txt LICENSE-eplv10-aslv20.html LICENSE-CONTRIBUTOR
%doc LICENSE-MIT
%files util-ajax -f .mfiles-jetty-util-ajax
%files webapp -f .mfiles-jetty-webapp
%files xml -f .mfiles-jetty-xml
-%files project -f .mfiles-project
%files websocket-api -f .mfiles-websocket-api
%files websocket-client -f .mfiles-websocket-client
%files websocket-common -f .mfiles-websocket-common
%files websocket-parent -f .mfiles-websocket-parent
%files websocket-server -f .mfiles-websocket-server
%files websocket-servlet -f .mfiles-websocket-servlet
+%files websocket-mux-extension -f .mfiles-websocket-mux-extension
+%files javax-websocket-client-impl -f .mfiles-javax-websocket-client-impl
+%files javax-websocket-server-impl -f .mfiles-javax-websocket-server-impl
%if %{with nosql}
%files nosql -f .mfiles-jetty-nosql
@@ -828,6 +844,9 @@ fi
%doc NOTICE.txt LICENSE*
%changelog
+* Wed Nov 27 2013 Michael Simacek <msimacek(a)redhat.com> - 9.1.0-1
+- Update to upstream version 9.1.0
+
* Fri Oct 11 2013 Michal Srb <msrb(a)redhat.com> - 9.0.6-1
- Update to upstream version 9.0.6
- Install licenses with jetty-util subpackage
diff --git a/sources b/sources
index f367a72..69e085e 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-85a30df6cbc5ccb2535e4d76ec55ef7a jetty-9.0.6.v20130930.tar.gz
+c28c640ed6d883f270def8a9bb692fff jetty-9.1.0.v20131115.tar.gz
10 years, 5 months
[async-http-client] Update to upstream version 1.7.22
by Mikolaj Izdebski
commit 3d46f28f5c5338a4cbaf2318092d374aaee7f479
Author: Mikolaj Izdebski <mizdebsk(a)redhat.com>
Date: Wed Dec 4 09:26:35 2013 +0100
Update to upstream version 1.7.22
.gitignore | 1 +
async-http-client.spec | 5 ++++-
sources | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index eef6b76..3b399fc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,3 +13,4 @@
/async-http-client-1.7.18.tar.gz
/async-http-client-1.7.19.tar.gz
/async-http-client-1.7.21.tar.gz
+/async-http-client-1.7.22.tar.gz
diff --git a/async-http-client.spec b/async-http-client.spec
index 0fb58ad..05044cc 100644
--- a/async-http-client.spec
+++ b/async-http-client.spec
@@ -1,6 +1,6 @@
Name: async-http-client
-Version: 1.7.21
+Version: 1.7.22
Release: 1%{?dist}
Summary: Asynchronous Http Client for Java
@@ -75,6 +75,9 @@ rm -Rf src/test/java/com/ning/http/client/websocket
%changelog
+* Wed Dec 4 2013 Mikolaj Izdebski <mizdebsk(a)redhat.com> - 1.7.22-1
+- Update to upstream version 1.7.22
+
* Fri Oct 18 2013 Michal Srb <msrb(a)redhat.com> - 1.7.21-1
- Update to upstream version 1.7.21
diff --git a/sources b/sources
index 6ef0971..88ca897 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-705af02750da05a5e7cd8f3997d9f9bf async-http-client-1.7.21.tar.gz
+61005497c495430c49946b8893763800 async-http-client-1.7.22.tar.gz
10 years, 5 months