Configuring Maven plugin object parameter from command line

2016-03-14 Thread João Martins
Hi,

hope this is the correct channel to respond to this question.

I'm building a Maven plugin whose every action take around 75 possible
flags (and counting).

To help with compartmentalizing all this configuration, I created Java
classes to hold the configs for each goal (e.g., DeployConfig, RunConfig,
etc.). It makes pom.xml look much better, but the downside is that
specifying parameters on the command line becomes a bit complicated.

According to this

article, if my parameter isn't of a simple type, collection of array, I'm
only left with the set(String args) method. I don't want to pass all args
in a single String and then parse it, so I thought of having a DeployConfig
and all the parameters inside it at the Mojo level. That would result in
stuff like:


  this bucket

that bucket

Where I'd have to add priorities and it would also get complicated.

Finally, since the mvn call sets system properties with -D, I'm thinking of
going over System.getProperties() at the beginning of my Mojo.execute() and
override the pom.xml values with the ones in the command line.

1) This gets rid of all @Parameter annotations except one, and we're
getting actual parameters hiding from Maven. Is there any automation by
Maven that uses those annotations and that we might be missing on?

2) Is there a better way to accomplish Complex Object parameters through
command line?

Thanks a lot for your time,
joão

-- 
João André Martins | Technical Solutions Engineer - Cloud Platform |
joaomart...@google.com | +1 650-214-7143


Re: svn commit: r1734070 - /maven/site/trunk/content/apt/guides/mini/guide-using-toolchains.apt

2016-03-14 Thread Michael Osipov

Am 2016-03-12 um 13:11 schrieb Hervé BOUTEMY:

thank you Lukas and Dennis for your feedback
in a wiki in general, like Confluence, both creation and last updated date are
displayed: IMHO, both can be useful


I did some investigations:
4. Doxia Sitetools SiteRenderer [4] says "dateCreation The date specified in
the source document, in the format "MMdd""


I have always assumed this to be a creation date as defined by the site 
context. Beware, the date format is not basic ISO date but an extended 
one in the source document. You have even improved the code/error 
message. The basic date is added to the Velocity context for internal 
use and is up for deprecation since 1.7 anyway.


Michael


-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org