Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 55B3F17D11 for ; Fri, 22 May 2015 18:15:18 +0000 (UTC) Received: (qmail 88025 invoked by uid 500); 22 May 2015 18:15:18 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 87994 invoked by uid 500); 22 May 2015 18:15:18 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 87850 invoked by uid 99); 22 May 2015 18:15:18 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 May 2015 18:15:18 +0000 Date: Fri, 22 May 2015 18:15:18 +0000 (UTC) From: "Andreas Panagiotidis (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CXF-6420) Maven cxf-java2ws-plugin copies to the maven repository only the last wsdl of multiple services/executions - overwrites the others MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-6420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andreas Panagiotidis updated CXF-6420: -------------------------------------- Description: I use the Maven *cxf-java2ws-plugin:java2ws* to generate WSDLs from WebService Java classes. For each Service, I create an execution of the plugin, as suggest in this link http://mail-archives.apache.org/mod_mbox/cxf-users/201003.mbox/%3C201003132152.22957.dkulp@apache.org%3E . I have not found any other option to generate multiple services in a single project. By default in the latest version of cxf-java2ws-plugin the configuration parameter "attachWsdl" is true. That means that the plugin generates a WSDL for *each* execution. Unfortunately, the plugin during the maven install phase tries to attache each generated WSDL to the local repository in the maven repository with the name: {code} maven-local-repository\[groupId]\[version]\[artifactId]-[version].wsdl {code} The naming of the file is the reason that maven does not copy all the WSDLs . Only the one of the first execution of the plugin get's copied. The plugin checks if the file exists already and it skips the others (which are named with the same name). Equally important, Maven version 3.3.3 does not allow to release a Maven project. (Maven 3.0.5 had a different process) The maven deploy plugin during the release uploads to the enterprise repository the first generated WSDL successfully. But then it tries to upload the WSDL from second execution, but that already exists in the Maven Enterprise Repository (the WSDLs have the same name). Thus, the project cannot upload the WSDLs and it cannot also get released. We may set the attachWsdl option to false, but this is not a solution, as for some the goal is to *deploy* the WSDL files. I attach a zip with a maven project that demonstrates the issue. You see that the plugin copies in the local repository only the last WSDL file, instead of generating once for each execution. {code} [INFO] [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ test-cxf-with-deploy-plugin --- [INFO] Installing C:\test-cxf-with-deploy-plugin\target\test-cxf-with-deploy-plugin-1.0.jar to C:\\m3-repository\ch\apanag\test-cxf-with-deploy-plugin\1.0\test-cxf-with-deploy-plugin-1.0.jar [INFO] Installing C:\test-cxf-with-deploy-plugin\pom.xml to C:\eplatform\lib\m3-repository\ch\apanag\test-cxf-with-deploy-plugin\1.0\test-cxf-with-deploy-plugin-1.0.pom [INFO] Installing C:\test-cxf-with-deploy-plugin\target\generated\wsdl\MyService.wsdl to C:\m3-repository\ch\apanag\test-cxf-with-deploy-plugin\1.0\test-cxf-with-deploy-plugin-1.0.wsdl [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ {code} Deploying a release version to a Maven Enterprise Repository throws an HTML 400 error, as normally a release repository does not allow the redeployment of file. In the end of the day, the plugin does not allow to copy to a repository each WSDL. This is against to what it promotes and what its goal was. A simple change is the solution. Add in the name of each generated WSDL the name of the Service that it represents too. {code} maven-local-repository\[groupId]\[version]\[artifactId]-[version].[service-name].wsdl {code} was: I use the Maven *cxf-java2ws-plugin:java2ws* to generate WSDLs from WebService Java classes. For each Service, I create an execution of the plugin, as suggest in this link http://mail-archives.apache.org/mod_mbox/cxf-users/201003.mbox/%3C201003132152.22957.dkulp@apache.org%3E . I also did not find any other possibility for generation of multiple services. By default in the latest version of cxf-java2ws-plugin the configuration parameter "attachWsdl" is true. That means that the plugin generates a WSDL for *each* execution. Unfortunately, the plugin during the maven install phase tries to attache each generated WSDL to the local repository in the maven repository with the name: {code} maven-local-repository\[groupId]\[version]\[artifactId]-[version].wsdl {code} The naming of the file is the reason that maven does not copy all the WSDLs . Only the one of the first execution of the plugin get's copied. The plugin checks if the file exists already and it skips the others (which are named with the same name). Equally important, Maven version 3.3.3 does not allow to release a Maven project. (Maven 3.0.5 had a different process) The maven deploy plugin during the release uploads to the enterprise repository the first generated WSDL successfully. But then it tries to upload the WSDL from second execution, but that already exists in the Maven Enterprise Repository (the WSDLs have the same name). Thus, the project cannot upload the WSDLs and it cannot also get released. We may set the attachWsdl option to false, but this is not a solution, as for some the goal is to *deploy* the WSDL files. I attach a zip with a maven project that demonstrates the issue. You see that the plugin copies in the local repository only the last WSDL file, instead of generating once for each execution. {code} [INFO] [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ test-cxf-with-deploy-plugin --- [INFO] Installing C:\test-cxf-with-deploy-plugin\target\test-cxf-with-deploy-plugin-1.0.jar to C:\\m3-repository\ch\apanag\test-cxf-with-deploy-plugin\1.0\test-cxf-with-deploy-plugin-1.0.jar [INFO] Installing C:\test-cxf-with-deploy-plugin\pom.xml to C:\eplatform\lib\m3-repository\ch\apanag\test-cxf-with-deploy-plugin\1.0\test-cxf-with-deploy-plugin-1.0.pom [INFO] Installing C:\test-cxf-with-deploy-plugin\target\generated\wsdl\MyService.wsdl to C:\m3-repository\ch\apanag\test-cxf-with-deploy-plugin\1.0\test-cxf-with-deploy-plugin-1.0.wsdl [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ {code} Deploying a release version to a Maven Enterprise Repository throws an HTML 400 error, as normally a release repository does not allow the redeployment of file. In the end of the day, the plugin does not allow to copy to a repository each WSDL. This is against to what it promotes and what its goal was. A simple change is the solution. Add in the name of each generated WSDL the name of the Service that it represents too. {code} maven-local-repository\[groupId]\[version]\[artifactId]-[version].[service-name].wsdl {code} > Maven cxf-java2ws-plugin copies to the maven repository only the last wsdl of multiple services/executions - overwrites the others > ---------------------------------------------------------------------------------------------------------------------------------- > > Key: CXF-6420 > URL: https://issues.apache.org/jira/browse/CXF-6420 > Project: CXF > Issue Type: Improvement > Components: Build system > Affects Versions: 3.1.0 > Environment: in all environments > Reporter: Andreas Panagiotidis > Labels: easyfix > Original Estimate: 2h > Remaining Estimate: 2h > > I use the Maven *cxf-java2ws-plugin:java2ws* to generate WSDLs from WebService Java classes. > For each Service, I create an execution of the plugin, as suggest in this link http://mail-archives.apache.org/mod_mbox/cxf-users/201003.mbox/%3C201003132152.22957.dkulp@apache.org%3E . I have not found any other option to generate multiple services in a single project. > By default in the latest version of cxf-java2ws-plugin the configuration parameter "attachWsdl" is true. > That means that the plugin generates a WSDL for *each* execution. Unfortunately, the plugin during the maven install phase tries to attache each generated WSDL to the local repository in the maven repository with the name: > {code} > maven-local-repository\[groupId]\[version]\[artifactId]-[version].wsdl > {code} > The naming of the file is the reason that maven does not copy all the WSDLs . Only the one of the first execution of the plugin get's copied. The plugin checks if the file exists already and it skips the others (which are named with the same name). > Equally important, Maven version 3.3.3 does not allow to release a Maven project. (Maven 3.0.5 had a different process) > The maven deploy plugin during the release uploads to the enterprise repository the first generated WSDL successfully. But then it tries to upload the WSDL from second execution, but that already exists in the Maven Enterprise Repository (the WSDLs have the same name). Thus, the project cannot upload the WSDLs and it cannot also get released. > We may set the attachWsdl option to false, but this is not a solution, as for some the goal is to *deploy* the WSDL files. > I attach a zip with a maven project that demonstrates the issue. > You see that the plugin copies in the local repository only the last WSDL file, instead of generating once for each execution. > {code} > [INFO] > [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ test-cxf-with-deploy-plugin --- > [INFO] Installing C:\test-cxf-with-deploy-plugin\target\test-cxf-with-deploy-plugin-1.0.jar to C:\\m3-repository\ch\apanag\test-cxf-with-deploy-plugin\1.0\test-cxf-with-deploy-plugin-1.0.jar > [INFO] Installing C:\test-cxf-with-deploy-plugin\pom.xml to C:\eplatform\lib\m3-repository\ch\apanag\test-cxf-with-deploy-plugin\1.0\test-cxf-with-deploy-plugin-1.0.pom > [INFO] Installing C:\test-cxf-with-deploy-plugin\target\generated\wsdl\MyService.wsdl to C:\m3-repository\ch\apanag\test-cxf-with-deploy-plugin\1.0\test-cxf-with-deploy-plugin-1.0.wsdl > [INFO] ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > [INFO] ------------------------------------------------------------------------ > {code} > Deploying a release version to a Maven Enterprise Repository throws an HTML 400 error, as normally a release repository does not allow the redeployment of file. > In the end of the day, the plugin does not allow to copy to a repository each WSDL. This is against to what it promotes and what its goal was. > A simple change is the solution. Add in the name of each generated WSDL the name of the Service that it represents too. > {code} > maven-local-repository\[groupId]\[version]\[artifactId]-[version].[service-name].wsdl > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)