Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I believe we have a similar configuration to what you are trying to set up. Be sure you have "Resolve dependencies in workspace" checked in the Preferences > Ivy > Classpath pane.</p> <p>With the setup below, when adding WarProject to Tomcat, you should see a [+] link on the WarProject node and expanding it should show the JarProject node. When publishing, you should see <code>JarProject.jar</code> and any jars defined in it's <code>ivy.xml</code> added to <code>wtpwebapps/WarProject/WEB-INF/lib</code> in Tomcat's publish directory, which for me is in <code>.metadata/.plugins/org.eclipse.wst.server.core/tmp0</code> under my workspace directory.</p> <p>Jar project's .settings/org.eclipse.wst.common.project.facet.core.xml:</p> <pre><code>&lt;faceted-project&gt; &lt;fixed facet="jst.java" /&gt; &lt;fixed facet="jst.utility" /&gt; &lt;installed facet="jst.java" version="1.6" /&gt; &lt;installed facet="jst.utility" version="1.0" /&gt; &lt;/faceted-project&gt; </code></pre> <p>Jar project's .settings/org.eclipse.wst.common.component:</p> <pre><code>&lt;project-modules id="moduleCoreId" project-version="1.5.0"&gt; &lt;wb-module deploy-name="JarProject"&gt; &lt;wb-resource deploy-path="/" source-path="/src" /&gt; &lt;wb-resource deploy-path="/" source-path="/resources" /&gt; &lt;/wb-module&gt; &lt;/project-modules&gt; </code></pre> <p>Jar project's ivy.xml:</p> <pre><code>&lt;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"&gt; &lt;info module="JarProject" organisation="org.whatever" revision="${revision}" /&gt; &lt;configurations&gt; &lt;conf name="local" visibility="private" description="Artifacts necessary for local development and testing" /&gt; &lt;conf name="master" /&gt; &lt;conf name="sources" /&gt; &lt;/configurations&gt; &lt;publications&gt; &lt;artifact ext="pom" type="pom" /&gt; &lt;artifact ext="jar" type="jar" conf="master" /&gt; &lt;artifact ext="jar" type="source" conf="sources" m:classifier="sources" /&gt; &lt;/publications&gt; &lt;dependencies defaultconfmapping="*-&gt;master(default),runtime()"&gt; &lt;dependency org="org.jdom" name="jdom" rev="1.0" conf="master" /&gt; &lt;dependency org="junit" name="junit-dep" rev="4.9" conf="local" /&gt; &lt;/dependencies&gt; &lt;/ivy-module&gt; </code></pre> <p>War project's .settings/org.eclipse.wst.common.project.facet.core.xml:</p> <pre><code>&lt;faceted-project&gt; &lt;fixed facet="jst.java" /&gt; &lt;fixed facet="jst.web" /&gt; &lt;installed facet="jst.java" version="1.6" /&gt; &lt;installed facet="jst.web" version="2.5" /&gt; &lt;runtime name="Apache Tomcat v6.0" /&gt; </code></pre> <p></p> <p>War project's .settings/org.eclipse.wst.common.component:</p> <pre><code>&lt;project-modules id="moduleCoreId" project-version="1.5.0"&gt; &lt;wb-module deploy-name="WarProject"&gt; &lt;property name="context-root" value="WarProject" /&gt; &lt;wb-resource deploy-path="/" source-path="/WebContent" /&gt; &lt;wb-resource deploy-path="/WEB-INF/classes" source-path="/src" /&gt; &lt;wb-resource deploy-path="/WEB-INF/classes" source-path="/resources" /&gt; &lt;/wb-module&gt; &lt;/project-modules&gt; </code></pre> <p>War project's .classpath:</p> <pre><code>&lt;classpath&gt; &lt;classpathentry kind="output" path="bin" /&gt; &lt;classpathentry kind="src" path="src" /&gt; &lt;classpathentry kind="src" path="resources" /&gt; &lt;classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"&gt; &lt;attributes&gt; &lt;attribute name="owner.project.facets" value="jst.java" /&gt; &lt;/attributes&gt; &lt;/classpathentry&gt; &lt;classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v6.0"&gt; &lt;attributes&gt; &lt;attribute name="owner.project.facets" value="jst.web" /&gt; &lt;/attributes&gt; &lt;/classpathentry&gt; &lt;classpathentry kind="con" path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?ivyXmlPath=ivy.xml&amp;amp;confs=local&amp;amp;ivySettingsPath=%24%7Bworkspace_loc%3AWarProject%2Fivysettings.xml%7D&amp;amp;loadSettingsOnDemand=false&amp;amp;propertyFiles=" /&gt; &lt;classpathentry kind="con" path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?ivyXmlPath=ivy.xml&amp;amp;confs=master&amp;amp;ivySettingsPath=%24%7Bworkspace_loc%3AWarProject%2Fivysettings.xml%7D&amp;amp;loadSettingsOnDemand=false&amp;amp;propertyFiles="&gt; &lt;attributes&gt; &lt;attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib" /&gt; &lt;/attributes&gt; &lt;/classpathentry&gt; &lt;classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container" /&gt; &lt;/classpath&gt; </code></pre> <p>War project's ivy.xml:</p> <pre><code>&lt;ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd"&gt; &lt;info module="WarProject" organisation="org.whatever" revision="${revision}" /&gt; &lt;configurations&gt; &lt;conf name="local" visibility="private" description="Artifacts necessary for local development and testing" /&gt; &lt;conf name="master" /&gt; &lt;/configurations&gt; &lt;dependencies defaultconfmapping="*-&gt;master(default),runtime()"&gt; &lt;dependency org="org.whatever" name="JarProject" rev="latest.integration" changing="true" conf="master" /&gt; &lt;!-- and other dependencies of the war project --&gt; &lt;/dependencies&gt; &lt;/ivy-module&gt; </code></pre> <hr> <p>I also found it possible to omit the <code>org.eclipse.jst.component.dependency</code> attribute in the classpath entry for the Ivy classpath container and instead add it to the <code>org.eclipse.wst.common.component</code> file like this:</p> <pre><code>&lt;dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/con/org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?ivyXmlPath=ivy.xml&amp;amp;confs=master&amp;amp;ivySettingsPath=%24%7Bworkspace_loc%3AWarProject%2Fivysettings.xml%7D&amp;amp;loadSettingsOnDemand=false&amp;amp;propertyFiles="&gt; &lt;dependency-type&gt;consumes&lt;/dependency-type&gt; &lt;/dependent-module&gt; </code></pre> <p>But under this alternative, the deployed webapp was not updating very nicely if I changed the ivy.xml and ran resolve. Also, any changes to the URL parameters to Ivy needed to be kept in sync with the two files or there would be nothing contributed to the deployment assembly.</p> <p>No idea how to set all this up through the UI...</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload