-
1. Re: Maven dependency issue
alesj Jul 11, 2011 5:57 AM (in response to ales_d)<dependency>
...
<exclusions>
<exclude>
...
;-)
-
2. Re: Maven dependency issue
ales_d Jul 11, 2011 10:26 AM (in response to alesj)Yes - I do it this way now. But have you seen the list?
I was interested if there is some other solution that I might be missing. Can't belive that everyone who use maven for development against JBoss is building the exclude list manually like me.
I was also interested on "principle". IMHO it is wrong to have for example XercesImpl listed in API dependency?
I'll give it 2 or 3 days and if no good reasoning why it is this way is posted I'll try opening bug against the EJB3.
Thanks
-
3. Re: Maven dependency issue
alesj Jul 11, 2011 10:32 AM (in response to ales_d)Yes - I do it this way now. But have you seen the list?
I was interested if there is some other solution that I might be missing. Can't belive that everyone who use maven for development against JBoss is building the exclude list manually like me.
This is how Maven works, so I guess you should complain there. :-)
I was also interested on "principle". IMHO it is wrong to have for example XercesImpl listed in API dependency?
It depends what's the scope of this dependency -- probaby provided.
-
4. Re: Maven dependency issue
jaikiran Jul 11, 2011 1:02 PM (in response to ales_d)The entire org.jboss.ejb3:jboss-ejb3-ext-api should be marked as "provided" scope within the <dependency> of your project. It (like other JBoss jars) shouldn't be bundled within your application.
-
5. Re: Maven dependency issue
ales_d Jul 11, 2011 9:11 PM (in response to ales_d)I definitelly would not complain to "how maven works" - it works as expected. Setting scope of jboss-ejb3-ext-api to provided would not help as long as the scope of its dependencies is "compile". See the table at http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope
The problem IS jboss-ejb3-ext-api. Either it
1) should not reference it's parent which "drags" in the unneeded dependencies, or
2) the parent should used provided scope for its dependencies
Seems that the folks here are not strong in maven "theory" and go with defaults since they "just work". There are however differences and in this case they matter. :-)
Ales
-
6. Re: Maven dependency issue
wolfc Jul 12, 2011 6:14 AM (in response to ales_d)Jaikiran is right, you should set the dependency to 'provided'. As seen in the table any transitive dependency would then also be in 'provided'.
There is however a dependency on jboss-metadata in jboss-ejb3-ext-api, which is wrong.
This is fixed in version 2 of jboss-ejb3-ext-api.