<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>
    <parent>
        <groupId>org.modeshape</groupId>
        <artifactId>modeshape-parent</artifactId>
        <version>4.6.2.Final</version>
        <relativePath>../../modeshape-parent</relativePath>
    </parent>
    <artifactId>modeshape-web-explorer</artifactId>
    <packaging>jar</packaging>
    <name>ModeShape Repository Explorer (Bare)</name>
    <description>ModeShape repository explorer that does not contain ModeShape libraries</description>
    <url>http://www.modeshape.org</url>
    <dependencies>
        <dependency>
            <groupId>javax.jcr</groupId>
            <artifactId>jcr</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.modeshape</groupId>
            <artifactId>modeshape-common</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.modeshape</groupId>
            <artifactId>modeshape-jcr-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.modeshape</groupId>
            <artifactId>modeshape-jcr</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.modeshape</groupId>
            <artifactId>modeshape-web-jcr</artifactId>
            <scope>provided</scope>		
        </dependency>

        <!-- gwt-user.jar contains old servlet classes and we need 
             this artefact in front of it to have newer classes in the classpath 
             first
        -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
        </dependency>

        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-user</artifactId>
        </dependency>
        
        <dependency>
            <groupId>com.googlecode.gwtmosaic</groupId>
            <artifactId>gwt-incubator</artifactId>
        </dependency>

        <dependency>
            <groupId>com.smartgwt</groupId>
            <artifactId>smartgwt</artifactId>
        </dependency>

        <dependency>
            <groupId>com.smartgwt</groupId>
            <artifactId>smartgwt-skins</artifactId>
        </dependency>
        
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
        </dependency>

        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-servlet</artifactId>
        </dependency>

    </dependencies>
    <build>
        <finalName>modeshape-explorer-${project.version}</finalName>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
        </resources>
        <plugins>
            <!--Overwrite this plugin from parent, to avoid it requiring a MANIFEST.MF file -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <id>test-jar</id>
                        <phase>non-existent</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>gwt-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>test</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <runTarget>org.modeshape.explorer.client.Explorer/Explorer.html</runTarget>
                    <webappDirectory>target/classes/META-INF/resources</webappDirectory>
                    <persistentunitcachedir>target/gwt-unitCache</persistentunitcachedir>
                </configuration>
            </plugin>
            <!--We don't have any tests in this module -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>assembly</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <configuration>
                            <descriptorRefs>
                                <descriptorRef>module-with-dependencies</descriptorRef>
                            </descriptorRefs>
                            <attach>false</attach>
                            <finalName>${binary.dist.name}</finalName>
                            <appendAssemblyId>false</appendAssemblyId>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
