Eclipse - How to bypass the standard directory structure (src/main/java) in maven?

六月ゝ 毕业季﹏ 提交于 2019-12-11 17:42:51

问题


I am converting my existing project into maven but the point at which I am getting stuck is that I don't want to use the standard src/main/java structure.

I thought How to edit the directory structure in Maven? might help, but from what I understood it gives a way to append a directory path before src/main/java. This is the solution suggested in post that I am referring to:

<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
    <testSourceDirectory>${project.basedir}/src/test/java</testSourceDirectory>
    <resources>
      <resource>
        <directory>${project.basedir}/src/main/resources</directory>
      </resource>
    </resources>
    <testResources>
      <testResource>
        <directory>${project.basedir}/src/test/resources</directory>
      </testResource>
    </testResources> 

Whereas, in my case I want to be able to completely configure the source and build/output directories as I can't alter my existing directory structure. Is there a way to do that?

来源:https://stackoverflow.com/questions/49042329/eclipse-how-to-bypass-the-standard-directory-structure-src-main-java-in-mave

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!