<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.springsource.insight.bootstrap</groupId>
    <artifactId>insight-bootstrap-weblogic-common</artifactId>
    <version>1.9.0-BETA-RC3</version>
    <name>com.springsource.insight.bootstrap:weblogic-common</name>
    <packaging>jar</packaging>

    <parent>
        <groupId>com.springsource.insight</groupId>
        <artifactId>parent</artifactId>
        <version>1.9.0-BETA-RC3</version>
        <relativePath>../../../../parent</relativePath>
    </parent>
    
    <properties>
    	<weblogic.version>10.3.5</weblogic.version>    
    </properties>

    <profiles>
        <profile>
            <id>publish-sensitive-sources</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <dependencies>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
            <version>${aspectj.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
            <version>${aspectj.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.springsource.insight.bootstrap</groupId>
            <artifactId>insight-bootstrap-generic</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.springsource.insight</groupId>
            <artifactId>insight-intercept</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.springsource.insight</groupId>
            <artifactId>insight-util</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
            <!-- mainly so we can make sure it has been downloaded when we deploy it during development -->
        <dependency>
            <groupId>com.springsource.insight</groupId>
            <artifactId>insight-annotation</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>

            <!-- NOTE: the following dependencies are not available
                via Maven repository so they are provided as part of
                the checked-in project -->
        <dependency>
            <groupId>weblogic</groupId>
            <artifactId>weblogic</artifactId>
            <version>${weblogic.version}</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/lib/weblogic.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>weblogic</groupId>
            <artifactId>wlthint3client</artifactId>
            <version>${weblogic.version}</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/lib/wlthint3client.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>com.bea.core.weblogic.web</groupId>
            <artifactId>api</artifactId>
            <version>1.4.0.0</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/lib/com.bea.core.weblogic.web.api_1.4.0.0.jar</systemPath>
        </dependency>
        
        
                
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>${servlet-api.version}</version>
            <scope>provided</scope>
        </dependency>
        
        <dependency>
            <groupId>com.springsource.insight.bootstrap</groupId>
            <artifactId>insight-bootstrap-generic</artifactId>
            <version>${project.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>test-compile</goal>
                        </goals>
                        <configuration>
                            <outxml>false</outxml>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-clover2-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemProperties>
                        <property>
                            <name>insight.base</name>
                            <value>${project.basedir}/src/test/insight</value>
                        </property>
                        <property>
                            <name>insight.enabled</name>
                            <value>true</value>
                        </property>
                        <property>
                            <name>insight.bootstrap.ignore.missing.appname</name>
                            <value>localhost|surefire</value>
                        </property>
                        <property>
                            <name>insight.bootstrap.server.delegate.class</name>
                            <value>com.springsource.insight.bootstrap.weblogic.WebLogicServerDelegate</value>
                        </property>
                    </systemProperties>
                    <argLine>
                        -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
                    </argLine>
                </configuration>
            </plugin>

            <plugin>
                <groupId>com.mycila.maven-license-plugin</groupId>
                <artifactId>maven-license-plugin</artifactId>
                <configuration>
                    <header>../../../../etc/aslHeader.txt</header>
                </configuration>
            </plugin>
            
            <!-- Avoid the automatic attempt to download the sources on every build
                since some of the are never available -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>ignore</id>
                        <phase>none</phase>
                    </execution>
                </executions>
            </plugin>           
        </plugins>
    </build>
</project>
