Groovy can't see imported Java class in spec: “unable to resolve class …”Maven is not working in Java 8 when Javadoc tags are incompleteThe parameters 'sourceEncoding' rpm-maven-plugin are missing or invalidMaven unable to run specific testGetting null pointer excepetion when using any annotation other than @BeforeClassFailed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project siriproject: Compilation failureUnable to prepare a maven release with ERRORJhipster Prod build failedHow to fix maven exception : [ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.6.1:cleanMaven shade plugin -Failed to execute goalwhen i run maven compile on springboot project i got this error i am using java 9 and maven 3.7.0 and lombok version 1.16.18

How do you say "Trust your struggle." in French?

How do I lift the insulation blower into the attic?

Pre-Employment Background Check With Consent For Future Checks

Relations between homogeneous polynomials

Does capillary rise violate hydrostatic paradox?

Why can't I get pgrep output right to variable on bash script?

Put the phone down / Put down the phone

Capacitor electron flow

Extract substring according to regexp with sed or grep

If the Dominion rule using their Jem'Hadar troops, why is their life expectancy so low?

What properties make a magic weapon befit a Rogue more than a DEX-based Fighter?

Why is participating in the European Parliamentary elections used as a threat?

Output visual diagram of picture

Travelling in US for more than 90 days

New Order #2: Turn My Way

What do the positive and negative (+/-) transmit and receive pins mean on Ethernet cables?

1 John in Luther’s Bibel

How do you justify more code being written by following clean code practices?

How to split IPA spelling into syllables

Not hide and seek

PTIJ: Which Dr. Seuss books should one obtain?

Offset in split text content

Magnifying glass in hyperbolic space

"Oh no!" in Latin



Groovy can't see imported Java class in spec: “unable to resolve class …”


Maven is not working in Java 8 when Javadoc tags are incompleteThe parameters 'sourceEncoding' rpm-maven-plugin are missing or invalidMaven unable to run specific testGetting null pointer excepetion when using any annotation other than @BeforeClassFailed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project siriproject: Compilation failureUnable to prepare a maven release with ERRORJhipster Prod build failedHow to fix maven exception : [ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.6.1:cleanMaven shade plugin -Failed to execute goalwhen i run maven compile on springboot project i got this error i am using java 9 and maven 3.7.0 and lombok version 1.16.18













0















I've run into problem with running test-compile goal using Maven when setting up Spock for my Spring Boot project.
I have Java class named WcyUrlsFactory with method createGroupPageUrl() that I want to test with Groovy/Spock. Class is located in src/main/java/...






 package pl.edu.wat.wcy.bali.sync.service.session.utils;

import lombok.extern.slf4j.Slf4j;
import pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams;

import java.time.Clock;
import java.time.LocalDate;
import java.time.Month;

import static pl.edu.wat.wcy.bali.sync.service.session.utils.WcyUrlParams.*;

@Slf4j
public class WcyUrlsFactory
private WcyUrlsFactory()


public static String createGroupPageUrl(GroupRequestParams params)
return createIndexPageUrl(params.getSessionId()) +
MID.value() +
iid(params.getSemester(), params.getClock()) +
exv(params.getGroupName());

...





Tested method has one argument which is instance of GroupRequestParams.class. This class is also located in src/main/java but in different package:






package pl.edu.wat.wcy.bali.sync.service.fetcher;

import lombok.Builder;
import lombok.Value;
import pl.edu.wat.wcy.bali.sync.service.session.utils.Semester;

import java.time.Clock;

@Value
@Builder
public class GroupRequestParams
private final Clock clock;
private final String sessionId;
private final Semester semester;
private final String groupName;





I've created spec class in Groovy - class is located in the same package as test subject, in src/test/groovy/... directory:






package pl.edu.wat.wcy.bali.sync.service.session.utils

import pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
import spock.lang.Specification

import java.time.Clock
import java.time.Instant
import java.time.ZoneId

class WcyUrlsFactorySpec extends Specification
def "should create group page url for current date"() currentTime





Running test in Idea works fine but when I try to build an artifact with Maven, I get error :






> mvn clean test-compile -e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building bali-sync 0.1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ bali-sync ---
[INFO]
[INFO] --- gmavenplus-plugin:1.6:compileTests (default) @ bali-sync ---
[INFO] Using Groovy 2.4.4 to perform compileTests.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.108 s
[INFO] Finished at: 2019-03-07T20:41:36+01:00
[INFO] Final Memory: 25M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.gmavenplus:gmavenplus-plugin:1.6:compileTests (default) on project bali-sync: Error occurred while calling a method on a Groovy class from classpath.: InvocationTargetException: startup failed:
[ERROR] /home/mnowicki/IdeaProjects/bali/bali-sync/src/test/groovy/pl/edu/wat/wcy/bali/sync/service/session/utils/WcyUrlsFactorySpec.groovy: 3: unable to resolve class pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
[ERROR] @ line 3, column 1.
[ERROR] import pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
[ERROR] ^
[ERROR]
[ERROR] 1 error
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.gmavenplus:gmavenplus-plugin:1.6:compileTests (default) on project bali-sync: Error occurred while calling a method on a Groovy class from classpath.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error occurred while calling a method on a Groovy class from classpath.
at org.codehaus.gmavenplus.mojo.CompileTestsMojo.execute (CompileTestsMojo.java:74)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.gmavenplus.util.ReflectionUtils.invokeMethod (ReflectionUtils.java:275)
at org.codehaus.gmavenplus.mojo.AbstractCompileMojo.doCompile (AbstractCompileMojo.java:197)
at org.codehaus.gmavenplus.mojo.CompileTestsMojo.execute (CompileTestsMojo.java:70)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
/home/mnowicki/IdeaProjects/bali/bali-sync/src/test/groovy/pl/edu/wat/wcy/bali/sync/service/session/utils/WcyUrlsFactorySpec.groovy: 3: unable to resolve class pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
@ line 3, column 1.
import pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
^

1 error

at org.codehaus.groovy.control.ErrorCollector.failIfErrors (ErrorCollector.java:310)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits (CompilationUnit.java:946)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation (CompilationUnit.java:593)
at org.codehaus.groovy.control.CompilationUnit.compile (CompilationUnit.java:542)
at org.codehaus.groovy.control.CompilationUnit.compile (CompilationUnit.java:525)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.gmavenplus.util.ReflectionUtils.invokeMethod (ReflectionUtils.java:275)
at org.codehaus.gmavenplus.mojo.AbstractCompileMojo.doCompile (AbstractCompileMojo.java:197)
at org.codehaus.gmavenplus.mojo.CompileTestsMojo.execute (CompileTestsMojo.java:70)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException





My pom.xml has gmavenplus included:






<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<goals>
<goal>compileTests</goal>
</goals>
</execution>
</executions>
</plugin>





When I move GroupRequestParams.class to the same class as test subject, Maven test passes - how can I make gmavenplus scan sources in src/main/java?










share|improve this question
























  • You'll need to include your full POM. It looks like Maven isn't running compile between clean and test-compile for some reason.

    – chrylis
    Mar 7 at 20:45











  • @chrylis Thank you for answer - in fact you were right, my project was not compiled because of <packaging>pom</packaging> set in pom - removing it solved my problem :)

    – M.Nowicki
    Mar 8 at 23:28















0















I've run into problem with running test-compile goal using Maven when setting up Spock for my Spring Boot project.
I have Java class named WcyUrlsFactory with method createGroupPageUrl() that I want to test with Groovy/Spock. Class is located in src/main/java/...






 package pl.edu.wat.wcy.bali.sync.service.session.utils;

import lombok.extern.slf4j.Slf4j;
import pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams;

import java.time.Clock;
import java.time.LocalDate;
import java.time.Month;

import static pl.edu.wat.wcy.bali.sync.service.session.utils.WcyUrlParams.*;

@Slf4j
public class WcyUrlsFactory
private WcyUrlsFactory()


public static String createGroupPageUrl(GroupRequestParams params)
return createIndexPageUrl(params.getSessionId()) +
MID.value() +
iid(params.getSemester(), params.getClock()) +
exv(params.getGroupName());

...





Tested method has one argument which is instance of GroupRequestParams.class. This class is also located in src/main/java but in different package:






package pl.edu.wat.wcy.bali.sync.service.fetcher;

import lombok.Builder;
import lombok.Value;
import pl.edu.wat.wcy.bali.sync.service.session.utils.Semester;

import java.time.Clock;

@Value
@Builder
public class GroupRequestParams
private final Clock clock;
private final String sessionId;
private final Semester semester;
private final String groupName;





I've created spec class in Groovy - class is located in the same package as test subject, in src/test/groovy/... directory:






package pl.edu.wat.wcy.bali.sync.service.session.utils

import pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
import spock.lang.Specification

import java.time.Clock
import java.time.Instant
import java.time.ZoneId

class WcyUrlsFactorySpec extends Specification
def "should create group page url for current date"() currentTime





Running test in Idea works fine but when I try to build an artifact with Maven, I get error :






> mvn clean test-compile -e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building bali-sync 0.1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ bali-sync ---
[INFO]
[INFO] --- gmavenplus-plugin:1.6:compileTests (default) @ bali-sync ---
[INFO] Using Groovy 2.4.4 to perform compileTests.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.108 s
[INFO] Finished at: 2019-03-07T20:41:36+01:00
[INFO] Final Memory: 25M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.gmavenplus:gmavenplus-plugin:1.6:compileTests (default) on project bali-sync: Error occurred while calling a method on a Groovy class from classpath.: InvocationTargetException: startup failed:
[ERROR] /home/mnowicki/IdeaProjects/bali/bali-sync/src/test/groovy/pl/edu/wat/wcy/bali/sync/service/session/utils/WcyUrlsFactorySpec.groovy: 3: unable to resolve class pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
[ERROR] @ line 3, column 1.
[ERROR] import pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
[ERROR] ^
[ERROR]
[ERROR] 1 error
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.gmavenplus:gmavenplus-plugin:1.6:compileTests (default) on project bali-sync: Error occurred while calling a method on a Groovy class from classpath.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error occurred while calling a method on a Groovy class from classpath.
at org.codehaus.gmavenplus.mojo.CompileTestsMojo.execute (CompileTestsMojo.java:74)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.gmavenplus.util.ReflectionUtils.invokeMethod (ReflectionUtils.java:275)
at org.codehaus.gmavenplus.mojo.AbstractCompileMojo.doCompile (AbstractCompileMojo.java:197)
at org.codehaus.gmavenplus.mojo.CompileTestsMojo.execute (CompileTestsMojo.java:70)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
/home/mnowicki/IdeaProjects/bali/bali-sync/src/test/groovy/pl/edu/wat/wcy/bali/sync/service/session/utils/WcyUrlsFactorySpec.groovy: 3: unable to resolve class pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
@ line 3, column 1.
import pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
^

1 error

at org.codehaus.groovy.control.ErrorCollector.failIfErrors (ErrorCollector.java:310)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits (CompilationUnit.java:946)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation (CompilationUnit.java:593)
at org.codehaus.groovy.control.CompilationUnit.compile (CompilationUnit.java:542)
at org.codehaus.groovy.control.CompilationUnit.compile (CompilationUnit.java:525)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.gmavenplus.util.ReflectionUtils.invokeMethod (ReflectionUtils.java:275)
at org.codehaus.gmavenplus.mojo.AbstractCompileMojo.doCompile (AbstractCompileMojo.java:197)
at org.codehaus.gmavenplus.mojo.CompileTestsMojo.execute (CompileTestsMojo.java:70)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException





My pom.xml has gmavenplus included:






<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<goals>
<goal>compileTests</goal>
</goals>
</execution>
</executions>
</plugin>





When I move GroupRequestParams.class to the same class as test subject, Maven test passes - how can I make gmavenplus scan sources in src/main/java?










share|improve this question
























  • You'll need to include your full POM. It looks like Maven isn't running compile between clean and test-compile for some reason.

    – chrylis
    Mar 7 at 20:45











  • @chrylis Thank you for answer - in fact you were right, my project was not compiled because of <packaging>pom</packaging> set in pom - removing it solved my problem :)

    – M.Nowicki
    Mar 8 at 23:28













0












0








0








I've run into problem with running test-compile goal using Maven when setting up Spock for my Spring Boot project.
I have Java class named WcyUrlsFactory with method createGroupPageUrl() that I want to test with Groovy/Spock. Class is located in src/main/java/...






 package pl.edu.wat.wcy.bali.sync.service.session.utils;

import lombok.extern.slf4j.Slf4j;
import pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams;

import java.time.Clock;
import java.time.LocalDate;
import java.time.Month;

import static pl.edu.wat.wcy.bali.sync.service.session.utils.WcyUrlParams.*;

@Slf4j
public class WcyUrlsFactory
private WcyUrlsFactory()


public static String createGroupPageUrl(GroupRequestParams params)
return createIndexPageUrl(params.getSessionId()) +
MID.value() +
iid(params.getSemester(), params.getClock()) +
exv(params.getGroupName());

...





Tested method has one argument which is instance of GroupRequestParams.class. This class is also located in src/main/java but in different package:






package pl.edu.wat.wcy.bali.sync.service.fetcher;

import lombok.Builder;
import lombok.Value;
import pl.edu.wat.wcy.bali.sync.service.session.utils.Semester;

import java.time.Clock;

@Value
@Builder
public class GroupRequestParams
private final Clock clock;
private final String sessionId;
private final Semester semester;
private final String groupName;





I've created spec class in Groovy - class is located in the same package as test subject, in src/test/groovy/... directory:






package pl.edu.wat.wcy.bali.sync.service.session.utils

import pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
import spock.lang.Specification

import java.time.Clock
import java.time.Instant
import java.time.ZoneId

class WcyUrlsFactorySpec extends Specification
def "should create group page url for current date"() currentTime





Running test in Idea works fine but when I try to build an artifact with Maven, I get error :






> mvn clean test-compile -e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building bali-sync 0.1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ bali-sync ---
[INFO]
[INFO] --- gmavenplus-plugin:1.6:compileTests (default) @ bali-sync ---
[INFO] Using Groovy 2.4.4 to perform compileTests.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.108 s
[INFO] Finished at: 2019-03-07T20:41:36+01:00
[INFO] Final Memory: 25M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.gmavenplus:gmavenplus-plugin:1.6:compileTests (default) on project bali-sync: Error occurred while calling a method on a Groovy class from classpath.: InvocationTargetException: startup failed:
[ERROR] /home/mnowicki/IdeaProjects/bali/bali-sync/src/test/groovy/pl/edu/wat/wcy/bali/sync/service/session/utils/WcyUrlsFactorySpec.groovy: 3: unable to resolve class pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
[ERROR] @ line 3, column 1.
[ERROR] import pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
[ERROR] ^
[ERROR]
[ERROR] 1 error
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.gmavenplus:gmavenplus-plugin:1.6:compileTests (default) on project bali-sync: Error occurred while calling a method on a Groovy class from classpath.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error occurred while calling a method on a Groovy class from classpath.
at org.codehaus.gmavenplus.mojo.CompileTestsMojo.execute (CompileTestsMojo.java:74)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.gmavenplus.util.ReflectionUtils.invokeMethod (ReflectionUtils.java:275)
at org.codehaus.gmavenplus.mojo.AbstractCompileMojo.doCompile (AbstractCompileMojo.java:197)
at org.codehaus.gmavenplus.mojo.CompileTestsMojo.execute (CompileTestsMojo.java:70)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
/home/mnowicki/IdeaProjects/bali/bali-sync/src/test/groovy/pl/edu/wat/wcy/bali/sync/service/session/utils/WcyUrlsFactorySpec.groovy: 3: unable to resolve class pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
@ line 3, column 1.
import pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
^

1 error

at org.codehaus.groovy.control.ErrorCollector.failIfErrors (ErrorCollector.java:310)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits (CompilationUnit.java:946)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation (CompilationUnit.java:593)
at org.codehaus.groovy.control.CompilationUnit.compile (CompilationUnit.java:542)
at org.codehaus.groovy.control.CompilationUnit.compile (CompilationUnit.java:525)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.gmavenplus.util.ReflectionUtils.invokeMethod (ReflectionUtils.java:275)
at org.codehaus.gmavenplus.mojo.AbstractCompileMojo.doCompile (AbstractCompileMojo.java:197)
at org.codehaus.gmavenplus.mojo.CompileTestsMojo.execute (CompileTestsMojo.java:70)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException





My pom.xml has gmavenplus included:






<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<goals>
<goal>compileTests</goal>
</goals>
</execution>
</executions>
</plugin>





When I move GroupRequestParams.class to the same class as test subject, Maven test passes - how can I make gmavenplus scan sources in src/main/java?










share|improve this question
















I've run into problem with running test-compile goal using Maven when setting up Spock for my Spring Boot project.
I have Java class named WcyUrlsFactory with method createGroupPageUrl() that I want to test with Groovy/Spock. Class is located in src/main/java/...






 package pl.edu.wat.wcy.bali.sync.service.session.utils;

import lombok.extern.slf4j.Slf4j;
import pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams;

import java.time.Clock;
import java.time.LocalDate;
import java.time.Month;

import static pl.edu.wat.wcy.bali.sync.service.session.utils.WcyUrlParams.*;

@Slf4j
public class WcyUrlsFactory
private WcyUrlsFactory()


public static String createGroupPageUrl(GroupRequestParams params)
return createIndexPageUrl(params.getSessionId()) +
MID.value() +
iid(params.getSemester(), params.getClock()) +
exv(params.getGroupName());

...





Tested method has one argument which is instance of GroupRequestParams.class. This class is also located in src/main/java but in different package:






package pl.edu.wat.wcy.bali.sync.service.fetcher;

import lombok.Builder;
import lombok.Value;
import pl.edu.wat.wcy.bali.sync.service.session.utils.Semester;

import java.time.Clock;

@Value
@Builder
public class GroupRequestParams
private final Clock clock;
private final String sessionId;
private final Semester semester;
private final String groupName;





I've created spec class in Groovy - class is located in the same package as test subject, in src/test/groovy/... directory:






package pl.edu.wat.wcy.bali.sync.service.session.utils

import pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
import spock.lang.Specification

import java.time.Clock
import java.time.Instant
import java.time.ZoneId

class WcyUrlsFactorySpec extends Specification
def "should create group page url for current date"() currentTime





Running test in Idea works fine but when I try to build an artifact with Maven, I get error :






> mvn clean test-compile -e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building bali-sync 0.1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ bali-sync ---
[INFO]
[INFO] --- gmavenplus-plugin:1.6:compileTests (default) @ bali-sync ---
[INFO] Using Groovy 2.4.4 to perform compileTests.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.108 s
[INFO] Finished at: 2019-03-07T20:41:36+01:00
[INFO] Final Memory: 25M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.gmavenplus:gmavenplus-plugin:1.6:compileTests (default) on project bali-sync: Error occurred while calling a method on a Groovy class from classpath.: InvocationTargetException: startup failed:
[ERROR] /home/mnowicki/IdeaProjects/bali/bali-sync/src/test/groovy/pl/edu/wat/wcy/bali/sync/service/session/utils/WcyUrlsFactorySpec.groovy: 3: unable to resolve class pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
[ERROR] @ line 3, column 1.
[ERROR] import pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
[ERROR] ^
[ERROR]
[ERROR] 1 error
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.gmavenplus:gmavenplus-plugin:1.6:compileTests (default) on project bali-sync: Error occurred while calling a method on a Groovy class from classpath.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error occurred while calling a method on a Groovy class from classpath.
at org.codehaus.gmavenplus.mojo.CompileTestsMojo.execute (CompileTestsMojo.java:74)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.gmavenplus.util.ReflectionUtils.invokeMethod (ReflectionUtils.java:275)
at org.codehaus.gmavenplus.mojo.AbstractCompileMojo.doCompile (AbstractCompileMojo.java:197)
at org.codehaus.gmavenplus.mojo.CompileTestsMojo.execute (CompileTestsMojo.java:70)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
/home/mnowicki/IdeaProjects/bali/bali-sync/src/test/groovy/pl/edu/wat/wcy/bali/sync/service/session/utils/WcyUrlsFactorySpec.groovy: 3: unable to resolve class pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
@ line 3, column 1.
import pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
^

1 error

at org.codehaus.groovy.control.ErrorCollector.failIfErrors (ErrorCollector.java:310)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits (CompilationUnit.java:946)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation (CompilationUnit.java:593)
at org.codehaus.groovy.control.CompilationUnit.compile (CompilationUnit.java:542)
at org.codehaus.groovy.control.CompilationUnit.compile (CompilationUnit.java:525)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.gmavenplus.util.ReflectionUtils.invokeMethod (ReflectionUtils.java:275)
at org.codehaus.gmavenplus.mojo.AbstractCompileMojo.doCompile (AbstractCompileMojo.java:197)
at org.codehaus.gmavenplus.mojo.CompileTestsMojo.execute (CompileTestsMojo.java:70)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException





My pom.xml has gmavenplus included:






<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<goals>
<goal>compileTests</goal>
</goals>
</execution>
</executions>
</plugin>





When I move GroupRequestParams.class to the same class as test subject, Maven test passes - how can I make gmavenplus scan sources in src/main/java?






 package pl.edu.wat.wcy.bali.sync.service.session.utils;

import lombok.extern.slf4j.Slf4j;
import pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams;

import java.time.Clock;
import java.time.LocalDate;
import java.time.Month;

import static pl.edu.wat.wcy.bali.sync.service.session.utils.WcyUrlParams.*;

@Slf4j
public class WcyUrlsFactory
private WcyUrlsFactory()


public static String createGroupPageUrl(GroupRequestParams params)
return createIndexPageUrl(params.getSessionId()) +
MID.value() +
iid(params.getSemester(), params.getClock()) +
exv(params.getGroupName());

...





 package pl.edu.wat.wcy.bali.sync.service.session.utils;

import lombok.extern.slf4j.Slf4j;
import pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams;

import java.time.Clock;
import java.time.LocalDate;
import java.time.Month;

import static pl.edu.wat.wcy.bali.sync.service.session.utils.WcyUrlParams.*;

@Slf4j
public class WcyUrlsFactory
private WcyUrlsFactory()


public static String createGroupPageUrl(GroupRequestParams params)
return createIndexPageUrl(params.getSessionId()) +
MID.value() +
iid(params.getSemester(), params.getClock()) +
exv(params.getGroupName());

...





package pl.edu.wat.wcy.bali.sync.service.fetcher;

import lombok.Builder;
import lombok.Value;
import pl.edu.wat.wcy.bali.sync.service.session.utils.Semester;

import java.time.Clock;

@Value
@Builder
public class GroupRequestParams
private final Clock clock;
private final String sessionId;
private final Semester semester;
private final String groupName;





package pl.edu.wat.wcy.bali.sync.service.fetcher;

import lombok.Builder;
import lombok.Value;
import pl.edu.wat.wcy.bali.sync.service.session.utils.Semester;

import java.time.Clock;

@Value
@Builder
public class GroupRequestParams
private final Clock clock;
private final String sessionId;
private final Semester semester;
private final String groupName;





package pl.edu.wat.wcy.bali.sync.service.session.utils

import pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
import spock.lang.Specification

import java.time.Clock
import java.time.Instant
import java.time.ZoneId

class WcyUrlsFactorySpec extends Specification
def "should create group page url for current date"() currentTime





package pl.edu.wat.wcy.bali.sync.service.session.utils

import pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
import spock.lang.Specification

import java.time.Clock
import java.time.Instant
import java.time.ZoneId

class WcyUrlsFactorySpec extends Specification
def "should create group page url for current date"() currentTime





> mvn clean test-compile -e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building bali-sync 0.1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ bali-sync ---
[INFO]
[INFO] --- gmavenplus-plugin:1.6:compileTests (default) @ bali-sync ---
[INFO] Using Groovy 2.4.4 to perform compileTests.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.108 s
[INFO] Finished at: 2019-03-07T20:41:36+01:00
[INFO] Final Memory: 25M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.gmavenplus:gmavenplus-plugin:1.6:compileTests (default) on project bali-sync: Error occurred while calling a method on a Groovy class from classpath.: InvocationTargetException: startup failed:
[ERROR] /home/mnowicki/IdeaProjects/bali/bali-sync/src/test/groovy/pl/edu/wat/wcy/bali/sync/service/session/utils/WcyUrlsFactorySpec.groovy: 3: unable to resolve class pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
[ERROR] @ line 3, column 1.
[ERROR] import pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
[ERROR] ^
[ERROR]
[ERROR] 1 error
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.gmavenplus:gmavenplus-plugin:1.6:compileTests (default) on project bali-sync: Error occurred while calling a method on a Groovy class from classpath.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error occurred while calling a method on a Groovy class from classpath.
at org.codehaus.gmavenplus.mojo.CompileTestsMojo.execute (CompileTestsMojo.java:74)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.gmavenplus.util.ReflectionUtils.invokeMethod (ReflectionUtils.java:275)
at org.codehaus.gmavenplus.mojo.AbstractCompileMojo.doCompile (AbstractCompileMojo.java:197)
at org.codehaus.gmavenplus.mojo.CompileTestsMojo.execute (CompileTestsMojo.java:70)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
/home/mnowicki/IdeaProjects/bali/bali-sync/src/test/groovy/pl/edu/wat/wcy/bali/sync/service/session/utils/WcyUrlsFactorySpec.groovy: 3: unable to resolve class pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
@ line 3, column 1.
import pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
^

1 error

at org.codehaus.groovy.control.ErrorCollector.failIfErrors (ErrorCollector.java:310)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits (CompilationUnit.java:946)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation (CompilationUnit.java:593)
at org.codehaus.groovy.control.CompilationUnit.compile (CompilationUnit.java:542)
at org.codehaus.groovy.control.CompilationUnit.compile (CompilationUnit.java:525)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.gmavenplus.util.ReflectionUtils.invokeMethod (ReflectionUtils.java:275)
at org.codehaus.gmavenplus.mojo.AbstractCompileMojo.doCompile (AbstractCompileMojo.java:197)
at org.codehaus.gmavenplus.mojo.CompileTestsMojo.execute (CompileTestsMojo.java:70)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException





> mvn clean test-compile -e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building bali-sync 0.1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ bali-sync ---
[INFO]
[INFO] --- gmavenplus-plugin:1.6:compileTests (default) @ bali-sync ---
[INFO] Using Groovy 2.4.4 to perform compileTests.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.108 s
[INFO] Finished at: 2019-03-07T20:41:36+01:00
[INFO] Final Memory: 25M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.gmavenplus:gmavenplus-plugin:1.6:compileTests (default) on project bali-sync: Error occurred while calling a method on a Groovy class from classpath.: InvocationTargetException: startup failed:
[ERROR] /home/mnowicki/IdeaProjects/bali/bali-sync/src/test/groovy/pl/edu/wat/wcy/bali/sync/service/session/utils/WcyUrlsFactorySpec.groovy: 3: unable to resolve class pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
[ERROR] @ line 3, column 1.
[ERROR] import pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
[ERROR] ^
[ERROR]
[ERROR] 1 error
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.gmavenplus:gmavenplus-plugin:1.6:compileTests (default) on project bali-sync: Error occurred while calling a method on a Groovy class from classpath.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error occurred while calling a method on a Groovy class from classpath.
at org.codehaus.gmavenplus.mojo.CompileTestsMojo.execute (CompileTestsMojo.java:74)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.gmavenplus.util.ReflectionUtils.invokeMethod (ReflectionUtils.java:275)
at org.codehaus.gmavenplus.mojo.AbstractCompileMojo.doCompile (AbstractCompileMojo.java:197)
at org.codehaus.gmavenplus.mojo.CompileTestsMojo.execute (CompileTestsMojo.java:70)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
/home/mnowicki/IdeaProjects/bali/bali-sync/src/test/groovy/pl/edu/wat/wcy/bali/sync/service/session/utils/WcyUrlsFactorySpec.groovy: 3: unable to resolve class pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
@ line 3, column 1.
import pl.edu.wat.wcy.bali.sync.service.fetcher.GroupRequestParams
^

1 error

at org.codehaus.groovy.control.ErrorCollector.failIfErrors (ErrorCollector.java:310)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits (CompilationUnit.java:946)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation (CompilationUnit.java:593)
at org.codehaus.groovy.control.CompilationUnit.compile (CompilationUnit.java:542)
at org.codehaus.groovy.control.CompilationUnit.compile (CompilationUnit.java:525)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.gmavenplus.util.ReflectionUtils.invokeMethod (ReflectionUtils.java:275)
at org.codehaus.gmavenplus.mojo.AbstractCompileMojo.doCompile (AbstractCompileMojo.java:197)
at org.codehaus.gmavenplus.mojo.CompileTestsMojo.execute (CompileTestsMojo.java:70)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException





<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<goals>
<goal>compileTests</goal>
</goals>
</execution>
</executions>
</plugin>





<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<goals>
<goal>compileTests</goal>
</goals>
</execution>
</executions>
</plugin>






java spring spring-boot groovy spock






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 7 at 20:29









Michael Petch

26.8k557106




26.8k557106










asked Mar 7 at 20:13









M.NowickiM.Nowicki

1




1












  • You'll need to include your full POM. It looks like Maven isn't running compile between clean and test-compile for some reason.

    – chrylis
    Mar 7 at 20:45











  • @chrylis Thank you for answer - in fact you were right, my project was not compiled because of <packaging>pom</packaging> set in pom - removing it solved my problem :)

    – M.Nowicki
    Mar 8 at 23:28

















  • You'll need to include your full POM. It looks like Maven isn't running compile between clean and test-compile for some reason.

    – chrylis
    Mar 7 at 20:45











  • @chrylis Thank you for answer - in fact you were right, my project was not compiled because of <packaging>pom</packaging> set in pom - removing it solved my problem :)

    – M.Nowicki
    Mar 8 at 23:28
















You'll need to include your full POM. It looks like Maven isn't running compile between clean and test-compile for some reason.

– chrylis
Mar 7 at 20:45





You'll need to include your full POM. It looks like Maven isn't running compile between clean and test-compile for some reason.

– chrylis
Mar 7 at 20:45













@chrylis Thank you for answer - in fact you were right, my project was not compiled because of <packaging>pom</packaging> set in pom - removing it solved my problem :)

– M.Nowicki
Mar 8 at 23:28





@chrylis Thank you for answer - in fact you were right, my project was not compiled because of <packaging>pom</packaging> set in pom - removing it solved my problem :)

– M.Nowicki
Mar 8 at 23:28












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55052092%2fgroovy-cant-see-imported-java-class-in-spec-unable-to-resolve-class%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55052092%2fgroovy-cant-see-imported-java-class-in-spec-unable-to-resolve-class%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme

Identity Server 4 is not redirecting to Angular app after login2019 Community Moderator ElectionIdentity Server 4 and dockerIdentityserver implicit flow unauthorized_clientIdentityServer Hybrid Flow - Access Token is null after user successful loginIdentity Server to MVC client : Page Redirect After loginLogin with Steam OpenId(oidc-client-js)Identity Server 4+.NET Core 2.0 + IdentityIdentityServer4 post-login redirect not working in Edge browserCall to IdentityServer4 generates System.NullReferenceException: Object reference not set to an instance of an objectIdentityServer4 without HTTPS not workingHow to get Authorization code from identity server without login form

2005 Ahvaz unrest Contents Background Causes Casualties Aftermath See also References Navigation menue"At Least 10 Are Killed by Bombs in Iran""Iran"Archived"Arab-Iranians in Iran to make April 15 'Day of Fury'"State of Mind, State of Order: Reactions to Ethnic Unrest in the Islamic Republic of Iran.10.1111/j.1754-9469.2008.00028.x"Iran hangs Arab separatists"Iran Overview from ArchivedConstitution of the Islamic Republic of Iran"Tehran puzzled by forged 'riots' letter""Iran and its minorities: Down in the second class""Iran: Handling Of Ahvaz Unrest Could End With Televised Confessions""Bombings Rock Iran Ahead of Election""Five die in Iran ethnic clashes""Iran: Need for restraint as anniversary of unrest in Khuzestan approaches"Archived"Iranian Sunni protesters killed in clashes with security forces"Archived