[GRADLE-3140] Gradle doesn't correctly resolve POM dependency declarations with type ejb-client Created: 25/Jul/14 Updated: 25/Jul/14 Resolved: 25/Jul/14 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | 2.0 |
Fix Version/s: | 2.1-rc-1 |
Type: | Bug | ||
Reporter: | Gradle Forums | Assignee: | Benjamin Muschko |
Resolution: | Fixed | Votes: | 0 |
Description |
We are in the process of migrating an application from Maven to Gradle. Our project depends on other libraries from within our company, which specify their dependency as type "ejb-client" from Maven. When attempting to resolve the dependency, it seems to resolves it as "<groupId>.<artifactId> I notice that there is not really any documentation on EJBs with Gradle. Is there something on the roadmap to do something more with them, like being able to create client jars and publish them to a Maven repository? |
Comments |
Comment by Gradle Forums [ 25/Jul/14 ] |
I assume you are trying to resolve a dependency with a classifier? For more information see the section [1]"50.4.1.3. Classifiers" in the Gradle user guide. |
Comment by Gradle Forums [ 25/Jul/14 ] |
Benjamin, Thanks for the reply, but no. I think I need to clarify. I have a dependency that has a transitive dependency that is of type ["ejb-client"] ([1]http://maven.apache.org/plugins/maven...). This is our first Gradle project at our company, so everything we are referencing outside of our project is Maven and uses things like ejb-clients. Chris |
Comment by Gradle Forums [ 25/Jul/14 ] |
I don't know about Benjamin, but I'm wondering what exactly you mean by "type". I made the same assumption Benjamin made, that you were talking about classifiers. How about you show us some script and structure? We can't see enough to help you. |
Comment by Gradle Forums [ 25/Jul/14 ] |
So, within Maven, a dependency can have a type, which corresponds to the artifact's packaging type ([Maven doc] ([1]http://maven.apache.org/pom.html#Depe...)). The default for that type is a jar, but you can have things like ejb, war, or ear. With EJBs, there is a special dependency type, ejb-client ([Maven doc] ([2]http://maven.apache.org/plugins/maven...)). An ejb-client artifact should really have the EJB interface and other classes needed by that interface. And, you're right, based on the way I described it, in the Maven repository it looks just like a classifier. However, in the Maven POM, an ejb-client dependency would look like: <dependency> So, like I said, I'm referencing an existing Maven project from our repository (meaning I can't really change the project POM) that has a transitive dependency on an ejb-client, like above, and Gradle is not liking it. Using the above example, I'm getting an error like:
It seems that Gradle is taking the Maven dependency type and trying to use it as the suffix for the artifact. |
Comment by Gradle Forums [ 25/Jul/14 ] |
Thanks for clarifying. I had a quick look at the parsing code and it looks like the type `ejb-client` is not handled correctly. I opened an issue. |