mirror of https://github.com/apache/maven.git
o adding a couple more checked to make sure the setters are executed.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@280000 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
843ed8061a
commit
6b442c75a9
|
@ -20,7 +20,7 @@ public class CoreItMojoWithSetters
|
|||
{
|
||||
/**
|
||||
* @parameter
|
||||
* property="outputDirectoryValue"
|
||||
* property="outputDirectory"
|
||||
* expression="${project.build.directory}"
|
||||
* @required
|
||||
*/
|
||||
|
@ -45,14 +45,22 @@ public class CoreItMojoWithSetters
|
|||
this.outputDirectoryValue = outputDirectory;
|
||||
}
|
||||
|
||||
boolean setFooSetterExecuted;
|
||||
|
||||
public void setFoo( String fooValue )
|
||||
{
|
||||
this.fooValue = fooValue;
|
||||
|
||||
setFooSetterExecuted = true;
|
||||
}
|
||||
|
||||
boolean setBarSetterExecuted;
|
||||
|
||||
public void setBar( String barValue )
|
||||
{
|
||||
this.barValue = barValue;
|
||||
|
||||
setBarSetterExecuted = true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
@ -68,12 +76,12 @@ public class CoreItMojoWithSetters
|
|||
File outDir = new File( outputDirectoryValue );
|
||||
|
||||
// Test parameter setting
|
||||
if ( fooValue != null )
|
||||
if ( fooValue != null && setFooSetterExecuted )
|
||||
{
|
||||
touch( outDir, fooValue );
|
||||
}
|
||||
|
||||
if ( barValue != null )
|
||||
if ( barValue != null && setBarSetterExecuted )
|
||||
{
|
||||
touch( outDir, barValue );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue