<?xml version="1.0" encoding="UTF-8"?>
<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>com.alibaba.csb.sdk</groupId>
	<artifactId>csb.sdk.parent</artifactId>
	<version>1.1.0</version>
        <relativePath>..</relativePath>
    </parent>
    
	<name>CSB :: SDK :: wsclient</name>
	<artifactId>ws-client</artifactId>

	<dependencies>
	<dependency>
			<groupId>com.alibaba.csb.sdk</groupId>
			<artifactId>common</artifactId>
			<version>${parent.version}</version>
			<scope>compile</scope>
		</dependency>
		
        <dependency>
            <groupId>commons-cli</groupId>
            <artifactId>commons-cli</artifactId>
            <version>1.3.1</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.5</version>
        </dependency>
		
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<version>1.12.6</version>
			<scope>provided</scope>
		</dependency>

	<dependency>
		<groupId>junit</groupId>
		<artifactId>junit</artifactId>
		<version>4.11</version>
		<scope>test</scope>
	</dependency>

	<dependency>
		<groupId>axis</groupId>
		<artifactId>axis</artifactId>
		<version>1.4</version>
		<scope>provided</scope>
	</dependency>

	<dependency>
		<groupId>org.apache.axis</groupId>
		<artifactId>axis-jaxrpc</artifactId>
		<version>1.4</version>
		<scope>provided</scope>
	</dependency>

	</dependencies>
	
	<profiles>
                <profile>
                        <id>jdk1.7</id>
                        <activation>
                                <activeByDefault>true</activeByDefault>
                                <jdk>1.7</jdk>
                        </activation>
                        <properties>
                                <maven.compiler.source>1.7</maven.compiler.source>
                                <maven.compiler.target>1.7</maven.compiler.target>
                                <maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>
                        </properties>
                </profile>
		<profile>
			<id>jdk1.6</id>
			<activation>
				<activeByDefault>false</activeByDefault>
				<jdk>1.6</jdk>
			</activation>
			<properties>
				<maven.compiler.source>1.6</maven.compiler.source>
				<maven.compiler.target>1.6</maven.compiler.target>
				<maven.compiler.compilerVersion>1.6</maven.compiler.compilerVersion>
			</properties>
		</profile>
	</profiles>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-assembly-plugin</artifactId>
				<version>2.3</version>
				<configuration>
					<appendAssemblyId>false</appendAssemblyId>
					<descriptorRefs>
						<descriptorRef>jar-with-dependencies</descriptorRef>
					</descriptorRefs>
					<archive>
					   <manifest>
                            <mainClass>com.alibaba.csb.ws.sdk.CmdWsCaller</mainClass>
                        </manifest>
					</archive>
				</configuration>
				<executions>
					<execution>
						<id>make-assembly</id>
						<phase>assembly</phase>
						<goals>
							<goal>assembly</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.0.2</version>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>
				</configuration>
			</plugin>
			
			
      <plugin>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-codegen-plugin</artifactId>
        <version>3.0.5</version>
        <executions>
          <execution>
            <id>generate-sources</id>
            <phase>generate-sources</phase>
            <configuration>
              <sourceRoot>${basedir}/target/generated/src/test/java</sourceRoot>
              <wsdlOptions>
                <wsdlOption>
                  <wsdl>${basedir}/src/test/resources/ws2restful.wsdl</wsdl>
                </wsdlOption>
              </wsdlOptions>
            </configuration>
            <goals>
              <goal>wsdl2java</goal>
            </goals>
          </execution>
        </executions>
      </plugin>


      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.9.1</version>
        <executions>
          <execution>
            <id>add-integration-test-source-as-test-sources</id>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>add-test-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${basedir}/target/generated/src/test/java</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
		</plugins>
	</build>

</project>
