Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<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.testatoo.container</groupId>
        <artifactId>testatoo-container</artifactId>
        <version>1.0.0</version>
    </parent>

    <artifactId>testatoo-container-jetty</artifactId>
    <version>1.0.0_7.1.0</version>
    <packaging>jar</packaging>

    <name>${project.artifactId}</name>
    <description>Jetty bundled in one jar</description>

    <properties>
        <jettyVersion>7.1.0.v20100505</jettyVersion>
    </properties>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>embedded-version</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>embedded-version</id>
                        <phase>package</phase>
                        <configuration>
                            <tasks>
                                <copy file="${project.build.directory}/${project.build.finalName}.jar" tofile="${project.build.directory}/${project.build.finalName}-${containerClassifier}.jar" />
                                <jar update="true" file="${project.build.directory}/${project.build.finalName}-${containerClassifier}.jar">
                                    <!-- core dependencies -->
                                    <zipfileset src="${project.build.directory}/dependency/testatoo-container-core-${project.parent.version}.jar" />
                                    <zipfileset src="${project.build.directory}/dependency/mycila-log-2.10.jar" />
                                    <!-- container jars-->
                                    <zipfileset src="${project.build.directory}/dependency/jetty-ajp-${jettyVersion}.jar" />
                                    <zipfileset src="${project.build.directory}/dependency/jetty-client-${jettyVersion}.jar" />
                                    <zipfileset src="${project.build.directory}/dependency/jetty-continuation-${jettyVersion}.jar" />
                                    <zipfileset src="${project.build.directory}/dependency/jetty-deploy-${jettyVersion}.jar" />
                                    <zipfileset src="${project.build.directory}/dependency/jetty-http-${jettyVersion}.jar" />
                                    <zipfileset src="${project.build.directory}/dependency/jetty-io-${jettyVersion}.jar" />
                                    <zipfileset src="${project.build.directory}/dependency/jetty-jmx-${jettyVersion}.jar" />
                                    <zipfileset src="${project.build.directory}/dependency/jetty-jndi-${jettyVersion}.jar" />
                                    <zipfileset src="${project.build.directory}/dependency/jetty-plus-${jettyVersion}.jar" />
                                    <zipfileset src="${project.build.directory}/dependency/jetty-rewrite-${jettyVersion}.jar" />
                                    <zipfileset src="${project.build.directory}/dependency/jetty-security-${jettyVersion}.jar" />
                                    <zipfileset src="${project.build.directory}/dependency/jetty-server-${jettyVersion}.jar" />
                                    <zipfileset src="${project.build.directory}/dependency/jetty-servlet-${jettyVersion}.jar" />
                                    <zipfileset src="${project.build.directory}/dependency/jetty-servlets-${jettyVersion}.jar" />
                                    <zipfileset src="${project.build.directory}/dependency/jetty-util-${jettyVersion}.jar" />
                                    <zipfileset src="${project.build.directory}/dependency/jetty-webapp-${jettyVersion}.jar" />
                                    <zipfileset src="${project.build.directory}/dependency/jetty-xml-${jettyVersion}.jar" />
                                    <!-- servlet api -->
                                    <zipfileset src="${project.build.directory}/dependency/servlet-api-2.5.jar" />
                                    <!-- jsp stack -->
                                    <zipfileset src="${project.build.directory}/dependency/ant-1.6.5.jar" />
                                    <zipfileset src="${project.build.directory}/dependency/jsp-api-2.1-glassfish-9.1.1.B60.25.p1.jar" />
                                    <zipfileset src="${project.build.directory}/dependency/jsp-2.1-glassfish-9.1.1.B60.25.p1.jar" />
                                    <zipfileset src="${project.build.directory}/dependency/core-3.1.1.jar" />
                                </jar>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>embedded-version</id>
                        <phase>package</phase>
                        <goals>
                            <goal>attach-artifact</goal>
                        </goals>
                        <configuration>
                            <artifacts>
                                <artifact>
                                    <file>
                                        ${project.build.directory}/${project.build.finalName}-${containerClassifier}.jar
                                    </file>
                                    <type>jar</type>
                                    <classifier>${containerClassifier}</classifier>
                                </artifact>
                            </artifacts>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.testatoo.container</groupId>
            <artifactId>testatoo-container-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <!-- Following libraries will be packaged in the embedded version -->
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-ajp</artifactId>
            <version>${jettyVersion}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-client</artifactId>
            <version>${jettyVersion}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-continuation</artifactId>
            <version>${jettyVersion}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-deploy</artifactId>
            <version>${jettyVersion}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-http</artifactId>
            <version>${jettyVersion}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-io</artifactId>
            <version>${jettyVersion}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-jmx</artifactId>
            <version>${jettyVersion}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-jndi</artifactId>
            <version>${jettyVersion}</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>javax.mail</groupId>
                    <artifactId>mail</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-plus</artifactId>
            <version>${jettyVersion}</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.geronimo.specs</groupId>
                    <artifactId>geronimo-jta_1.1_spec</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-rewrite</artifactId>
            <version>${jettyVersion}</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-security</artifactId>
            <version>${jettyVersion}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-server</artifactId>
            <version>${jettyVersion}</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-servlet</artifactId>
            <version>${jettyVersion}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-servlets</artifactId>
            <version>${jettyVersion}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-util</artifactId>
            <version>${jettyVersion}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-webapp</artifactId>
            <version>${jettyVersion}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-xml</artifactId>
            <version>${jettyVersion}</version>
            <scope>provided</scope>
        </dependency>
        <!-- SERVLET API -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
            <scope>provided</scope>
        </dependency>
        <!-- JSP STACK -->
        <dependency>
            <groupId>ant</groupId>
            <artifactId>ant</artifactId>
            <version>1.6.5</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jsp-api-2.1-glassfish</artifactId>
            <version>9.1.1.B60.25.p1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jsp-2.1-glassfish</artifactId>
            <version>9.1.1.B60.25.p1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jdt</groupId>
            <artifactId>core</artifactId>
            <version>3.1.1</version>
            <scope>provided</scope>
        </dependency>
        <!-- TO TEST JNDI -->
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>1.1.116</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

</project>
New to GrepCode? Check out our FAQ X