[
https://issues.apache.org/jira/browse/TWILL-182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15429546#comment-15429546
]
ASF GitHub Bot commented on TWILL-182:
--------------------------------------
Github user chtyim commented on a diff in the pull request:
https://github.com/apache/twill/pull/1#discussion_r75587121
--- Diff:
twill-core/src/test/java/org/apache/twill/internal/utils/ApplicationBundlerTest.java
---
@@ -17,27 +17,32 @@
*/
package org.apache.twill.internal.utils;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Lists;
-import com.google.common.io.ByteStreams;
-import com.google.common.io.Files;
-import org.apache.twill.filesystem.LocalLocationFactory;
-import org.apache.twill.filesystem.Location;
-import org.apache.twill.internal.ApplicationBundler;
-import org.junit.Assert;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
-
import java.io.File;
import java.io.FileInputStream;
+import java.io.FileOutputStream;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
+import java.util.ArrayList;
import java.util.List;
import java.util.jar.JarEntry;
import java.util.jar.JarInputStream;
+import java.util.jar.JarOutputStream;
+
+import org.apache.commons.compress.utils.IOUtils;
--- End diff --
Same here. The profile that we use have all JDK classes come after other
imports.
> ApplicationBundler will overwrite dependencies with identical names
> -------------------------------------------------------------------
>
> Key: TWILL-182
> URL: https://issues.apache.org/jira/browse/TWILL-182
> Project: Apache Twill
> Issue Type: Bug
> Components: core
> Affects Versions: 0.7.0-incubating
> Reporter: Martin Serrano
> Fix For: 0.8.0
>
>
> If two jars obtained from *different* classpath locations have the same name
> but different contents, one will overwrite the other. The dependency code
> correctly finds the jars (uses the full path in the HashSet which accumulates
> the deps) but when the bundle is created the jars are written to {{/lib}}
> under their name. This results in one overwriting the other.
> While this is not a likely occurrence, it occurs for us in our development
> environment because our published jar names are built up from their project
> hierarchy. For example the model project for our sdk is in {{.../sdk/model}}
> and will be on the classpath as {{.../sdk/model.jar}} and published as
> {{sdk-model.jar}}.
> In practice however this could occur with any jar name and would be more
> likely over time.
> The {{ApplicationBundler}} could detect this and re-write the name with some
> part of the path or suffix to ensure the name is unique.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)