Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to copy dependencies to gae war/WEB-INF/lib
    text
    copied!<p>I'm coming from Ant perspective, so pardon me. I realise there are quite a few questions here already on how to maven dependencies, but none of them seem to tell how to do what need to do.</p> <p><strong>Question 1</strong>: Currently, in conjunction with using maven-war-plugin, when I run mvn war:war, it creates a war folder in target folder.</p> <p>However, I wish copy all the dependencies' jars to war/WEB-INF/lib set up by google eclipse plugin (with gae enabled, gwt disabled), without overwriting the jars that google eclipse plugin placed there.</p> <p>I don't wish to setup a war file or war directory. I just need to copy/consolidate all the non-gae jars with the gae jars so that when the project is run as a gae web app, Eclipse would not complain ClassNotFoundException. </p> <p><strong>Question 2</strong>: When using Ant in Eclipse, I could run Ant targets within Eclipse.</p> <p>Right now, I have to perform mvn commands from a shell window (which is mutually oblivious to the existence of an Eclipse session). It appears that the only thing that is automatically done is whenever I update dependencies.</p> <p>Is there a way, or any plugin for eclipse that would allow me to run mvn goals within Eclipse?</p> <p><strong>Additional info</strong>:</p> <p><code>mvn dependency:copy-dependencies</code> persists in copying to <code>target/dependency</code> directory, with the following:</p> <pre><code> &lt;plugin&gt; &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;copy-dependencies&lt;/id&gt; &lt;phase&gt;process-resources&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;copy-dependencies&lt;/goal&gt; &lt;/goals&gt; &lt;configuration&gt; &lt;outputDirectory&gt;${basedir}/war/WEB-INF/lib/&lt;/outputDirectory&gt; &lt;overWriteReleases&gt;false&lt;/overWriteReleases&gt; &lt;overWriteSnapshots&gt;false&lt;/overWriteSnapshots&gt; &lt;overWriteIfNewer&gt;true&lt;/overWriteIfNewer&gt; &lt;excludeArtifactIds&gt;gwt-user,gwt-dev&lt;/excludeArtifactIds&gt; &lt;/configuration&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; </code></pre> <p>I even tried changing to absolute path</p> <pre><code>&lt;outputDirectory&gt; /home/geek/eclipse/workspace/Demo-autoshoppe/holycow &lt;/outputDirectory&gt; </code></pre> <p>But holycow directory is still empty and mvn still persists in copying to <code>target/dependency</code> directory. My current solution is to softlink <code>target/dependency</code> as <code>war/WEB-INF/lib</code>, which is a very very bad kludge. Why is maven not sensitive to outputDirectory specification? I am using Ubuntu's maven 2.2.</p>
 

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