Re: Build DAG traversal.

2019-02-14 Thread Paul Hammant
Yeah, maybe that makes sense.

On Thu, Feb 14, 2019 at 1:45 PM Mykola Nikishov  wrote:

> Paul Hammant  writes:
>
> > mvn clean install -DskipTests
> -Dmaven.repo.local=/usr/local/var/MAVEN_CI_REPOSITORY
>
> This would compile and test-compile for the first time...
>
> > mvn surefire:test -Dmaven.repo.local=/usr/local/var/MAVEN_CI_REPOSITORY
>
> Run compile and test-compile one more time, on the same sources, for
> artifacts that had been just installed. Does it make sense to skip them
> with '-Dmaven.main.skip=true -Dmaven.test.skip=true' [1]?
>
> [1]
> https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#skipMain
>
> --
> Mykola
>
> Libre/Free Java Software Engineer
> https://manandbytes.gitlab.io/
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>
>


Re: Build DAG traversal.

2019-02-14 Thread Mykola Nikishov
Paul Hammant  writes:

> mvn clean install -DskipTests 
> -Dmaven.repo.local=/usr/local/var/MAVEN_CI_REPOSITORY

This would compile and test-compile for the first time...

> mvn surefire:test -Dmaven.repo.local=/usr/local/var/MAVEN_CI_REPOSITORY

Run compile and test-compile one more time, on the same sources, for
artifacts that had been just installed. Does it make sense to skip them
with '-Dmaven.main.skip=true -Dmaven.test.skip=true' [1]?

[1] 
https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#skipMain

-- 
Mykola

Libre/Free Java Software Engineer
https://manandbytes.gitlab.io/


-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Build DAG traversal.

2019-02-13 Thread Paul Hammant
The depth first DAG traversal of Maven modules in a build is a great and
under appreciated thing, but sometimes I wish for a different way of
working. Particularly for CI, I'd want to compile everything first, *then*
run tests. Two DAG traversals, if you like. This is possible, like so:

mvn clean install -DskipTests
-Dmaven.repo.local=/usr/local/var/MAVEN_CI_REPOSITORY
mvn surefire:test -Dmaven.repo.local=/usr/local/var/MAVEN_CI_REPOSITORY

I'm separating out the local maven repo bcause SNAPSHOT items can drop in
on the "install" action, but still later fail tests. And I'd not want other
builds on the same machine to utilize those jars of dubious quality (even
if they are over written a lot).

Question: Anyway, is there a critical (but subtle) goal/phase that's going
to be skipped with this way of working?

- Paul