Reactor-core: Every java source file is duplicated in the 3.1.0 source jar in the central maven repository

Created on 28 Sep 2017  路  10Comments  路  Source: reactor/reactor-core

Expected behavior

The java source files should not be duplicated

Actual behavior

They are duplicated

Steps to reproduce

Download file from http://repo1.maven.org/maven2/io/projectreactor/reactor-core/3.1.0.RELEASE/reactor-core-3.1.0.RELEASE-sources.jar
Check contents of the jar.

Reactor Core version

3.1.0.RELEASE

JVM version (e.g. java -version)

N/A

OS version (e.g. uname -a)

N/A

statuhas-workaround typbug typchores

Most helpful comment

All 10 comments

I just did that and I don't see any duplication in the source jar:
image

I checked it on windows with Total Commander and it does show the java files duplicated for me inside the 3.1.0 source jar.
I have checked 3.0.7 source jar as well. That does not show duplication.

Also the 3.0.7 source jar is less than half the size of the 3.1.0 source jar (600 KB vs 1.3 MB).

I see the duplication:

image

Also this Java 9 program shows there are duplicate entries:

try (JarFile jar = new JarFile("reactor-core-3.1.0.RELEASE-sources.jar")) {
    jar.stream()
            .collect(Collectors.groupingBy(e -> e.getName()))
    .entrySet()
    .stream()
    .filter(e -> e.getValue().size() > 1)
    .forEach(System.out::println);
}

Thanks. Upon extraction or listing on the command line with unzip -l reactor-core-3.1.0.RELEASE-sources.jar hides the duplication, but if I do unzip reactor-core-3.1.0.RELEASE-sources.jar -d ./temp it asks if I want to replace an existing file so there is duplication indeed 馃槩

investigating...

@akiraly has it caused any issue for you eg. in the IDE so far?

It did not cause any issues for me so far so IMHO this is just a minor issue.

Looks like this is indeed the Kotlin plugin issue, and a workaround is to explicitly exclude duplicates (duplicatesStrategy = DuplicatesStrategy.EXCLUDE) in the jar task...

@akiraly @akarnokd @sdeleuze thanks for checking the jar with various tools 馃憤 (tested integration in IntelliJ 2017.2 and Eclipse Neon as well)

So far it doesn't look like it is causing any critical side effect 馃槍

I'll list this issue as a know "bug" of the 3.1.0 RELEASE in the release notes and also link to it in the announcement blog I'm preparing.

I'll also keep it open for a week or so, in order to give a chance for people to comment if they encounter any major usability issue as a result of this situation (you never know).

This issue has been fixed, the fix will be available in Kotlin Gradle plugin 1.1.60 https://youtrack.jetbrains.com/issue/KT-17564

closing this as 3.1.1.RELEASE was released without duplicate sources thanks to the workaround. #915 will track the upgrade of gradle plugin when it becomes available, as well as the removal of the workaround.

Was this page helpful?
0 / 5 - 0 ratings