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

Implemented a second goal "macker-no-fork" #6

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

fjakop
Copy link

@fjakop fjakop commented Jul 16, 2014

I was also embarassed by #5, so I implemented the LinkedMacker, which was there as commented out line.
Perhaps You can review incorporate the change.

@buildhive
Copy link

andrena objects ag » macker-maven-plugin #30 SUCCESS
This pull request looks good
(what's this?)

@buildhive
Copy link

andrena objects ag » macker-maven-plugin #31 SUCCESS
This pull request looks good
(what's this?)

@BenRomberg
Copy link
Contributor

Sorry for not getting back to this sooner - I believe the reason we didn't consider calling Macker within the same JVM is because of licensing issues. At least that's what I believe the reason is from the original macker-maven-plugin implementation. It's hard to confirm or deny this by searching the net, but if you have more confidence and can provide a trustworthy source supporting this to be legal, I'd be happy to finally merge this.

@BenRomberg
Copy link
Contributor

Btw, Macker is using GPL 2.0 as stated in https://github.com/andrena/macker/blob/master/LICENSE.html, while the Maven Plugin is using Apache 2.0, see https://github.com/andrena/macker-maven-plugin/blob/master/pom.xml.

@fjakop
Copy link
Author

fjakop commented Jan 29, 2015

After much and many reading GPL 2 I cannot find a passage which would make a difference between calling a different VM vs. the same VM. In both cases you rely on the dependency and use features from the original macker.
Maybe it would be an option to release the original macker under APL2 and GPL2?

@BenRomberg
Copy link
Contributor

I've digged a little into this as well. The problem seems to be that Apache2 is not compatible with GPL2. More info in these 2 SO discussions:
http://stackoverflow.com/questions/2044321/can-libraries-licensed-with-gplv2-be-used-in-proprietary-applications
http://stackoverflow.com/questions/2982364/how-does-apache-2-0-license-differ-from-gpl

@fjakop
Copy link
Author

fjakop commented Jan 29, 2015

Well, as far as I understand this, it's the interpretation of "linking" and "derivative work".
So what do I understand as linking?

  1. the code does not compile without the other part of software?
  2. the code does not run without the other part of software?
  3. the code does have limited function without the other part of software?

I think we agree that the plugin meets points 2 and 3 certainly, so what about 1?
By calling via script / process / separate VM the compile problem is solved. If this is your point, I can surely solve the same problem by using reflection.
I do not think it's a matter of running in the one VM or another.

Nevertheless, I requested for a license relaxation on the macker developer's mailing list. I will update this issue, as soon as I get the response.

@BenRomberg
Copy link
Contributor

Here is some info from the authors of the GPL regarding Java and derivative work:
https://www.gnu.org/licenses/lgpl-java.html
Relevant passage:

Applications use Java's “import” functionality to access classes from these libraries. When the application is compiled, function signatures are checked against the library, creating a link. The application is then generally a derivative work of the library.

Thanks for going through the effort of asking in the macker developer's list. I'd really like to merge your contribution, but would like to avoid licensing issues at all costs.

@buildhive
Copy link

andrena objects ag » macker-maven-plugin #32 SUCCESS
This pull request looks good
(what's this?)

@fjakop
Copy link
Author

fjakop commented Feb 3, 2015

Ok, I removed any import from the code by using string values and reflection. This should cope with your comment above.
No reply from macker-dev at this time, neither good nor bad.

@GurvanLd
Copy link

Hello,
In my project i have the problem where macker plugin is causing compiler to be called twice.
I have tried macker plugin with your fix, but no luck, I still have the compiler called twice.
Do you confirm your fix worked ?
Thanks

@fjakop
Copy link
Author

fjakop commented Mar 26, 2015

Yes, it works. When I call "clean package", I get this output.

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building MyProject - Server 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ myproject ---
[INFO] Deleting D:\Workspaces\...target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ myproject  ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] Copying 10 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ myproject  ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 9 source files to D:\Workspaces\...\target\classes
[INFO] 
[INFO] --- macker-maven-plugin:1.0.3-tolina-2:macker-no-fork (default) @ myproject  ---

(Checking ruleset: Controller access)
[INFO] Macker has not found any violation.
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ myproject  ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ myproject ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 8 source files to D:\Workspaces\...\target\test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ myproject  ---

--- Test output skipped ---

[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ myproject  ---
[INFO] Building jar: D:\Workspaces\...\myproject-1.0.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.040s
[INFO] Finished at: Thu Mar 26 08:06:12 CET 2015
[INFO] Final Memory: 11M/28M
[INFO] ------------------------------------------------------------------------

No double "compile". I used this lifecycle binding

    <build>
        <plugins>
            <plugin>
                <groupId>de.andrena.tools.macker</groupId>
                <artifactId>macker-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>macker-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

@NielsDoucet
Copy link

Is there any movement on this?
We could really use this, as we have some other plugins running during the compile phase, which makes running that phase two times rather costly.

@fjakop
Copy link
Author

fjakop commented Nov 23, 2015

Well, it waits for merging. From my point of view there's nothing to do since #6 (comment)

@BenRomberg
Copy link
Contributor

@fjakop: I no longer work for andrena and don't have access credentials to release it under de.andrena in Maven Central anymore.

If you're interested you could make your fork the "project lead", or we could create a new GitHub organization which we register at Maven Central. We could then release a new version together with your changes.

In any case, I could change the README to point it to the new project location, as I doubt that any of my former colleagues would take care of this project any time soon.

Thanks for your efforts so far and sorry for the hassle.

@fjakop
Copy link
Author

fjakop commented Nov 24, 2015

Ben,

I have no real experience with GitHub's administrative possibilities. What
would be necessary to be the "project lead"? Would you transfer ownership
aof andrena/macker & andrena/macker-maven-plugin to me? Or would you just
tell in README.md "please use arxes-tolina/macker-maven-plugin"?
Would this cause changing groupId too?

Btw. I asked the initial developers of macker to change license to APL/MIT
but since there was no activity since 2007 on macker I don't expect
much...

@NielsDoucet
Copy link

I see it is listed in mojohaus as a sandboxed plugin.
http://www.mojohaus.org/plugins.html

Maybe you could go through there (or their mailing list: https://groups.google.com/forum/#!forum/mojohaus-dev) and see what can be done?

@BenRomberg
Copy link
Contributor

@fjakop: I'd change the README.md to say "Please use $otherRepository for updates". You'd have to change the groupId as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants