Dashboard > GreenPepper Open Documentation Refactoring > ... > 3. Use GreenPepper Maven plugin > Maven plugin examples
  GreenPepper Open Documentation Refactoring Log In View a printable version of the current page.  
  Maven plugin examples
Added by Laurent Cobos, last edited by Laurent Cobos on Aug 13, 2009
Labels: 
(None)

Examples

GreenPepper Core Pom.xml example

 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <artifactId>greenpepper-core</artifactId>
    <packaging>jar</packaging>
    <name>GreenPepper Core</name>

    <parent>
        <groupId>greenpepper-open</groupId>
        <artifactId>greenpepper-open</artifactId>
        <version>2.6</version>
    </parent>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>greenpepper</groupId>
                <artifactId>greenpepper-maven-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                    <fixtureSourceDirectory>src/fixture/java</fixtureSourceDirectory>
                    <fixtureOutputDirectory>target/fixture-test-classes</fixtureOutputDirectory>
                    <specsDirectory>src/specs</specsDirectory>
                    <reportsDirectory>target/greenpepper-reports</reportsDirectory>
                    <systemUnderDevelopment>com.greenpepper.systemunderdevelopment.GreenPepperSystemUnderDevelopment</systemUnderDevelopment>
                    <resources>
                        <resource>
                            <directory>src/fixture/resources</directory>
                        </resource>
                    </resources>
                    <repositories>
                        <repository>
                            <type>com.greenpepper.runner.repository.GreenPepperRepository</type>
                            <root>
                                <![CDATA[http://www.greenpeppersoftware.com/confluence/rpc/xmlrpc?handler=greenpepper1&sut=GreenPepperOpen - Core Java&includeStyle=true]]>
                            </root>
                            <name>greenpepper</name>
                            <suites>
                                <suite>GreenPepper Confluence-GREENPEPPER</suite>
                            </suites>
                        </repository>
                    </repositories>
                </configuration>
                <executions>
                    <execution>
                        <id>greenpepper</id>
                        <goals>
                            <goal>compile</goal>
                            <goal>resources</goal>
                            <goal>fixture-jar</goal>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

Specifications documents as HTML files

Example of a file system repository:
In this example, the specifications are under the directory ${basedir}\src\fixture\specs (which correspond to the root element). For each repository, the specifications are under the directory Demo and DemoPhoneBook.

<build>
    <plugins>
        <plugin>
            <groupId>greenpepper</groupId>
            <artifactId>greenpepper-maven-plugin</artifactId>
            <version>2.6</version>
            <configuration>
                <source>1.5</source>
                <target>1.5</target>
                <fixtureSourceDirectory>src/fixture/java</fixtureSourceDirectory>
                <fixtureOutputDirectory>target/fixture-test-classes</fixtureOutputDirectory>
                <systemUnderDevelopment>com.greenpepper.confluence.demo.DemoSystemUnderDevelopment</systemUnderDevelopment>
                <resources>
                    <resource>
                        <directory>src/fixture/resources</directory>
                        <excludes>
                            <exclude>**/*.java</exclude>
                        </excludes>
                    </resource>
                </resources>
                <repositories>
                    <repository>
                        <name>Demo</name>
                        <type>com.greenpepper.repository.FileSystemRepository</type>
                        <root>${basedir}/src/fixture/specs</root>
                        <suites>
                            <suite>Demo</suite>
                        </suites>
                    </repository>
                    <repository>
                        <name>DemoPhoneBook</name>
                        <type>com.greenpepper.repository.FileSystemRepository</type>
                        <root>${basedir}/src/fixture/specs</root>
                        <suites>
                            <suite>DemoPhoneBook</suite>
                        </suites>
                    </repository>
                </repositories>
            </configuration>
            <executions>
                <execution>
                    <id>greenpepper</id>
                    <goals>
                        <goal>compile</goal>
                        <goal>resources</goal>
                        <goal>fixture-jar</goal>
                        <goal>run</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

You can found the project of this example here.
try anonymous/anonymous if asked for a password

GreenPepper Core pom.xml (GreenPepper Open Documentation Refactoring )
Specifications documents as HTML files (GreenPepper Open Documentation Refactoring )

DEMONSTRATION LICENSE - This Confluence site is for demonstration purposes only. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.4.3 Build:#705 Mar 21, 2007) - Bug/feature request - Contact Administrators