mrdon / maven-cli-plugin
- Source
- Commits
- Network (16)
- Issues (6)
- Downloads (20)
- Wiki (7)
- Graphs
-
Branch:
master
click here to add a description
click here to add a homepage
-
I have been able to verify that profiles are properly activated when using cli:execute based on the command line flag or activation trigger. However, the configuration in the profile doesn't seem to take affect.
Case in point. I have an antrun configuration in a profile. I activate that profile using -P
bash$ mvn cli:execute -Pexplode
maven2> runant(runant is an alias to the antrun plugin). None of the ant tasks are run.
Comments
Please log in to comment. -
don't require a fully-qualified plugin name in userAliases
0 comments Created 9 months ago by mojavelinuxI'm not sure why, but userAliases require a fully qualified plugin name (groupId:artifactId:goal) rather than the shorthand version (prefix:goal). I'm not sure why this is the case, or if it is easy to fix, but it seems rather unnecessary. I'm thinking the parser is just misreading something.
Comments
Please log in to comment. -
Once all the parsing of the command is done, execute-phase should validate that what is left is either a valid life-cycle goal or property plugin syntax (i.e., groupId:artifactId:goal). That way, it doesn't try to execute gibberish.
Comments
Please log in to comment.
mojavelinux
Tue May 05 10:13:42 -0700 2009
| link
Btw, the list of possible life-cycle goals is already a constant. It's just a matter of adding the cross-reference (and regex for plugin goals).
-
Use a history file in the user's home area to keep track of commands typed between sessions. jline supports this, so it is just a matter of calling on History to load the history file.
Comments
Please log in to comment. -
RIght now, nothing happens or an exception is thrown when this plugin is attempted to be run from Maven 3.0. We'll likely have to fork the code, but I think it is worthwhile. I've got two link to help get the conversation started:
A Google search for:
java.lang.UnsupportedOperationException executeMojo
http://www.google.com/search?q=java.lang.UnsupportedOperationException%20executeMojo&ie=utf-8&oe=utf-8And some Sonar code that is being changed for the same reason:
http://jira.codehaus.org/browse/SONAR-1265
https://svn.codehaus.org/mojo/branches/sonar-maven-plugin-mvn-3.x/src/main/java/org/codehaus/mojo/sonar/Bootstraper.javaComments
matthewmccullough
Thu Dec 31 11:30:39 -0800 2009
| link
I spent 3 hours today trying to chase down the changes necessary to make this work. No distinct luck so far. The exceptions and error messages are sparse and don't give any definitive reason why we're getting an java.lang.UnsupportedOperationException. I've brought the http://github.com/matthewmccullough/mojo-executor/ source into GitHub. It was previously located at http://code.google.com/p/mojo-executor/. I believe the problem lies in this module's usage of core maven in the executeMojo method of http://github.com/matthewmccullough/mojo-executor/blob/master/src/main/java/org/twdata/maven/mojoexecutor/MojoExecutor.java
matthewmccullough
Thu Dec 31 11:31:33 -0800 2009
| link
I'm pushing these experiments to http://github.com/matthewmccullough/mojo-executor/tree/maven3compat I will try to add a unit test or two so that I'm not debugging this via a full integration of all the modules and SNAPSHOT deployment.
matthewmccullough
Thu Dec 31 15:31:22 -0800 2009
| link
Branched to http://github.com/mrdon/maven-cli-plugin/tree/maven3compat then attempted, and got decently far on using the new MavenPluginManager injected attribute to run the plugins, but still getting an exception.
org.apache.maven.plugin.PluginContainerException: Unable to load the mojo 'compile' (or one of its required components) from the plugin 'org.apache.maven.plugins:maven-compiler-plugin:2.0.2'
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:566)
matthewmccullough
Fri Jan 01 09:10:09 -0800 2010
| link
After another 3 hours, I finally got it working (somewhat). At least the help-system works with the cli:execute plugin. Compile and some other plugins fail with some other odd messages like NPEs. But this is the closest we've been yet. The oddest part is that just rearranging the MojoExecutor to do the "same things" but in a manner consistent with the Sonar plugin mentioned earlier was enough to get it working. Why on earth should sequence or incantations of calls (that result in the same objects) make a difference. Thus is part of the mystery of Maven. This is not very unit testable right now. I would love for someone to hack on and get a unit test around MojoExecutor.
sleberrigaud
Fri Jan 01 19:52:47 -0800 2010
| link
Is it worth it? I explain…
I seem to remember that for maven 3.0 (maybe 3.1) they (Jason VZ) planned to have a tool similar to the cli plugin as part of maven. Unfortunately I can't find anything in mailing list at the moment about that, but would probably be worth having a look, before speding to much effort on this one?
matthewmccullough
Fri Jan 01 20:05:03 -0800 2010
| link
Yup, there will be a commercial product from Sonatype called the Maven shell. It will definitely be stronger than this plugin, but it'll be great to continue to have an OSS option (maven-cli-plugin) as well.
Please log in to comment.
sleberrigaud
Sat Jan 02 14:11:24 -0800 2010
| link
This is a shame.
But it that case I certainly agree that keeping the cli plugin going is a good idea. -
Running mvn-cli-plugin in Windows under Cygwin results in the following behavior:
After running "mvn cli:execute" I get to the maven2 prompt.
There I type "test".
Nothing happens.Versions:
cygwin 1.6 or 1.7
maven 2.1.0
mvn-cli-plugin 1.0.1Comments
Please log in to comment.



