Note that there are some explanatory texts on larger screens.

plurals
  1. POEclipse test-run looking for classes in different directory than build is placing them
    primarykey
    data
    text
    <p>I recently make the switch from <a href="https://code.google.com/p/objectify-appengine/wiki/IntroductionToObjectify" rel="nofollow">Objectify 3.1</a> to <a href="https://code.google.com/p/objectify-appengine/wiki/Introduction" rel="nofollow">Objectify 4.0</a> which involved a switch to Maven. The build puts the output .class files under war/WEB_INF/classes and the app runs just fine both locally and on App-Engine.</p> <p>My problem is that when I run my <em>test</em> target, it can't find any of my test classes because it is trying to load them from the target/classes directory. If I switch the default output directory temporarily to that, the tests run fine but then of course the real target won't run (class definitions not found at run-time under war/WEB-INF/classes).</p> <p>I tried to delete the target/classes directory and maybe link it to the new location but Eclipse immediately recreates it as soon as I remove it.</p> <p><em>Am I doing something wrong? How to I make the test target read classes from the designated output directory?</em></p> <p><strong>Update 2013-12-21:</strong> If I look at the "Source" information for both the App-Engine run-config and the associated tests run-config, both have (under the project name) a "target" entry with sub-entries of "classes" and "test-classes". It <em>also</em> has a "war/WEB-INF" entry with sub-entries of "classes" and "lib". Unfortunately, I can't seem to delete the former set and I have no idea what is causing it to be there.</p> <p><strong>Update 2013-12-30:</strong> Here is my <code>pom.xml</code> file...</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;DeityAE&lt;/groupId&gt; &lt;artifactId&gt;DeityAE&lt;/artifactId&gt; &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt; &lt;packaging&gt;war&lt;/packaging&gt; &lt;properties&gt; &lt;/properties&gt; &lt;build&gt; &lt;sourceDirectory&gt;src&lt;/sourceDirectory&gt; &lt;resources&gt; &lt;resource&gt; &lt;directory&gt;src&lt;/directory&gt; &lt;excludes&gt; &lt;exclude&gt;**/*.java&lt;/exclude&gt; &lt;/excludes&gt; &lt;/resource&gt; &lt;/resources&gt; &lt;plugin&gt; &lt;groupId&gt;com.google.appengine&lt;/groupId&gt; &lt;artifactId&gt;appengine-maven-plugin&lt;/artifactId&gt; &lt;version&gt;1.8.8&lt;/version&gt; &lt;/plugin&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt; &lt;version&gt;3.1&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;!-- Found this on the web but doesn't seem to be working. --&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt; &lt;version&gt;2.8&lt;/version&gt; &lt;executions&gt; &lt;execute&gt; &lt;id&gt;default-cli&lt;/id&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;/execute&gt; &lt;/executions&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;dependencies&gt; &lt;!-- dependency&gt; &lt;groupId&gt;com.google.appengine&lt;/groupId&gt; &lt;artifactId&gt;appengine-api-1.0-sdk&lt;/artifactId&gt; &lt;version&gt;1.8.8&lt;/version&gt; &lt;/dependency --&gt; &lt;dependency&gt; &lt;groupId&gt;javax.servlet&lt;/groupId&gt; &lt;artifactId&gt;servlet-api&lt;/artifactId&gt; &lt;version&gt;2.5&lt;/version&gt; &lt;scope&gt;provided&lt;/scope&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;com.googlecode.objectify&lt;/groupId&gt; &lt;artifactId&gt;objectify&lt;/artifactId&gt; &lt;version&gt;4.0rc2&lt;/version&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;/project&gt; </code></pre>
    singulars
    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