You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2018/04/19 13:13:48 UTC

[royale-compiler] branch develop updated: fix royale-maven-plugin to accept files at the root of an artifact. This was causing overlays in sampleamfwebapp not working correctly and copying root files in the war

This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git


The following commit(s) were added to refs/heads/develop by this push:
     new 5e2b3bf  fix royale-maven-plugin to accept files at the root of an artifact. This was causing overlays in sampleamfwebapp not working correctly and copying root files in the war
5e2b3bf is described below

commit 5e2b3bf2dbc4bac87c173ab99013137d8470f740
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Thu Apr 19 15:13:43 2018 +0200

    fix royale-maven-plugin to accept files at the root of an artifact. This was causing overlays in sampleamfwebapp not working correctly and copying root files in the war
---
 .../src/main/java/org/apache/royale/maven/PackageJSMojo.java          | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/royale-maven-plugin/src/main/java/org/apache/royale/maven/PackageJSMojo.java b/royale-maven-plugin/src/main/java/org/apache/royale/maven/PackageJSMojo.java
index fc16e85..ff3c957 100644
--- a/royale-maven-plugin/src/main/java/org/apache/royale/maven/PackageJSMojo.java
+++ b/royale-maven-plugin/src/main/java/org/apache/royale/maven/PackageJSMojo.java
@@ -103,7 +103,9 @@ public class PackageJSMojo extends AbstractMojo {
                     addDirectoryToZip(zipRootDirectory, file, zipOutputStream);
                 } else {
                     String relativePath = zipRootDirectory.toURI().relativize(currentDirectory.toURI()).getPath();
-                    ZipEntry zipEntry = new ZipEntry(relativePath + "/" + file.getName());
+                    if (relativePath.startsWith("/"))
+                        relativePath = relativePath.substring(1);
+                    ZipEntry zipEntry = new ZipEntry(relativePath + file.getName());
                     zipOutputStream.putNextEntry(zipEntry);
                     FileInputStream in = new FileInputStream(file);
                     IOUtils.copy(in, zipOutputStream);

-- 
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.