Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven compile does not create class files

I have a 3 module maven project with parent pom. From parent when I run a maven clean-compile-test. It fails at test phase and gives tons of compilation errors saying "symbol not found" for my local classes.

I discovered using IntelliJ ide if I use the "Make Project" button before I run a maven test, then maven test works!

Edit: Now I figured out that probelem is maven compile does not create class files in target folder for some reason this is my maven compiler plugin configuration in parent pom file:

  <build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.1</version>
            <configuration>

                <source>1.6</source>
                <target>1.6</target>
                <excludes>
                    <exclude>**/*.*</exclude>
                </excludes>
            </configuration>
        </plugin>
    </plugins>

</build>

Any ideas?

like image 332
Spring Avatar asked May 08 '14 09:05

Spring


1 Answers

One more thing.

Look in pom.xml, tag <packaging>. If it sets in pom, Maven shouldn`t create class-files for you. Change it for appropriate package - jar, war ...

like image 117
Vasily Pozdeev Avatar answered Sep 24 '22 23:09

Vasily Pozdeev