<?xml version="1.0"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements. See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership. The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License. You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, either express or implied. See the License for the
  specific language governing permissions and limitations
  under the License.
-->
<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>cxf-rt-management-web</artifactId>
    <packaging>bundle</packaging>
    <name>Apache CXF Runtime Web Management</name>
    <description>Apache CXF Runtime Web Management</description>
    <url>http://cxf.apache.org</url>
    <parent>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-parent</artifactId>
        <version>3.0.4.redhat-621177</version>
        <relativePath>../../parent/pom.xml</relativePath>
    </parent>
    <properties>
        <cxf.osgi.import>
	  !com.google.*,
	  org.apache.abdera.parser.stax,
	  org.apache.abdera,
	  com.ctc.wstx.stax,
	  *
        </cxf.osgi.import>
        <gwt.version>2.6.0</gwt.version>
        <gwt.inject.version>1.5.0</gwt.inject.version>
        <gwt.plugin.version>2.6.0</gwt.plugin.version>
        <google.findbugs.version>1.3.9</google.findbugs.version>
        <gwt.hostedmode.dir>${project.build.directory}/war</gwt.hostedmode.dir>
        <gwt.classes.dir>${gwt.hostedmode.dir}/WEB-INF/classes</gwt.classes.dir>
        <cxf.pmd.eclipse.ruleset.ext>-generated</cxf.pmd.eclipse.ruleset.ext>
    </properties>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.abdera</groupId>
            <artifactId>abdera-core</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.apache.abdera</groupId>
            <artifactId>abdera-parser</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.apache.abdera</groupId>
            <artifactId>abdera-extensions-json</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-core</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-rs-extension-providers</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-rs-extension-search</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>${cxf.servlet-api.group}</groupId>
            <artifactId>${cxf.servlet-api.artifact}</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.codehaus.jettison</groupId>
            <artifactId>jettison</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-management</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-frontend-jaxrs</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-rs-client</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-servlet</artifactId>
            <version>${gwt.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-user</artifactId>
            <version>${gwt.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.gwt.inject</groupId>
            <artifactId>gin</artifactId>
            <version>${gwt.inject.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-activation_1.1_spec</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <version>${google.findbugs.version}</version>
        </dependency>
    </dependencies>
    <build>
        <outputDirectory>${gwt.classes.dir}</outputDirectory>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>gwt-maven-plugin</artifactId>
                <version>${gwt.plugin.version}</version>
                <executions>
                    <execution>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <soyc>false</soyc>
                    <disableClassMetadata>true</disableClassMetadata>
                    <disableCastChecking>true</disableCastChecking>
                    <webappDirectory>${gwt.classes.dir}/static-content</webappDirectory>
                    <hostedWebapp>${gwt.hostedmode.dir}</hostedWebapp>
                    <runTarget>logbrowser/LogBrowser.html</runTarget>
                    <gen>${project.build.directory}/generated-sources/gwt</gen>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Include-Resource>
                          {maven-resources},
                          static-content=${gwt.classes.dir}/static-content
                        </Include-Resource>
			<Export-Package>
			  org.apache.cxf.management.web.browser,
			  org.apache.cxf.management.web.browser*,
			  org.apache.cxf.management.web.logging.atom*,
			</Export-Package>
                    </instructions>
                </configuration>
            </plugin>

        </plugins>
    </build>
    <profiles>
        <profile>
            <id>setup.eclipse</id>
            <build>
                <defaultGoal>process-test-sources</defaultGoal>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>setup.eclipse.project.sdo</id>
                                <phase>process-test-sources</phase>
                                <configuration>
                                    <target>
                                        <!-- GWT generated code is pretty crappy -->
                                        <propertyfile file="${basedir}/.settings/org.eclipse.jdt.core.prefs">
                                            <entry key="org.eclipse.jdt.core.compiler.problem.rawTypeReference" value="ignore" />
                                            <entry key="org.eclipse.jdt.core.compiler.problem.unusedImport" value="ignore" />
                                            <entry key="org.eclipse.jdt.core.compiler.problem.unusedLocal" value="ignore" />
                                            <entry key="org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation" value="ignore" />
                                            <entry key="org.eclipse.jdt.core.compiler.problem.deprecation" value="ignore" />
                                            <entry key="org.eclipse.jdt.core.compiler.problem.unusedPrivateMember" value="ignore" />
                                        </propertyfile>
                                    </target>
                                </configuration>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>build-helper-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>add-source-dir</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>add-source</goal>
                                </goals>
                                <configuration>
                                    <sources>
                                        <source>${project.build.directory}/generated-sources/gwt</source>
                                    </sources>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>dev</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-resources-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>copy-resources</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>copy-resources</goal>
                                </goals>
                                <configuration>
                                    <outputDirectory>${gwt.hostedmode.dir}</outputDirectory>
                                    <resources>
                                        <resource>
                                            <directory>${project.basedir}/src/test/gwt-debug</directory>
                                        </resource>
                                    </resources>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>build-helper-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>add-source</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>add-source</goal>
                                </goals>
                                <configuration>
                                    <sources>
                                        <source>${project.basedir}/src/test/gwt-debug</source>
                                    </sources>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
