Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365932 - Produce jetty-websocket aggregate jar for android use
Summary: Produce jetty-websocket aggregate jar for android use
Status: RESOLVED WORKSFORME
Alias: None
Product: Jetty
Classification: RT
Component: websocket (show other bugs)
Version: 7.5.4   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 7.5.x   Edit
Assignee: Joakim Erdfelt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 401273
Blocks:
  Show dependency tree
 
Reported: 2011-12-07 12:16 EST by Joakim Erdfelt CLA
Modified: 2015-01-08 14:04 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joakim Erdfelt CLA 2011-12-07 12:16:57 EST
The jetty-websocket jars ...
 * jetty-websocket.jar
 * jetty-util.jar 
 * jetty-io.jar
 * jetty-util.jar

all include a common file /about.html that causes APK packaging errors on android.

[2011-12-07 09:53:15 - bubblewrap-app] Error generating final archive: Found duplicate file for APK: about.html
Origin 1: /home/joakim/.m2/repository/org/eclipse/jetty/jetty-websocket/7.6.0.RC1/jetty-websocket-7.6.0.RC1.jar
Origin 2: /home/joakim/.m2/repository/org/eclipse/jetty/jetty-util/7.6.0.RC1/jetty-util-7.6.0.RC1.jar

Need an aggregate jar that will eliminate this duplicate issue.
Comment 1 Joakim Erdfelt CLA 2011-12-07 12:18:56 EST
Added maven-shade-plugin configuration (default config, no bytecode manipulation) with classifier 'aggregate' to produce an aggregate jar of the jetty-websocket dependencies.
Comment 2 Joakim Erdfelt CLA 2011-12-07 12:37:26 EST
reopening, while the produced artifact is indeed an aggregate, having the pom refer to the existing downstream / transitive dependencies makes using this artifact more noisy.

example:


  <dependencies>
    <dependency>
      <groupId>com.google.android</groupId>
      <artifactId>android</artifactId>
      <version>${android-version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-websocket</artifactId>
      <version>${jetty-version}</version>
      <classifier>aggregate</classifier>
      <type>jar</type>
      <exclusions>
        <exclusion>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-util</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-io</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-http</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
Comment 3 Joakim Erdfelt CLA 2014-06-05 20:07:03 EDT
Adding dependency on community/process bug #401273
Comment 4 Joakim Erdfelt CLA 2015-01-08 14:04:14 EST
The new Android Studio 1.0 makes this an irrelevant task.