maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Bentmann (JIRA)" <j...@codehaus.org>
Subject [jira] Closed: (MNG-4770) WSDL dependencies should not be transitive
Date Wed, 18 Aug 2010 09:13:33 GMT

     [ http://jira.codehaus.org/browse/MNG-4770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Benjamin Bentmann closed MNG-4770.
----------------------------------

    Resolution: Not A Bug
      Assignee: Benjamin Bentmann

Maven itself cannot know that dependencies of type wsdl are inherently different from ordinary
JAR dependencies unless being told. If special handling is required, the consumer project
must use the appropriate build extension (e.g. in form of the cxf-codegen-plugin) that contributes
the necessary artifact handler to disable transitive dependency resolution for WSDLs.

So I suggest to check back with the CXF guys or fill an issue in the Maven WAR Plugin about
its handling of optional dependencies.

> WSDL dependencies should not be transitive
> ------------------------------------------
>
>                 Key: MNG-4770
>                 URL: http://jira.codehaus.org/browse/MNG-4770
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 2.2.x (to be reviewed)
>            Reporter: Ove Gram Nipen
>            Assignee: Benjamin Bentmann
>
> Some web service frameworks, such as CXF, lets you deploy wsdl artifacts in the maven
repository. When another project (the client) depends on a wsdl artifact, the client should
not receive the dependencies of the web service project transitively, since the web service
is isolated. 
> It is not possible to work around the problem by declaring the dependencies of the web
service project as optional, since this leads to missing jar files in the web service's {{WEB-INF/lib}}.

> More specifically: 
> Say you have a service called {{HelloService}}, defined in its own pom: 
> {code}
> <project>
> 	<groupId>com.example</groupId>
> 	<artifactId>HelloService</artifactId>
> 	<version>1.0</version>
> 	<packaging>war</packaging>
> 	<dependencies>
> 		<dependency>
> 			<dependency>
> 			<groupId>org.springframework</groupId>
> 			<artifactId>spring-core</artifactId>
> 			<version>2.5.6</version>
> 		</dependency>
> 	...
> </project>
> {code}
> {{HelloService}} uses the {{cxf-java2ws-plugin}}, which generates a wsdl file and installs
it in the maven repository during {{mvn install}}. 
> You then have a client project called {{HelloConsumer}}, defined in its own pom: 
> {code}
> <project>
> 	<groupId>org.something</groupId>
> 	<artifactId>HelloConsumer</artifactId>
> 	<packaging>war</packaging>
> 	<dependencies>
> 		<dependency>
> 			<groupId>com.example</groupId>
> 			<artifactId>HelloService</artifactId>
> 			<version>1.0</version>
> 			<type>wsdl</type>
> 		</dependency>
> 	...
> </project>
> {code}
> {{HelloConsumer}} would then use the {{maven-dependency-plugin}} together with the {{cxf-codegen-plugin}}
to copy the wsdl locally and generate the necessary web service stubs. 
> If you then do {{mvn dependency:tree}} on {{HelloConsumer}}, you would expect to see
only {{HelloService}}, not spring, because {{HelloService}} and {{HelloConsumer}} are isolated
from each other by the web service transport layer, most often http. *However, maven currently
includes spring transitively*, which is wrong.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message