Skip to content
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
Assignees
Labels
status/has-workaround This has a known workaround described type/bug A general bug type/chores A task not related to code (build, formatting, process, ...)
Milestone

Comments

@akiraly
Copy link

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
Copy link
Member

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

@akiraly
Copy link
Author

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
Copy link
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
Copy link
Member

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
Copy link
Author

akiraly commented Sep 28, 2017

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

@akarnokd
Copy link
Contributor

Could be Gradle 4.2 or a config problem with the subprojects:

https://stackoverflow.com/questions/34996571/gradle-multi-project-builds-with-duplicate-source-files

@sdeleuze
Copy link
Contributor

Seems to be https://youtrack.jetbrains.com/issue/KT-17564

@simonbasle
Copy link
Member

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 type/chores A task not related to code (build, formatting, process, ...) type/bug A general bug labels Sep 28, 2017
@simonbasle simonbasle added this to the 3.1.1.RELEASE milestone Sep 28, 2017
@sdeleuze
Copy link
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

simonbasle added a commit that referenced this issue Oct 2, 2017
simonbasle added a commit that referenced this issue Oct 2, 2017
@simonbasle simonbasle added for/merge-with-rebase Reminder to merge the PR in rebase mode (several semantic commits) status/has-workaround This has a known workaround described and removed for/merge-with-rebase Reminder to merge the PR in rebase mode (several semantic commits) labels Oct 4, 2017
@simonbasle
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/has-workaround This has a known workaround described type/bug A general bug type/chores A task not related to code (build, formatting, process, ...)
Projects
None yet
Development

No branches or pull requests

4 participants