there is no enforcer plugin in my pom.xml, here is its content:

# cat pom.xml
<?xml version="1.0" encoding="UTF-8"?>

<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";>





  <!-- Model Version -->
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.jboss.ejb3</groupId>
    <artifactId>jboss-ejb3-tutorial-common</artifactId>
    <version>1.1.1</version>
    <relativePath>../common/</relativePath>
  </parent>

  <properties>
    
<ejb3.tutorial.client>org.jboss.tutorial.stateless.client.Client</ejb3.tutorial.client>
  </properties>

  <artifactId>jboss-ejb3-tutorial-stateless</artifactId>
  <version>1.1.1-SNAPSHOT</version>
  <packaging>jar</packaging>
  <name>EJB3.0 Stateless Bean Tutorial</name>
  <url>http://labs.jboss.com/jbossejb3/</url>
  <description>
    Tutorial for Stateless EJB 3.0
  </description>

  <repositories>
    <repository>
      <id>jboss-repositories</id>
      <url>http://repository.jboss.org/maven2/</url>
    </repository>
  </repositories>

</project>

Move over, when I put the following "new codes" in the pom.xml file,
it causes errors:

      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.0-beta-1</version>
        <executions>
          <execution>
            <id>enforce-banned-dependencies</id>
            <goals>
              <goal>enforce</goal>
            </goals>
          </execution>
          <execution>
            <id>enforce-property</id>
            <phase>pre-integration-test</phase>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireProperty>
                  <property>jboss.home</property>
                  <message>"Please set JBOSS_HOME"</message>
                </requireProperty>
              </rules>
              <fail>true</fail>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <rules>
            <bannedDependencies>
              <excludes>
                <exclude>jboss:jboss-common-core</exclude>
                <exclude>jboss:jboss-remoting</exclude>
                <exclude>jboss.remoting:jboss-remoting</exclude>
                <exclude>jboss:jboss-test</exclude>
                <exclude>org.jboss:javassist</exclude>
                <exclude>org.jboss:jboss-metadata</exclude>
                <exclude>org.jboss:jboss-transaction-spi</exclude>
                <exclude>org.jboss.microcontainer:jboss-container</exclude>

<exclude>org.jboss.microcontainer:jboss-deployers-core-spi</exclude>
                <exclude>org.jboss.microcontainer:jboss-deployers-impl</exclude>
                <exclude>org.jboss.microcontainer:jboss-deployers-spi</exclude>
              </excludes>
            </bannedDependencies>
            <requireMavenVersion>
              <version>[2.1,2.2)</version>
            </requireMavenVersion>
          </rules>
        </configuration>
      </plugin>


On Wed, Jul 8, 2009 at 11:28 AM, Wayne Fay<[email protected]> wrote:
>> Hi, I rather fix the project so that it works for 2.1, which files I
>> should modify and how?
>
> Look at the pom.xml files in your project and find an entry for the
> enforcer plugin, then comment it out or tweak the configuration
> appropriately.
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to