Author: veithen
Date: Sat May 14 15:07:14 2011
New Revision: 1103123
URL: http://svn.apache.org/viewvc?rev=1103123&view=rev
Log:
AXIS2-5038: Make sure that the targetSourceFolderLocation property is used
consistently, including when adding the sources to the Maven project.
Modified:
axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java
axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/test/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojoTest.java
Modified:
axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java?rev=1103123&r1=1103122&r2=1103123&view=diff
==============================================================================
---
axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java
(original)
+++
axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java
Sat May 14 15:07:14 2011
@@ -173,9 +173,9 @@ public class WSDL2CodeMojo extends Abstr
private String wsdlVersion = null;
/**
- * @parameter expression="${axis2.wsdl2code.targetSourceFolderLocation}"
+ * @parameter expression="${axis2.wsdl2code.targetSourceFolderLocation}"
default-value="src"
*/
- private String targetSourceFolderLocation = null;
+ private String targetSourceFolderLocation;
/**
* @parameter expression="${axis2.wsdl2code.targetResourcesFolderLocation}"
@@ -462,13 +462,11 @@ public class WSDL2CodeMojo extends Abstr
new String[]{wsdlVersion}));
}
- if (targetSourceFolderLocation != null) {
- optionMap.put(
-
CommandLineOptionConstants.WSDL2JavaConstants.SOURCE_FOLDER_NAME_OPTION,
- new CommandLineOption(
-
CommandLineOptionConstants.WSDL2JavaConstants.SOURCE_FOLDER_NAME_OPTION,
- new String[]{targetSourceFolderLocation}));
- }
+ optionMap.put(
+
CommandLineOptionConstants.WSDL2JavaConstants.SOURCE_FOLDER_NAME_OPTION,
+ new CommandLineOption(
+
CommandLineOptionConstants.WSDL2JavaConstants.SOURCE_FOLDER_NAME_OPTION,
+ new String[]{targetSourceFolderLocation}));
if (targetResourcesFolderLocation != null) {
optionMap.put(
@@ -595,7 +593,7 @@ public class WSDL2CodeMojo extends Abstr
}
private void fixCompileSourceRoots() {
- File srcDir = new File(outputDirectory, "src");
+ File srcDir = new File(outputDirectory, targetSourceFolderLocation);
project.addCompileSourceRoot(srcDir.getPath());
}
}
Modified:
axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/test/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojoTest.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/test/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojoTest.java?rev=1103123&r1=1103122&r2=1103123&view=diff
==============================================================================
---
axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/test/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojoTest.java
(original)
+++
axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/test/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojoTest.java
Sat May 14 15:07:14 2011
@@ -46,6 +46,8 @@ public class WSDL2CodeMojoTest extends A
setVariableValueToObject(mojo, "syncMode", "both");
setVariableValueToObject(mojo, "databindingName", "adb");
setVariableValueToObject(mojo, "language", "java");
+ // "src" is the default, but we need to set this explicitly because of
MPLUGINTESTING-7
+ setVariableValueToObject(mojo, "targetSourceFolderLocation", "src");
return mojo;
}