[forge-issues] [JBoss JIRA] (FORGE-1621) Creating a jar project with Main should generate an exec-maven-plugin in pom.xml
Antonio Goncalves (JIRA)
issues at jboss.org
Sun Mar 2 11:58:47 EST 2014
Antonio Goncalves created FORGE-1621:
----------------------------------------
Summary: Creating a jar project with Main should generate an exec-maven-plugin in pom.xml
Key: FORGE-1621
URL: https://issues.jboss.org/browse/FORGE-1621
Project: Forge
Issue Type: Feature Request
Components: Maven
Affects Versions: 2.1.1.Final
Reporter: Antonio Goncalves
Priority: Minor
When creating a project with a {{Main}} class :
{code}
project-new --named mainproj --type jar --createMain
{code}
It would be good to have, in the {{pom.xml}}, a generated {{exec-maven-plugin}} so that we could execute the {{Main}} class with a simple {{mvn exec:java}} command :
{code}
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.mainproj</groupId>
<artifactId>mainproj</artifactId>
<version>1.0.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>org.mainproj.Main</mainClasss>
</configuration>
</plugin>
</plugins>
</build>
</project>
{code}
See : http://mojo.codehaus.org/exec-maven-plugin/index.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the forge-issues
mailing list