java.lang.IllegalArgumentException: at least one goal must be specified

Spring JIRA | Matthew T. Adams | 5 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    In order to run both my TestNG & JUnit 4 tests, I configured surefire in the following way in my project's pom: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.11</version> <executions> <execution> <id>default-test</id> <configuration> <skipTests>true</skipTests> </configuration> </execution> <execution> <id>junit-tests</id> <goals> <goal>test</goal> </goals> <configuration> <testNGArtifactName>none:none</testNGArtifactName> <printSummary>false</printSummary> <redirectTestOutputToFile>true</redirectTestOutputToFile> <excludes> <exclude>**/*_Roo_*</exclude> </excludes> </configuration> </execution> <execution> <id>testng-tests</id> <goals> <goal>test</goal> </goals> <configuration> <junitArtifactName>none:none</junitArtifactName> <printSummary>false</printSummary> <redirectTestOutputToFile>true</redirectTestOutputToFile> <excludes> <exclude>**/*_Roo_*</exclude> </excludes> </configuration> </execution> </executions> </plugin> Then, after running roo.sh (with development.mode=true), I get the following shell behavior: ____ ____ ____ / __ \/ __ \/ __ \ / /_/ / / / / / / / / _, _/ /_/ / /_/ / /_/ |_|\____/\____/ 1.2.1.RELEASE [rev 6eae723] Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER. [FelixDispatchQueue] at least one goal must be specified java.lang.IllegalArgumentException: at least one goal must be specified at org.apache.commons.lang3.Validate.notEmpty(Validate.java:251) at org.springframework.roo.project.Execution.<init>(Execution.java:48) at org.springframework.roo.project.Plugin.getExecutions(Plugin.java:137) at org.springframework.roo.project.Plugin.<init>(Plugin.java:182) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.springframework.roo.project.maven.PomFactoryImpl.parseElements(PomFactoryImpl.java:164) at org.springframework.roo.project.maven.PomFactoryImpl.getInstance(PomFactoryImpl.java:90) at org.springframework.roo.project.PomManagementServiceImpl.parseUnparsedPoms(PomManagementServiceImpl.java:206) at org.springframework.roo.project.PomManagementServiceImpl.updatePomCache(PomManagementServiceImpl.java:336) at org.springframework.roo.project.PomManagementServiceImpl.getModuleForFileIdentifier(PomManagementServiceImpl.java:123) at org.springframework.roo.project.AbstractProjectOperations.getModuleForFileIdentifier(AbstractProjectOperations.java:510) at org.springframework.roo.classpath.TypeLocationServiceImpl.getProposedJavaType(TypeLocationServiceImpl.java:342) at org.springframework.roo.classpath.TypeLocationServiceImpl.doesPathIndicateJavaType(TypeLocationServiceImpl.java:112) at org.springframework.roo.classpath.TypeLocationServiceImpl.getPhysicalTypeIdentifier(TypeLocationServiceImpl.java:248) at org.springframework.roo.classpath.DefaultPhysicalTypeMetadataProvider.onFileEvent(DefaultPhysicalTypeMetadataProvider.java:176) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:429) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanAll(PollingFileMonitorService.java:642) at org.springframework.roo.process.manager.internal.MonitoringRequestCommand.callback(MonitoringRequestCommand.java:39) at org.springframework.roo.process.manager.internal.MonitoringRequestCommand.callback(MonitoringRequestCommand.java:15) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:169) at org.springframework.roo.process.manager.internal.DefaultProcessManager.completeStartup(DefaultProcessManager.java:139) at org.springframework.roo.process.manager.internal.DefaultProcessManager.access$100(DefaultProcessManager.java:35) at org.springframework.roo.process.manager.internal.DefaultProcessManager$1.frameworkEvent(DefaultProcessManager.java:68) at org.apache.felix.framework.util.EventDispatcher.invokeFrameworkListenerCallback(EventDispatcher.java:774) at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:725) at org.apache.felix.framework.util.EventDispatcher.run(EventDispatcher.java:949) at org.apache.felix.framework.util.EventDispatcher.access$000(EventDispatcher.java:54) at org.apache.felix.framework.util.EventDispatcher$1.run(EventDispatcher.java:106) at java.lang.Thread.run(Thread.java:662) roo> hint at least one goal must be specified java.lang.IllegalArgumentException: at least one goal must be specified at org.apache.commons.lang3.Validate.notEmpty(Validate.java:251) at org.springframework.roo.project.Execution.<init>(Execution.java:48) at org.springframework.roo.project.Plugin.getExecutions(Plugin.java:137) at org.springframework.roo.project.Plugin.<init>(Plugin.java:182) at sun.reflect.GeneratedConstructorAccessor11.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.springframework.roo.project.maven.PomFactoryImpl.parseElements(PomFactoryImpl.java:164) at org.springframework.roo.project.maven.PomFactoryImpl.getInstance(PomFactoryImpl.java:90) at org.springframework.roo.project.PomManagementServiceImpl.parseUnparsedPoms(PomManagementServiceImpl.java:206) at org.springframework.roo.project.PomManagementServiceImpl.updatePomCache(PomManagementServiceImpl.java:336) at org.springframework.roo.project.PomManagementServiceImpl.getFocusedModule(PomManagementServiceImpl.java:108) at org.springframework.roo.project.PomManagementServiceImpl.getFocusedModuleName(PomManagementServiceImpl.java:116) at org.springframework.roo.project.AbstractProjectOperations.getFocusedModuleName(AbstractProjectOperations.java:494) at org.springframework.roo.project.AbstractProjectOperations.isFocusedProjectAvailable(AbstractProjectOperations.java:595) at org.springframework.roo.classpath.operations.HintOperationsImpl.determineTopic(HintOperationsImpl.java:49) at org.springframework.roo.classpath.operations.HintOperationsImpl.hint(HintOperationsImpl.java:101) at org.springframework.roo.classpath.operations.HintCommands.hint(HintCommands.java:26) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy$1.callback(ProcessManagerHostedExecutionStrategy.java:46) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:169) at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:226) at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:43) at org.springframework.roo.shell.AbstractShell.executeCommandImpl(AbstractShell.java:225) at org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:135) at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:420) at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:538) at java.lang.Thread.run(Thread.java:662) If I then add <goals><goal>test</goal></goals> to the default-test surefire execution, everything works fine.

    Spring JIRA | 5 years ago | Matthew T. Adams
    java.lang.IllegalArgumentException: at least one goal must be specified
  2. 0

    In order to run both my TestNG & JUnit 4 tests, I configured surefire in the following way in my project's pom: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.11</version> <executions> <execution> <id>default-test</id> <configuration> <skipTests>true</skipTests> </configuration> </execution> <execution> <id>junit-tests</id> <goals> <goal>test</goal> </goals> <configuration> <testNGArtifactName>none:none</testNGArtifactName> <printSummary>false</printSummary> <redirectTestOutputToFile>true</redirectTestOutputToFile> <excludes> <exclude>**/*_Roo_*</exclude> </excludes> </configuration> </execution> <execution> <id>testng-tests</id> <goals> <goal>test</goal> </goals> <configuration> <junitArtifactName>none:none</junitArtifactName> <printSummary>false</printSummary> <redirectTestOutputToFile>true</redirectTestOutputToFile> <excludes> <exclude>**/*_Roo_*</exclude> </excludes> </configuration> </execution> </executions> </plugin> Then, after running roo.sh (with development.mode=true), I get the following shell behavior: ____ ____ ____ / __ \/ __ \/ __ \ / /_/ / / / / / / / / _, _/ /_/ / /_/ / /_/ |_|\____/\____/ 1.2.1.RELEASE [rev 6eae723] Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER. [FelixDispatchQueue] at least one goal must be specified java.lang.IllegalArgumentException: at least one goal must be specified at org.apache.commons.lang3.Validate.notEmpty(Validate.java:251) at org.springframework.roo.project.Execution.<init>(Execution.java:48) at org.springframework.roo.project.Plugin.getExecutions(Plugin.java:137) at org.springframework.roo.project.Plugin.<init>(Plugin.java:182) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.springframework.roo.project.maven.PomFactoryImpl.parseElements(PomFactoryImpl.java:164) at org.springframework.roo.project.maven.PomFactoryImpl.getInstance(PomFactoryImpl.java:90) at org.springframework.roo.project.PomManagementServiceImpl.parseUnparsedPoms(PomManagementServiceImpl.java:206) at org.springframework.roo.project.PomManagementServiceImpl.updatePomCache(PomManagementServiceImpl.java:336) at org.springframework.roo.project.PomManagementServiceImpl.getModuleForFileIdentifier(PomManagementServiceImpl.java:123) at org.springframework.roo.project.AbstractProjectOperations.getModuleForFileIdentifier(AbstractProjectOperations.java:510) at org.springframework.roo.classpath.TypeLocationServiceImpl.getProposedJavaType(TypeLocationServiceImpl.java:342) at org.springframework.roo.classpath.TypeLocationServiceImpl.doesPathIndicateJavaType(TypeLocationServiceImpl.java:112) at org.springframework.roo.classpath.TypeLocationServiceImpl.getPhysicalTypeIdentifier(TypeLocationServiceImpl.java:248) at org.springframework.roo.classpath.DefaultPhysicalTypeMetadataProvider.onFileEvent(DefaultPhysicalTypeMetadataProvider.java:176) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:429) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanAll(PollingFileMonitorService.java:642) at org.springframework.roo.process.manager.internal.MonitoringRequestCommand.callback(MonitoringRequestCommand.java:39) at org.springframework.roo.process.manager.internal.MonitoringRequestCommand.callback(MonitoringRequestCommand.java:15) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:169) at org.springframework.roo.process.manager.internal.DefaultProcessManager.completeStartup(DefaultProcessManager.java:139) at org.springframework.roo.process.manager.internal.DefaultProcessManager.access$100(DefaultProcessManager.java:35) at org.springframework.roo.process.manager.internal.DefaultProcessManager$1.frameworkEvent(DefaultProcessManager.java:68) at org.apache.felix.framework.util.EventDispatcher.invokeFrameworkListenerCallback(EventDispatcher.java:774) at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:725) at org.apache.felix.framework.util.EventDispatcher.run(EventDispatcher.java:949) at org.apache.felix.framework.util.EventDispatcher.access$000(EventDispatcher.java:54) at org.apache.felix.framework.util.EventDispatcher$1.run(EventDispatcher.java:106) at java.lang.Thread.run(Thread.java:662) roo> hint at least one goal must be specified java.lang.IllegalArgumentException: at least one goal must be specified at org.apache.commons.lang3.Validate.notEmpty(Validate.java:251) at org.springframework.roo.project.Execution.<init>(Execution.java:48) at org.springframework.roo.project.Plugin.getExecutions(Plugin.java:137) at org.springframework.roo.project.Plugin.<init>(Plugin.java:182) at sun.reflect.GeneratedConstructorAccessor11.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.springframework.roo.project.maven.PomFactoryImpl.parseElements(PomFactoryImpl.java:164) at org.springframework.roo.project.maven.PomFactoryImpl.getInstance(PomFactoryImpl.java:90) at org.springframework.roo.project.PomManagementServiceImpl.parseUnparsedPoms(PomManagementServiceImpl.java:206) at org.springframework.roo.project.PomManagementServiceImpl.updatePomCache(PomManagementServiceImpl.java:336) at org.springframework.roo.project.PomManagementServiceImpl.getFocusedModule(PomManagementServiceImpl.java:108) at org.springframework.roo.project.PomManagementServiceImpl.getFocusedModuleName(PomManagementServiceImpl.java:116) at org.springframework.roo.project.AbstractProjectOperations.getFocusedModuleName(AbstractProjectOperations.java:494) at org.springframework.roo.project.AbstractProjectOperations.isFocusedProjectAvailable(AbstractProjectOperations.java:595) at org.springframework.roo.classpath.operations.HintOperationsImpl.determineTopic(HintOperationsImpl.java:49) at org.springframework.roo.classpath.operations.HintOperationsImpl.hint(HintOperationsImpl.java:101) at org.springframework.roo.classpath.operations.HintCommands.hint(HintCommands.java:26) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy$1.callback(ProcessManagerHostedExecutionStrategy.java:46) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:169) at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:226) at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:43) at org.springframework.roo.shell.AbstractShell.executeCommandImpl(AbstractShell.java:225) at org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:135) at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:420) at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:538) at java.lang.Thread.run(Thread.java:662) If I then add <goals><goal>test</goal></goals> to the default-test surefire execution, everything works fine.

    Spring JIRA | 5 years ago | Matthew T. Adams
    java.lang.IllegalArgumentException: at least one goal must be specified
  3. 0

    String constants (months and day of week) not working as expected

    GitHub | 2 years ago | michaelknigge
    java.lang.IllegalArgumentException: Values must not be empty
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 27#117922987

    GitHub | 2 years ago | michaelknigge
    java.lang.IllegalArgumentException: Values must not be empty
  6. 0

    Illegal question mark value on cron pattern assumed valid.

    GitHub | 1 year ago | DanoOM
    java.lang.IllegalArgumentException: Values must not be empty
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalArgumentException

    at least one goal must be specified

    at org.apache.commons.lang3.Validate.notEmpty()
  2. Commons Lang
    Validate.notEmpty
    1. org.apache.commons.lang3.Validate.notEmpty(Validate.java:251)
    1 frame
  3. org.springframework.roo
    Plugin.<init>
    1. org.springframework.roo.project.Execution.<init>(Execution.java:48)
    2. org.springframework.roo.project.Plugin.getExecutions(Plugin.java:137)
    3. org.springframework.roo.project.Plugin.<init>(Plugin.java:182)
    3 frames
  4. Java RT
    Constructor.newInstance
    1. sun.reflect.GeneratedConstructorAccessor11.newInstance(Unknown Source)
    2. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    3. java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    3 frames
  5. org.springframework.roo
    HintCommands.hint
    1. org.springframework.roo.project.maven.PomFactoryImpl.parseElements(PomFactoryImpl.java:164)
    2. org.springframework.roo.project.maven.PomFactoryImpl.getInstance(PomFactoryImpl.java:90)
    3. org.springframework.roo.project.PomManagementServiceImpl.parseUnparsedPoms(PomManagementServiceImpl.java:206)
    4. org.springframework.roo.project.PomManagementServiceImpl.updatePomCache(PomManagementServiceImpl.java:336)
    5. org.springframework.roo.project.PomManagementServiceImpl.getFocusedModule(PomManagementServiceImpl.java:108)
    6. org.springframework.roo.project.PomManagementServiceImpl.getFocusedModuleName(PomManagementServiceImpl.java:116)
    7. org.springframework.roo.project.AbstractProjectOperations.getFocusedModuleName(AbstractProjectOperations.java:494)
    8. org.springframework.roo.project.AbstractProjectOperations.isFocusedProjectAvailable(AbstractProjectOperations.java:595)
    9. org.springframework.roo.classpath.operations.HintOperationsImpl.determineTopic(HintOperationsImpl.java:49)
    10. org.springframework.roo.classpath.operations.HintOperationsImpl.hint(HintOperationsImpl.java:101)
    11. org.springframework.roo.classpath.operations.HintCommands.hint(HintCommands.java:26)
    11 frames
  6. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  7. org.springframework.roo
    JLineShell.run
    1. org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy$1.callback(ProcessManagerHostedExecutionStrategy.java:46)
    2. org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:169)
    3. org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:226)
    4. org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:43)
    5. org.springframework.roo.shell.AbstractShell.executeCommandImpl(AbstractShell.java:225)
    6. org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:135)
    7. org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:420)
    8. org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:538)
    8 frames
  8. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:662)
    1 frame