From c5d7b826001925e10c56be89b1a80465a5a4bea9 Mon Sep 17 00:00:00 2001 From: Anders Hammar Date: Thu, 6 Jul 2017 19:44:18 +0200 Subject: [PATCH] Fixed #15: corrected classloader classpath for looking up wsdl files --- .../codehaus/mojo/jaxws/MainWsImportMojo.java | 25 +++ .../codehaus/mojo/jaxws/TestWsImportMojo.java | 23 ++ .../org/codehaus/mojo/jaxws/WsImportMojo.java | 202 +++++++++--------- src/test/it/issue-12/pom.xml | 1 + src/test/it/issue-15/invoker.properties | 19 ++ src/test/it/issue-15/pom.xml | 95 ++++++++ .../it/issue-15/src/main/wsdls/HelloWs.wsdl | 59 +++++ .../src/main/wsdls/HelloWs_schema1.xsd | 40 ++++ src/test/it/issue-15/verify.groovy | 38 ++++ src/test/it/jaxwscommons-4/invoker.properties | 19 ++ src/test/it/jaxwscommons-4/pom.xml | 9 +- src/test/it/jaxwscommons-4/verify.groovy | 55 +++++ src/test/it/wsdl-lib/pom.xml | 25 +-- src/test/it/wsdl-lib/wsdl-lib1/pom.xml | 34 +++ .../src/main/resources/META-INF/wsdl/po2.wsdl | 1 - .../src/main/resources/ProcessOrder.wsdl | 1 - .../src/main/resources/ProcessOrder.xsd | 0 .../src/main/resources/custom/custom.wsdl | 1 - src/test/it/wsdl-lib/wsdl-lib2/pom.xml | 34 +++ .../main/resources/META-INF/wsdl/echo.wsdl | 67 ++++++ .../mojo/jaxws/WsImportMojoITCase.java | 10 - 21 files changed, 628 insertions(+), 130 deletions(-) create mode 100644 src/test/it/issue-15/invoker.properties create mode 100644 src/test/it/issue-15/pom.xml create mode 100644 src/test/it/issue-15/src/main/wsdls/HelloWs.wsdl create mode 100644 src/test/it/issue-15/src/main/wsdls/HelloWs_schema1.xsd create mode 100644 src/test/it/issue-15/verify.groovy create mode 100644 src/test/it/jaxwscommons-4/invoker.properties create mode 100644 src/test/it/jaxwscommons-4/verify.groovy create mode 100644 src/test/it/wsdl-lib/wsdl-lib1/pom.xml rename src/test/it/wsdl-lib/{ => wsdl-lib1}/src/main/resources/META-INF/wsdl/po2.wsdl (96%) rename src/test/it/wsdl-lib/{ => wsdl-lib1}/src/main/resources/ProcessOrder.wsdl (96%) rename src/test/it/wsdl-lib/{ => wsdl-lib1}/src/main/resources/ProcessOrder.xsd (100%) rename src/test/it/wsdl-lib/{ => wsdl-lib1}/src/main/resources/custom/custom.wsdl (96%) create mode 100644 src/test/it/wsdl-lib/wsdl-lib2/pom.xml create mode 100644 src/test/it/wsdl-lib/wsdl-lib2/src/main/resources/META-INF/wsdl/echo.wsdl diff --git a/src/main/java/org/codehaus/mojo/jaxws/MainWsImportMojo.java b/src/main/java/org/codehaus/mojo/jaxws/MainWsImportMojo.java index 36acd03..84dd14f 100644 --- a/src/main/java/org/codehaus/mojo/jaxws/MainWsImportMojo.java +++ b/src/main/java/org/codehaus/mojo/jaxws/MainWsImportMojo.java @@ -37,7 +37,10 @@ package org.codehaus.mojo.jaxws; import java.io.File; +import java.util.ArrayList; +import java.util.List; +import org.apache.maven.artifact.Artifact; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; @@ -99,4 +102,26 @@ protected File getImplDestDir() { return implDestDir; } + + @Override + protected List getWSDLFileLookupClasspathElements() + { + List list = new ArrayList(); + + for ( Artifact a : project.getDependencyArtifacts() ) + { + if ( Artifact.SCOPE_COMPILE.equals( a.getScope() ) + || Artifact.SCOPE_PROVIDED.equals( a.getScope() ) + || Artifact.SCOPE_SYSTEM.equals( a.getScope() ) ) + { + File file = a.getFile(); + if ( file != null ) + { + list.add( file.getPath() ); + } + } + } + + return list; + } } diff --git a/src/main/java/org/codehaus/mojo/jaxws/TestWsImportMojo.java b/src/main/java/org/codehaus/mojo/jaxws/TestWsImportMojo.java index e4bc194..38c7dbc 100644 --- a/src/main/java/org/codehaus/mojo/jaxws/TestWsImportMojo.java +++ b/src/main/java/org/codehaus/mojo/jaxws/TestWsImportMojo.java @@ -37,7 +37,10 @@ package org.codehaus.mojo.jaxws; import java.io.File; +import java.util.ArrayList; +import java.util.List; +import org.apache.maven.artifact.Artifact; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; @@ -129,6 +132,26 @@ protected File getImplDestDir() return implDestDir; } + @Override + protected List getWSDLFileLookupClasspathElements() + { + List list = new ArrayList(); + + for ( Artifact a : project.getDependencyArtifacts() ) + { + if ( !Artifact.SCOPE_RUNTIME.equals( a.getScope() ) ) + { + File file = a.getFile(); + if ( file != null ) + { + list.add( file.getPath() ); + } + } + } + + return list; + } + @Override public void executeJaxws() throws MojoExecutionException diff --git a/src/main/java/org/codehaus/mojo/jaxws/WsImportMojo.java b/src/main/java/org/codehaus/mojo/jaxws/WsImportMojo.java index 805f02e..64936a9 100644 --- a/src/main/java/org/codehaus/mojo/jaxws/WsImportMojo.java +++ b/src/main/java/org/codehaus/mojo/jaxws/WsImportMojo.java @@ -50,13 +50,11 @@ import java.util.Enumeration; import java.util.Formatter; import java.util.List; -import java.util.Set; import java.util.jar.JarEntry; import java.util.jar.JarFile; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.apache.maven.artifact.Artifact; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.settings.Proxy; @@ -271,6 +269,12 @@ abstract class WsImportMojo protected abstract File getImplDestDir(); + /** + * Returns the dependencies that should be placed on the classpath for the classloader + * to lookup wsdl files. + */ + protected abstract List getWSDLFileLookupClasspathElements(); + @Override public void executeJaxws() throws MojoExecutionException @@ -559,136 +563,132 @@ private URL[] getWSDLFiles() throws MojoExecutionException { List files = new ArrayList(); - Set dependencyArtifacts = project.getDependencyArtifacts(); - List urlCpath = new ArrayList( dependencyArtifacts.size() ); - for ( Artifact a : dependencyArtifacts ) + ClassLoader loader = null; + + try { - try - { - if ( a.getFile() != null ) - { - URL u = a.getFile().toURI().toURL(); - urlCpath.add( u ); - } - else - { - getLog().warn( "cannot find file for " + a.getGroupId() + ":" + a.getArtifactId() + ":" - + a.getVersion() ); - } - } - catch ( MalformedURLException ex ) + List classpathElements = getWSDLFileLookupClasspathElements(); + List urlCpath = new ArrayList( classpathElements.size() ); + for ( String el : classpathElements ) { - getLog().error( ex ); + URL u = new File( el ).toURI().toURL(); + urlCpath.add( u ); } - } - ClassLoader loader = urlCpath.isEmpty() ? Thread.currentThread().getContextClassLoader() - : new URLClassLoader( urlCpath.toArray( new URL[0] ) ); - if ( wsdlFiles != null ) - { - for ( String wsdlFileName : wsdlFiles ) + + loader = new URLClassLoader( urlCpath.toArray( new URL[0] ) ); + + if ( wsdlFiles != null ) { - File wsdl = new File( wsdlFileName ); - URL toAdd = null; - if ( !wsdl.isAbsolute() ) + for ( String wsdlFileName : wsdlFiles ) { - wsdl = new File( wsdlDirectory, wsdlFileName ); - } - if ( !wsdl.exists() ) - { - toAdd = loader.getResource( wsdlFileName ); - } - else - { - try + File wsdl = new File( wsdlFileName ); + URL toAdd = null; + if ( !wsdl.isAbsolute() ) { - toAdd = wsdl.toURI().toURL(); + wsdl = new File( wsdlDirectory, wsdlFileName ); } - catch ( MalformedURLException ex ) + if ( !wsdl.exists() ) { - getLog().error( ex ); + toAdd = loader.getResource( wsdlFileName ); } - } - getLog().debug( "The wsdl File is '" + wsdlFileName + "' from '" + toAdd + "'" ); - if ( toAdd != null ) - { - files.add( toAdd ); - } - else - { - throw new MojoExecutionException( "'" + wsdlFileName + "' not found." ); - } - } - } - else - { - getLog().debug( "The wsdl Directory is " + wsdlDirectory ); - if ( wsdlDirectory.exists() ) - { - File[] wsdls = wsdlDirectory.listFiles( new WSDLFile() ); - for ( File wsdl : wsdls ) - { - try + else { - files.add( wsdl.toURI().toURL() ); + try + { + toAdd = wsdl.toURI().toURL(); + } + catch ( MalformedURLException ex ) + { + getLog().error( ex ); + } } - catch ( MalformedURLException ex ) + getLog().debug( "The wsdl File is '" + wsdlFileName + "' from '" + toAdd + "'" ); + if ( toAdd != null ) { - getLog().error( ex ); + files.add( toAdd ); + } + else + { + throw new MojoExecutionException( "'" + wsdlFileName + "' not found." ); } } } else { - URI rel = project.getBasedir().toURI().relativize( wsdlDirectory.toURI() ); - String dir = rel.getPath(); - URL u = loader.getResource( dir ); - if ( u == null ) - { - dir = "WEB-INF/wsdl/"; - u = loader.getResource( dir ); - } - if ( u == null ) + getLog().debug( "The wsdl Directory is " + wsdlDirectory ); + if ( wsdlDirectory.exists() ) { - dir = "META-INF/wsdl/"; - u = loader.getResource( dir ); + File[] wsdls = wsdlDirectory.listFiles( new WSDLFile() ); + for ( File wsdl : wsdls ) + { + files.add( wsdl.toURI().toURL() ); + } } - if ( !( u == null || !"jar".equalsIgnoreCase( u.getProtocol() ) ) ) + else { - String path = u.getPath(); - JarFile jarFile = null; - try + URI rel = project.getBasedir().toURI().relativize( wsdlDirectory.toURI() ); + String dir = rel.getPath(); + URL u = loader.getResource( dir ); + if ( u == null ) { - Pattern p = Pattern.compile( dir.replace( File.separatorChar, '/' ) + PATTERN, - Pattern.CASE_INSENSITIVE ); - jarFile = new JarFile( path.substring( 5, path.indexOf( "!/" ) ) ); - Enumeration jes = jarFile.entries(); - while ( jes.hasMoreElements() ) - { - JarEntry je = jes.nextElement(); - Matcher m = p.matcher( je.getName() ); - if ( m.matches() ) - { - String s = "jar:" + path.substring( 0, path.indexOf( "!/" ) + 2 ) + je.getName(); - files.add( new URL( s ) ); - } - } + dir = "WEB-INF/wsdl/"; + u = loader.getResource( dir ); } - catch ( IOException ex ) + if ( u == null ) { - getLog().error( ex ); + dir = "META-INF/wsdl/"; + u = loader.getResource( dir ); } - finally + if ( !( u == null || !"jar".equalsIgnoreCase( u.getProtocol() ) ) ) { - closeQuietly( jarFile ); + String path = u.getPath(); + JarFile jarFile = null; + try + { + Pattern p = Pattern.compile( dir.replace( File.separatorChar, '/' ) + PATTERN, + Pattern.CASE_INSENSITIVE ); + jarFile = new JarFile( path.substring( 5, path.indexOf( "!/" ) ) ); + Enumeration jes = jarFile.entries(); + while ( jes.hasMoreElements() ) + { + JarEntry je = jes.nextElement(); + Matcher m = p.matcher( je.getName() ); + if ( m.matches() ) + { + String s = "jar:" + path.substring( 0, path.indexOf( "!/" ) + 2 ) + je.getName(); + files.add( new URL( s ) ); + } + } + } + catch ( IOException ex ) + { + getLog().error( ex ); + } + finally + { + closeQuietly( jarFile ); + } } } } } - if ( !urlCpath.isEmpty() ) + catch ( MojoExecutionException e ) { - // if we created a classloader, cleanup - closeQuietly( loader ); + throw e; } + catch ( Exception e ) + { + throw new MojoExecutionException( "Error while retrieving list of WSDL files to process", e ); + } + finally + { + if ( loader != null ) + { + // if we created a classloader, cleanup + closeQuietly( loader ); + } + } + return files.toArray( new URL[0] ); } diff --git a/src/test/it/issue-12/pom.xml b/src/test/it/issue-12/pom.xml index 773e747..b922ae4 100644 --- a/src/test/it/issue-12/pom.xml +++ b/src/test/it/issue-12/pom.xml @@ -38,6 +38,7 @@ junit junit 4.12 + test diff --git a/src/test/it/issue-15/invoker.properties b/src/test/it/issue-15/invoker.properties new file mode 100644 index 0000000..aa43562 --- /dev/null +++ b/src/test/it/issue-15/invoker.properties @@ -0,0 +1,19 @@ +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. +# +# Copyright (c) 2017 MojoHaus +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +invoker.goals=clean generate-test-sources diff --git a/src/test/it/issue-15/pom.xml b/src/test/it/issue-15/pom.xml new file mode 100644 index 0000000..736aef9 --- /dev/null +++ b/src/test/it/issue-15/pom.xml @@ -0,0 +1,95 @@ + + + + + 4.0.0 + + + org.jvnet.jax-ws-commons.test + parent + @project.version@ + + + mojo.it.issue-15 + + Test project for Github issue #15 + + + + org.jvnet.jax-ws-commons.tests + wsdl-lib1 + 1.0-SNAPSHOT + + + org.jvnet.jax-ws-commons.tests + wsdl-lib2 + 1.0-SNAPSHOT + test + + + + + + + @project.groupId@ + jaxws-maven-plugin + + true + + + + id1 + + wsimport + + + ${project.basedir}/src/main/wsdls + ws1 + + + + id2 + + wsimport + + + ws2 + + + + id3 + + wsimport-test + + + + ProcessOrder.wsdl + META-INF/wsdl/echo.wsdl + + ws3 + + + + + + + diff --git a/src/test/it/issue-15/src/main/wsdls/HelloWs.wsdl b/src/test/it/issue-15/src/main/wsdls/HelloWs.wsdl new file mode 100644 index 0000000..d3678f9 --- /dev/null +++ b/src/test/it/issue-15/src/main/wsdls/HelloWs.wsdl @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/it/issue-15/src/main/wsdls/HelloWs_schema1.xsd b/src/test/it/issue-15/src/main/wsdls/HelloWs_schema1.xsd new file mode 100644 index 0000000..25f9795 --- /dev/null +++ b/src/test/it/issue-15/src/main/wsdls/HelloWs_schema1.xsd @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/it/issue-15/verify.groovy b/src/test/it/issue-15/verify.groovy new file mode 100644 index 0000000..782e939 --- /dev/null +++ b/src/test/it/issue-15/verify.groovy @@ -0,0 +1,38 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2017 MojoHaus + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Verify that correct set of files have been generated + +// execution id1 +// Hello.wsdl should have been used +def source = new File( basedir, 'target/generated-sources/wsimport/ws1/HelloWS.java' ) +assert source.exists() + +// execution id2 +// po2.wsdl should have been used, not echo.wsdl +source = new File( basedir, 'target/generated-sources/wsimport/ws2/ProcessOrder.java' ) +assert source.exists() +source = new File( basedir, 'target/generated-sources/wsimport/ws2/EchoService.java' ) +assert !source.exists() + +// execution id3 +// ProcessOrder and echo.wsdl should have been used +source = new File( basedir, 'target/generated-sources/test-wsimport/ws3/ProcessOrder.java' ) +assert source.exists() +source = new File( basedir, 'target/generated-sources/test-wsimport/ws3/EchoService.java' ) +assert source.exists() diff --git a/src/test/it/jaxwscommons-4/invoker.properties b/src/test/it/jaxwscommons-4/invoker.properties new file mode 100644 index 0000000..e0a1776 --- /dev/null +++ b/src/test/it/jaxwscommons-4/invoker.properties @@ -0,0 +1,19 @@ +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. +# +# Copyright (c) 2017 MojoHaus +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +invoker.goals=clean generate-sources diff --git a/src/test/it/jaxwscommons-4/pom.xml b/src/test/it/jaxwscommons-4/pom.xml index f0aa70c..f0b5dfc 100644 --- a/src/test/it/jaxwscommons-4/pom.xml +++ b/src/test/it/jaxwscommons-4/pom.xml @@ -37,10 +37,11 @@ org.jvnet.jax-ws-commons.tests - wsdl-lib + wsdl-lib1 1.0-SNAPSHOT + @@ -59,7 +60,7 @@ ProcessOrder.wsdl - sample + ws1 @@ -67,6 +68,9 @@ wsimport + + ws2 + id3 @@ -75,6 +79,7 @@ custom + ws3 diff --git a/src/test/it/jaxwscommons-4/verify.groovy b/src/test/it/jaxwscommons-4/verify.groovy new file mode 100644 index 0000000..924b952 --- /dev/null +++ b/src/test/it/jaxwscommons-4/verify.groovy @@ -0,0 +1,55 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2017 MojoHaus + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Verify that correct set of files have been generated + +// execution id1 +def source = new File( basedir, 'target/generated-sources/wsimport/ws1/ProcessOrder.java' ) +assert source.exists() +source = new File( basedir, 'target/generated-sources/wsimport/ws1/ProcessOrder_Service.java' ) +assert source.exists() +source = new File( basedir, 'target/generated-sources/wsimport/ws1/ProcessOrderInDir.java' ) +assert !source.exists() +source = new File( basedir, 'target/generated-sources/wsimport/ws1/CustomOrder.java' ) +assert !source.exists() +source = new File( basedir, 'target/generated-sources/wsimport/ws1/CustomOrder_Service.java' ) +assert !source.exists() + +// execution id2 +source = new File( basedir, 'target/generated-sources/wsimport/ws2/ProcessOrder.java' ) +assert source.exists() +source = new File( basedir, 'target/generated-sources/wsimport/ws2/ProcessOrderInDir.java' ) +assert source.exists() +source = new File( basedir, 'target/generated-sources/wsimport/ws2/ProcessOrder_Service.java' ) +assert !source.exists() +source = new File( basedir, 'target/generated-sources/wsimport/ws2/CustomOrder.java' ) +assert !source.exists() +source = new File( basedir, 'target/generated-sources/wsimport/ws2/CustomOrder_Service.java' ) +assert !source.exists() + +// execution id3 +source = new File( basedir, 'target/generated-sources/wsimport/ws3/CustomOrder.java' ) +assert source.exists() +source = new File( basedir, 'target/generated-sources/wsimport/ws3/CustomOrder_Service.java' ) +assert source.exists() +source = new File( basedir, 'target/generated-sources/wsimport/ws3/ProcessOrder.java' ) +assert !source.exists() +source = new File( basedir, 'target/generated-sources/wsimport/ws3/ProcessOrderInDir.java' ) +assert !source.exists() +source = new File( basedir, 'target/generated-sources/wsimport/ws3/ProcessOrder_Service.java' ) +assert !source.exists() diff --git a/src/test/it/wsdl-lib/pom.xml b/src/test/it/wsdl-lib/pom.xml index 8f3f026..6a21695 100644 --- a/src/test/it/wsdl-lib/pom.xml +++ b/src/test/it/wsdl-lib/pom.xml @@ -1,13 +1,13 @@ - + + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 org.jvnet.jax-ws-commons.tests wsdl-lib 1.0-SNAPSHOT - jar - - wsdl-lib - http://maven.apache.org - - - UTF-8 - + pom + + wsdl-lib1 + wsdl-lib2 + diff --git a/src/test/it/wsdl-lib/wsdl-lib1/pom.xml b/src/test/it/wsdl-lib/wsdl-lib1/pom.xml new file mode 100644 index 0000000..7bb09c6 --- /dev/null +++ b/src/test/it/wsdl-lib/wsdl-lib1/pom.xml @@ -0,0 +1,34 @@ + + + + + 4.0.0 + + org.jvnet.jax-ws-commons.tests + wsdl-lib1 + 1.0-SNAPSHOT + + + UTF-8 + + + diff --git a/src/test/it/wsdl-lib/src/main/resources/META-INF/wsdl/po2.wsdl b/src/test/it/wsdl-lib/wsdl-lib1/src/main/resources/META-INF/wsdl/po2.wsdl similarity index 96% rename from src/test/it/wsdl-lib/src/main/resources/META-INF/wsdl/po2.wsdl rename to src/test/it/wsdl-lib/wsdl-lib1/src/main/resources/META-INF/wsdl/po2.wsdl index da152a8..5658644 100644 --- a/src/test/it/wsdl-lib/src/main/resources/META-INF/wsdl/po2.wsdl +++ b/src/test/it/wsdl-lib/wsdl-lib1/src/main/resources/META-INF/wsdl/po2.wsdl @@ -24,7 +24,6 @@ - diff --git a/src/test/it/wsdl-lib/src/main/resources/ProcessOrder.wsdl b/src/test/it/wsdl-lib/wsdl-lib1/src/main/resources/ProcessOrder.wsdl similarity index 96% rename from src/test/it/wsdl-lib/src/main/resources/ProcessOrder.wsdl rename to src/test/it/wsdl-lib/wsdl-lib1/src/main/resources/ProcessOrder.wsdl index 65b28f8..ad84887 100644 --- a/src/test/it/wsdl-lib/src/main/resources/ProcessOrder.wsdl +++ b/src/test/it/wsdl-lib/wsdl-lib1/src/main/resources/ProcessOrder.wsdl @@ -24,7 +24,6 @@ - diff --git a/src/test/it/wsdl-lib/src/main/resources/ProcessOrder.xsd b/src/test/it/wsdl-lib/wsdl-lib1/src/main/resources/ProcessOrder.xsd similarity index 100% rename from src/test/it/wsdl-lib/src/main/resources/ProcessOrder.xsd rename to src/test/it/wsdl-lib/wsdl-lib1/src/main/resources/ProcessOrder.xsd diff --git a/src/test/it/wsdl-lib/src/main/resources/custom/custom.wsdl b/src/test/it/wsdl-lib/wsdl-lib1/src/main/resources/custom/custom.wsdl similarity index 96% rename from src/test/it/wsdl-lib/src/main/resources/custom/custom.wsdl rename to src/test/it/wsdl-lib/wsdl-lib1/src/main/resources/custom/custom.wsdl index f72b305..1813753 100644 --- a/src/test/it/wsdl-lib/src/main/resources/custom/custom.wsdl +++ b/src/test/it/wsdl-lib/wsdl-lib1/src/main/resources/custom/custom.wsdl @@ -24,7 +24,6 @@ - diff --git a/src/test/it/wsdl-lib/wsdl-lib2/pom.xml b/src/test/it/wsdl-lib/wsdl-lib2/pom.xml new file mode 100644 index 0000000..7f85fe8 --- /dev/null +++ b/src/test/it/wsdl-lib/wsdl-lib2/pom.xml @@ -0,0 +1,34 @@ + + + + + 4.0.0 + + org.jvnet.jax-ws-commons.tests + wsdl-lib2 + 1.0-SNAPSHOT + + + UTF-8 + + + diff --git a/src/test/it/wsdl-lib/wsdl-lib2/src/main/resources/META-INF/wsdl/echo.wsdl b/src/test/it/wsdl-lib/wsdl-lib2/src/main/resources/META-INF/wsdl/echo.wsdl new file mode 100644 index 0000000..489be0a --- /dev/null +++ b/src/test/it/wsdl-lib/wsdl-lib2/src/main/resources/META-INF/wsdl/echo.wsdl @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/java/org/codehaus/mojo/jaxws/WsImportMojoITCase.java b/src/test/java/org/codehaus/mojo/jaxws/WsImportMojoITCase.java index 16bf51f..3f3c99e 100644 --- a/src/test/java/org/codehaus/mojo/jaxws/WsImportMojoITCase.java +++ b/src/test/java/org/codehaus/mojo/jaxws/WsImportMojoITCase.java @@ -136,16 +136,6 @@ public void wsimport22() "Generated source version: 2.2" ); } - @Test - public void jaxwscommons4() - throws IOException - { - project = new File( PROJECTS_DIR, "jaxwscommons-4" ); - - assertFilePresent( project, "target/generated-sources/wsimport/sample/ProcessOrder_Service.java" ); - assertFilePresent( project, "target/generated-sources/wsimport/tests/CustomOrder_Service.java" ); - } - @Test public void jaxwscommons49() throws IOException