Maven best-practice is to stick to Maven conventions. You're not doing that and therefore you're running into trouble.
I'm guessing here, but you've probably run into some limitation in the testCompile goal of m-compile-p. I suggest you change your opinion regarding where Maven creates files during build and follow the Maven standard. Your life will be much easier then. /Anders On Tue, Dec 7, 2010 at 12:08, Viktor Sadovnikov <[email protected]>wrote: > Hello, > > I'm migrating our ANT + Ivy based projects to Maven and came across a > strange > problem with compiling test classes. > > Currently I have only on parent pom.xml, which controls common for all > modules > settings, and one child module. The child module compiles and tests > perfectly as > long as <build><directory> is kept to default. However we prefer to keep > temporary files outside of modules, therefore I changed <directory> as it > shown > below. Compilation still succeeds, but compiler plugin fails to compile > test > classes in "test" phase - it doesn't file compiled main classes. I also > noticed > that if the directory name is fixed (doesn't use ${project.name}) > compilation of > test classes succeeds either. > > Is it OK to use ${project.name} as I'm using? > > With regards, > Viktor > > <build> > > <sourceDirectory>src</sourceDirectory> > <testSourceDirectory>test</testSourceDirectory> > <directory>../.build/${project.name}/target</directory> > > <plugins> > > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-compiler-plugin</artifactId> > <version>2.3.2</version> > <configuration> > <source>1.6</source> > <target>1.6</target> > </configuration> > </plugin> > > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-surefire-plugin</artifactId> > <version>2.6</version> > <configuration> > <systemPropertyVariables> > <com.fiserv.storage.dir>${storage.dir}</com.fiserv.storage.dir> > <log4j.configuration>file:${storage.dir}/log4j.xml</log4j.configuration> > > <com.fiserv.application.dir>${com.fiserv.application.dir}</com.fiserv.application.dir> > > > <com.fiserv.classes.dir>${project.build.outputDirectory}</com.fiserv.classes.dir> > > </systemPropertyVariables> > </configuration> > </plugin> > > </plugins> > </build> > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
