1

I have 2 web project: myLibraryProject and myWebProject

myWebProject depends on myLibraryProject, and each use ivy for dependency management:

myLibraryProject ivy.xml:

<ivy-module>
    <info organisation="it.me" module="my-library" />
    <!-- ... configurations and dependencies ... -->
</ivy-module>

myWebProject ivy.xml:

<ivy-module>
    <info organisation="it.me" module="my-web" />
    <!-- ... configurations... -->
    <dependencies>
         <dependency org="it.me" name="my-library" rev="latest.integration" />
    </dependencies>
</ivy-module>

I'm also using Resolve in workspace (within eclipse and ivyDe plugin).

it's able to resolve the dependency, but it put my-library.war in my-web.war/WEB-INF/lib/

This way myWebProject can't use the library becouse it expect a jar, and not a war.

How can i tell... eclipse? ivy?... to not create war but a jar ?

lelmarir
  • 593
  • 2
  • 7
  • 24
  • It's hard to understand what your problem is but I suspect it has something to do with how you're calling the ivy "retrieve" task in the myWebProject build.xml file. Secondly are you publishing a jar from the myLibraryProject build.xml? I don't see an "publications" section in the ivy file. – Mark O'Connor Jun 06 '13 at 23:38
  • i don't use ant (not now at least). I have the two projects in the eclipse workspace and tell ivy to "resolve in workspace". There is no publications, and if i tell , ivyDe (not ivy, the eclipse plugin) seem to ignore it. I have also tried removing the ivy dependency and add the project directly from eclipse changing the extension to jar in Deployment Assembly, but this way it simply deploy WEB-INF/lib/my-library.jar, but internally is still a war, and does not work. – lelmarir Jun 07 '13 at 08:14
  • Ivy is primarily an ANT plugin. Sounds like an issue specific to the Eclipse plugin. – Mark O'Connor Jun 07 '13 at 23:28

1 Answers1

1

I've found something, not a solution but at least an explanation, and a work-around.

The explanation

As the ant documentation says:

Note that WTP doesn't support IvyDE's workspace resolver. See the details in the page dedicated to WTP integration.

The work-around

I've created a normal java project and a symbolic link (can be done also on window) to the web-project source folder in the normal project. This way ivyDe can resolve in workspace the normal project and all modifications still "propagate" in the web-project.

Not the best way, but at least...hope it may help someone.

lelmarir
  • 593
  • 2
  • 7
  • 24