Thomas, your provided conf does specify transitive="false", correct? It should.
Side note. Not that this is your problem and not that there's anything literally wrong about what you're doing, but I'd recommend using a combination of ivy:cachepath and ivy:cachefileset instead of ivy:retrieve. Then when you're actually ready to specify the libraries that go in your EAR, just reference the fileset you've created via ivy:cachefileset. Now you have a fileset you can examine by itself before you go and copy it where you ultimately need it. 2010/7/7 Thomas Göttlich <[email protected]> > Hi, I have a question on the ivy:retrieve task: > > We are building an enterprise application which consists of multiple > modules. > Each module has several dependencies, among which are some which only are > required for compilation. > > The EAR has dependencies on our modules in order to put them into the lib > dir. > > We now have several Ivy configurations: > > dep-for-ear -> dependency for the ear, i.e. artifacts of type "ejb" are put > into the top level and artifacts of type "jar" are put into the "lib" > directory. > provided -> dependency which is needed at compile time only and is provided > by the application server (JBoss in our case) > > > I now want to retrieve all direct and transitive dependencies which need to > be put into the ear/lib directory: > > <ivy:retrieve sync="true" conf="dep-for-ear" type="jar" > pattern="${ear.dir}/lib/[ > artifact]-[revision].[ext]" /> > > However, I also get the "provided" transitive dependencies. > The output indicates they are resolved as "dep-for-ear". > > Example: > > In our EAR-project's ivy.xml, we have this dependency definition: > > <dependencies defaultconfmapping="*->*,!sources,!javadoc"> > ... > <dependency org="my.org" name="my-ejb-project" rev="latest.integration" > conf="dep-for-ear" /> > ... > </dependencies> > > > In the ivy.xml of the my-ejb-project module, some JBoss artifacts are > declared as "provided", others are declared as "dep-for-ear": > > <dependencies defaultconfmapping="*->*,!sources,!javadoc"> > ... > <dependency org="my.org" name="my-api-project" rev="latest.integration" > conf="dep-for-ear"/> > ... > <dependency org="jboss" name="jboss-annotations-ejb3" > rev="4.2.3.GA<http://4.2.3.ga/>" > conf="provided"/> > <dependency org="jboss" name="jboss-ejb3x" rev="4.2.3.GA< > http://4.2.3.ga/>" > conf="provided"/> > <dependency org="jboss" name="jboss-ejb3" rev="4.2.3.GA<http://4.2.3.ga/ > >" > conf="provided"/> > <dependency org="jboss" name="jboss-j2ee" rev="4.2.3.GA<http://4.2.3.ga/ > >" > conf="provided"/> > ... > </dependencies> > > > When retrieving the "dep-for-ear" dependencies, I'd expect that > only*my-api-project > * would be copied to the ear/lib dir, since *my-ejb-project* is of type > ejb. > > However, I also get the JBoss libs. > > > Any idea of what is missing or wrong? > > Thanks in advance for your help. >
