krasa / EclipseCodeFormatter

IntelliJ plugin - use Eclipse's code formatter directly from IntelliJ. https://plugins.jetbrains.com/plugin/6546
Apache License 2.0
484 stars 118 forks source link

Eclipse Public License violations #230

Closed howlger closed 2 years ago

howlger commented 2 years ago

This project seems to violate the Eclipse Public License (EPL), as it contains code released under the EPL without containing the license, and falsely claims that the entire project is released under the Apache-2.0 License:

In addition, the project name starting with Eclipse violates the Eclipse Foundation Trademark Usage Policy:

  1. You may not incorporate the name of an Eclipse Project Trademark into the name of your company or software product name. If you have a software product that works with an Eclipse Project, you may only use the following phrases: '\ for \' or '\, \ Edition'.
krasa commented 2 years ago

Thanks for the info. It will be fixed asap.

krasa commented 2 years ago

Not sure if the repository name needs to be changed. Other than that, all should be good now.

heidelmeier-weclapp commented 2 years ago

Does this mean, the plugin will only work with a local Eclipse installation? The update to 21.0 just broke my setup.

krasa commented 2 years ago

yes

heidelmeier-weclapp commented 2 years ago

I installed Eclipse 2021-09 and set the installation directory in the IntelliJ settings of this plugin. Doesn' work yet, I'm getting this exception: https://gist.github.com/heidelmeier-weclapp/eeb2381669868503fb4fad527d29e088

howlger commented 2 years ago

To be clear, EPL allows the use in both, open source and commercial products. Eclipse publishes the JARs on Maven Central making it easy to consume them also in non Eclipse based applications.

But like other licenses, EPL does not allow to remove or replace the licenses with another license, independent of whether the other license is compatible with the EPL or not.

krasa commented 2 years ago

@heidelmeier-weclapp Thanks, I removed too much. It should work now.

markiewb commented 2 years ago

First (not last): Thank you @krasa for your hard work and the ongoing maintenance of this plugin.

But removing the bundled eclipse-jars and rely on an external eclipse distribution is IMO inferior. I have to download an >100 MB distribution only for a formatter and to setup a path?

My proposal: Externalise the eclipse-jars into a separate plugin with EPL license and publish it to the IDEA marketplace. Your Code Formatter for Eclipse has a dependency to that plugin. When installing your plugin within the plugin dialog, IDEA should propose that other plugin automatically. Thus you can keep your plugin Apache 2.0-licensed and users can still rely on bundled eclipse-dependencies. Please reconsider this idea.

(Background story: This approach had been used by Apache NetBeans when they got OSS. The JDK/JVM-compiler-part for JDK8 has not been open-sourced/relicensed by Oracle. Thus Apache NetBeans asks you before using Java development to install the still-Oracle-licensed JDK/JVM-compiler-part as a plugin.)

oesolutions commented 2 years ago

If the long term solution is to continue requiring a local installation of Eclipse, please split the path settings into a separate configuration file so that this per-instance data can be excluded from version control. Some sort of per-IDE setting would probably be ideal, but at least excluding it from the shared project settings would help.

krasa commented 2 years ago

@markiewb Thanks, you are right, it sucks, but I do not have time or energy to deal with it properly right now. The bundled lib was outdated all the time anyway, and I am glad I do not have to update it anymore, I'd rather spend time fixing bugs.

@oesolutions done, let's hope no one needs two locations.

howlger commented 2 years ago

To my understanding, this project just wraps the Java formatter of the Eclipse JDT project as an IntelliJ IDEA plugin. It is not the Eclipse Java coder formatter itself, as the former name implied, but is built on the Eclipse Java formatter. I would expect this information with a link to Eclipse JDT project and which license applies to which part of the code in the project description in both, in the README of the repository and in the marketplace entry.

I have reported this issue because that was not the case and even worse, all references to the license have been removed from the Eclipse code. To my understanding, this violates the EPL. Taking code from others, not telling doing so and removing the license doesn't seem fair to me. I don't know if the donations and the money from sponsors were kept, even though most of the work was and is done in Eclipse JDT.

In contrast to what @markiewb says, EPL code does not only allow, but is intended to be used (no separate plugins or repositories are required for this):

krasa commented 2 years ago

I do not think the name implied anything like that. It was always clear that is an IntelliJ plugin. Also, the description stated that it Allows using Eclipse's code formatter directly from IntelliJ. It is literally the first thing in the project description. It is not built on the Eclipse Java formatter, it only uses it.

about.html was removed as a part of reducing the plugin size, it did not seem necessary.

It is not like I took the code and claimed it to be mine. Sure, there were formal mistakes, but nothing deceitful or malicious. I am no licensing expert and when any license issue came up in any of my project, it was quickly fixed. This one was missed for 10+ years. And talking about the chump change I received seems pretty rude to me. Maybe you are not familiar with these things, but there is absolutely no profit to be made by this or any other free plugin, if anything it is a total waste of time, a lot of time. There was zero time invested in this plugin by Eclipse folks, the same as any other third-party library that is used.

howlger commented 2 years ago

There was zero time invested in this plugin by Eclipse folks

Your Eclipse Code Formatter (not to be confused with the code formatter by Eclipse) was made up by 30 times more code by the Eclipse folks than by your glue code (not including the license notes you removed).

krasa commented 2 years ago

I think we are done here.

RohanHart commented 2 years ago

Given that other non-EPL projects such as SonarSource's sonar-java have a direct dependency on Eclipse's libraries can't that be an alternative rather than trying to depend on another plugin which depends on these libraries. See https://github.com/SonarSource/sonar-java/blob/4b4ad5d011965e30af9a0558d2a50e8cdbadfb23/jdt/pom.xml

howlger commented 2 years ago

@RohanHart The problem was that Eclipse code was repackaged as eclipse.jar with all references to the EPL removed. In this Git repository as well as in the Marketplace entry it was falsely claimed that all the code is licensed under the Apache License 2.0. As already explained, EPL code is intended to be used. @krasa has decided to remove all EPL code rather than tell that it is EPL code.

LumnitzF commented 2 years ago

@krasa Would you be willing to accept a Pull request, which re-introduces the eclipse library with correct license handling?

krasa commented 2 years ago

@LumnitzF I did not expect that people would hate installing Eclipse so much, so although the damage is already done, perhaps it would be good to add it back. So the answer is yes, but with some automated updater (https://github.com/krasa/EclipseCodeFormatter/tree/master/support) - afaik plugin.xml needs to get removed from the jars, IntelliJ does not like it.