<!--
  ~ 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>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>org.apache.geronimo.deployment.model.edit</artifactId>
    <packaging>jar</packaging>
    <version>${org.apache.geronimo.deployment.model.edit_version}</version>
    <name>${artifactId}</name>
    <parent>
        <groupId>org.apache.geronimo.devtools</groupId>
        <artifactId>eclipse-plugins-parent</artifactId>
        <version>1.0</version>
    </parent>
    <properties>
        <imported-resources>
            ${project.build.directory}/imported-resources</imported-resources>
    </properties>
    <build>
        <resources>
            <resource>
                <directory>.</directory>
                <includes>
                    <include>plugin.xml</include>
                    <include>plugin.properties</include>
                </includes>
            </resource>
            <resource>
                <targetPath>icons/</targetPath>
                <directory>icons/</directory>
                <includes>
                    <include>**/*</include>
                </includes>
            </resource>
            <resource>
                <targetPath>META-INF</targetPath>
                <directory>..</directory>
                <includes>
                    <include>LICENSE</include>
                    <include>NOTICE</include>
                </includes>
            </resource>
        </resources>
        
        <plugins>
            <plugin>
                <groupId>org.apache.geronimo.devtools</groupId>
                <artifactId>maven-geronimodevtools-plugin</artifactId>
            </plugin>
            <plugin>
            	<artifactId>maven-antrun-plugin</artifactId>
            </plugin>    
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
            </plugin>       
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>dependency-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <artifactItems>
                        <artifactItem>
                            <groupId>org.apache.geronimo.devtools</groupId>
                            <artifactId>geronimo-1.0-emf</artifactId>
                            <version>1.0</version>
                            <type>jar</type>
                        </artifactItem>
                    </artifactItems>
                    <outputDirectory>${imported-resources}</outputDirectory>
                </configuration>
            </plugin>
            
            <plugin>
                <groupId>org.apache.geronimo.devtools</groupId>
                <artifactId>maven-emf-plugin</artifactId>
                <configuration>
                    <workspace>${project.basedir}/..</workspace>
                    <type>edit</type>
                </configuration>
                <executions>
                    <execution>
                        <id>execution-web</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <genmodel>
                                ${imported-resources}/emf/geronimo-web-1.0.genmodel</genmodel>
                        </configuration>
                    </execution>
                    <execution>
                        <id>execution-openejb</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <genmodel>
                                ${imported-resources}/emf/openejb-jar-2.0.genmodel</genmodel>
                        </configuration>
                    </execution>
                    <execution>
                        <id>execution-connector</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <genmodel>
                                ${imported-resources}/emf/geronimo-connector-1.0.genmodel</genmodel>
                        </configuration>
                    </execution>
                    <execution>
                        <id>execution-application</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <genmodel>
                                ${imported-resources}/emf/geronimo-application-1.0.genmodel</genmodel>
                        </configuration>
                    </execution>
                    <execution>
                        <id>execution-appclient</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <genmodel>
                                ${imported-resources}/emf/geronimo-application-client-1.0.genmodel</genmodel>
                        </configuration>
                    </execution>
                    <execution>
                        <id>execution-security</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <genmodel>
                                ${imported-resources}/emf/geronimo-security-1.1.genmodel</genmodel>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>org.apache.geronimo.devtools</groupId>
            <artifactId>org.apache.geronimo.deployment.model</artifactId>
            <version>${org.apache.geronimo.deployment.model_version}</version>
        </dependency>
    </dependencies>
</project>