Re: Dependency and skipping tests
Presumably Maven still tries to resolve the dependencies even if not compiling (because there's no difference between submodules for test or not?)? On Sat, 19 Sep 2020, 16:44 Mark Bean, wrote: > I tried that option too. Same result. This surprised me even further since > the documentation explicitly says compilation of tests is skipped. > > Hopefully, fresh eyes after a weekend will reveal the issue. Any additional > suggestions are still welcome! > > Thanks. > > On Fri, Sep 18, 2020 at 4:01 PM James Srinivasan < > james.sriniva...@gmail.com> > wrote: > > > -DskipTests will compile but not run tests > > > > You probably want something like -Dmaven.test.skip > > > > See > > > http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#skip > > > > On Fri, 18 Sep 2020 at 20:58, Mark Bean wrote: > > > > > > I had an interesting problem building Apache NiFi (1.11.4) using Java > 11 > > > which resulted in a build failure. The environment is on a private > > network > > > with a dedicated Nexus repository. I used the maven option > "-DskipTests". > > > It appears test execution was skipped, but maven still attempted to > > compile > > > the source. In the end, the failure was due to a missing dependency > from > > > the Nexus repo. Specifically, the artifact was a dependency in > > > nifi-accumulo-processors, but only required by test classes. > > > > > > Group: org.openjfx > > > Name: javafx.base > > > Version: 11.0.0-SNAPSHOT > > > > > > First, it surprised me that a SNAPSHOT version was allowed. However, > > since > > > it is required only for a test, perhaps this may not be an issue. Can > > > someone please confirm? > > > > > > Secondly, why did maven still attempt to compile test classes even when > > > using the option "-DskipTests" ? Is there something in the nifi poms > > > overriding the behavior? Or have I just misunderstood what -DskipTests > > does? > > > > > > I had the same results on Maven version 3.6.3 and 3.5.0. > > > > > > Thanks. > > >
Re: Dependency and skipping tests
I tried that option too. Same result. This surprised me even further since the documentation explicitly says compilation of tests is skipped. Hopefully, fresh eyes after a weekend will reveal the issue. Any additional suggestions are still welcome! Thanks. On Fri, Sep 18, 2020 at 4:01 PM James Srinivasan wrote: > -DskipTests will compile but not run tests > > You probably want something like -Dmaven.test.skip > > See > http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#skip > > On Fri, 18 Sep 2020 at 20:58, Mark Bean wrote: > > > > I had an interesting problem building Apache NiFi (1.11.4) using Java 11 > > which resulted in a build failure. The environment is on a private > network > > with a dedicated Nexus repository. I used the maven option "-DskipTests". > > It appears test execution was skipped, but maven still attempted to > compile > > the source. In the end, the failure was due to a missing dependency from > > the Nexus repo. Specifically, the artifact was a dependency in > > nifi-accumulo-processors, but only required by test classes. > > > > Group: org.openjfx > > Name: javafx.base > > Version: 11.0.0-SNAPSHOT > > > > First, it surprised me that a SNAPSHOT version was allowed. However, > since > > it is required only for a test, perhaps this may not be an issue. Can > > someone please confirm? > > > > Secondly, why did maven still attempt to compile test classes even when > > using the option "-DskipTests" ? Is there something in the nifi poms > > overriding the behavior? Or have I just misunderstood what -DskipTests > does? > > > > I had the same results on Maven version 3.6.3 and 3.5.0. > > > > Thanks. >
Re: Dependency and skipping tests
-DskipTests will compile but not run tests You probably want something like -Dmaven.test.skip See http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#skip On Fri, 18 Sep 2020 at 20:58, Mark Bean wrote: > > I had an interesting problem building Apache NiFi (1.11.4) using Java 11 > which resulted in a build failure. The environment is on a private network > with a dedicated Nexus repository. I used the maven option "-DskipTests". > It appears test execution was skipped, but maven still attempted to compile > the source. In the end, the failure was due to a missing dependency from > the Nexus repo. Specifically, the artifact was a dependency in > nifi-accumulo-processors, but only required by test classes. > > Group: org.openjfx > Name: javafx.base > Version: 11.0.0-SNAPSHOT > > First, it surprised me that a SNAPSHOT version was allowed. However, since > it is required only for a test, perhaps this may not be an issue. Can > someone please confirm? > > Secondly, why did maven still attempt to compile test classes even when > using the option "-DskipTests" ? Is there something in the nifi poms > overriding the behavior? Or have I just misunderstood what -DskipTests does? > > I had the same results on Maven version 3.6.3 and 3.5.0. > > Thanks.
Dependency and skipping tests
I had an interesting problem building Apache NiFi (1.11.4) using Java 11 which resulted in a build failure. The environment is on a private network with a dedicated Nexus repository. I used the maven option "-DskipTests". It appears test execution was skipped, but maven still attempted to compile the source. In the end, the failure was due to a missing dependency from the Nexus repo. Specifically, the artifact was a dependency in nifi-accumulo-processors, but only required by test classes. Group: org.openjfx Name: javafx.base Version: 11.0.0-SNAPSHOT First, it surprised me that a SNAPSHOT version was allowed. However, since it is required only for a test, perhaps this may not be an issue. Can someone please confirm? Secondly, why did maven still attempt to compile test classes even when using the option "-DskipTests" ? Is there something in the nifi poms overriding the behavior? Or have I just misunderstood what -DskipTests does? I had the same results on Maven version 3.6.3 and 3.5.0. Thanks.