libgdx-maven-archetype icon indicating copy to clipboard operation
libgdx-maven-archetype copied to clipboard

maven commands fail with "'jar-no-fork' was specified in an execution, but not found in the plugin"

Open campbellr opened this issue 11 years ago • 1 comments

First of all, I'm not particularly familiar with the maven or the rest of the java ecosystem (i'm a python developer) so this could be a user error...

Anyways, after installing this archetype and generating an empty project, all the maven subcommands (package, integration-test, etc...) fail with the following error:

INFO] ------------------------------------------------------------------------
[INFO] Building Drop Parent
[INFO]    task-segment: [integration-test]
[INFO] ------------------------------------------------------------------------
[INFO] [site:attach-descriptor {execution: default-attach-descriptor}]
[INFO] ------------------------------------------------------------------------
[INFO] Building Drop Core
[INFO]    task-segment: [integration-test]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] 'jar-no-fork' was specified in an execution, but not found in the plugin
[INFO] ------------------------------------------------------------------------

I managed to resolve this by adding the maven-source-plugin to my project's pom.xml as follows:

diff --git a/pom.xml b/pom.xml
index 00d2266..c0ee2d7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -34,6 +34,15 @@
                                        <target>1.6</target>
                                </configuration>
                        </plugin>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-source-plugin</artifactId>
+                               <version>2.2.1</version>
+                               <configuration>
+                                       <source>1.6</source>
+                                       <target>1.6</target>
+                               </configuration>
+                       </plugin>
                </plugins>
        </build>

Is this something that needs to be in src/main/resources/archetype-resources/pom.xml?

campbellr avatar Jul 07 '13 21:07 campbellr

I had the same problem. Installing maven 3.0.4 solved it for me.

kinnarr avatar Jan 24 '14 14:01 kinnarr