This is an automated email from the git hooks/post-receive script. tg pushed a commit to branch master in repository maven-war-plugin.
commit 9360c3074116dd070fa3025a687c918a3bd0358f Author: mirabilos <t.gla...@tarent.de> Date: Sat Oct 29 01:19:48 2016 +0200 Apply upstream fix for MWAR-269, needed to package Guacamole (as announced in IRC) --- debian/changelog | 7 ++++++ debian/patches/MWAR-269.diff | 55 ++++++++++++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 63 insertions(+) diff --git a/debian/changelog b/debian/changelog index 8d0621b..a57b361 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +maven-war-plugin (2.2-2) unstable; urgency=medium + + * Team upload. + * Apply upstream fix for MWAR-269 + + -- Thorsten Glaser <t...@mirbsd.de> Sat, 29 Oct 2016 01:19:15 +0200 + maven-war-plugin (2.2-1) unstable; urgency=medium * Team upload. diff --git a/debian/patches/MWAR-269.diff b/debian/patches/MWAR-269.diff new file mode 100644 index 0000000..a9f3caf --- /dev/null +++ b/debian/patches/MWAR-269.diff @@ -0,0 +1,55 @@ +# DP: from https://issues.apache.org/jira/browse/MWAR-269 +# DP: fix already contained in later upstream versions + +--- a/src/main/java/org/apache/maven/plugin/war/packaging/AbstractWarPackagingTask.java ++++ b/src/main/java/org/apache/maven/plugin/war/packaging/AbstractWarPackagingTask.java +@@ -32,6 +32,7 @@ import org.apache.maven.plugin.war.util. + import org.apache.maven.shared.filtering.MavenFilteringException; + import org.codehaus.plexus.archiver.ArchiverException; + import org.codehaus.plexus.archiver.UnArchiver; ++import org.codehaus.plexus.archiver.jar.JarArchiver; + import org.codehaus.plexus.archiver.manager.NoSuchArchiverException; + import org.codehaus.plexus.interpolation.InterpolationException; + import org.codehaus.plexus.util.DirectoryScanner; +@@ -264,14 +265,14 @@ public abstract class AbstractWarPackagi + } + + /** +- * Copy file from source to destination. The directories up to <code>destination</code> ++ * Copy file or folder from source to destination. The directories up to <code>destination</code> + * will be created if they don't already exist. if the <code>onlyIfModified</code> flag + * is <tt>false</tt>, <code>destination</code> will be overwritten if it already exists. If the + * flag is <tt>true</tt> destination will be overwritten if it's not up to date. + * <p/> + * + * @param context the packaging context +- * @param source an existing non-directory <code>File</code> to copy bytes from ++ * @param source an existing file or directory <code>File</code> to copy bytes from or assemble jar from + * @param destination a non-directory <code>File</code> to write bytes to (possibly overwriting). + * @param targetFilename the relative path of the file from the webapp root directory + * @param onlyIfModified if true, copy the file only if the source has changed, always copy otherwise +@@ -290,9 +291,21 @@ public abstract class AbstractWarPackagi + } + else + { +- FileUtils.copyFile( source.getCanonicalFile(), destination ); +- // preserve timestamp +- destination.setLastModified( source.lastModified() ); ++ if (source.isDirectory()) { ++ JarArchiver jarArchiver = new JarArchiver(); ++ try { ++ jarArchiver.setDestFile( destination ); ++ jarArchiver.addDirectory( source.getCanonicalFile() ); ++ jarArchiver.createArchive(); ++ } catch (ArchiverException e) { ++ // wrap ArchiverException in IOException ++ throw new IOException(e); ++ } ++ } else { ++ FileUtils.copyFile( source.getCanonicalFile(), destination ); ++ // preserve timestamp ++ destination.setLastModified( source.lastModified() ); ++ } + context.getLog().debug( " + " + targetFilename + " has been copied." ); + return true; + } diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..2927438 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +MWAR-269.diff -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/maven-war-plugin.git _______________________________________________ pkg-java-commits mailing list pkg-java-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits