How to pass src directory to the classpath with maven eclipse plugin
My project structure is not like "src/main/java". How can I give src directory manually from pom.xml?
PS:I tried and tags. resources is applying the include command but,by default act, it also adds an exclude *..java al开发者_Python百科so so it is not working. sourceIncludes is doing nothing:)
Add
<sourceDirectory>${basedir}/your-source-directory</sourceDirectory>
to the build
section of your POM.
build
<sourceDirectory>../java-path-to-source </sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<includes><include>**</include></includes>
</configuration>
</plugin>
</plugins>
</build>
</project>
http://maven.apache.org/guides/mini/guide-using-one-source-directory.html
精彩评论