[GMAVENPLUS-36] Groovy 1.5.8 should be blacklisted for Groovydoc Created: 07/Mar/15  Updated: 08/Mar/15  Resolved: 07/Mar/15

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: 1.5

Type: Bug Priority: Minor
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Groovy 1.5.8 has the same bad dependency on Ant as 1.6-RC-1 and should be blacklisted from supported versions.






[GMAVENPLUS-35] Groovy version cannot be detected if Groovy classes are contained in the build classes folder Created: 03/Mar/15  Updated: 08/Mar/15  Resolved: 08/Mar/15

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: 1.4
Fix Version/s: 1.5

Type: Bug Priority: Critical
Reporter: Rene Scheibe Assignee: Keegan Witt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

This is for example the case when Groovy is packaged/shaded in an artifact's jar itself.

In this case ClassWrangler#getJarPath only returns "file:../target/classes/groovy/lang/GroovyObject.class"



 Comments   
Comment by Keegan Witt [ 03/Mar/15 ]

You're right, but this is a design problem that I'm not sure I have a good answer for. I read the version string from the jar name itself because I wanted to support all versions of Groovy, but there wasn't a reliable way to do this from Groovy's API until 1.6.6. Here was the discussion I originally had, which I summarize in the Javadoc on ClassWrangler's getGroovyVersionString().

Maybe what I could do is try the jar method first, then fall back to calling the Groovy API. Let me give it some more thought.

Comment by Rene Scheibe [ 03/Mar/15 ]

1. I am not familiar with the Maven plugin system. But maybe it's possible to get a classloader that doesn't have the ${build.outputDirectory} in scope.

2. Why not just calling GroovySystem.getVersion() and InvokerHelper.getVersion() per reflection in this order? Shouldn't it always produce a result? And it's much less code than fiddling with the classpath.

Comment by Keegan Witt [ 03/Mar/15 ]

There are a few difficulties.

  • There are cases in which InvokerHelper.getVersion() has issues (I've heard GAE is one such case), and GroovySystem.getVersion() isn't available because it's an older version of Groovy. Although in such cases I can fallback to current behavior.
  • If for some reason I have to fall back to current behavior, Groovy brought in by an uber jar will still not work correctly (for example, if the uber jar has a version on it, it'll find that version not the Groovy version).
  • There's no way to use the Groovy API to tell whether I'm looking at the indy version of Groovy or not. Maybe I'll have to keep track of how I determined the Groovy version and don't do the indy safety check if I wasn't able to use the jar name. Or just give up on the safety check altogether.

The last time I tried using InvokerHelper.getVersion(), it didn't seem to be working for 1.5.0 (just returned an empty string). I'll do some more digging to figure out why.

Comment by Keegan Witt [ 03/Mar/15 ]

Another option that comes to mind is parsing the MANIFEST.MF for the Groovy version, but these are often stomped on in uber jars.

Comment by Keegan Witt [ 04/Mar/15 ]

OK. Jochen suggested I check for the existancen of org.codehaus.groovy.vmplugin.v7.IndyInterface for my indy safety check. So what I put in place is trying in this order

  1. GroovySystem.getVersion()
  2. InvokerHelper.getVersion()
  3. The old jar name method

There are times when working with old versions of Groovy (like 1.5.0) that I won't be able to detect the Groovy version when it's in an uber jar. But I don't see that I have any options there. For any recent version of Groovy (1.6.6 or newer), it should work without issue.

Since this is a change to something pretty core, I want to do some more testing before I release it. But this is a significant defect, without any viable workaround (if you're unlucky enough to have your uber jar before any Groovy jar in your classpath), so I will be releasing it pretty quickly. I deployed a snapshot with this change to Codehaus snapshots. Could you verify that this resolves this issue for you?

Comment by Rene Scheibe [ 04/Mar/15 ]

Version 1.5-SNAPSHOT works like charm.

Thank you very much.





[GMAVENPLUS-34] Exception when running maven build with -T Created: 27/Jan/15  Updated: 19/Feb/15  Resolved: 28/Jan/15

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: 1.4

Type: Bug Priority: Major
Reporter: Dmitry Andrianov Assignee: Keegan Witt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

It looks like for GMAVENPLUS-15 you added GMaven's NoExitSecurityManager. Unfortunately it also brought exactly the same problem GMaven had. Now a build with -T 2 fails with

[00:53:27][Step 1/1] java.lang.SecurityException: Use of System.exit() is forbidden!
[00:53:27][Step 1/1] 	at org.codehaus.gmavenplus.util.NoExitSecurityManager.checkExit(NoExitSecurityManager.java:66)
[00:53:27][Step 1/1] 	at java.lang.Runtime.exit(Runtime.java:107)
[00:53:27][Step 1/1] 	at java.lang.System.exit(System.java:962)
[00:53:27][Step 1/1] 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:354)
[00:53:27][Step 1/1] Exception in thread "main" java.lang.SecurityException: Use of System.exit() is forbidden!
[00:53:27][Step 1/1] 	at org.codehaus.gmavenplus.util.NoExitSecurityManager.checkExit(NoExitSecurityManager.java:66)
[00:53:27][Step 1/1] 	at java.lang.Runtime.exit(Runtime.java:107)
[00:53:27][Step 1/1] 	at java.lang.System.exit(System.java:962)
[00:53:27][Step 1/1] 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:360)
[00:53:27][Step 1/1] Process exited with code 1

There is already some analysis why it happens and how to fix it in GMAVEN-114 but this issue is open for quite some time there.



 Comments   
Comment by Keegan Witt [ 27/Jan/15 ]

Hmm. I hadn't considered this particular use case. The ExecuteMojo (which executes scripts) is itself synchronized, so scripts won't be run in parallel and stomp on each other (which is something I think GMaven didn't have). But what can happen is if you have tests and scripts running at the same time (for example), and one or both modify the security manager and/or do system exits, it can interfere with the normal behavior. Unfortunately, I don't think there's any thread-specific security manager configuration in Java. I'm not sure there's any safe way to always do the right thing automatically.

I think this is a bit of an edge case, plus I prefer to avoid changing defaults unless there's a strong argument for doing so. Would it be sufficient for your use case to allow you to opt-out of GMavenPlus's security manager with a new configuration option? Feel free to argue why I should invert the default (if you feel it's appropriate), and to correct me if I'm totally misunderstanding the scenario here.

Comment by Keegan Witt [ 27/Jan/15 ]

Ooh, actually I already did that with the allowSystemExits option. The only problem is I set the manager back to what it was at the start of the execution regardless of the setting (which I shouldn't be).

Comment by Dmitry Andrianov [ 28/Jan/15 ]

Given that I never did Maven plugin development myself and do not know what is going on internally, I do not really have strong opinion here and I am not in a position to argue
However it really sounds to me like it should be Maven itself protecting itself from System.exit invoked from plugins, not plugin developers care about that.

Anyways, the workaround you are suggesting is good for us so if you could fix GMavenPlus so it does not "restore" security manager in the end when it was told to not change it in the beginning - it should do the trick.
Do you have plans on releasing new version soon?

Many thanks

Comment by Keegan Witt [ 28/Jan/15 ]

My release cadence is "when it's needed", but I usually space out releases a bit to give others the opportunity to report issues for the next release (otherwise I'd have a release for nearly every single Jira). My last release was less than a week ago, but I'll release again if it's a substantial issue. Otherwise, I'll release in a month or so. How burdensome would it be to remove the -T option for now?

Could you verify that <allowSystemExits>true</allowSystemExits> in GMavenPlus's <configuration> with the 1.4-SNAPSHOT I just deployed to Codehaus Snapshots resolves your issue?

Comment by Dmitry Andrianov [ 28/Jan/15 ]

Yep, build succeeded with that option.
Surely we can wait for the release.

Thanks!

Comment by Keegan Witt [ 28/Jan/15 ]

Awesome! Thanks for your feedback!

Comment by Keegan Witt [ 19/Feb/15 ]

There are two circumstances under which this change is relevant.

  1. When running parallel builds (-T option) with script execution
  2. When mixing unit tests that change the security manager and script executions




[GMAVENPLUS-33] Goals not consistantly named Created: 06/Oct/14  Updated: 10/Mar/15  Resolved: 24/Oct/14

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Won't Fix Votes: 0
Labels: maybe_someday
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I just realized some goals don't follow the naming convention (the mojo got renamed, but not the goal – I have no idea how I overlooked this so long). To make them consistent, I'd rename
testGenerateStubs -> generateTestStubs
testCompile -> compileTests
testGroovydoc -> groovydocTests

Despite the inconsistency, I'm hesitant to make this change now, since it'd mean folks would have to edit their pom after upgrade to get things working again. The only way I could avoid that is to extend the existing mojos that just make calls to their parent, and one class would have the old goal name, one with new. This would appear to the user as a clone, not an alias, and so would probably just cause more confusion.

I opened this Jira to collect feedback.



 Comments   
Comment by Keegan Witt [ 08/Oct/14 ]

Actually, I'm warming up to the idea of extending the class as a means of deprecation. The @deprecated Javadoc tag makes it clear users should migrate off the old name, while not actually breaking anything. It's slightly ugly, but it has the advantage of satisfying my meticulous nature while preserving backwards compatibility.

However, now I'm thinking that maybe I should have followed GMaven's convention to begin with (that is, having test in front of the regular goal name). This would match the pattern used by Maven Compiler Plugin, Maven Javadoc Plugin, and Maven Resources Plugin. If I went down that path, it'd mean renaming
addTestSources -> testAddSources
addTestStubSources -> testAddStubSources
removeTestStubs -> testRemoveStubs

Comment by Keegan Witt [ 08/Oct/14 ]

One downside to the deprecation idea would be for m2eclipse users. m2eclipse would need to map both the new and deprecated goals (maybe just ignoring deprecated goals) to prevent errors from popping up.

Comment by Jason Winnebeck [ 20/Oct/14 ]

As a user, I've never noticed the inconsistency. The "addTestSources" reads better to me than "testAddSources". It also doesn't matter much to me whether or not the goals have any consistent relationship with those in other plugins. I've configured a few (3-5) projects with this plugin, and in all cases what I do is go onto the documentation wiki and copy the example execution with all of the goals then just comment out the ones I need. So from that perspective, as long as the goal's name clearly notes what it does, then I'm happy. From my perspective there's no benefit to an arbitrary name change that could break compatibility when updating the plugin.

Comment by Keegan Witt [ 24/Oct/14 ]

Fair enough, and thanks for the feedback. I agree, the benefit to the end-user would be marginal. I just wish I had noticed this while it was still beta, a breaking change would have been more tolerable then. I'll mark this as a "maybe someday" and if for some reason I make a bunch of breaking changes, this can be yet another one (though probably that'll never happen).

Comment by Keegan Witt [ 10/Mar/15 ]

Migrated to GitHub.





[GMAVENPLUS-32] Support grooid classifier Created: 06/Sep/14  Updated: 21/Jan/15  Resolved: 06/Sep/14

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: 1.3

Type: New Feature Priority: Major
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Support parsing Groovy version from jars containing grooid classifier.



 Comments   
Comment by Keegan Witt [ 01/Nov/14 ]

Works in 1.2, but includes grooid as part of version string. I haven't been able to think of a scenario where this would cause an issue, but I'm officially only supporting grooid in 1.3.





[GMAVENPLUS-31] Bind MavenProjectHelper to tool properties Created: 10/Jul/14  Updated: 21/Jan/15  Resolved: 10/Jul/14

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: 1.3

Type: Improvement Priority: Major
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Needed for use cases like this one. There is no expression for this, but we can add as a component the way the Build Helper Plugin did.






[GMAVENPLUS-30] Extract core logic Created: 08/Jul/14  Updated: 10/Mar/15

Status: Open
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Wish Priority: Minor
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

We could extract the logic around handling the discrepancies between the various Groovy versions using reflection into a core module that could be used by other tools (making sure to remove any Maven dependencies). This could improve tool compatibility. Obviously, for tools that tie directly to the Groovyc Ant task, there may not be much benefit to something like this.

I'm leaving as a wishlist for now, if someone has a tool this would be useful for, vote this issue up and we'll tackle it then.



 Comments   
Comment by Keegan Witt [ 10/Mar/15 ]

Migrated to GitHub.





[GMAVENPLUS-29] Determine Groovy dependency from transitive dependencies Created: 18/Jun/14  Updated: 28/Jan/15  Resolved: 18/Jun/14

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: 1.2
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Andres Almiray Assignee: Keegan Witt
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
Maven home: /usr/local/maven
Java version: 1.7.0_60, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.9.3", arch: "x86_64", family: "mac"


Number of attachments : 0

 Description   

I've setup a project where the groovy-all jar comes as a transitive dependency of griffon-groovy jar. The following list is the output of calling mvn dependency:resolve

[INFO] The following files have been resolved:
[INFO]    aopalliance:aopalliance:jar:1.0:runtime
[INFO]    cglib:cglib-nodep:jar:2.2:test
[INFO]    com.google.code.findbugs:jsr305:jar:2.0.2:runtime
[INFO]    com.google.inject:guice:jar:3.0:runtime
[INFO]    com.jayway.awaitility:awaitility:jar:1.4.0:test
[INFO]    javax.inject:javax.inject:jar:1:runtime
[INFO]    junit:junit:jar:4.11:test
[INFO]    log4j:log4j:jar:1.2.17:runtime
[INFO]    org.codehaus.griffon:griffon-core:jar:2.0.0.BETA:runtime
[INFO]    org.codehaus.griffon:griffon-core-compile:jar:2.0.0.BETA:provided
[INFO]    org.codehaus.griffon:griffon-core-test:jar:2.0.0.BETA:test
[INFO]    org.codehaus.griffon:griffon-groovy:jar:2.0.0.BETA:compile
[INFO]    org.codehaus.griffon:griffon-groovy-compile:jar:2.0.0.BETA:provided
[INFO]    org.codehaus.griffon:griffon-guice:jar:2.0.0.BETA:runtime
[INFO]    org.codehaus.griffon:griffon-swing:jar:2.0.0.BETA:compile
[INFO]    org.codehaus.griffon:griffon-swing-groovy:jar:2.0.0.BETA:runtime
[INFO]    org.codehaus.groovy:groovy-all:jar:2.3.3:runtime
[INFO]    org.hamcrest:hamcrest-core:jar:1.3:test
[INFO]    org.hamcrest:hamcrest-library:jar:1.3:test
[INFO]    org.kordamp.gipsy:gipsy:jar:0.4.0:provided
[INFO]    org.kordamp.jipsy:jipsy:jar:0.4.0:provided
[INFO]    org.objenesis:objenesis:jar:1.2:test
[INFO]    org.slf4j:slf4j-api:jar:1.7.5:runtime
[INFO]    org.slf4j:slf4j-log4j12:jar:1.7.5:runtime

However gmavenplus fails to locate the Groovy jar and outputs

[INFO] --- gmavenplus-plugin:1.2:compile (default) @ test ---
[ERROR] Unable to determine Groovy version.  Is Groovy declared as a dependency?
[ERROR] Unable to determine Groovy version.  Is Groovy declared as a dependency?
[ERROR] Unable to determine Groovy version.  Is Groovy declared as a dependency?
[ERROR] Unable to determine Groovy version.  Is Groovy declared as a dependency?
[ERROR] Your Groovy version (null) doesn't support compilation.  The minimum version of Groovy required is 1.5.0.  Skipping compiling.

Adding an explicit dependency to the pom file solves the problem for the time being, however that shouldn't be required.



 Comments   
Comment by Andres Almiray [ 18/Jun/14 ]

Perhaps this view of the dependencies gives you further details about the setup

[INFO] org.codehaus.griffon.samples:test:jar:0.1.0.SNAPSHOT
[INFO] +- org.codehaus.griffon:griffon-groovy-compile:jar:2.0.0.BETA:provided
[INFO] |  +- org.codehaus.griffon:griffon-core-compile:jar:2.0.0.BETA:provided
[INFO] |  |  \- org.kordamp.jipsy:jipsy:jar:0.4.0:provided
[INFO] |  \- org.kordamp.gipsy:gipsy:jar:0.4.0:provided
[INFO] +- org.codehaus.griffon:griffon-groovy:jar:2.0.0.BETA:compile
[INFO] |  +- org.codehaus.griffon:griffon-core:jar:2.0.0.BETA:runtime
[INFO] |  |  +- javax.inject:javax.inject:jar:1:runtime
[INFO] |  |  \- com.google.code.findbugs:jsr305:jar:2.0.2:runtime
[INFO] |  \- org.codehaus.groovy:groovy-all:jar:2.3.3:runtime
[INFO] +- org.codehaus.griffon:griffon-swing:jar:2.0.0.BETA:compile
[INFO] +- org.codehaus.griffon:griffon-swing-groovy:jar:2.0.0.BETA:runtime
[INFO] +- org.codehaus.griffon:griffon-guice:jar:2.0.0.BETA:runtime
[INFO] |  \- com.google.inject:guice:jar:3.0:runtime
[INFO] |     \- aopalliance:aopalliance:jar:1.0:runtime
[INFO] +- log4j:log4j:jar:1.2.17:runtime
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.7.5:runtime
[INFO] |  \- org.slf4j:slf4j-api:jar:1.7.5:runtime
[INFO] \- org.codehaus.griffon:griffon-core-test:jar:2.0.0.BETA:test
[INFO]    +- junit:junit:jar:4.11:test
[INFO]    |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO]    \- com.jayway.awaitility:awaitility:jar:1.4.0:test
[INFO]       +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO]       +- cglib:cglib-nodep:jar:2.2:test
[INFO]       \- org.objenesis:objenesis:jar:1.2:test
Comment by Andres Almiray [ 18/Jun/14 ]

User error. The groovy-all dependency exported by griffon-groovy is marked as a runtime dependency. Fixing the pom of griffon-groovy allows gmavenplus to perform the work as expected.





[GMAVENPLUS-28] Use project.build.sourceEncoding for Groovydoc stylesheet default encoding Created: 09/Jun/14  Updated: 21/Jan/15  Resolved: 09/Jun/14

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: 1.3

Type: Improvement Priority: Major
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Instead of defaulting the Groovydoc stylesheet to UTF-8, we should try to use project.build.sourceEncoding, and if that's not set use the platform default so that the encoding behavior of the stylesheet matches the behavior for the rest of the source code.



 Comments   
Comment by Keegan Witt [ 20/Oct/14 ]

It should be noted that this change will break your build if all the conditions below are met

  1. You are using the groovydoc and/or testGroovydoc goal
  2. You have specified stylesheetFile
  3. You have not specified stylesheetEncoding
  4. Your system has a default encoding other than UTF-8
  5. The file specified by stylesheetFile contains characters outside the ASCII range

I decided that the chances of this breaking a build are pretty small, and since the new behavior better conforms to the principle of lease surprise, it's an acceptable risk.





[GMAVENPLUS-27] Set targetBytecode from maven.compiler.target Created: 09/Jun/14  Updated: 21/Jan/15  Resolved: 09/Jun/14

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: 1.3

Type: Improvement Priority: Major
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

https://github.com/groovy/GMavenPlus/pull/30






[GMAVENPLUS-25] Evaluate/improve thread safety Created: 28/May/14  Updated: 10/Mar/15

Status: Open
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Right now, we're threadsafe because we synchronize the entire Mojo execution. This task is to look into whether we can be smarter about that, and really prove that the plugin is threadsafe. Also it'd be good to know whether we benefit at all from parallel builds after we remove the synchronizing.



 Comments   
Comment by Keegan Witt [ 28/May/14 ]

One tricky thing that may make this impossible is determining whether the Groovy methods called are threadsafe (especially since that can change between any version).

Comment by Keegan Witt [ 10/Mar/15 ]

Migrated to GitHub.





[GMAVENPLUS-24] Allow properties to bind GMaven style Created: 18/May/14  Updated: 18/May/14  Resolved: 18/May/14

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: 1.2

Type: Improvement Priority: Major
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Add an option to bind properties using a properties variable rather than separate variables. For example, with this option turned off, a script might use project, with this option might use properties['project'].



 Comments   
Comment by Keegan Witt [ 18/May/14 ]

I've gone back and forth on whether the way GMavenPlus binds predefined variables (with a separate variable for each) vs the way GMaven bound variables (all within a properties variable). Here's what I thought about making this change:

Pros

  • Limits possibility of variable name collision by using just 1 variable name
  • New variables won't break existing scripts just because of a version upgrade
  • Might be a little clearer since the name matches the pom parameter

Cons

  • Is a breaking change
  • Is more verbose

Since none of the pros seemed compelling enough to make the breaking change to completely switch the binding styles, I decided to allow the user to choose and default to the current behavior.





[GMAVENPLUS-23] Conditional groovy-ant dependency in test script Created: 06/May/14  Updated: 28/Jan/15  Resolved: 07/May/14

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Groovy >= 1.3.0-rc-1 needs a dependency on groovy-ant for AntBuilder support. But older versions don't. We need to somehow disable that dependency for older versions.






[GMAVENPLUS-22] Test shell & console mojos in integration suite Created: 27/Apr/14  Updated: 10/Mar/15

Status: Open
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I haven't done it yet because I haven't figured out how. It'd be really good to do though, since I rely on the suite to discover when things break and I always have to remember to manually test these.



 Comments   
Comment by Keegan Witt [ 10/Mar/15 ]

Migrated to GitHub.





[GMAVENPLUS-21] Test indy & non-indy versions in integration suite Created: 25/Apr/14  Updated: 28/Jan/15  Resolved: 05/May/14

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Keegan Witt [ 05/May/14 ]

I ended up using profiles to do this. Not as simple as I was hoping for, but it works.





[GMAVENPLUS-20] Remove support for groovy-jar packaging Created: 10/Apr/14  Updated: 18/May/14  Resolved: 18/Apr/14

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: 1.2

Type: Improvement Priority: Minor
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

This functionality was brought in from GMaven (MGROOVY-73), perhaps without the consideration it deserved. I'm now convinced that deploying jars that are of a dependency type of groovy-jar is just plain wrong. Here are my reasons why

  • It doesn't have it's own file extension (so you have two files that look the same but are in fact different types), and there's no reason to introduce a new extension.
  • There is no reason to have users consuming Groovy artifacts treat it any differently than a regular jar.
  • No one else is packaging Groovy in this way, and it makes no sense to break with convention.
  • Packaging types should be based on the application type (webapp, java app, etc) and not based on how the class files came to be.

I suspect this was originally done to make it so users didn't have to specify executions (that was my reason for porting it over), but thankfully this doesn't seem to have been used much (if at all) and I don't recall it ever being presented as the preferred way to do compilation, so it should be relatively safe to remove.



 Comments   
Comment by Keegan Witt [ 10/Apr/14 ]

Interestingly, the Clojure plugin has it's own packaging type. I'm not sure why. Maybe one of their devs can explain it to me.

Comment by Keegan Witt [ 11/Apr/14 ]

Notably, the Scala, Kotlin, and Jython Maven plugins don't have their own packaging type.

Comment by Keegan Witt [ 14/Apr/14 ]

I guess another option would be to leave the feature in, but recommend that it not be used.

Comment by Keegan Witt [ 18/Apr/14 ]

Actually it's even possible for an artifact to be a groovy-jar and not contain a single line of Groovy if a user used the custom lifecycle but only used Groovy for testing.

Comment by Keegan Witt [ 18/Apr/14 ]

I didn't hear back from Mark, but I've thought a lot about this and I'm still convinced removing this is the right thing to do. It may make the pom more verbose for some, but the ultimate deliverable is the jar, and marking that as anything but a jar isn't right.

Comment by Keegan Witt [ 18/Apr/14 ]

I forgot to mention that my reading of the commit messages in the Clojure plugin source code seem to suggest that they used the custom lifecycle for the same reasons that I did, a shorter pom.





[GMAVENPLUS-19] Provide default JLine dependency Created: 07/Apr/14  Updated: 18/May/14  Resolved: 07/Apr/14

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: 1.2

Type: Improvement Priority: Minor
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Rather than force all users of the shell mojo to specify a JLine dependency, include JLine 2.x so that only users of Groovy < 2.0.0-beta-1 need to specify a JLine dependency.






[GMAVENPLUS-18] Fix Java 5 Support Created: 03/Apr/14  Updated: 18/May/14  Resolved: 10/Apr/14

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: 1.2

Type: Bug Priority: Minor
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

To be safe, we should have required Java 6 rather than 5 because of our dependency on Guava, which has required 6 since version 12. We should check all dependencies and remove/replace any that require 6.

Note that this limits users from running against Java 5, but not targeting Java 5 as part of their compilation.



 Comments   
Comment by Keegan Witt [ 10/Apr/14 ]

Actually, there are methods I'm using internally that also don't work with 5.





[GMAVENPLUS-17] Prevent compilation classloader pollution Created: 02/Apr/14  Updated: 18/May/14  Resolved: 12/Apr/14

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: 1.2

Type: Bug Priority: Major
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

First, some history on why things were implemented the way they were. The way things are now, the project dependencies are loaded onto the plugin's classpath, then that classloader is used to instantiate all the Groovy classes. For some mojos (like shell), there are additional dependencies the plugin introduces at runtime so the user doesn't need to specify them and I liked the simplicity of all the mojos handling classpaths the same way. One advantage to doing it this way is that you can feed the plugin a Groovy dependency without actually having it in your project. Another advantage is that you can easily override a project dependency (like Groovy) within the context of the plugin.

There was always the possibility of a dependency on the plugin classpath overriding a dependency from the project classpath, but there weren't a lot of dependencies in the project (and most are Maven-related). With the addition of more dependencies (like for GMAVENPLUS-7 and GMAVENPLUS-14), I became more nervous about this possibility becoming more likely. While it is possible to avoid this by putting exclusions in the plugin dependencies, this violated the principle of least surprise. It is worth noting this only happens at compiletime, not at runtime. But you can run into API incompatibilities between the compile and runtime versions.

The solution I'm proposing is a hybrid approach. The tool mojos will continue to use the classloader population as they do today (so that the user can stick in Groovy without needing it as a project dependency and the plugin can continue to provide the extra dependencies Groovy doesn't), but the compilation mojos will use an isolated classloader that the project classpath elements are loaded onto. One disadvantage to this approach is that the tool mojos still have the possibility of a dependency being overridden (though for those there is no compiletime vs runtime problem, there's only runtime and this can be worked around with exclusions if it causes a problem). However, this seemed preferable to forcing the user to shove more dependencies into their project. The other disadvantage is that you can't override compiletime versions of dependencies anymore. In my opinion this was a dubious practice to begin with.

It'd be cool if I could create an isolated classloader for the tools as well, and then cherry-pick the stuff from the plugin classpath that are needed. But I haven't found a way to do that.



 Comments   
Comment by Keegan Witt [ 06/Apr/14 ]

I've committed an initial version of the fix. One worry I have is that calling a method on one of the Groovy objects that doesn't take a ClassLloader as an argument will use the current ClassLoader and leak classpaths that way. But when I do

Thread.currentThread().setContextClassLoader(isolatedClassLoader);

it doesn't seem to be able to find the Groovy classes.

I also considered adding a new ClassRealm to the Plexus ClassWorld. The reason I didn't go with that approach is that the world has a realm for each plugin and this isolated ClassRealm would be a top level container. I could prefix the name with the Maven coordinates of the plugin to reduce the chances of a collision between ClassRealm IDs, but this would require either filtering Java or looking it up against a manifest file at runtime. And even if I did that, I think the ClassRealm would continue to exist even after the execution of the plugin, since there's no way to know nothing else will reference that ClassRealm. Maybe there's something I could tie to in the Maven lifecycle to remove the unneeded ClassRealm, but it seemed simpler to just instantiate a new ClassLoader object.

Comment by Keegan Witt [ 09/Apr/14 ]

Doing Thread.currentThread().setContextClassLoader(isolatedClassLoader) doesn't work with Class.forName(String className) because the JDK code is

public static Class<?> forName(String className) throws ClassNotFoundException {
    return forName0(className, true, ClassLoader.getClassLoader(Reflection.getCallerClass()));
}

.
So now it's a question of whether to do Thread.currentThread().setContextClassLoader(isolatedClassLoader) in addition to Class.forName(String name, boolean initialize, ClassLoader loader).

Comment by Keegan Witt [ 12/Apr/14 ]

OK, after more reading of Groovy code it looks like not calling Thread.currentThread().setContextClassLoader(isolatedClassLoader) results in the parent ClassLoader being the plugin ClassLoader rather than the isolated ClassLoader. This didn't seem to affect the integration tests, but it's probably safer to set it just in case.





[GMAVENPLUS-16] Cleanup tool properties Created: 02/Apr/14  Updated: 18/May/14  Resolved: 02/Apr/14

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: 1.2

Type: Improvement Priority: Minor
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

There are some properties being populated that are available from the session property already. Specifically settings, localRepository, and reactorProjects. Additionally, mojoExecution isn't currently a property and there's no other way to get to it so it should be included.






[GMAVENPLUS-15] Tools should forbid exits Created: 25/Mar/14  Updated: 18/May/14  Resolved: 26/Mar/14

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: 1.2

Type: Improvement Priority: Minor
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

We should port over NoExitSecurityManager from GMaven and run

final SecurityManager sm = System.getSecurityManager();

before our try,

final SecurityManager sm = System.getSecurityManager();
System.setSecurityManager(new NoExitSecurityManager());

within our try, and

System.setSecurityManager(sm);

in a finally, for all mojos that extend AbstractToolsMojo.






[GMAVENPLUS-14] Support more built-in properties in execute goal Created: 24/Mar/14  Updated: 18/May/14  Resolved: 09/Apr/14

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: 1.1
Fix Version/s: 1.2

Type: Improvement Priority: Minor
Reporter: Dave Meibusch Assignee: Keegan Witt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

I'm looking to migrate my projects from gmaven (specifically, groovy-maven--plugin) to gmaven+.

Unfortunately the projects heavily use some of the Variables that groovy-maven-plugin:execute expose. (See http://groovy.github.io/gmaven/groovy-maven-plugin/variables.html)

Specifically, Groovy scripts are used to augment parts of the Maven build (they replaced earlier usage of maven-antrun-plugin). Useful variables for this are:

  • properties
  • ant
  • fail
  • log


 Comments   
Comment by Keegan Witt [ 24/Mar/14 ]

I'll take these one at a time.
properties
These are already supported. Unless I'm misunderstanding.
ant
I'm not sure what this would mean in our context. We don't use Ant. Could you explain?
fail
I don't think I can support this the same way GMaven did because I would need to implement a Groovy interface which would mean introducing a hard dependency on Groovy.
log
This is doable, we could bind to Maven's log.

Comment by Dave Meibusch [ 24/Mar/14 ]

I may be misunderstanding the properties.

In groovy-maven-plugin, you have (see http://groovy.github.io/gmaven/groovy-maven-plugin/execute.html):

<configuration>
          <properties>
            <name>Xenu</name>
          </properties>
          <source>
            println 'Hello ' + properties['name']
          </source>
</configuration>

and default properties:

<configuration>
        <defaults>
          <name>Xenu</name>
        </defaults>
        <source>
          println 'Hello ' + properties['name']
        </source>
</configuration>

which can be overwritten by mvn -Dname=Dave.

This is in addition to the "built-in" variable properties that groovy-maven-plugin that you can refer to:

println "$project.basedir"

This doesn't seem quite the same as the properties support in gmaven+, however I think you could achieve a similar result with appropriate configuration?

ant is described as a pre-configured instance of AntBuilder - enormously useful in scripts to do stuff like:

ant.copy(todir: "${project.build.directory}/css") {
    preservelastmodified : true
    fileset(dir : "${project.basedir}/css") { 
        include(name:"**/*") 
    }
}

For fail, pretty much 100% of the cases I've seen it used, it's really just a method call that throws the appropriate Maven exception to fail the build. No special closure stuff.
Maybe there's a method on the Maven project/session that is already accessible that would do this? Or expose a Mojo/Maven object that has such a method?

Comment by Keegan Witt [ 25/Mar/14 ]

Note that all these XML snippets are within the context of GMavenPlus's <plugin> group.

properties
Here's an example of how you'd do that

<configuration>
  <properties>
    <property>
      <name>someProp</name>
      <value>someValue</value>
    </property>
    <property>
      <name>cliProp</name>
      <value>${cliProp}</value>
    </property>
  </properties>
  <scripts>
    <script><![CDATA[
      assert someProp == "someValue"
      assert cliProp == "someValueFromCommandLine"
    ]]></script>
  </scripts>
</configuration>

I did bind these a little different than how GMaven did. GMaven bound things like project by name, and put everything else in a variable called 'properties'. Instead, I bound them all by name (as you can see in the example). If you think that's problematic, let me know.
ant
I'll remind myself how GMaven's does it, specifically for the binding (I used to contribute to GMaven). But maybe it'd work to just do this?

<configuration>
  <scripts>
    <script><![CDATA[
      AntBuilder ant = new AntBuilder()
    ]]></script>
  </scripts>
</configuration>
<dependencies>
  <dependency>
    <groupId>org.apache.ant</groupId>
    <artifactId>ant</artifactId>
    <version>1.9.3</version>
    <scope>runtime</scope>
  </dependency>
</dependencies>

fail
Fail was just a wrapper around Maven's MojoExecutionException. You can call that directly. Here's an example of how you'd do that

<configuration>
  <scripts>
  <script><![CDATA[
    import org.apache.maven.plugin.MojoExecutionException
    if (someCondition) {
      throw new MojoExecutionException("Some error occurred")
    }
  ]]></script>
  </scripts>
</configuration>

log
I'll probably include this in the next release. Thank you for the suggestion.

Comment by Keegan Witt [ 27/Mar/14 ]

I've got mixed feelings on the ant suggestion. On the one hand, the example I provided gives a valid workaround and GMavenPlus wouldn't have a dependency on a particular version of Ant. On the other hand, it means more configuration for the user and including dependencies so a user doesn't have to isn't entirely unprecedented (we include Jansi so the shell mojo won't blow up when the user doesn't include it as a dependency). I'm kinda starting to lean towards including it now. Lemme think about it some more.

Comment by Keegan Witt [ 10/Apr/14 ]

I've added ant and log to what will be the 1.2 release. I've deployed a snapshot of it, if you'd like to give it a try.





[GMAVENPLUS-13] joint compilation fails with Groovy 1.9-beta-1 and 1.9-beta-2 Created: 17/Mar/14  Updated: 10/Mar/15

Status: Open
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Joint compilation fails with Groovy 1.9-beta-1 and 1.9-beta-2, but not with 1.9-beta-3. It's puzzling why since the only code that seems to have changed between beta-2 and beta-3 is class generation stuff.



 Comments   
Comment by Keegan Witt [ 10/Mar/15 ]

Migrated to GitHub.





[GMAVENPLUS-12] Cannot compile if groovy dependency has test scope only Created: 26/Feb/14  Updated: 18/Mar/14  Resolved: 28/Feb/14

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: 1.1

Type: Improvement Priority: Major
Reporter: Laurent Chane Assignee: Keegan Witt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

gmavenplus-plugin version 1.0
Maven 3.2.1
Java version: 1.7.0_51


Attachments: Zip Archive GMAVENPLUS-12.zip    
Number of attachments : 1

 Description   

When I define groovy with a test scope:
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.2.1</version>
<scope>test</scope>
</dependency>

and gmavenplus-plugin with these goals:
<executions>
<execution>
<goals>
<goal>testGenerateStubs</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>

Groovy files in the test directory are not compiled. Error message is:

[WARNING] Unable to determine Groovy version. Is Groovy declared as a dependency?
[ERROR] Your Groovy version (null) doesn't support stub generation. The minimum version of Groovy required is 1.8.2. Skipping stub generation.

Everything works fine if the scope is "compile". Can gmavenplus check for the test dependencies also?

Thanks,
Laurent



 Comments   
Comment by Keegan Witt [ 26/Feb/14 ]

I did that on purpose, but your use case seems valid and is making me question that decision. Lemme think about it some more. In the mean time, as a workaround you can do

pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <properties>
    <groovyVersion>2.2.1</groovyVersion>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.codehaus.groovy</groupId>
      <artifactId>groovy-all</artifactId>
      <version>${groovyVersion}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.gmavenplus</groupId>
        <artifactId>gmavenplus-plugin</artifactId>
        <version>1.0</version>
        <executions>
          <execution>
            <goals>
              <goal>testGenerateStubs</goal>
              <goal>testCompile</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>${groovyVersion}</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>
</project>
Comment by Keegan Witt [ 26/Feb/14 ]

OK. As I'm looking over this, I'm remembering more about why I did it this way. The problem is with the configurators. When I grab the dependencies from the project compile or test classpath, I grab all the dependencies on that classpath. So the concern is one of classpath pollution. If you had a compile dependency on Foo and a test dependency on Bar, and Foo depended on SomeDependency version 1, and Bar depended on SomeDependency version 2, and I just pulled in all the test dependencies, I would compile your main code that uses Foo with version 2 of SomeDependency rather than version 1.

The only way I can think of to avoid this pollution while still looking to your test dependencies for Groovy would be to inspect the URLs of the classpath elements and keep a list of known transitive dependencies of Groovy and only pull Groovy and the transitive dependencies on the list in. But that seemed rather heavy-handed and fragile to me.

I hate how unintuitive my workaround for your use case is, but offhand I can't think of a good way to safely do what you're asking. I'll keep thinking about it, but worst case scenario I'll add the workaround for this to the examples documentation.

Comment by Keegan Witt [ 27/Feb/14 ]

Actually, I was wrong about this being an issue with the configurators, the test mojos bring in the test classpath, I just need to remember to check it. I've committed a fix in for this, I'll do a deploy of the snapshot tonight or tomorrow so you can test it.

Comment by Keegan Witt [ 27/Feb/14 ]

I've deployed a new snapshot (1.1-SNAPSHOT) on Codehaus Nexus that includes this fix. I'd be shocked if it didn't work for you, but I'd appreciate it if you tried it out before I release it. Make sure you use version 20140228.045602-5 and not one of the older snapshots.

Comment by Laurent Chane [ 28/Feb/14 ]

Hi Keegan,

thanks for the prompt fix. Indeed, I was also wondering how maven-compiler-plugin would do it, since it would be the same problem.

I've downloaded and installed locally version 20140228.045602-5. It fails with:

testGenerateStubs failed: A required class was missing while executing org.codehaus.gmavenplus:gmavenplus-plugin:1.1-SNAPSHOT:testGenerateStubs: [Lorg/apache/maven/shared/model/fileset/FileSet;
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.codehaus.gmavenplus:gmavenplus-plugin:1.1-SNAPSHOT
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/lc/.m2/repository/org/codehaus/gmavenplus/gmavenplus-plugin/1.1-SNAPSHOT/gmavenplus-plugin-1.1-SNAPSHOT.jar
[ERROR] urls[1] = file:/Users/lc/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]

Comment by Keegan Witt [ 28/Feb/14 ]

Wow. OK, something must be different about your setup than mine, because this worked for me. What version of Maven are you using?

Comment by Laurent Chane [ 28/Feb/14 ]

Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T18:37:52+01:00)
Java version: 1.7.0_51, vendor: Oracle Corporation

I'll try to do more tests later this week

Comment by Keegan Witt [ 28/Feb/14 ]

Strange, that's the same setup I'm running. I've attached the sample project I created that worked for me. See if that seems to work.

Comment by Keegan Witt [ 28/Feb/14 ]

Reopening until fix has been verified

Comment by Laurent Chane [ 28/Feb/14 ]

Hi Keegan,

ok, it works, sorry for the delay and extra work. It's a config issue on my side.

Installing the module by hand using "mvn install:install-file" did not produce a complete pom file, hence the class not found.

It's all good. This issue can be closed.

Regards,
Laurent

Comment by Keegan Witt [ 28/Feb/14 ]

Ah, I suspected it was probably something simple like that. Thanks for verifying.





[GMAVENPLUS-11] Allow using Java 1.4 bytecode with Groovy < 2.1.3 Created: 25/Feb/14  Updated: 18/Mar/14  Resolved: 25/Feb/14

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: 1.1

Type: Improvement Priority: Major
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

GMavenPlus is currently only accepting 1.5 as the target bytecode for Groovy older than 2.1.3. Even though the plugin requires Java 5, it might be used to target Java 1.4, so instead use whatever bytecode is passed for all versions of Groovy and let Groovy handle invalid selections.






[GMAVENPLUS-10] Add support for configuration scripts Created: 21/Feb/14  Updated: 18/Mar/14  Resolved: 21/Feb/14

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: 1.1

Type: New Feature Priority: Major
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Allow users to specify a location to a configuration script to do things like global @CompileStatic, like you can with the Ant task now that builders have been added with GROOVY-5503.






[GMAVENPLUS-9] NPE thrown by ExecuteMojo when project.build.sourceEncoding and sourceEncoding aren't set Created: 10/Feb/14  Updated: 18/Mar/14  Resolved: 10/Feb/14

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: 1.1

Type: Bug Priority: Major
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0




[GMAVENPLUS-8] Maven properties don't work in Windows Created: 10/Feb/14  Updated: 10/Feb/14  Resolved: 10/Feb/14

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Maven properties in paths don't work on Windows because they come into the plugin as Strings evaluated by Maven, and they have just the one backslash instead of being escaped backslashes.



 Comments   
Comment by Keegan Witt [ 10/Feb/14 ]

Arghh, I need to read my own integration tests. The workaround for this is to use a URL instead of a file path, for example

<script>file:///${project.basedir}/src/main/resources/groovyScripts/someScript.groovy</script>




[GMAVENPLUS-7] Add mojos for Groovysh and GroovyConsole Created: 06/Feb/14  Updated: 18/Mar/14  Resolved: 03/Mar/14

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: 1.1

Type: Improvement Priority: Major
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Comments   
Comment by Keegan Witt [ 02/Mar/14 ]

Reopening because console doesn't seem to allow scripts be run more than once for some Groovy versions. I'm doing more research on what those versions are.

Comment by Keegan Witt [ 02/Mar/14 ]

Seems to affect all versions older than 1.7.1. I'm not sure why yet, or if there's any way to work around the issue.

Comment by Keegan Witt [ 02/Mar/14 ]

Actually, having downloaded the zip of 1.7.0, it looks like that problem exists in the official binaries as well, it's not specific to GMavenPlus. I guess I'll just ship as-is.





[GMAVENPLUS-6] Stub generation doesn't include Javadoc Created: 17/Jan/14  Updated: 10/Mar/15  Resolved: 20/Feb/14

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Stub generation doesn't include Javadoc, which is a problem for things like Maven Mojos, which use annotations in the Javadoc to do the Plexus wiring.



 Comments   
Comment by Keegan Witt [ 17/Jan/14 ]

I'm still trying to figure out a way to do this without completely forking Groovy's stub generation.

Comment by Keegan Witt [ 20/Feb/14 ]

I've finally concluded there is no way without forking Groovy's stub generation, which I refuse to do. If people want this feature, they should push for it to be patched upstream.

Comment by Keegan Witt [ 10/Mar/15 ]

Migrated back to GitHub.





[GMAVENPLUS-5] Groovy versions older than 1.6.0 fail integration tests Created: 17/Jan/14  Updated: 02/Mar/14  Resolved: 02/Mar/14

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to GMAVENPLUS-2 Stub generation doesn't work for old... Open
is related to GMAVENPLUS-1 Groovydoc doesn't work for older Groo... Closed
Number of attachments : 0

 Description   

The issue is when compiling with 1.8.2, then running with < 1.6.0 causes a java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/callsite/CallSiteArray.

The following builds failed:
[ERROR] * advancedExecute\pom.xml
[ERROR] * advancedGenerateStubs\pom.xml
[ERROR] * advancedGroovydoc\pom.xml
[ERROR] * astCompile\pom.xml
[ERROR] * basicGenerateStubs\pom.xml
[ERROR] * basicGroovydoc\pom.xml
[ERROR] * mixedCompile\pom.xml
[ERROR] * mixedCompile2\pom.xml
[ERROR] * mixedGroovdoc\pom.xml
[ERROR] * mixedGroovdoc2\pom.xml






[GMAVENPLUS-4] Load specified classpath into execute mojo Created: 17/Jan/14  Updated: 10/Mar/15  Resolved: 20/Feb/14

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Let the user specify the classpath (compile, test, runtime, or system) into the execute mojo so that they can be used in scripts.



 Comments   
Comment by Keegan Witt [ 17/Jan/14 ]

I've not done this already because I'm not sure how to wire in the component configurator with arguments to control dependency resolution and which classpath to include.

Comment by Keegan Witt [ 20/Feb/14 ]

I don't think this pipe dream is actually possible.

Comment by Keegan Witt [ 10/Mar/15 ]

Migrated back to GitHub.





[GMAVENPLUS-3] Plugin does not work with JDK 1.4 Created: 17/Jan/14  Updated: 10/Mar/15  Resolved: 20/Feb/14

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Number of attachments : 0

 Description   

Plugin does not work with JDK <= 1.4.



 Comments   
Comment by Keegan Witt [ 20/Feb/14 ]

I don't think I'm going to do this. Java 1.4 is miserable to program in and nobody should be using it anymore anyway. If someone actually asks for it, maybe I'll reconsider.

Comment by Keegan Witt [ 10/Mar/15 ]

Migrated back to GitHub.





[GMAVENPLUS-2]  Stub generation doesn't work for older Groovy versions Created: 17/Jan/14  Updated: 10/Mar/15

Status: Open
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
relates to GMAVENPLUS-5 Groovy versions older than 1.6.0 fail... Closed
Number of attachments : 0

 Description   

Stub generation doesn't work for Groovy < 1.8.2.



 Comments   
Comment by Keegan Witt [ 24/Feb/14 ]

This is really puzzling. No exceptions are thrown, Groovy just silently doesn't create any stubs. I'm backtracking through release history to figure out what changed that might explain this.

Comment by Keegan Witt [ 26/Feb/14 ]

I think this was fixed with GROOVY-4711, specifically commit 5d726fd9d2090b6a1c2669da7c5972f8229c1ae4. The problem is what to do with versions of Groovy before that. I'm trying to find a way to incorporate this fix without forking Groovy code the way GMaven did.

Comment by Keegan Witt [ 10/Mar/15 ]

Migrated back to GitHub.





[GMAVENPLUS-1] Groovydoc doesn't work for older Groovy versions Created: 17/Jan/14  Updated: 18/Mar/14  Resolved: 03/Mar/14

Status: Closed
Project: GMavenPlus
Component/s: None
Affects Version/s: None
Fix Version/s: 1.1

Type: Improvement Priority: Major
Reporter: Keegan Witt Assignee: Keegan Witt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
relates to GMAVENPLUS-5 Groovy versions older than 1.6.0 fail... Closed
Number of attachments : 0

 Description   

Groovydoc doesn't work for Groovy < 1.6.2.



 Comments   
Comment by Keegan Witt [ 27/Feb/14 ]

I've committed an initial fix for this. I'm just slogging through testing it in all the various Groovy releases.





Generated at Tue Mar 10 13:24:07 CDT 2015 by Keegan Witt using JIRA 6.1.6#6162-sha1:7af547ce7c84dbb7c1e345a65437ed7b85efffa2.