Maven 3.0's “mvn release:perform” doesn't like a pom.xml that isn't in its git repo's root directory

后端 未结 3 1774
孤城傲影
孤城傲影 2021-02-08 15:46

I have a question about Maven, the maven-release-plugin, git integration, pom.xml\'s, and having pom.xml\'s in subdirectories of the repo\'s local copy rather than in the root.<

3条回答
  •  广开言路
    2021-02-08 16:25

    The first thing is to understand git which has it's convention that every project has it's own repository. The next thing is that Maven has it's conventions and putting the pom.xml into the root of it's project is the most obvious one. Furthermore you are trying to fight against Maven and i will predict that you will lose the combat and make your life not easy. If your projects A and B are related (same versio number or same release times) in some kind you should think about a multi-module build which results in a structure like this:

    root (Git Repos)
      +-- pom.xml
           +--- projectA (pom.xml)
           +--- projectB (pom.xml)
    

    and you can do a release of both projectA (better calling it a module) and module b in a single step from the root.

提交回复
热议问题