Usage

The plugin need a project that generate a war file to run.
<project>
...
  <package>war</package>
...
</project>

Without pom.xml change

 $> mvn net.sf.alchim:winstone-maven-plugin:embed
 $> java -jar target/myArtifact-myVersion-standalone.jar
 

With pom.xml change

To Generate with the default winstone (0.9.10), without override default commande line options, with default name (finalName-standalone.jar) :

<project>
...
  <build>
    <plugins>
...
      <plugin>
        <groupId>net.sf.alchim</groupId>
        <artifactId>winstone-maven-plugin</artifactId>
      </plugin>
...
    </plugins>
  </build>
...
</project>
 

To use an other version of winstone (the artifact must present in a repository (default, or project defined), declare your winstone version as dependency :

<project>
...
  <build>
    <plugins>
...
      <plugin>
        <groupId>net.sf.alchim</groupId>
        <artifactId>winstone-maven-plugin</artifactId>
        <dependencies>
          <dependency>
            <groupId>net.sourceforge.winstone</groupId>
            <artifactId>winstone</artifactId>
            <version>0.9.9</version>
          </dependency>
        </dependencies>
      </plugin>
...
    </plugins>
  </build>
...
</project>
 

To override default command line options , define options as property of cmdLineOptions:

<project>
...
  <build>
    <plugins>
...
      <plugin>
        <groupId>net.sf.alchim</groupId>
        <artifactId>winstone-maven-plugin</artifactId>
        <configuration>
          <cmdLineOptions>
            <property>
              <name>ajp13Port</name>
              <value>-1</value>
            </property>
          </cmdLineOptions>
        </configuration>
      </plugin>
...
    </plugins>
  </build>
...
</project>
 

For other configuration (change the output name, war file,...) see the "embed" goal

attach to package phase

<project>
...
  <build>
    <plugins>
...
      <plugin>
        <groupId>net.sf.alchim</groupId>
        <artifactId>winstone-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>embed</goal>
            </goals>
          </execution>
        </executions>
        ...
      </plugin>
...
    </plugins>
  </build>
...
</project>