skpal / jarjar

Automatically exported from code.google.com/p/jarjar
0 stars 0 forks source link

JarJar Ant task does not repackage package-info.class files #36

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Attempt to jarjar com.google.collections:google-collections:1.0-rc4 
using pattern com.google.common.** -> com.acme.repackaged.@0
2. Inspect the resulting JAR

What is the expected output? What do you see instead?

The file com/google/common/collect/package-info.class should (?) be moved 
to package com/acme/repackaged/com/google/common/collect. Instead, it is 
still at its old location com/google/common/collect.

What version of the product are you using? On what operating system?

The test was carried out running the JarJar Ant task via Maven using the 
following configuration:

<project>
  ...
  <dependency>
    <groupId>com.google.collections</groupId>
    <artifactId>google-collections</artifactId>
    <version>1.0-rc4</version>
  </dependency>
  ...
  <build>
      <plugins>
          <plugin>
              <artifactId>maven-assembly-plugin</artifactId>
              <executions>
                  <execution>
                      <phase>package</phase>
                      <goals>
                          <goal>single</goal>
                      </goals>
                      <configuration>
                          <descriptorRefs>
                              <descriptorRef>jar-with-
dependencies</descriptorRef>
                          </descriptorRefs>
                      </configuration>
                  </execution>
              </executions>
          </plugin>   
          <plugin>
              <artifactId>maven-antrun-plugin</artifactId>
              <executions>
                  <execution>
                      <phase>package</phase>
                      <goals>
                          <goal>run</goal>
                      </goals>
                      <configuration>
                          <tasks>
                              <taskdef name="jarjar" 
classname="com.tonicsystems.jarjar.JarJarTask"/>
                              <jarjar 
destfile="${build.directory}/${build.finalName}-jar-with-dependencies.jar"
                                      update="true">
                                  <rule pattern="com.google.common.**" 
result="${groupId}.repackaged.@0"/>
                              </jarjar>
                          </tasks>
                      </configuration>
                  </execution>
              </executions>
              <dependencies>
                  <dependency>
                      <groupId>com.tonicsystems.jarjar</groupId>
                      <artifactId>jarjar</artifactId>
                      <version>1.0-rc8</version>
                  </dependency>
              </dependencies>
          </plugin>                     
      </plugins>
  </build>
</project>

I'm assuming this is equivalent to running the Ant or even command-line 
task, but of course there is always a chance this is down to Maven. I would 
suspect not, but haven't verified this.

Original issue reported on code.google.com by sharedo...@gmail.com on 17 Dec 2009 at 2:23

Attachments:

GoogleCodeExporter commented 8 years ago
Here's a patch that fixes the issue for me. Assuming the change looks ok I'd 
really appreciate it if we could get a new build that incorporates this fix.

Thanks,
Max

Original comment by max.r...@gmail.com on 22 Jan 2012 at 5:54

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by max.r...@gmail.com on 3 Feb 2012 at 6:10