jmporterog / maven-replacer-plugin

Automatically exported from code.google.com/p/maven-replacer-plugin
MIT License
0 stars 0 forks source link

Wrong usage guide #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The usage guide on
http://code.google.com/p/maven-replacer-plugin/wiki/UsageGuide contains
wrong XML configuration examples. Using these, you will always receive an
error like “/path/to/project/null (no such file or directory)”.

The reason is that the <configuration> tags are inside the <execution>
elements, whereas they should be inside the <plugin> element directly.

Original issue reported on code.google.com by cda...@googlemail.com on 27 Apr 2010 at 12:59

GoogleCodeExporter commented 9 years ago
Hi cdauth,

The configuration can be either inside or outside the execution, it just 
depends on 
how you are invoking the plugin.
This is quoted from the Maven configuring guide:
"Note: Configurations inside the <executions> tag differ from those that are 
outside 
<executions> in that they cannot be used from a direct command line invocation. 
Instead they are only applied when the lifecycle phase they are bound to are 
invoked. 
Alternatively, if you move a configuration section outside of the executions 
section, 
it will apply globally to all invocations of the plugin." 
(http://maven.apache.org/guides/mini/guide-configuring-plugins.html)

Would you like examples of each in the UsageGuide, or perhaps that I provide 
more 
clarification within the UsageGuide that the examples are invoked by phase 
execution?

Original comment by baker.st...@gmail.com on 27 Apr 2010 at 9:37

GoogleCodeExporter commented 9 years ago
I don’t see any use to document the configuration inside the <executions> tag 
in the
UsageGuide if that only works with automatic phase execution. Instead, I 
suggest to
change the examples in the UsageGuide to the configuration inside the <plugin>
element, as that works in both cases and thus avoids confusion without having 
any
disadvantages.

Original comment by cda...@googlemail.com on 27 Apr 2010 at 9:44

GoogleCodeExporter commented 9 years ago
Hi cdauth,

To be honest, each example has been directly retrieved from a complete usage 
example 
pom (referenced within the UsageGuide) and this examples many executions where 
a 
global configuration does not make sense.

However, I agree with you that the individual examples should be changed. I 
will 
update them shortly.

Thanks for your valuable feedback. :-)

Original comment by baker.st...@gmail.com on 27 Apr 2010 at 9:57

GoogleCodeExporter commented 9 years ago
The UsageGuide has been updated.

Original comment by baker.st...@gmail.com on 27 Apr 2010 at 10:04