In Maven, can I specify a relative path above my current project?

后端 未结 2 1544
后悔当初
后悔当初 2020-12-14 15:24

I\'m learning maven on the fly while doing work on a project with a large set of projects to build.

Currently a line in the main build uses an absolute path to speci

2条回答
  •  鱼传尺愫
    2020-12-14 15:30

    Ideally the pom.xml should be in the same directory as your src directory. For eg suppose you have checked out your project from svn into a folder C:/work/project, then keep the main pom.xml in C:/work/project. src should also be in C:/work/project.

    Your other subprojects should be in C:/work/subproject1, C:/work/subproject2 and so on each having their own pom.xml. Then in the main pom.xml you can refer to the other projects in the

          
        ../subproject1
        ../subproject2
    
    

提交回复
热议问题