<!--
  ~ 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.
  -->
<!-- $Rev$ $Date$ -->
<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>org.apache.geronimo.devtools</groupId>
    <artifactId>org.apache.geronimo.runtime.v30</artifactId>
    <packaging>jar</packaging>
    <name>${artifactId}</name>

    <parent>
        <groupId>org.apache.geronimo.devtools</groupId>
        <artifactId>eclipse-plugins-parent</artifactId>
        <version>4.0.0-SNAPSHOT</version>
    </parent>

    <properties>
        <!-- Make sure to update .classpath and META-INF/MANIFEST.MF files when changing 
             the Geronimo version property -->
        <geronimoVersion>3.0.1</geronimoVersion>
    </properties>
    <build>
        <resources>
            <resource>
                <directory>..</directory>
                <filtering>true</filtering>
                <includes>
                    <include>about.html</include>
                </includes>
            </resource>
            <resource>
                <directory>.</directory>
                <includes>
                    <include>plugin.xml</include>
                </includes>
            </resource>
            <resource>
                <directory>lib</directory>
                <targetPath>lib</targetPath>
                <includes>
                    <include>*.jar</include>
                </includes>
            </resource>
            <!-- The Geronimo covention puts license and notice for artifacts shipped in this jar 
                 in the jar's meta-inf directory -->
            <resource>
                <targetPath>META-INF</targetPath>
                <directory>.</directory>
                <includes>
                    <include>LICENSE.txt</include>
                    <include>NOTICE.txt</include>
                </includes>
            </resource>
            <!-- GERONIMODEVTOOLS-406 Display license and notice in Eclipse Update Manager 
                 See also http://www.eclipse.org/legal/guidetolegaldoc.php
                 about.html references about_files to show licenses and notices to the user
                 at install time using Eclipse Update Manager, and after install.
              -->
            <resource>
                <targetPath>about_files</targetPath>
                <directory>.</directory>
                <includes>
                    <include>LICENSE.txt</include>
                    <include>NOTICE.txt</include>
                </includes>
            </resource>
            <resource>
                <targetPath>about_files</targetPath>
                <directory>../..</directory>
                <filtering>true</filtering>
                <includes>
                    <include>PLUGIN_RELEASE-NOTES.txt</include>
                </includes>
            </resource>
			<resource>
                <targetPath>META-INF</targetPath>
                <directory>target/maven-shared-archive-resources/META-INF/</directory>
                <excludes>
                    <exclude>LICENSE</exclude>
                    <exclude>NOTICE</exclude>
                </excludes>
            </resource>
        </resources>
		
        <plugins>
			<plugin>
				<groupId>com.google.code.maven-replacer-plugin</groupId>
				<artifactId>maven-replacer-plugin</artifactId>
			</plugin>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.apache.geronimo.framework</groupId>
                                    <artifactId>geronimo-kernel</artifactId>
                                    <version>${geronimoVersion}</version>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.geronimo.framework</groupId>
                                    <artifactId>geronimo-deploy-jsr88</artifactId>
                                    <version>${geronimoVersion}</version>
                                </artifactItem>
                                
                                <artifactItem>
                                    <groupId>org.apache.geronimo.framework</groupId>
                                    <artifactId>geronimo-bundle-recorder</artifactId>
                                    <version>${geronimoVersion}</version>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.geronimo.framework</groupId>
                                    <artifactId>geronimo-cli</artifactId>
                                    <version>${geronimoVersion}</version>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.geronimo.framework</groupId>
                                    <artifactId>geronimo-deploy-tool</artifactId>
                                    <version>${geronimoVersion}</version>
                                </artifactItem>
                                
                                <artifactItem>
                                    <groupId>org.apache.geronimo.framework</groupId>
                                    <artifactId>geronimo-common</artifactId>
                                    <version>${geronimoVersion}</version>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.geronimo.modules</groupId>
                                    <artifactId>geronimo-j2ee-schema</artifactId>
                                    <version>${geronimoVersion}</version>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.geronimo.framework</groupId>
                                    <artifactId>geronimo-system</artifactId>
                                    <version>${geronimoVersion}</version>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.geronimo.framework</groupId>
                                    <artifactId>geronimo-plugin</artifactId>
                                    <version>${geronimoVersion}</version>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.geronimo.framework</groupId>
                                    <artifactId>geronimo-deployment</artifactId>
                                    <version>${geronimoVersion}</version>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.geronimo.framework</groupId>
                                    <artifactId>geronimo-deploy-config</artifactId>
                                    <version>${geronimoVersion}</version>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.geronimo.framework</groupId>
                                    <artifactId>geronimo-crypto</artifactId>
                                    <version>${geronimoVersion}</version>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.codehaus.plexus</groupId>
                                    <artifactId>plexus-archiver</artifactId>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.slf4j</groupId>
                                    <artifactId>slf4j-api</artifactId>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.slf4j</groupId>
                                    <artifactId>slf4j-simple</artifactId>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>lib</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                  <execution>
                    <goals>
                      <goal>sign</goal>
                    </goals>
                  </execution>
                </executions>
                <configuration>
                  <keystore>../../${keystoreFile}</keystore>
                  <alias>${keystoreAlias}</alias>
                  <storepass>${keystoreStorepass}</storepass>
                  <keypass>${keystoreKeypass}</keypass>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>${pom.basedir}</directory>
                            <includes>
                                <include>*.log</include>
                            </includes>
                        </fileset>
                        <fileset>
                            <directory>${pom.basedir}/lib</directory>
                            <includes>
                                <include>**</include>
                            </includes>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>org.apache.geronimo.devtools</groupId>
            <artifactId>eclipse</artifactId>
            <version>${version}</version>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.framework</groupId>
            <artifactId>geronimo-kernel</artifactId>
            <version>${geronimoVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.framework</groupId>
            <artifactId>geronimo-deploy-jsr88</artifactId>
            <version>${geronimoVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.framework</groupId>
            <artifactId>geronimo-bundle-recorder</artifactId>
            <version>${geronimoVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.framework</groupId>
            <artifactId>geronimo-cli</artifactId>
            <version>${geronimoVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.framework</groupId>
            <artifactId>geronimo-deploy-tool</artifactId>
            <version>${geronimoVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.framework</groupId>
            <artifactId>geronimo-common</artifactId>
            <version>${geronimoVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.modules</groupId>
            <artifactId>geronimo-j2ee-schema</artifactId>
            <version>${geronimoVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.framework</groupId>
            <artifactId>geronimo-system</artifactId>
            <version>${geronimoVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.framework</groupId>
            <artifactId>geronimo-plugin</artifactId>
            <version>${geronimoVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.framework</groupId>
            <artifactId>geronimo-deployment</artifactId>
            <version>${geronimoVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.framework</groupId>
            <artifactId>geronimo-deploy-config</artifactId>
            <version>${geronimoVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.devtools</groupId>
            <artifactId>org.apache.geronimo.runtime.common</artifactId>
            <version>${version}</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-archiver</artifactId>
        </dependency>
    </dependencies>
</project>
