cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1465636 - in /cxf/trunk: maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/ systests/wsdl_maven/codegen/ systests/wsdl_maven/java2ws/
Date Mon, 08 Apr 2013 13:51:06 GMT
Author: ffang
Date: Mon Apr  8 13:51:05 2013
New Revision: 1465636

URL: http://svn.apache.org/r1465636
Log:
[CXF-4951]cxf-codegen-plugin wsdlArtifact ignores classifier|add classifier for cxf-java2ws-plugin
used to publish wsdl

Modified:
    cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
    cxf/trunk/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java
    cxf/trunk/systests/wsdl_maven/codegen/pom.xml
    cxf/trunk/systests/wsdl_maven/java2ws/pom.xml

Modified: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java?rev=1465636&r1=1465635&r2=1465636&view=diff
==============================================================================
--- cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
(original)
+++ cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
Mon Apr  8 13:51:05 2013
@@ -802,9 +802,11 @@ public abstract class AbstractCodegenMoh
             if (wsdlA == null) {
                 continue;
             }
-            Artifact wsdlArtifact = artifactFactory.createBuildArtifact(wsdlA.getGroupId(),
+            Artifact wsdlArtifact = artifactFactory.createArtifactWithClassifier(wsdlA.getGroupId(),
                                                                         wsdlA.getArtifactId(),
-                                                                        wsdlA.getVersion(),
wsdlA.getType());
+                                                                        wsdlA.getVersion(),

+                                                                        wsdlA.getType(),
+                                                                        wsdlA.getClassifier());
             wsdlArtifact = resolveRemoteWsdlArtifact(wsdlArtifact);
             if (wsdlArtifact != null) {
                 File supposedFile = wsdlArtifact.getFile();

Modified: cxf/trunk/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java
URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java?rev=1465636&r1=1465635&r2=1465636&view=diff
==============================================================================
--- cxf/trunk/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java
(original)
+++ cxf/trunk/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java
Mon Apr  8 13:51:05 2013
@@ -92,6 +92,12 @@ public class Java2WSMojo extends Abstrac
      * @parameter
      */
     private String address;
+    
+    
+    /**
+     * @parameter
+     */
+    private String classifier;
 
     /**
      * @parameter  expression="${project.compileClasspathElements}"
@@ -427,7 +433,12 @@ public class Java2WSMojo extends Abstrac
         if (attachWsdl && outputFile != null) {
             File wsdlFile = new File(outputFile);
             if (wsdlFile.exists()) {
-                projectHelper.attachArtifact(project, "wsdl", wsdlFile);
+                if (classifier != null) {
+                    projectHelper.attachArtifact(project, "wsdl", classifier, wsdlFile);
+                } else {
+                    projectHelper.attachArtifact(project, "wsdl", wsdlFile);
+                }
+                
             }
         }
     }

Modified: cxf/trunk/systests/wsdl_maven/codegen/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/wsdl_maven/codegen/pom.xml?rev=1465636&r1=1465635&r2=1465636&view=diff
==============================================================================
--- cxf/trunk/systests/wsdl_maven/codegen/pom.xml (original)
+++ cxf/trunk/systests/wsdl_maven/codegen/pom.xml Mon Apr  8 13:51:05 2013
@@ -76,6 +76,31 @@
                             <fork>${cxf.codegenplugin.forkmode}</fork>
                         </configuration>
                     </execution>
+                    <execution>
+                        <id>process-sources</id>
+                        <phase>process-sources</phase>
+                        <goals>
+                            <goal>wsdl2java</goal>
+                        </goals>
+                        <configuration>
+                            <wsdlOptions>
+                                <wsdlOption>
+                                    <wsdlArtifact>
+                                        <groupId>org.apache.cxf.systests.wsdl_maven</groupId>
+                                        <artifactId>cxf-systests-java2ws</artifactId>
+                                        <version>${project.version}</version>
+                                        <classifier>test</classifier>
+                                    </wsdlArtifact>
+                                </wsdlOption>
+                            </wsdlOptions>
+                            <fork>${cxf.codegenplugin.forkmode}</fork>
+                            <defaultOptions>
+                                <markGenerated>true</markGenerated>
+                                <asyncMethods />
+                            </defaultOptions>
+                        </configuration>
+                    </execution>
+
                 </executions>
             </plugin>
             <!--
@@ -115,6 +140,7 @@
             <groupId>org.apache.cxf.systests.wsdl_maven</groupId>
             <artifactId>cxf-systests-java2ws</artifactId>
             <version>${project.version}</version>
+            <classifier>test</classifier>
             <type>wsdl</type>
         </dependency>
         <dependency>

Modified: cxf/trunk/systests/wsdl_maven/java2ws/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/wsdl_maven/java2ws/pom.xml?rev=1465636&r1=1465635&r2=1465636&view=diff
==============================================================================
--- cxf/trunk/systests/wsdl_maven/java2ws/pom.xml (original)
+++ cxf/trunk/systests/wsdl_maven/java2ws/pom.xml Mon Apr  8 13:51:05 2013
@@ -56,12 +56,14 @@
 							<className>org.apache.cxf.systests.java2ws.HelloWorld</className>
 							<genWsdl>true</genWsdl>
 							<verbose>true</verbose>
+                                                        <classifier>test</classifier>
 							<attachWsdl>true</attachWsdl>
 						</configuration>
 						<goals>
 							<goal>java2ws</goal>
 						</goals>
 					</execution>
+
 				</executions>
 			</plugin>
         </plugins>



Mime
View raw message