MavenStart
From semanticweb.org
| MavenStart | |
|---|---|
| Status: | alpha |
| Last release: | 0.0.2 (September 11, 2008) |
| License: | BSD |
| Affiliation: | FZI |
MavenStart is a Maven2-plugin for generating simple command line scripts to just start a project. This allows you to run your maven-based projects by settingthe classpath to target/classes and all jars in the local maven repository without starting eclipse. So you don't need to package the project as a jar just to run it. It is the command-line equivalent to Eclipse/Run As....
Contents |
[edit] Road Map
- Add support for generating Linux shell scripts
- Add support for including start scripts in distributions
- This requires the plugin to generate a different classpath
[edit] Feedback
Simply use the discussion page of this wikiu page. I watch it.
[edit] Usage
Add this to your pom.xml file and change mainclass:
<build>
<plugins>
<plugin>
<groupId>de.xam</groupId>
<artifactId>maven-start-plugin</artifactId>
<!-- this number might change -->
<version>0.0.3-SNAPSHOT</version>
<configuration>
<!-- put YOUR main class here, syntax: de.xam.MainClass -->
<mainclass> ... your main class goes here ... </mainclass>
</configuration>
</plugin>
</plugins>
</build>
To let Maven find the plugin you also need to include
<pluginRepositories>
<pluginRepository>
<id>semweb4j-repo</id>
<name>Semweb4j.org maven repo</name>
<url>http://semweb4j.org/repo/</url>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>semweb4j-snapshots</id>
<name>Semweb4j.org maven snapshots</name>
<url>http://semweb4j.org/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
By running
mvn de.xam:maven-start-plugin:start
the plugin generates a file called run_win.bat in the project root folder.
Running
start.bat or start.sh
should run your application,