New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Every java source file is duplicated in the 3.1.0 source jar in the central maven repository #887

Closed
akiraly opened this Issue Sep 28, 2017 · 10 comments

Comments

Projects
None yet
4 participants
@akiraly

akiraly commented Sep 28, 2017

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

@simonbasle

This comment has been minimized.

Show comment
Hide comment
@simonbasle

simonbasle Sep 28, 2017

Contributor

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

Contributor

simonbasle commented Sep 28, 2017

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

@akiraly

This comment has been minimized.

Show comment
Hide comment
@akiraly

akiraly Sep 28, 2017

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).

akiraly commented Sep 28, 2017

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).

@akarnokd

This comment has been minimized.

Show comment
Hide comment
@akarnokd

akarnokd Sep 28, 2017

Contributor

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);
}
Contributor

akarnokd commented Sep 28, 2017

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);
}
@simonbasle

This comment has been minimized.

Show comment
Hide comment
@simonbasle

simonbasle Sep 28, 2017

Contributor

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?

Contributor

simonbasle commented Sep 28, 2017

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?

@akiraly

This comment has been minimized.

Show comment
Hide comment
@akiraly

akiraly Sep 28, 2017

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

akiraly commented Sep 28, 2017

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

@akarnokd

This comment has been minimized.

Show comment
Hide comment
@akarnokd
Contributor

akarnokd commented Sep 28, 2017

@sdeleuze

This comment has been minimized.

Show comment
Hide comment
@sdeleuze
Contributor

sdeleuze commented Sep 28, 2017

@simonbasle

This comment has been minimized.

Show comment
Hide comment
@simonbasle

simonbasle Sep 28, 2017

Contributor

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).

Contributor

simonbasle commented Sep 28, 2017

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).

@simonbasle simonbasle self-assigned this Sep 28, 2017

@simonbasle simonbasle added this to the 3.1.1.RELEASE milestone Sep 28, 2017

@sdeleuze

This comment has been minimized.

Show comment
Hide comment
@sdeleuze

sdeleuze Sep 28, 2017

Contributor

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

Contributor

sdeleuze commented Sep 28, 2017

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

simonbasle added a commit that referenced this issue Oct 2, 2017

simonbasle added a commit that referenced this issue Oct 2, 2017

@simonbasle

This comment has been minimized.

Show comment
Hide comment
@simonbasle

simonbasle Oct 21, 2017

Contributor

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.

Contributor

simonbasle commented Oct 21, 2017

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.

@simonbasle simonbasle closed this Oct 21, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment