开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜