badlogic / lwjgl3-maven-gradle

Maven/Gradle based HelloWorld LWJGL 3 app
39 stars 12 forks source link

Add exec plugin for maven users #3

Open mpfeifer opened 7 years ago

mpfeifer commented 7 years ago

The project compiled and ran just fine for me. How do you think about adding exec-maven plugin to pom.xml:

   <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>exec-maven-plugin</artifactId>
      <version>1.5.0</version>
      <executions>
        <execution>
          <goals>
            <goal>java</goal>
          </goals>
        </execution>
      </executions>
      <configuration>
        <executable>java</executable>
        <arguments>
          <argument>-classpath</argument>
          <classpath/>
          <argument>Lwjgl3Test</argument>
        </arguments>
      </configuration>
    </plugin>

This way one can "mvn exec:exec" and see the demo running.

petrzjunior commented 4 years ago

@mpfeifer You literally saved my back. I was trying for hours to get this to run via generated .jar and this is a simple elegant solution. Would definitely recommend adding this to the demo to get it running.

chirontt commented 3 years ago

The following Maven command should launch the Lwjgl3Test sample app without any extra plugin:

mvn exec:java -Dexec.mainClass=Lwjgl3Test