Hello,

I use maven-shade-plugin to create an uber jar and its source jar with
<createSourcesJar>.

https://github.com/tkobayas/shade-test/blob/main/pom.xml
```
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.5.2</version>
        <executions>
          <execution>
            <id>source-jar</id>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <createSourcesJar>true</createSourcesJar>
              <artifactSet>
                <includes>
                  <include>org.ow2.asm:asm</include>
                </includes>
              </artifactSet>
            </configuration>
          </execution>
        </executions>
      </plugin>
```

The uber jar (shade-test-1.0-SNAPSHOT.jar) contains both the project
classes (App.class) and dependency classes (org.ow2.asm:asm), but the
source jar (shade-test-1.0-SNAPSHOT-sources.jar) contains only
dependency class sources, not the project class sources (App.java).

Is it expected? Am I overlooking any configuration?

Any help/suggestions would be appreciated.

Thanks!
Toshiya

Reply via email to