Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ RHQ Management Platform
  ~ Copyright (C) 2005-2013 Red Hat, Inc.
  ~ All rights reserved.
  ~
  ~ This program is free software; you can redistribute it and/or modify
  ~ it under the terms of the GNU General Public License as published by
  ~ the Free Software Foundation version 2 of the License.
  ~
  ~ This program is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  ~ GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License
  ~ along with this program; if not, write to the Free Software Foundation, Inc.,
  ~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  -->

<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/xsd/maven-4.0.0.xsd">
  <parent>
    <artifactId>rhq-helpers</artifactId>
    <groupId>org.rhq.helpers</groupId>
    <version>4.13.0</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.rhq.helpers</groupId>
  <artifactId>rest-docs-generator</artifactId>
  <packaging>jar</packaging>

  <build>
    <sourceDirectory>src/main/java</sourceDirectory>
    <defaultGoal>install</defaultGoal>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
    </resources>
    <testSourceDirectory>src/test/java</testSourceDirectory>
    <testResources>
      <testResource>
        <directory>src/test/resources</directory>
      </testResource>
    </testResources>
    <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <executions>
          <execution>
            <!-- Compile the sources i.e. the processor plugin-->
            <id>compile-processor</id>
            <phase>compile</phase>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <proc>none</proc>
              <verbose>false</verbose>
            </configuration>
          </execution>
          <execution>
            <!-- Execute the compiled plugin on the test sources -->
            <id>create-rest-api-reports</id>
            <phase>process-test-classes</phase>
            <goals>
              <!-- We want to process the classes in test/ -->
              <goal>testCompile</goal>
            </goals>
            <configuration>
              <annotationProcessors>
                <processor>org.rhq.helpers.rest_docs_generator.ClassLevelProcessor</processor>
              </annotationProcessors>
              <proc>only</proc>
              <compilerArguments>
                <AtargetDirectory>${project.build.directory}/docs/xml</AtargetDirectory>
                <AmodelPkg>org.rhq.helpers.rest_docs_generator.test</AmodelPkg>
                <!-- enable the next line to have the output of the processor shown on console -->
                <!--<Averbose>true</Averbose>-->
              </compilerArguments>
              <!-- set the next to true to enable verbose output of the compiler plugin; default from the evn is true, but this is too noisy -->
              <verbose>false</verbose>
            </configuration>

          </execution>
        </executions>
      </plugin>

      <!-- now xml translate the output from above to html -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>xml-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>process-test-classes</phase>
            <goals>
              <goal>transform</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <transformationSets>
            <transformationSet>
              <!-- target dir from -AtargetDirectory=... above -->
              <dir>target/docs/xml</dir>
              <stylesheet>src/main/xsl/apiout2html.xsl</stylesheet>
              <outputDir>${project.build.directory}/docs/html</outputDir>
              <fileMappers>
                <fileMapper implementation="org.codehaus.plexus.components.io.filemappers.FileExtensionMapper">
                  <targetExtension>.html</targetExtension>
                </fileMapper>
              </fileMappers>
            </transformationSet>
          </transformationSets>
        </configuration>
      </plugin>
    </plugins>
  </build>


  <dependencies>
    <dependency>
      <groupId>javax.ws.rs</groupId>
      <artifactId>jsr311-api</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>javax.ejb</groupId>
      <artifactId>ejb-api</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.wordnik</groupId>
      <artifactId>swagger-annotations_2.9.1</artifactId>
      <version>${swagger-annotations.version}</version>
    </dependency>
    <dependency>
      <groupId>org.jboss.resteasy</groupId>
      <artifactId>resteasy-jaxrs</artifactId>
      <version>${resteasy.version}</version>
    </dependency>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <scope>compile</scope>
    </dependency>
  </dependencies>
</project>
New to GrepCode? Check out our FAQ X