Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 365932

Summary: Produce jetty-websocket aggregate jar for android use
Product: [RT] Jetty Reporter: Joakim Erdfelt <joakim.erdfelt>
Component: websocketAssignee: Joakim Erdfelt <joakim.erdfelt>
Status: RESOLVED WORKSFORME QA Contact:
Severity: enhancement    
Priority: P3 CC: jetty-inbox
Version: 7.5.4   
Target Milestone: 7.5.x   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 401273    
Bug Blocks:    

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.