Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<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">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.kie.remote</groupId>
    <artifactId>kie-remote</artifactId>
    <version>6.3.0.Beta2</version>
  </parent>

  <artifactId>kie-remote-services</artifactId>
  <name>KIE Remote Services :: Services</name>

  <properties>
    <version.org.jboss.byteman>2.1.4</version.org.jboss.byteman>
    <version.org.mockito>1.9.5</version.org.mockito>
    <version.org.powermock>1.5.4</version.org.powermock>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.kie.remote</groupId>
      <artifactId>kie-remote-jaxb</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.remote</groupId>
      <artifactId>kie-remote-common</artifactId>
    </dependency>

    <!-- webservices -->
    <dependency>
      <groupId>org.kie.remote.ws</groupId>
      <artifactId>kie-remote-ws-common</artifactId>
    </dependency>

    <!-- kie -->
    <dependency>
      <groupId>org.kie</groupId>
      <artifactId>kie-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.kie</groupId>
      <artifactId>kie-internal</artifactId>
      <scope>provided</scope>
    </dependency>

    <!--  drools/jbpm -->
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-core</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-flow</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-runtime-manager</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-audit</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-human-task-core</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-human-task-audit</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-services-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-kie-services</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-services-cdi</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- JMS -->
    <dependency>
      <groupId>org.jboss.spec.javax.jms</groupId>
      <artifactId>jboss-jms-api_1.1_spec</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- REST -->
    <dependency>
      <groupId>org.jboss.resteasy</groupId>
      <artifactId>jaxrs-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.resteasy</groupId>
      <artifactId>resteasy-cdi</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.jboss.resteasy</groupId>
          <artifactId>resteasy-jaxrs</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <!--  JSON -->
    <dependency>
      <groupId>org.codehaus.jackson</groupId>
      <artifactId>jackson-core-asl</artifactId>
    </dependency> 
    <dependency>
      <groupId>org.codehaus.jackson</groupId>
      <artifactId>jackson-mapper-asl</artifactId>
    </dependency> 

    <!-- general -->
    <dependency>
      <groupId>org.jboss.spec.javax.ejb</groupId>
      <artifactId>jboss-ejb-api_3.1_spec</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.inject</groupId>
      <artifactId>javax.inject</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.enterprise</groupId>
      <artifactId>cdi-api</artifactId>
    </dependency>
    <dependency>
	  <groupId>com.sun.xml.bind</groupId>
      <artifactId>jaxb-impl</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- persistence -->
    <dependency>
      <groupId>org.hibernate.javax.persistence</groupId>
      <artifactId>hibernate-jpa-2.0-api</artifactId>
    </dependency>

    <!-- logging -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>

    <!-- security -->
    <dependency>
      <groupId>org.jboss.spec.javax.security.jacc</groupId>
      <artifactId>jboss-jacc-api_1.4_spec</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- async processing using jbpm executor -->
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-executor</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.deltaspike.core</groupId>
      <artifactId>deltaspike-core-api</artifactId>
    </dependency>

    <!-- query -->
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-query-jpa</artifactId>
    </dependency>

    <!-- TEST -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.kie.remote</groupId>
      <artifactId>kie-remote-client</artifactId>
      <scope>test</scope>
    </dependency>

    <!-- TEST: persistence -->
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-entitymanager</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.codehaus.btm</groupId>
      <artifactId>btm</artifactId>
      <scope>test</scope>
    </dependency>
    
    <!-- TEST: mock -->
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-module-junit4</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-api-mockito</artifactId>
      <scope>test</scope>
    </dependency>

    <!-- TEST: reflection -->
    <dependency>
      <groupId>org.reflections</groupId>
      <artifactId>reflections</artifactId>
      <scope>test</scope>
    </dependency>
    
    <!-- TEST: REST/JAXRS -->
    <dependency>
      <groupId>org.jboss.resteasy</groupId>
      <artifactId>resteasy-jaxrs</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <testResources>
      <testResource>
        <directory>src/test/resources</directory>
        <filtering>true</filtering>
      </testResource>
    </testResources>
    
    <plugins>
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <!--  0. delete all generated files because only the WSDL determines code, no code in VCS -->
        <configuration>
          <filesets>
            <fileset>
              <directory>src/main/generated</directory>
              <includes>
                <include>**/*.java</include>
              </includes>
              <followSymlinks>false</followSymlinks>
            </fileset>
          </filesets>
        </configuration>
      </plugin>
      
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <!-- 1. add src/main/generated so that generated classes are added to jar -->
          <execution>
            <id>add-generated-sources</id>
            <phase>initialize</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
             <configuration>
              <sources>
                <source>src/main/generated</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <!-- 2. copy wsdl file to target/classes so that "VERSION" in wsdl file can be replaced with appropriate value, before compile -->
          <execution>
            <id>copy-wsdl-to-target</id>
            <!-- here the phase you need -->
            <phase>process-sources</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
                <outputDirectory>${project.build.directory}/classes</outputDirectory>
                <resources>
                    <resource>
                        <directory>src/main/resources/</directory>
                    </resource>
                </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.google.code.maven-replacer-plugin</groupId>
        <artifactId>replacer</artifactId>
        <executions>
          <!-- 3. replace "VERSION" in WSDL file with project version + bugfix version -->
          <execution>
            <phase>process-resources</phase>
            <goals>
              <goal>replace</goal>
            </goals>                    
          </execution>
        </executions>
        <configuration>
          <basedir>${project.build.directory}/classes/wsdl</basedir>
          <includes>
            <include>CommandService.wsdl</include>
          </includes>
          <regex>true</regex>
          <replacements>
            <replacement>
              <token>VERSION</token>
              <value>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}.${bugfix.version}</value>
            </replacement>
          </replacements>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.jvnet.jax-ws-commons</groupId>
        <artifactId>jaxws-maven-plugin</artifactId>
        <version>2.3</version>
        <executions>
          <!-- 4. generate classes based on WSDL to be included in jar -->
          <execution>
            <id>wsimport-from-jdk-command</id>
            <phase>process-resources</phase>
            <goals>
              <goal>wsimport</goal>
            </goals>
            <configuration>
              <executable>${tool.wsimport}</executable>
              <sourceDestDir>${basedir}//src/main/generated</sourceDestDir>
              <packageName>org.kie.remote.services.ws.command.generated</packageName>
              <target>2.1</target>
              <!-- Following configuration will invoke wsimport once for each wsdl. -->
              <wsdlLocation>file:///wsdl/*</wsdlLocation>
              <wsdlDirectory>${project.build.directory}/classes/wsdl</wsdlDirectory>
              <wsdlFiles>
                <wsdlFile>CommandService.wsdl</wsdlFile>              
              </wsdlFiles>
            </configuration>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>

  <!-- setup corresponding executables on win/*nix -->
  <profiles>
    <profile>
      <id>win</id>
      <activation>
        <os>
          <family>windows</family>
        </os>
      </activation>
      <properties>
        <tool.wsgen>${java.home}/../bin/wsgen.exe</tool.wsgen>
        <tool.wsimport>${java.home}/../bin/wsimport.exe</tool.wsimport>
      </properties>
    </profile>
    <profile>
      <id>nix</id>
      <activation>
        <os>
          <family>!windows</family>
        </os>
      </activation>
      <properties>
        <tool.wsgen>${java.home}/../bin/wsgen</tool.wsgen>
        <tool.wsimport>${java.home}/../bin/wsimport</tool.wsimport>
      </properties>
    </profile>
  </profiles>
</project>
New to GrepCode? Check out our FAQ X