Sean, To answer your question, does not work $ mvn --projects submodule-b,submodule-e --also-make test .. [ERROR] [ERROR] Could not find the selected project in the reactor: submodule-b @ ..
does work: $ mvn --projects submodule-a/submodule-b,submodule-d/submodule-e --also-make test On Thu, Oct 22, 2015 at 8:15 PM, Tony Kurc <[email protected]> wrote: > > I have two branches - one is master and a feature branch (feature-x) > that I build a patch off of. It errors out when building submodule-e after > the patch: > > (that should be submodule b) > > On Thu, Oct 22, 2015 at 8:13 PM, Tony Kurc <[email protected]> wrote: > >> okay, I made a little project similar to what I described, but much less >> complex >> >> https://github.com/trkurc/just-maven-stuff >> >> I have two branches - one is master and a feature branch (feature-x) that >> I build a patch off of. It errors out when building submodule-e after the >> patch: >> >> [ERROR] Failed to execute goal >> org.apache.maven.plugins:maven-compiler-plugin:3.1:compile >> (default-compile) on project submodule-b: Compilation failure >> [ERROR] >> /home/tkurc/dev/workspace/project-with-submodules/submodule-a/submodule-b/src/main/java/just/maven/things/b/Awesome.java:[6,21] >> constructor AlsoAwesome in class just.maven.things.e.AlsoAwesome cannot be >> applied to given types; >> >> How I ran test-patch: >> >> $ test-patch.sh --plugins="checkstyle,javac" ../feature-x.patch >> >> Here is the output that leads me to believe it is changing directories >> and building. If I apply the patch and run mvn clean install, it succeeds. >> Is it possible the reactor build order *must* be the same after a patch? >> >> >> ============================================================================ >> >> ============================================================================ >> Patch maven install >> >> ============================================================================ >> >> ============================================================================ >> >> >> cd >> /home/tkurc/dev/workspace/project-with-submodules/submodule-a/submodule-b >> mvn -fae clean install -DskipTests=true -Dmaven.javadoc.skip=true > >> /tmp/yetus-30777.3611/patch-mvninstall-submodule-a_submodule-b.txt 2>&1 >> Elapsed: 0m 4s >> cd >> /home/tkurc/dev/workspace/project-with-submodules/submodule-d/submodule-e >> mvn -fae clean install -DskipTests=true -Dmaven.javadoc.skip=true > >> /tmp/yetus-30777.3611/patch-mvninstall-submodule-d_submodule-e.txt 2>&1 >> Elapsed: 0m 5s >> >> submodule-b in the patch failed. >> >> >> >> >> >> >> >> >> >> On Thu, Oct 22, 2015 at 5:27 PM, Tony Kurc <[email protected]> wrote: >> >>> I think what I'll do is make a small project which is built similarly >>> and be easier to diagnose whether I'm doing something wrong or test-patch >>> is doing something I'm not expecting. >>> >>> On Thu, Oct 22, 2015 at 2:51 PM, Sean Busbey <[email protected]> wrote: >>> >>>> do things work correctly if you start at the top and manually run: >>>> >>>> mvn --projects C,E --also-make test >>>> >>>> On Thu, Oct 22, 2015 at 12:25 PM, Tony Kurc <[email protected]> wrote: >>>> > say I have a project with submodules, project is A, with submodules B >>>> and >>>> > D. B has a submodule C, D has a submodule E. A structure similar to >>>> this: >>>> > >>>> > A/B/C >>>> > A/D/E >>>> > >>>> > I have a patch that changes C and E and some methods change in E that >>>> C >>>> > depends on and there are changes to C that E depends on. When run I >>>> run >>>> > test-patch , "Patch maven install fails". I get failures (compilation >>>> > errors) because it looks like C is traversed to and maven is run and >>>> fails >>>> > to compile. It looks like it fails because it is using the pre-patch >>>> > installed jars. I was reading code and maven submodule best >>>> practices, but >>>> > not getting anywhere to get past this. >>>> > >>>> > Is this a use case someone else has working? >>>> > >>>> > Tony >>>> >>> >>> >> >
