Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ JBoss, Home of Professional Open Source.
~ Copyright 2010, Red Hat, Inc., and individual contributors
~ as indicated by the @author tags. See the copyright.txt file in the
~ distribution for a full listing of individual contributors.
~
~ This is free software; you can redistribute it and/or modify it
~ under the terms of the GNU Lesser General Public License as
~ published by the Free Software Foundation; either version 2.1 of
~ the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
~ Lesser General Public License for more details.
~
~ You should have received a copy of the GNU Lesser General Public
~ License along with this software; if not, write to the Free
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.jboss.as.legacy</groupId>
        <artifactId>jboss-as-legacy-naming</artifactId>
        <version>1.0.0</version>
    </parent>
    <groupId>org.jboss.as.legacy.naming</groupId>
    <artifactId>jboss-as-legacy-naming-jnp</artifactId>
    <packaging>jar</packaging>
    <name>JBoss Application Server Legacy Naming : JNP</name>
    <properties>
        <module.name>org.jboss.legacy.jnp</module.name>
        <directory.dependencies>${project.build.directory}/dependencies</directory.dependencies>
    </properties>
    <dependencies>
        <dependency>
            <groupId>oswego-concurrent</groupId>
            <artifactId>concurrent</artifactId>
        </dependency>
        <dependency>
            <groupId>org.infinispan</groupId>
            <artifactId>infinispan-tree</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>infinispan-core</artifactId>
                    <groupId>org.infinispan</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.jboss.as</groupId>
            <artifactId>jboss-as-clustering-impl</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.cluster</groupId>
            <artifactId>jboss-ha-server-cache-spi</artifactId>
            <!-- maven sucks -->
            <exclusions>
                <exclusion>
                    <groupId>org.jboss.logging</groupId>
                    <artifactId>jboss-logging-spi</artifactId>
                </exclusion>
                <exclusion>
                    <artifactId>jgroups</artifactId>
                    <groupId>jgroups</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jboss-metadata</artifactId>
                    <groupId>org.jboss.metadata</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.jboss.cluster</groupId>
            <artifactId>jboss-ha-client</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>jboss-transaction-spi</artifactId>
                    <groupId>org.jboss.integration</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.jboss.jbossas</groupId>
            <artifactId>jboss-as-cluster</artifactId>
        </dependency>
        <!-- work-around for transitive dependency of org.jboss.jbossas:jboss-as-cluster -->
        <dependency>
            <groupId>org.jboss.jbossas</groupId>
            <artifactId>jboss-as-j2se</artifactId>
        </dependency>
        <!-- work-around for transitive dependency of org.jboss.jbossas:jboss-as-cluster -->
        <dependency>
            <groupId>org.jboss.jbossas</groupId>
            <artifactId>jboss-as-server</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.jbossas</groupId>
            <artifactId>jboss-as-system</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.jbossas</groupId>
            <artifactId>jboss-as-system-jmx</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.security</groupId>
            <artifactId>jboss-security-spi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.microcontainer</groupId>
            <artifactId>jboss-kernel</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.microcontainer</groupId>
            <artifactId>jboss-dependency</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.as</groupId>
            <artifactId>jboss-as-naming</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.remoting</groupId>
            <artifactId>jboss-remoting</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.naming</groupId>
            <artifactId>jnpserver</artifactId>
            <!-- maven sucks -->
            <exclusions>
                <exclusion>
                    <groupId>org.jboss.logging</groupId>
                    <artifactId>jboss-logging-spi</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>
    <build>
        <!-- Maven will append the version to the finalName (which is the name
        given to the generated war, and hence the context root) -->
        <finalName>${project.artifactId}</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>${version.enforcer.plugin}</version>
                <executions>
                    <execution>
                        <id>ban-bad-dependencies</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <skip>false</skip>
                            <rules>
                                <bannedDependencies>
                                    <searchTransitive>true</searchTransitive>
                                    <excludes>
                                        <exclude>args4j:args4j</exclude>
                                        <exclude>biz.aQute:bnd</exclude>
                                        <exclude>com.fasterxml:classmate</exclude>
                                        <exclude>com.google.gwt.inject:gin</exclude>
                                        <exclude>com.google.inject:guice</exclude>
                                        <exclude>com.gwtplatform:gwtp-all</exclude>
                                        <exclude>commons-httpclient:commons-httpclient</exclude>
                                        <exclude>commons-logging:commons-logging</exclude>
                                        <exclude>commons-logging:commons-logging-api</exclude>
                                        <exclude>concurrent:concurrent</exclude>
                                        <exclude>jacorb:jacorb</exclude>
                                        <exclude>javassist:javassist</exclude>
                                        <exclude>javax.persistence:persistence-api</exclude>
                                        <exclude>javax.servlet:servlet-api</exclude>
                                        <exclude>javax.transaction:jta</exclude>
                                        <exclude>javax.xml:jaxrpc-api</exclude>
                                        <exclude>javax.xml.soap:saaj-api</exclude>
                                        <exclude>javax.xml.stream:stax-api</exclude>
                                        <exclude>jboss:jboss-logging-spi</exclude>
                                        <exclude>jboss:jboss-serialization</exclude>
                                        <exclude>jboss.web:el-api</exclude>
                                        <exclude>jboss.web:jsp-api</exclude>
                                        <exclude>jboss.web:servlet-api</exclude>
                                        <exclude>net.sf.kxml:kxml2</exclude>
                                        <exclude>org.apache.geronimo.specs:geronimo-activation_1.1_spec</exclude>
                                        <exclude>org.apache.geronimo.specs:geronimo-jaxb_2.1_spec</exclude>
                                        <exclude>org.apache.geronimo.specs:geronimo-jaxr_1.0_spec</exclude>
                                        <exclude>org.apache.geronimo.specs:geronimo-saaj_1.3_spec</exclude>
                                        <exclude>org.apache.geronimo.specs:geronimo-stax-api_1.0_spec</exclude>
                                        <exclude>org.apache.xalan:serializer</exclude>
                                        <exclude>org.apache.xalan:xalan</exclude>
                                        <exclude>org.hibernate:ejb3-persistence</exclude>
                                        <exclude>org.hibernate.java-persistence:jpa-api</exclude>
                                        <exclude>org.jboss.integration:jboss-jca-spi</exclude>
                                        <exclude>org.jboss.interceptor:jboss-interceptor-api</exclude>
                                        <exclude>org.jboss.javaee:jboss-javaee</exclude>
                                        <exclude>org.jboss.javaee:jboss-ejb-api</exclude>
                                        <exclude>org.jboss.javaee:jboss-ejb-api_3.1</exclude>
                                        <exclude>org.jboss.javaee:jboss-jacc-api</exclude>
                                        <exclude>org.jboss.javaee:jboss-jad-api</exclude>
                                        <exclude>org.jboss.javaee:jboss-jaspi-api</exclude>
                                        <exclude>org.jboss.javaee:jboss-jca-api</exclude>
                                        <exclude>org.jboss.javaee:jboss-jms-api</exclude>
                                        <exclude>org.jboss.javaee:servlet-api</exclude>
                                        <exclude>org.jboss.javaee:jsp-api</exclude>
                                        <exclude>org.jboss.javaee:jboss-transaction-api</exclude>
                                        <exclude>org.jboss.logging:jboss-logging-generator</exclude>
                                        <exclude>org.jboss.logging:jboss-logging-log4j</exclude>
                                        <exclude>org.jboss.logging:jboss-logging-jdk</exclude>
                                        <exclude>org.jboss.logging:jboss-logging-logmanager</exclude>
                                        <exclude>org.jboss.logging:jboss-logging-spi</exclude>
                                        <exclude>org.jboss.logging:jboss-logging-tools</exclude>
                                        <!-- replaced by io.netty:netty -->
                                        <exclude>org.jboss.netty:netty</exclude>
                                        <exclude>org.jboss.security:jbosssx</exclude>
                                        <exclude>org.jboss.slf4j:slf4j-jboss-logging</exclude>
                                        <exclude>org.jboss.spec.javax.resource:jboss-connector-api_1.5_spec</exclude>
                                        <exclude>org.ops4j.base</exclude>
                                        <exclude>org.ops4j.pax.swissbox</exclude>
                                        <exclude>org.ops4j.pax.web</exclude>
                                        <exclude>org.slf4j:slf4j-nop</exclude>
                                        <exclude>org.slf4j:slf4j-jdk14</exclude>
                                        <exclude>org.slf4j:slf4j-log4j12</exclude>
                                        <exclude>org.slf4j:slf4j-log4j13</exclude>
                                        <exclude>oro:oro</exclude>
                                        <exclude>relaxngDatatype:relaxngDatatype</exclude>
                                        <exclude>stax:stax-api</exclude>
                                        <exclude>sun-jaxb:jaxb-api</exclude>
                                        <exclude>trove:trove</exclude>
                                        <exclude>woodstox:wstx-lgpl</exclude>
                                        <exclude>xml-apis:xml-apis</exclude>
                                    </excludes>
                                </bannedDependencies>
                                <dependencyConvergence />
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.8</version>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <includeScope>runtime</includeScope>
                            <stripVersion>true</stripVersion>
                            <stripClassifier>true</stripClassifier>
                            <excludeGroupIds>org.jgroups</excludeGroupIds>
                        </configuration>
                    </execution>
                    <execution>
                        <!-- work-around for nonexistent 5.2.0 artifacts in a repo -->
                        <id>copy-system-dependencies</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <includeScope>system</includeScope>
                            <stripVersion>true</stripVersion>
                            <stripClassifier>true</stripClassifier>
                            <excludeGroupIds>com.sun</excludeGroupIds>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.4</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>build-dist</id>
                        <phase>package</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="maven.plugin.classpath" />
                                <for param="jar">
                                    <path>
                                        <fileset dir="${project.build.directory}/dependency" includes="**/*.jar" />
                                    </path>
                                    <sequential>
                                        <!-- Remove any existing signatures from a JAR file. -->
                                        <tempfile prefix="usignjar-" destdir="${java.io.tmpdir}" property="temp.file" />
                                        <echo message="Removing signatures from JAR: @{jar}" />
                                        <mkdir dir="${temp.file}" />

                                        <unjar src="@{jar}" dest="${temp.file}">
                                            <patternset>
                                                <include name="**" />
                                                <exclude name="META-INF/*.SF" />
                                                <exclude name="META-INF/*.DSA" />
                                                <exclude name="META-INF/*.RSA" />
                                            </patternset>
                                        </unjar>

                                        <delete file="@{jar}" failonerror="true" />
                                        <!-- Touch it in case the file didn't have a manifest.
                                        Otherwise the JAR task below will fail if the manifest
                                        file doesn't exist. -->
                                        <mkdir dir="${temp.file}/META-INF" />
                                        <touch file="${temp.file}/META-INF/MANIFEST.MF" />
                                        <jar destfile="@{jar}" basedir="${temp.file}" includes="**" manifest="${temp.file}/META-INF/MANIFEST.MF" />
                                        <delete dir="${temp.file}" failonerror="true" />
                                    </sequential>
                                </for>

                                <!-- Replace the '.' in ${module.name} with '/' to get its path  -->
                                <tempfile property="temp.file" />
                                <echo file="${temp.file}" message="${module.name}" />
                                <replace file="${temp.file}" token="." value="/" />
                                <loadfile property="module.path" srcfile="${temp.file}" />
                                <delete file="${temp.file}" />
                                <delete dir="target/module" />
                                <property name="module.dir" value="target/module/${module.path}/main" />
                                <property name="module.lib.dir" value="${module.dir}/lib" />
                                <copy file="src/main/resources/module/main/module.xml" tofile="${module.dir}/module.xml" />
                                <copy file="target/${project.artifactId}.jar" todir="${module.dir}" />
                                <echo>Copying dependencies</echo>
                                <copy todir="${module.lib.dir}">
                                    <fileset dir="${project.build.directory}/dependency" />
                                </copy>
                                <echo>Module ${module.name} has been created in the target/module directory. Copy to your JBoss AS 7 installation.</echo>
                            </target>
                        </configuration>
                    </execution>
                </executions>
                <inherited>false</inherited>
                <dependencies>
                    <dependency>
                        <groupId>ant-contrib</groupId>
                        <artifactId>ant-contrib</artifactId>
                        <version>1.0b3</version>
                        <exclusions>
                            <exclusion>
                                <groupId>ant</groupId>
                                <artifactId>ant</artifactId>
                            </exclusion>
                        </exclusions>
                    </dependency>
                    <dependency>
                        <groupId>org.apache.ant</groupId>
                        <artifactId>ant-nodeps</artifactId>
                        <version>1.8.1</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <id>create-distribution</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <finalName>legacy-jnp-extension-${project.version}</finalName>
                            <outputDirectory>${project.build.directory}/../..</outputDirectory>
                            <appendAssemblyId>false</appendAssemblyId>
                            <descriptors>
                                <descriptor>src/main/assembly/assembly-dist.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
New to GrepCode? Check out our FAQ X