debian/0000775000000000000000000000000012336377716007207 5ustar debian/README.source0000664000000000000000000000033512331207045011345 0ustar Repackage of upstream source. The upstream has been re-packed to remove all pre-compiled files with no associated source (including jar files). -- Niels Thykier Sat, 12 Sep 2009 22:42:00 +0200 debian/orig-tar.sh0000775000000000000000000000062012331207045011246 0ustar #!/bin/sh -e VERSION=$2 TAR=../jarjar_$VERSION.orig.tar.gz DIR=jarjar-$VERSION REV=$(echo $VERSION | sed 's/^.*+svn\([0-9]\+\)$/\1/') svn export http://jarjar.googlecode.com/svn/trunk/jarjar -r ${REV} $DIR tar -c -z -f $TAR --exclude '*.jar' $DIR rm -rf $DIR # move to directory 'tarballs' if [ -r .svn/deb-layout ]; then . .svn/deb-layout mv $TAR $origDir && echo "moved $TAR to $origDir" fi debian/ant.properties0000664000000000000000000000032212331234532012063 0ustar asm.jar=/usr/share/java/asm4.jar asm-commons.jar=/usr/share/java/asm4-commons.jar maven-plugin-api.jar=/usr/share/java/maven-plugin-api.jar ant.jar=/usr/share/java/ant.jar compile.source=1.5 compile.target=1.5 debian/watch0000664000000000000000000000027412331207045010221 0ustar version=3 opts=dversionmangle=s/[+.]svn(\d+)//,uversionmangle=s/(rc\d+)/~$1/ \ http://code.google.com/p/jarjar/downloads/list?can=1 \ //jarjar.googlecode.com/files/jarjar-(\d[\d.]*)\.jar debian/changelog0000664000000000000000000001654212336377716011071 0ustar jarjar (1.4+svn142-4ubuntu1) utopic; urgency=medium * Avoid dependency on libmaven2-core-java to avoid pulling Maven into Ubuntu main: - d/control: Drop BD on libmaven2-core-java - d/p/0001-fix-build.xml.patch: Re-instate patch which excludes Maven support from compilation. -- James Page Mon, 19 May 2014 13:57:49 +0100 jarjar (1.4+svn142-4) unstable; urgency=low * Add myself to Uploaders. * Remove szzepiq_jar_resources.diff patch. (Closes: #745815). * Add B-D on libmaven2-core-java. * Bump Standards-Version to 3.9.5. No changes were required. * Remove outdated readme d/README.Debian. * Remove outdated patch d/patches/0001-fix-build.xml.patch. * Add patch d/patches/0005-fix-javadocs.patch to fix some warnings during javadoc generation. -- Miguel Landaeta Sun, 04 May 2014 20:30:37 -0300 jarjar (1.4+svn142-3) unstable; urgency=low * Team upload. * Provide Maven artifacts. (Closes: #727652). -- Miguel Landaeta Thu, 24 Oct 2013 21:26:09 -0300 jarjar (1.4+svn142-2) unstable; urgency=low * Upload to unstable. * d/control: Use canonical URL for Vcs-* fields. * d/patches/add_ClassReader_EXPAND_FRAMES.diff: Add missing ClassReader.EXPAND_FRAMES for ASM call (Closes: #644469). -- Damien Raude-Morvan Tue, 07 May 2013 23:29:00 +0200 jarjar (1.4+svn142-1) experimental; urgency=low * New upstream release. * Add myself as Uploaders. * Use ASM 4.x for bytecode processing: - d/control: Build-Depends on libasm4-java. - d/rules: Update CLASSPATH. - d/ant.properties: Use asm4.jar and asm4-commons.jar. * d/watch: Update to check on googlecode.com * Update Standards-Version: 3.9.4, no changes needed. * d/patches/szzepiq_jar_resources.diff: From , resolve the issue with jarjar not updating the fully qualified class names in the jar's resources * d/patches/0003-fix-path-in-build.xml.patch, d/patches/0004-support-gnu-regexp.patch, d/patches/0005-cast-null-to-java.io.File.patch: Dropped, as only needed from old GCJ runtime. -- Damien Raude-Morvan Mon, 07 Jan 2013 23:46:03 +0100 jarjar (1.1-3) unstable; urgency=low * Rember to actually remove Michael Koch from uploaders. -- Niels Thykier Sun, 15 Jul 2012 13:19:13 +0200 jarjar (1.1-2) unstable; urgency=low [ James Page ] * Drop debian/patches/0006-remove-asm-commons-from-final-jar.patch: libasm3-java now ships correctly separated jar files so asm-commons must be included. (Closes: #646600) [ Niels Thykier ] * Remove Michael Koch from uploaders. Thanks for your work so far. (Closes: #654028) -- Niels Thykier Sun, 15 Jul 2012 12:42:56 +0200 jarjar (1.1-1) unstable; urgency=low * Team upload * New upstream release. * Change debian/watch to point to upstream's svn repo. * Refresh patches. * Remove Arnaud from Uploaders list. * Remove Java runtime from Depends. * Update Standards-Version: 3.9.2. -- Torsten Werner Thu, 08 Sep 2011 22:30:41 +0200 jarjar (1.0+dfsg-2) unstable; urgency=low [ Torsten Werner ] * Convert patches to dep3 format. * Add a patch to cast null to java.io.File. (Closes: #571340) * Add a patch to remove asm-commons from final jar file. * Convert package to source format 3.0. [ Thierry Carrez ] * debian/control: Minimal runtime dependency set to java2-runtime-headless [ Niels Thykier ] * debian/control: Added java5 and java6 as alternatives. -- Torsten Werner Sun, 28 Feb 2010 12:47:45 +0100 jarjar (1.0+dfsg-1) unstable; urgency=low [ Michael Koch ] * debian/watch: updated to track binary jar file instead of source release. [ Niels Thykier ] * New upstream release. - Identical content, but version numbers differed. * Create a script to handle fetching of orig source that works around 1.0rc8 and 1.0 being the same release. -- Niels Thykier Mon, 14 Sep 2009 21:39:52 +0200 jarjar (1.0~rc8+dfsg-1) unstable; urgency=low * New upstream release. * Added myself to uploaders. * Renamed and updated 02_dont_build_JarJarMojo.patch to 02_fix_build_xml.patch. * Stopped using Build-Depends-Indep since buildds and the policy does not agree on when it should used. * Changed section to java. * Replaced gcj-compat with the default javas packages. (Closes: #526279) * Bumped to Standard-Version 3.8.3. - Link to Apache-2.0 license rather than quoting it. * Bumped Debhelper to version 7. * Added a README.source to briefly explain that files have been excluded from the orignal upstream source. * Created an get-orig-source rule to fetch and create the orig.tar.gz. -- Niels Thykier Sat, 12 Sep 2009 19:26:57 +0200 jarjar (1.0~rc7.dfsg-2) unstable; urgency=low * Fix lists in long descriptions. Closes: #480324 -- Michael Koch Fri, 09 May 2008 17:13:34 -0100 jarjar (1.0~rc7.dfsg-1) unstable; urgency=low * New upstream version. * Updated watch file again to check for source download. -- Michael Koch Sat, 22 Mar 2008 17:23:24 +0100 jarjar (1.0~rc6.dfsg-1) unstable; urgency=low [ Michael Koch ] * Rewrote debian/copyright as new version is licensed under Apache License 2.0. * Updated watch file to match upstream version correctly. * Moved debhelper and cdbs from Build-Depends-Indep to Build-Depends. * Updated debhelper level to 5. * Added debian/patches/05_gnu_regexp.patch to work around limitation in gnu.regexp. * Removed some cruft from debian/rules. * Added Homepage, Vcs-Svn and Vcs-Browser fields. * Added myself to Uploaders. [ Arnaud Vandyck ] * New upstream. * debian/control: - Standards-Version: updated to 3.7.3, no change. - Build-Depends-Indep: removed libgnu-regexp-java. * debian/patches/19_TextDepHandler.patch, debian/patches/22_util_StandaloneJarProcessor.patch, debian/patches/23_KeepProcessor.patch, debian/patches/10_DepFindVisitor.patch, debian/patches/21_util_RemappingClassTransformer.patch, debian/patches/14_PackageRemapper.patch, debian/patches/12_JarJarTask.patch, debian/patches/17_ResourceProcessor.patch, debian/patches/20_util_ClassHeaderReader.patch, debian/patches/01_build_classpath.patch, debian/patches/18_StringReader.patch, debian/patches/15_util_JarTransformerChain.patch, debian/patches/24_util_GetNameClassWriter.patch, debian/patches/13_ManifestProcessor.patch, debian/patches/11_DepFind.patch, debian/patches/10_AbstractDepHandler_warning.patch: removed * debian/patches/04_path_build.patch: added * debian/libjarjar-java.install, debian/libjarjar-java.links: updated to new upstream * debian/patches/03_embed_libs_from_debian.patch: updated to match upstream change and removed reference to libgnu-regexp-java * debian/ant.properties: removed reference to libgnu-regexp-java and commented maven-plugin-api property * debian/rules: - removed reference to libgnu-regexp-java and ams3-util - removed clean comments -- Michael Koch Wed, 20 Feb 2008 21:11:44 +0100 jarjar (1.0~rc3.dfsg.1-1) unstable; urgency=low * Initial Release (closes: #417591). -- Arnaud Vandyck Fri, 18 May 2007 13:09:08 +0200 debian/compat0000664000000000000000000000000212331207045010363 0ustar 7 debian/libjarjar-java-doc.doc-base0000664000000000000000000000052712331207045014212 0ustar Document: jarjar-doc Title: Programmer API for jarjar (repackage third-party jars) Author: Chris Nokleberg Abstract: This is the programmer API of jarjar, a library for repackaging third-party jars. Section: Programming Format: HTML Index: /usr/share/doc/libjarjar-java-doc/api/index.html Files: /usr/share/doc/libjarjar-java-doc/api/*.html debian/copyright0000664000000000000000000000116512331207045011123 0ustar This package was debianized by Arnaud Vandyck on 3-April-2007. The source code was downloaded from http://www.tonicsystems.com/products/jarjar/ Authors: Tony Chris Nokleberg Copyright: (C) 2004 Tonic Systems, Inc. License: Apache 2.0 On Debian systems the full text of the Apache 2.0 License can be found at /usr/share/common-licenses/Apache-2.0. The Debian packaging is licensed under the General Public License. On Debian systems the full text of the General Public License, GPL, can be found at /usr/share/common-licenses/GPL. debian/patches/0000775000000000000000000000000012336377205010627 5ustar debian/patches/0005-fix-javadocs.patch0000664000000000000000000000150012331234630014571 0ustar Description: Fix classpath javadoc task Author: Miguel Landaeta Forwarded: no Last-Update: 2014-05-03 --- jarjar-1.4+svn142.orig/build.xml +++ jarjar-1.4+svn142/build.xml @@ -262,10 +262,16 @@ access="${javadoc.access}" failonerror="true" packagenames="com.tonicsystems.jarjar.*" - classpathref="path.run" Author="true" Version="true" - Use="true" - /> + Use="true"> + + + + + + + + debian/patches/szzepiq_jar_resources.diff0000664000000000000000000001224412331235236016107 0ustar Description: Create patch from fork at . which resolve the issue with jarjar not updating the fully qualified class names in the jar's resources. For instance, with this patch jarjar is able to replace classname (based on requested rules) in META-INF/plexus/components.xml files. Source: https://github.com/szczepiq/jarjar Author: Szczepan Faber Author: Damien Raude-Morvan Last-Update: 2013-01-08 --- a/src/main/com/tonicsystems/jarjar/MainProcessor.java +++ b/src/main/com/tonicsystems/jarjar/MainProcessor.java @@ -16,6 +16,8 @@ package com.tonicsystems.jarjar; +import com.tonicsystems.jarjar.resource.DefaultLineRewriter; +import com.tonicsystems.jarjar.resource.ResourceRewriter; import com.tonicsystems.jarjar.util.*; import java.io.File; import java.io.IOException; @@ -54,6 +56,7 @@ processors.add(new ZapProcessor(zapList)); processors.add(new JarTransformerChain(new RemappingClassTransformer[]{ new RemappingClassTransformer(pr) })); processors.add(new ResourceProcessor(pr)); + processors.add(new ResourceRewriter(new DefaultLineRewriter(ruleList), verbose)); chain = new JarProcessorChain(processors.toArray(new JarProcessor[processors.size()])); } --- /dev/null +++ b/src/main/com/tonicsystems/jarjar/resource/DefaultLineRewriter.java @@ -0,0 +1,34 @@ +package com.tonicsystems.jarjar.resource; + +import com.tonicsystems.jarjar.Rule; +import com.tonicsystems.jarjar.util.EntryStruct; + +import java.util.LinkedList; +import java.util.List; + +/** + * by Szczepan Faber, created at: 9/11/12 + */ +public class DefaultLineRewriter implements LineRewriter { + private final List rules = new LinkedList(); + + public DefaultLineRewriter(List ruleList) { + for (Rule rule : ruleList) { + rules.add(new MatchableRule(rule)); + } + } + + public boolean accepts(EntryStruct struct) { + return !struct.name.endsWith(".class") && !struct.name.endsWith(".java") && !struct.name.endsWith("MANIFEST.MF"); + } + + public String replaceLine(String line) { + for (MatchableRule rule : rules) { + String replacement = rule.replace(line); + if (!replacement.equals(line)) { + return replacement; + } + } + return line; + } +} --- /dev/null +++ b/src/main/com/tonicsystems/jarjar/resource/LineRewriter.java @@ -0,0 +1,14 @@ +package com.tonicsystems.jarjar.resource; + +import com.tonicsystems.jarjar.util.EntryStruct; + +/** + * by Szczepan Faber, created at: 9/11/12 + */ +public interface LineRewriter { + + boolean accepts(EntryStruct struct); + + String replaceLine(String line); + +} --- /dev/null +++ b/src/main/com/tonicsystems/jarjar/resource/MatchableRule.java @@ -0,0 +1,31 @@ +package com.tonicsystems.jarjar.resource; + +import com.tonicsystems.jarjar.Rule; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * by Szczepan Faber, created at: 9/11/12 + */ +public class MatchableRule { + + private final String pattern; + private final String replacement; + + public MatchableRule(Rule rule) { + this(rule.getPattern(), rule.getResult()); + } + + public MatchableRule(String pattern, String replacement) { + this.pattern = pattern; + this.replacement = replacement; + } + + public String replace(String input) { + String p = pattern.replaceAll("\\.", "\\\\.").replaceAll("\\*\\*", "([\\\\w\\\\d_\\\\\\$]*)"); + String replacement = this.replacement.replaceAll("@1","\\$1"); + Matcher m = Pattern.compile(p).matcher(input); + return m.replaceAll(replacement); + } +} \ No newline at end of file --- /dev/null +++ b/src/main/com/tonicsystems/jarjar/resource/ResourceRewriter.java @@ -0,0 +1,40 @@ +package com.tonicsystems.jarjar.resource; + +import com.tonicsystems.jarjar.util.EntryStruct; +import com.tonicsystems.jarjar.util.JarProcessor; + +import java.io.*; + +/** + * by Szczepan Faber, created at: 9/11/12 + */ +public class ResourceRewriter implements JarProcessor { + + private final LineRewriter input; + private final boolean verbose; + + public ResourceRewriter(LineRewriter input, boolean verbose) { + this.input = input; + this.verbose = verbose; + } + + public boolean process(EntryStruct struct) throws IOException { + if (input.accepts(struct)) { + BufferedReader reader = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(struct.data))); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + PrintStream printer = new PrintStream(out); + String line; + while((line = reader.readLine()) != null) { + String replacement = input.replaceLine(line); + if (!replacement.equals(line) && verbose) { + System.out.println("Updating file: " + struct.name + ". Replacement: " + replacement); + } + printer.println(replacement); + } + reader.close(); + printer.close(); + struct.data = out.toByteArray(); + } + return true; + } +} debian/patches/0002-embed-libs-from-debian.patch0000664000000000000000000000134112331207045016377 0ustar From: Arnaud Vandyck Date: Sun, 28 Feb 2010 12:42:06 +0100 Subject: embed libs from debian --- build.xml | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) --- a/build.xml +++ b/build.xml @@ -96,8 +96,8 @@ - - + + debian/patches/add_ClassReader_EXPAND_FRAMES.diff0000664000000000000000000000146712331207045016552 0ustar Description: Resolving dependencies with find, and possibly other tasks, report errors caused by the above missing flag. Author: Panayiotis Karabassis Last-Update: 2011-10-06 Forwarded: https://code.google.com/p/jarjar/issues/detail?id=6 --- a/src/main/com/tonicsystems/jarjar/DepFind.java +++ b/src/main/com/tonicsystems/jarjar/DepFind.java @@ -62,7 +62,7 @@ try { new ClassReader(in).accept( new DepFindVisitor(classes, entry.getSource(), handler), - ClassReader.SKIP_DEBUG); + ClassReader.SKIP_DEBUG | ClassReader.EXPAND_FRAMES); } catch (Exception e) { System.err.println("Error reading " + entry.getName() + ": " + e.getMessage()); } finally { debian/patches/0001-fix-build.xml.patch0000664000000000000000000000161512336377176014722 0ustar From: Arnaud Vandyck Date: Sun, 28 Feb 2010 12:42:05 +0100 Subject: fix build.xml to drop requirement for maven2 core --- build.xml | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) --- a/build.xml +++ b/build.xml @@ -69,7 +69,8 @@ + debug="${compile.debug}" optimize="${compile.optimize}" deprecation="${compile.deprecation}" + excludes="com/tonicsystems/jarjar/JarJarMojo.java"> debian/patches/series0000664000000000000000000000030512336377205012042 0ustar 0001-fix-build.xml.patch 0002-embed-libs-from-debian.patch # please see #745815 before re-enabling this patch #szzepiq_jar_resources.diff add_ClassReader_EXPAND_FRAMES.diff 0005-fix-javadocs.patch debian/source/0000775000000000000000000000000012331230340010457 5ustar debian/source/format0000664000000000000000000000001412331207045011673 0ustar 3.0 (quilt) debian/rules0000775000000000000000000000131312331234022010236 0ustar #!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/ant.mk VERSION=`echo $(DEB_UPSTREAM_VERSION) | sed -e s/~// | sed -e s/\.dfsg//` MAVEN_VERSION := $(shell echo $(VERSION) | sed -e 's/+svn.*/-SNAPSHOT/') JAVA_HOME := /usr/lib/jvm/default-java DEB_JARS := asm4 asm4-commons maven-plugin-api DEB_ANT_BUILD_TARGET := jar javadoc install/libjarjar-java:: # versioning workaround until 1.4 is released mh_installpom -plibjarjar-java --no-parent --set-version=$(MAVEN_VERSION) pom.xml mh_installjar -plibjarjar-java -l pom.xml --set-version=$(MAVEN_VERSION) dist/jarjar-*.jar clean:: mh_clean get-orig-source: debian/orig-tar.sh --release $(DEB_UPSTREAM_VERSION) debian/libjarjar-java-doc.install0000664000000000000000000000006612331207045014201 0ustar dist/javadoc/* /usr/share/doc/libjarjar-java-doc/api debian/control0000664000000000000000000000325512336375762010616 0ustar Source: jarjar Section: java Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian Java Maintainers Uploaders: Niels Thykier , Damien Raude-Morvan , Miguel Landaeta Build-Depends: ant, cdbs, debhelper (>= 7), default-jdk, libasm4-java (>= 4.1-2), maven-repo-helper Standards-Version: 3.9.5 Vcs-Svn: svn://anonscm.debian.org/pkg-java/trunk/jarjar Vcs-Browser: http://anonscm.debian.org/viewvc/pkg-java/trunk/jarjar Homepage: http://code.google.com/p/jarjar/ Package: libjarjar-java Architecture: all Depends: ${misc:Depends} Description: repackage third-party jars Utility that makes it easy to repackage Java libraries and embed them into your own distribution. This is useful for two reasons: . - You can easily ship a single jar file with no external dependencies. - You can avoid problems where your library depends on a specific version of a library, which may conflict with the dependencies of another library. Package: libjarjar-java-doc Section: doc Architecture: all Depends: ${misc:Depends} Suggests: libjarjar-java Description: repackage third-party jars - documentation Utility that makes it easy to repackage Java libraries and embed them into your own distribution. This is useful for two reasons: . - You can easily ship a single jar file with no external dependencies. - You can avoid problems where your library depends on a specific version of a library, which may conflict with the dependencies of another library. . This package includes the documentation.