credo che abbiamo una configurazione simile a quello che si è tryin g per configurare. Assicurati di avere "Risolvi dipendenze nello spazio di lavoro" selezionato nel pannello Preferenze> Edera> Percorso classi.
Con la configurazione seguente, quando si aggiunge WarProject a Tomcat, si dovrebbe vedere un [+] collegamento sul nodo WarProject e l'espansione dovrebbe mostrare il nodo JarProject. Quando pubblichi, dovresti vedere JarProject.jar
e qualsiasi jars definito in esso è ivy.xml
aggiunto a wtpwebapps/WarProject/WEB-INF/lib
nella directory di pubblicazione di Tomcat, che per me è in .metadata/.plugins/org.eclipse.wst.server.core/tmp0
nella directory del mio spazio di lavoro.
del progetto Jar .settings/org.eclipse.wst.common.project.facet.core.xml:
<faceted-project>
<fixed facet="jst.java" />
<fixed facet="jst.utility" />
<installed facet="jst.java" version="1.6" />
<installed facet="jst.utility" version="1.0" />
</faceted-project>
del progetto Jar .settings/org.eclipse.wst.common.component:
ivy.xml
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="JarProject">
<wb-resource deploy-path="/" source-path="/src" />
<wb-resource deploy-path="/" source-path="/resources" />
</wb-module>
</project-modules>
del progetto Jar:
<ivy-module
version="2.0"
xmlns:m="http://ant.apache.org/ivy/maven"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
<info module="JarProject" organisation="org.whatever" revision="${revision}" />
<configurations>
<conf name="local" visibility="private"
description="Artifacts necessary for local development and testing" />
<conf name="master" />
<conf name="sources" />
</configurations>
<publications>
<artifact ext="pom" type="pom" />
<artifact ext="jar" type="jar" conf="master" />
<artifact ext="jar" type="source" conf="sources" m:classifier="sources" />
</publications>
<dependencies defaultconfmapping="*->master(default),runtime()">
<dependency org="org.jdom" name="jdom" rev="1.0" conf="master" />
<dependency org="junit" name="junit-dep" rev="4.9" conf="local" />
</dependencies>
</ivy-module>
del progetto guerra .settings/org.eclipse.wst.common.project.facet.core.xml:
<faceted-project>
<fixed facet="jst.java" />
<fixed facet="jst.web" />
<installed facet="jst.java" version="1.6" />
<installed facet="jst.web" version="2.5" />
<runtime name="Apache Tomcat v6.0" />
del progetto Guerra .settings/org.eclipse.wst.common.component:
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="WarProject">
<property name="context-root" value="WarProject" />
<wb-resource deploy-path="/" source-path="/WebContent" />
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src" />
<wb-resource deploy-path="/WEB-INF/classes" source-path="/resources" />
</wb-module>
</project-modules>
.classpath
del progetto Guerra:
<classpath>
<classpathentry kind="output" path="bin" />
<classpathentry kind="src" path="src" />
<classpathentry kind="src" path="resources" />
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<attributes>
<attribute name="owner.project.facets" value="jst.java" />
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v6.0">
<attributes>
<attribute name="owner.project.facets" value="jst.web" />
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?ivyXmlPath=ivy.xml&confs=local&ivySettingsPath=%24%7Bworkspace_loc%3AWarProject%2Fivysettings.xml%7D&loadSettingsOnDemand=false&propertyFiles=" />
<classpathentry kind="con" path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?ivyXmlPath=ivy.xml&confs=master&ivySettingsPath=%24%7Bworkspace_loc%3AWarProject%2Fivysettings.xml%7D&loadSettingsOnDemand=false&propertyFiles=">
<attributes>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib" />
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container" />
</classpath>
edera
del progetto Guerra .xml:
<ivy-module
version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
<info module="WarProject" organisation="org.whatever" revision="${revision}" />
<configurations>
<conf name="local" visibility="private"
description="Artifacts necessary for local development and testing" />
<conf name="master" />
</configurations>
<dependencies defaultconfmapping="*->master(default),runtime()">
<dependency org="org.whatever" name="JarProject" rev="latest.integration" changing="true" conf="master" />
<!-- and other dependencies of the war project -->
</dependencies>
</ivy-module>
Ho anche trovato la possibilità di omettere l'attributo org.eclipse.jst.component.dependency
nella voce classpath per il contenitore classpath Ivy e invece inserirlo nel file org.eclipse.wst.common.component
in questo modo:
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/con/org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?ivyXmlPath=ivy.xml&confs=master&ivySettingsPath=%24%7Bworkspace_loc%3AWarProject%2Fivysettings.xml%7D&loadSettingsOnDemand=false&propertyFiles=">
<dependency-type>consumes</dependency-type>
</dependent-module>
Ma sotto questa alternativa, il la webapp distribuita non si aggiornava molto bene se avessi cambiato ivy.xml e avessi risolto. Inoltre, le eventuali modifiche ai parametri URL di Ivy dovevano essere mantenute sincronizzate con i due file o non ci sarebbe stato alcun contributo all'assembly di distribuzione.
Non ho idea di come impostare tutto tramite l'interfaccia utente ...
Grazie per il tempo di aiutare. Non è proprio quello che sto cercando, non ho davvero bisogno che IvyDE faccia una soluzione per me, far riferimento a loro nella cache locale va bene e la distribuzione WTP li distribuirà dalla Libreria che è stata creata da IvyDE. Il problema è che le librerie a cui fa riferimento il progetto "modules" verranno implementate nel jar che WTP crea per il progetto "modules" anziché per WEB-INF/lib della war per il progetto "web". Sto cercando di trovare una soluzione che non mi richieda di unire il progetto 'modulo' nel progetto 'web' solo per far funzionare il WTP. – Victor