Brett Porter wrote:
+1 under current circumstances.

Bearing in mind the following:
a) we agreed to eliminate expression over time to an explicit "property" (or some other name) that would just be property="jar.forcedCreate" - this doesn't actually change anything b) I'd actually like to be able to eliminate it altogether and just use the field name, using plugin prefix or FQN (org.apache.maven.jar:maven-jar-plugin:forcedCreate - more for storage rather than typing!) to disambiguate

+1 (as long as plugin prefix is supported :))


A possible counter example under this would be things like maven.test.skip where:
a) that's a lot of muscle memory to eliminate :)
b) it is actually used in two plugins for one use (I'd rather we eliminate that over time and figure out how to properly share stuff)

Global 'settings' could be prefixed with 'maven.', as long as there's no maven-maven-plugin.

Another gotcha:
mvn archetype:create -Darchetype.artifactId=foo -Darchetype.archetypeArtifactId=maven-archetype-mojo
(archetype overload!)


The archetype plugin is an exception - it's meant to run without a pom,
and it's (almost?) always run as the only goal on the cmd line. So when there's an explicit plugin:goal call we can drop the prefix. Might get a bit complicated this way, but it should be rather intuitive.

We could also still support the -DfieldName= format and treat it like the <configuration> section - only use/inject the value if the field exists in the mojo. To disambiguate you could always prefix. We could even warn that some setting is affecting multiple plugins and may cause weird side effects (like -DoutputDirectory=.. will unlikely cause if we ignore the expression and just inject using fieldnames).

-- Kenney

We might find that it tends to happen a bit.

Cheers,
Brett

On 22/08/2006, at 9:40 AM, Jason van Zyl wrote:

Hi,

While working on MJAR-7, John and I discussed a possible standard for plugin parameters naming conventions. Which basically boil down to:

field/property = noun|verbNoun
expression    = prefix.noun|verbNoun

So for MJAR-7 we have

field             = forceCreation
expression = jar.forceCreation

So we are using camel case to avoid any potential interpolation problems, the noun|verbNoun form to use used within the plugin configuration, and the prefix.noun|verbNoun on the command line to prevent name collisions with other plugins.

So that would be:

<plugin>
  <artifact-id>maven-jar-plugin</artifact-id>
  <configuration>
    <forceCreation>false</forceCreation>
  </configuration>
</plugin>

And on the command line it would be

mvn -Djar.forceCreation=false

I've seen all sorts of format for parameters as with everything the format is arbitrary but it would be good to have a standard guideline to follow.

Anyone else have any thoughts?

Jason van Zyl
[EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to