Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3B3BC200B8E for ; Mon, 26 Sep 2016 13:38:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 39BDD160AC8; Mon, 26 Sep 2016 11:38:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7E7E4160AB8 for ; Mon, 26 Sep 2016 13:38:21 +0200 (CEST) Received: (qmail 87108 invoked by uid 500); 26 Sep 2016 11:38:20 -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 87096 invoked by uid 99); 26 Sep 2016 11:38:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Sep 2016 11:38:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7E0EF2C044E for ; Mon, 26 Sep 2016 11:38:20 +0000 (UTC) Date: Mon, 26 Sep 2016 11:38:20 +0000 (UTC) From: "Atle Tokle (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CXF-7067) cxf-codegen-plugin version 3.1.x fails to download wsdlArtifact MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 26 Sep 2016 11:38:22 -0000 [ https://issues.apache.org/jira/browse/CXF-7067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15522802#comment-15522802 ] Atle Tokle commented on CXF-7067: --------------------------------- I debugged this to fail in org.apache.cxf.maven_plugin.AbstractCodegenMoho I changed the code as shown below, and it works OK. I don't know maven repository lookup, so must be checked that it does not cause other errors. And the return-statement need to handle null, empty and multiple artifacts in collection. What I see is that the mavenSession.getLocalRepository() only return one repositoty central. Not our local repository nexus. When run with only central, the result have originatingArtifact=null and 1 artifact in missingArtifacts. When I use mavenSession.getTopLevelProject().getRemoteArtifactRepositories() I get both central and nexus. The result still have null in originatingArtifact and missingArtifacts is null. But now the artifacts list got 1 artifact, and when returning that my project builds OK. {code} private Artifact resolveArbitraryWsdl(Artifact artifact) { ArtifactResolutionRequest request = new ArtifactResolutionRequest(); request.setArtifact(artifact); request.setResolveRoot(true).setResolveTransitively(false); request.setServers(mavenSession.getRequest().getServers()); request.setMirrors(mavenSession.getRequest().getMirrors()); request.setProxies(mavenSession.getRequest().getProxies()); request.setLocalRepository(mavenSession.getLocalRepository()); // request.setRemoteRepositories(mavenSession.getRequest().getRemoteRepositories()); request.setRemoteRepositories(mavenSession.getTopLevelProject().getRemoteArtifactRepositories()); ArtifactResolutionResult result = repositorySystem.resolve(request); return result.getArtifacts().iterator().next(); // return result.getOriginatingArtifact(); } {code} > cxf-codegen-plugin version 3.1.x fails to download wsdlArtifact > --------------------------------------------------------------- > > Key: CXF-7067 > URL: https://issues.apache.org/jira/browse/CXF-7067 > Project: CXF > Issue Type: Bug > Components: Build system > Affects Versions: 3.1.0, 3.1.7 > Reporter: Atle Tokle > > I am upgrading my project from using cxf version 3.0.1 to 3.1.7. And have my wsdl's in maven. But it fails to download. Have tested that all 3.0.x versions is OK, but 3.1.7 (and 3.1.0) both fails. > Plugin is configured like this: > {code} > > org.apache.cxf > cxf-codegen-plugin > > > generate-sources1 > generate-sources > > > > > no.xxxxxxx.kontrakter.tjeneste.felles.kontekst > soapheaderswrapper > 4.8.0 > > > > > > wsdl2java > > > > > {code} > When it runs, it logs this: > {code} > [INFO] > [INFO] --- cxf-codegen-plugin:3.1.7:wsdl2java (generate-sources1) @ iamhelper-domain-gen --- > Downloading: http://repo.maven.apache.org/maven2/no/xxxxxxx/kontrakter/tjeneste/felles/kontekst/soapheaderswrapper/4.8.0/soapheaderswrapper-4.8.0.wsdl > [INFO] ------------------------------------------------------------------------ > [INFO] BUILD FAILURE > [INFO] ------------------------------------------------------------------------ > [INFO] Total time: 2.455s > [INFO] Finished at: Fri Sep 23 09:41:00 CEST 2016 > [INFO] Final Memory: 13M/300M > [INFO] ------------------------------------------------------------------------ > [ERROR] Failed to execute goal org.apache.cxf:cxf-codegen-plugin:3.1.7:wsdl2java (generate-sources1) on project soapheaders-domain-gen: Failed to resolve WSDL artifact no.xxxxxxx.kontrakter.tjeneste.felles.kontekst:soapheaderswrapper:wsdl:4.8.0 -> [Help 1] > [ERROR] > {code} > The same run on 3.0.x version output this: > {code} > [INFO] > [INFO] --- cxf-codegen-plugin:3.0.10:wsdl2java (generate-sources1) @ iamhelper-domain-gen --- > [INFO] Resolved WSDL artifact to file C:\Users\atokle.AD-ONE\.m2\repository\no\xxxxxxx\kontrakter\tjeneste\felles\kontekst\soapheaderswrapper\4.8.0\soapheaderswrapper-4.8.0.wsdl > [INFO] no.xxxxxxx.kontrakter.tjeneste.felles.kontekst:soapheaderswrapper:wsdl:4.9.0:compile resolved to C:\Users\atokle.AD-ONE\.m2\repository\no\xxxxxxx\kontrakter\tjeneste\felles\kontekst\soapheaderswrapper\4.9.0\soapheaderswrapper-4.9.0.wsdl > [INFO] Resolved WSDL artifact to file C:\Users\atokle.AD-ONE\.m2\repository\no\xxxxxxx\kontrakter\tjeneste\felles\kontekst\soapheaderswrapper\4.9.0\soapheaderswrapper-4.9.0.wsdl > [INFO] > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)