You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Ove Gram Nipen (JIRA)" <ji...@codehaus.org> on 2010/08/18 10:07:32 UTC

[jira] Created: (MNG-4770) WSDL dependencies should not be transitive

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


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

        

[jira] Commented: (MNG-4770) WSDL dependencies should not be transitive

Posted by "Ove Gram Nipen (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=232321#action_232321 ] 

Ove Gram Nipen commented on MNG-4770:
-------------------------------------

I believe that wsdl dependencies should be listed as a true dependency in maven, because of the documentation value it provides. You should be able to do {{mvn dependency:list}} and see that this project does indeed depend upon a web service. 

I understand your rationale for saying that maven should not know that wsdls are inherently different from jar dependencies, but there is no way of telling maven that right now. There is a dependency exclusion mechanism now, but it's not practical when you want to exclude *all* transitive dependencies, since you have to specify each and every artifact you want to exclude. 

It is probably very hard to change the way Maven WAR Plugin handles optional dependencies, since it has behaved that way for some time, and people depend on this behavior. One example is the skinny wars pattern. 

I know that there is a way of telling (the next version of) CXF Codegen Plugin to fetch wsdls from the repository, but this breaks my number one priority, which is that it should be possible to see that a project depends on a web service by doing {{mvn dependency:list}}. 

I propose to introduce a new parameter to the <dependency> block that excludes transitive dependencies altogether. For instance: 

{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>

			<exclusions>*</exclusions>

			or perhaps:

			<transitive>false</transitive>

			or even:

			<excludeTransitiveDependencies>true</excludeTransitiveDependencies>

		</dependency>

	...
</project>
{code}

If this solution were to be implemented, maven itself does not have to know anything about wsdls (or other technologies with similar behavior which may turn up).

Please reopen, so we can discuss an appropriate solution.

> 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

        

[jira] Commented: (MNG-4770) WSDL dependencies should not be transitive

Posted by "Ove Gram Nipen (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=232324#action_232324 ] 

Ove Gram Nipen commented on MNG-4770:
-------------------------------------

Thanks, I'll look into that.

> 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

        

[jira] Closed: (MNG-4770) WSDL dependencies should not be transitive

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ 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

        

[jira] Commented: (MNG-4770) WSDL dependencies should not be transitive

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=232322#action_232322 ] 

Benjamin Bentmann commented on MNG-4770:
----------------------------------------

bq. [...] but there is no way of telling maven that right now.
This is not true, as I already mentioned, the way of telling this kind of information is called artifact handler, which can get added to projects by build extensions. So eventually, the plugins you use to create WSDL artifacts should also provide the artifact handler to deal with them as desired. So please check back with the CXF guys or search for artifact handler to learn about those yourself.

> 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