pom.xml is attached. I ran with -X but I wasn't sure what I'm looking
for - it didn't seem to trace anything about specific class files being
produced.
Anders Hammar wrote:
Ok, I was thinking that maybe your were using some IDE that interfered
(i.e. copied the classes).
Posting your pom.xml is probably necessary to figure this one out. You
should also execute Maven in debug mode (mvn -X test) and do a grep on
the output for test class. If nothing found, I would go through it
manually step by step and try to find anything that would suggest this
happening.
/Anders
On Mon, Jul 13, 2009 at 23:23, Yang Zhang<[email protected]> wrote:
I had tried cleaning already; I get the same thing.
Anders Hammar wrote:
What happens if you execute
$ mvn clean test
/Anders
On Mon, Jul 13, 2009 at 21:27, Yang Zhang<[email protected]> wrote:
For some reason, Maven is pulling in classes from the jar of a dependency
and putting them into my target/test-classes/ directory, causing mvn test
to
fail (since extra Test* classes from that package are getting picked up).
Why are these classes being copied? Thanks in advance for any answers.
$ find . -name 'TestableZooKeeper.java'
$ find . -name 'TestableZooKeeper.class'
./target/test-classes/org/apache/zookeeper/TestableZooKeeper.class
$ fgrep -B2 -A3 zookeeper-test pom.xml
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper-test</artifactId>
<version>3.2.0</version>
<scope>compile</scope>
</dependency>
$ jar tf
~/.m2/repository/org/apache/zookeeper/zookeeper-test/3.2.0/zookeeper-test-3.2.0.jar
| fgrep TestableZooKeeper
org/apache/zookeeper/TestableZooKeeper$1.class
org/apache/zookeeper/TestableZooKeeper.class
org/apache/zookeeper/TestableZooKeeper.java
$ mvn -version
Apache Maven 2.1.0 (r755702; 2009-03-18 12:10:27-0700)
Java version: 1.6.0_03
Java home: /usr/java/jdk1.6.0_03/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.9-34.elsmp" arch: "i386" Family: "unix"
--
Yang Zhang
http://www.mit.edu/~y_z/
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
--
Yang Zhang
http://www.mit.edu/~y_z/
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
--
Yang Zhang
http://www.mit.edu/~y_z/
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>pubsub</groupId>
<artifactId>hedwig</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<properties>
<mainclass>pubsub.server.netty.PubSubServer</mainclass>
</properties>
<groupId>pubsub</groupId>
<artifactId>server</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>server</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>pubsub</groupId>
<artifactId>client</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.4.2.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<version>3.2.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper-test</artifactId>
<version>3.2.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.bookkeeper</groupId>
<artifactId>bookkeeper</artifactId>
<version>3.2.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>${settings.localRepository}</classpathPrefix>
<classpathMavenRepositoryLayout>true</classpathMavenRepositoryLayout>
<mainClass>${mainclass}</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>${mainclass}</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>attached</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>removebuilddir</id>
<phase>clean</phase>
<configuration>
<tasks>
<delete dir="build" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>createbuilddir</id>
<phase>generate-test-resources</phase>
<configuration>
<tasks>
<mkdir dir="build" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]