Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I tell my eclipse-owned Tomcat about my maven repository?
    primarykey
    data
    text
    <p>I have a Tomcat server running in Eclipse. Normally, I have my web-inf directory with my .jar files in it in my project. When I add that project to my Tomcat, it picks up my dependencies and all is well.</p> <p>On this most recent project, I've decided to use Maven to manage my dependencies. My project compiles fine in Eclipse, in the sense that it knows where my dependencies are, has their java doc and everything. But when I send it to eclipse, it explodes because it cannot find these dependencies. How can I tell my Tomcat that these dependencies are Maven managed?</p> <p>I'm sure if I built my project as a .war file, I wouldn't have this problem. But typically we use four staged environments: local machine, dev, qa, and prod. Sending to dev to test might be okay for a little while, but long term we need to be able to test on the developer's local machine.</p> <p>All my Google-fu seems to point me to how to include tomcat as a dependency, thanks to the overlapping of the necessary search terms.</p> <p>My pom.xml:</p> <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt; &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; &lt;groupId&gt;myapp&lt;/groupId&gt; &lt;artifactId&gt;myapp&lt;/artifactId&gt; &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt; &lt;dependencies&gt; &lt;!-- hibernate --&gt; &lt;dependency&gt; &lt;groupId&gt;org.hibernate&lt;/groupId&gt; &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt; &lt;version&gt;4.2.6.Final&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;log4j&lt;/groupId&gt; &lt;artifactId&gt;log4j&lt;/artifactId&gt; &lt;version&gt;1.2.17&lt;/version&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;build&gt; &lt;sourceDirectory&gt;src&lt;/sourceDirectory&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt; &lt;version&gt;3.0&lt;/version&gt; &lt;configuration&gt; &lt;source&gt;1.7&lt;/source&gt; &lt;target&gt;1.7&lt;/target&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;/project&gt; </code></pre>
    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.
 

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