Cannot add a new nifi module due to maven-compiler-plugin:3.6.0:testCompile (groovy-tests) failure

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Cannot add a new nifi module due to maven-compiler-plugin:3.6.0:testCompile (groovy-tests) failure

Horváth Péter Gergely
Hi All,

I have a pending pull request where I am struggling with some strange build
issues. Shame or not, this guy really got me...

I would like to add a new module to NiFi (nifi-test would make it easier
programmatic management of a NiFi instance for testing).

My module build keeps failing as maven-compiler-plugin:3.6.0:testCompile
(groovy-tests) kicks in before the main classes are actually compiled. I do
not use Groovy for testing, so this thing is not required for my project,
but apparently, I have some misconfiguration in my project I cannot spot.

Could someone please point me in the right direction? The module build
output is here, below, and my code changes are in GitHub:
https://github.com/peter-gergely-horvath/nifi/tree/master/nifi-test

I think I would just need a second set of eyes to spot something minor, as
other modules seem to have a very similar module configuration and work
without any issues.

foobar @ ~/Projects/OpenSource/nifi/nifi-test
$ mvn clean package
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO]   ... total of 1 executions of maven-deploy-plugin replaced with
nexus-staging-maven-plugin
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building nifi-test 1.8.0-SNAPSHOT
[INFO]
------------------------------------------------------------------------
Downloading: ...
[INFO]
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ nifi-test ---
[INFO] Deleting /Users/foobar/Projects/OpenSource/nifi/nifi-test/target
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven-version) @
nifi-test ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven) @ nifi-test
---
[INFO]
[INFO] --- maven-remote-resources-plugin:1.5:process
(process-resource-bundles) @ nifi-test ---
[INFO]
[INFO] --- maven-compiler-plugin:3.6.0:testCompile (groovy-tests) @
nifi-test ---
[INFO] Changes detected - recompiling the module!
[INFO] Using Groovy-Eclipse compiler to compile both Java and Groovy files
[INFO] Found location
</Users/foobar/.m2/repository/org/codehaus/groovy/groovy-eclipse-batch/2.4.3-01/groovy-eclipse-batch-2.4.3-01.jar>
for className <org.eclipse.jdt.internal.compiler.batch.Main>
[INFO] no javaAgentClass seems to be set
[INFO] Compiling in a forked process using
/Users/foobar/.m2/repository/org/codehaus/groovy/groovy-eclipse-batch/2.4.3-01/groovy-eclipse-batch-2.4.3-01.jar
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Failure executing groovy-eclipse compiler:
incorrect classpath:
/Users/foobar/Projects/OpenSource/nifi/nifi-test/target/classes
----------
1. ERROR in
/Users/foobar/Projects/OpenSource/nifi/nifi-test/src/test/java/org/apache/nifi/test/samples/NiFiFlowTest.java
(at line 23)
        import org.apache.nifi.test.TestNiFiInstance;
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The import org.apache.nifi.test.TestNiFiInstance cannot be resolved


Thanks,
Peter
Reply | Threaded
Open this post in threaded view
|

Re: Cannot add a new nifi module due to maven-compiler-plugin:3.6.0:testCompile (groovy-tests) failure

Otto Fowler
mvn clean install

Worked for me off of your current master.

[INFO] nifi-assembly ...................................... SUCCESS [01:53 min]
[INFO] nifi-testharness ................................... SUCCESS [  8.170 s]




On July 6, 2018 at 08:42:03, Horváth Péter Gergely (
[hidden email]) wrote:

Google Calendar e a pending pull request where I am struggling with some
strange build
issues. Shame or not, this guy really got me...

I would like to add a new module to NiFi (nifi-test would make it easier
programmatic management of a NiFi instance for testing).

My module build keeps failing as maven-compiler-plugin:3.6.0:testCompile
(groovy-tests) kicks in before the main classes are actually compiled. I do
not use Groovy for testing, so this thing is not required for my project,
but apparently, I have some misconfiguration in my project I cannot spot.

Could someone please point me in the right direction? The module build
output is here, below, and my code changes are in GitHub:
https://github.com/peter-gergely-horvath/nifi/tree/master/nifi-test

I think I would just need a second set of eyes to spot something minor, as
other modules seem to have a very similar module configuration and work
without any issues.

foobar @ ~/Projects/OpenSource/nifi/nifi-test
$ mvn clean package
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO] ... total of 1 executions of maven-deploy-plugin replaced with
nexus-staging-maven-plugin
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building nifi-test 1.8.0-SNAPSHOT
[INFO]
------------------------------------------------------------------------
Downloading: ...
[INFO]
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ nifi-test ---
[INFO] Deleting /Users/foobar/Projects/OpenSource/nifi/nifi-test/target
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven-version) @
nifi-test ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven) @ nifi-test
---
[INFO]
[INFO] --- maven-remote-resources-plugin:1.5:process
(process-resource-bundles) @ nifi-test ---
[INFO]
[INFO] --- maven-compiler-plugin:3.6.0:testCompile (groovy-testsOtto Fowler
<[hidden email]> ecompiling the module!
[INFO] Using Groovy-Eclipse compiler to compile both Java and Groovy files
[INFO] Found location
</Users/foobar/.m2/repository/org/codehaus/groovy/groovy-eclipse-batch/2.4.3-01/groovy-eclipse-batch-2.4.3-01.jar>

for className <org.eclipse.jdt.internal.compiler.batch.Main>
[INFO] no javaAgentClass seems to be set
[INFO] Compiling in a forked process using
/Users/foobar/.m2/repository/org/codehaus/groovy/groovy-eclipse-batch/2.4.3-01/groovy-eclipse-batch-2.4.3-01.jar

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Failure executing groovy-eclipse compiler:
incorrect classpath:
/Users/foobar/Projects/OpenSource/nifi/nifi-test/target/classes
----------
1. ERROR in
/Users/foobar/Projects/OpenSource/nifi/nifi-test/src/test/java/org/apache/nifi/test/samples/NiFiFlowTest.java

(at line 23)
import org.apache.nifi.test.TestNiFiInstance;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The import org.apache.nifi.test.TestNiFiInstance cannot be resolved


Thanks,
Peter
Reply | Threaded
Open this post in threaded view
|

Re: Cannot add a new nifi module due to maven-compiler-plugin:3.6.0:testCompile (groovy-tests) failure

Otto Fowler
Running `mvn clean install from inside the nifi-testharness worked as well




On July 6, 2018 at 11:37:46, Otto Fowler ([hidden email]) wrote:

mvn clean install

Worked for me off of your current master.

[INFO] nifi-assembly ...................................... SUCCESS [01:53 min]
[INFO] nifi-testharness ................................... SUCCESS [  8.170 s]




On July 6, 2018 at 08:42:03, Horváth Péter Gergely (
[hidden email]) wrote:

Google Calendar e a pending pull request where I am struggling with some
strange build
issues. Shame or not, this guy really got me...

I would like to add a new module to NiFi (nifi-test would make it easier
programmatic management of a NiFi instance for testing).

My module build keeps failing as maven-compiler-plugin:3.6.0:testCompile
(groovy-tests) kicks in before the main classes are actually compiled. I do
not use Groovy for testing, so this thing is not required for my project,
but apparently, I have some misconfiguration in my project I cannot spot.

Could someone please point me in the right direction? The module build
output is here, below, and my code changes are in GitHub:
https://github.com/peter-gergely-horvath/nifi/tree/master/nifi-test

I think I would just need a second set of eyes to spot something minor, as
other modules seem to have a very similar module configuration and work
without any issues.

foobar @ ~/Projects/OpenSource/nifi/nifi-test
$ mvn clean package
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO] ... total of 1 executions of maven-deploy-plugin replaced with
nexus-staging-maven-plugin
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building nifi-test 1.8.0-SNAPSHOT
[INFO]
------------------------------------------------------------------------
Downloading: ...
[INFO]
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ nifi-test ---
[INFO] Deleting /Users/foobar/Projects/OpenSource/nifi/nifi-test/target
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven-version) @
nifi-test ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven) @ nifi-test
---
[INFO]
[INFO] --- maven-remote-resources-plugin:1.5:process
(process-resource-bundles) @ nifi-test ---
[INFO]
[INFO] --- maven-compiler-plugin:3.6.0:testCompile (groovy-testsOtto Fowler
<[hidden email]> ecompiling the module!
[INFO] Using Groovy-Eclipse compiler to compile both Java and Groovy files
[INFO] Found location
</Users/foobar/.m2/repository/org/codehaus/groovy/groovy-eclipse-batch/2.4.3-01/groovy-eclipse-batch-2.4.3-01.jar>
for className <org.eclipse.jdt.internal.compiler.batch.Main>
[INFO] no javaAgentClass seems to be set
[INFO] Compiling in a forked process using
/Users/foobar/.m2/repository/org/codehaus/groovy/groovy-eclipse-batch/2.4.3-01/groovy-eclipse-batch-2.4.3-01.jar
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Failure executing groovy-eclipse compiler:
incorrect classpath:
/Users/foobar/Projects/OpenSource/nifi/nifi-test/target/classes
----------
1. ERROR in
/Users/foobar/Projects/OpenSource/nifi/nifi-test/src/test/java/org/apache/nifi/test/samples/NiFiFlowTest.java
(at line 23)
import org.apache.nifi.test.TestNiFiInstance;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The import org.apache.nifi.test.TestNiFiInstance cannot be resolved


Thanks,
Peter
Reply | Threaded
Open this post in threaded view
|

Re: Cannot add a new nifi module due to maven-compiler-plugin:3.6.0:testCompile (groovy-tests) failure

Karl Heinz Marbaise
Hi,

the first thing I have seen is that the nifi-test module uses the wrong
parent version 1.7.0-SNAPSHOT instead of 1.8.0-SNAPSHOT...as the rest of
the modules...I have use [1] on branch "nifi-test" ...


Kind regards
Karl Heinz Marbaise

[1]: https://github.com/peter-gergely-horvath/nifi/tree/nifi-test

On 06/07/18 17:39, Otto Fowler wrote:

> Running `mvn clean install from inside the nifi-testharness worked as well
>
>
>
>
> On July 6, 2018 at 11:37:46, Otto Fowler ([hidden email]) wrote:
>
> mvn clean install
>
> Worked for me off of your current master.
>
> [INFO] nifi-assembly ...................................... SUCCESS [01:53 min]
> [INFO] nifi-testharness ................................... SUCCESS [  8.170 s]
>
>
>
>
> On July 6, 2018 at 08:42:03, Horváth Péter Gergely (
> [hidden email]) wrote:
>
> Google Calendar e a pending pull request where I am struggling with some
> strange build
> issues. Shame or not, this guy really got me...
>
> I would like to add a new module to NiFi (nifi-test would make it easier
> programmatic management of a NiFi instance for testing).
>
> My module build keeps failing as maven-compiler-plugin:3.6.0:testCompile
> (groovy-tests) kicks in before the main classes are actually compiled. I do
> not use Groovy for testing, so this thing is not required for my project,
> but apparently, I have some misconfiguration in my project I cannot spot.
>
> Could someone please point me in the right direction? The module build
> output is here, below, and my code changes are in GitHub:
> https://github.com/peter-gergely-horvath/nifi/tree/master/nifi-test
>
> I think I would just need a second set of eyes to spot something minor, as
> other modules seem to have a very similar module configuration and work
> without any issues.
>
> foobar @ ~/Projects/OpenSource/nifi/nifi-test
> $ mvn clean package
> [INFO] Scanning for projects...
> [INFO] Inspecting build with total of 1 modules...
> [INFO] Installing Nexus Staging features:
> [INFO] ... total of 1 executions of maven-deploy-plugin replaced with
> nexus-staging-maven-plugin
> [INFO]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building nifi-test 1.8.0-SNAPSHOT
> [INFO]
> ------------------------------------------------------------------------
> Downloading: ...
> [INFO]
> [INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ nifi-test ---
> [INFO] Deleting /Users/foobar/Projects/OpenSource/nifi/nifi-test/target
> [INFO]
> [INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven-version) @
> nifi-test ---
> [INFO]
> [INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven) @ nifi-test
> ---
> [INFO]
> [INFO] --- maven-remote-resources-plugin:1.5:process
> (process-resource-bundles) @ nifi-test ---
> [INFO]
> [INFO] --- maven-compiler-plugin:3.6.0:testCompile (groovy-testsOtto Fowler
> <[hidden email]> ecompiling the module!
> [INFO] Using Groovy-Eclipse compiler to compile both Java and Groovy files
> [INFO] Found location
> </Users/foobar/.m2/repository/org/codehaus/groovy/groovy-eclipse-batch/2.4.3-01/groovy-eclipse-batch-2.4.3-01.jar>
> for className <org.eclipse.jdt.internal.compiler.batch.Main>
> [INFO] no javaAgentClass seems to be set
> [INFO] Compiling in a forked process using
> /Users/foobar/.m2/repository/org/codehaus/groovy/groovy-eclipse-batch/2.4.3-01/groovy-eclipse-batch-2.4.3-01.jar
> [INFO] -------------------------------------------------------------
> [ERROR] COMPILATION ERROR :
> [INFO] -------------------------------------------------------------
> [ERROR] Failure executing groovy-eclipse compiler:
> incorrect classpath:
> /Users/foobar/Projects/OpenSource/nifi/nifi-test/target/classes
> ----------
> 1. ERROR in
> /Users/foobar/Projects/OpenSource/nifi/nifi-test/src/test/java/org/apache/nifi/test/samples/NiFiFlowTest.java
> (at line 23)
> import org.apache.nifi.test.TestNiFiInstance;
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> The import org.apache.nifi.test.TestNiFiInstance cannot be resolved
>
>
> Thanks,
> Peter