How to reference a web project from another web project with ivy and Resolve in workspace

StackOverflow https://stackoverflow.com/questions/16962659

문제

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 ?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top