CSS

Friday, July 22, 2011

Eclipse, JBoss and Javaee6 Maven Archtype

I created a new JBoss Java EE 6 project using the jboss-javaee6-webapp archtype.  I had to problems.  It had a  Missing artifact org.apache.xalan:xalan:jar:2.7.1-1.jbossorg:provided error which I fixed by editing the pom.xml file. Here is the change

     <dependency>
         <groupId>org.jboss.spec</groupId>
         <artifactId>jboss-javaee-web-6.0</artifactId>
         <version>2.0.0.Final</version>
         <type>pom</type>
         <scope>provided</scope>
         <exclusions>
            <exclusion>
               <groupId>org.apache.xalan</groupId>
               <artifactId>xalan</artifactId>
            </exclusion>
         </exclusions>
        
      </dependency>
      <dependency>
          <groupId>xalan</groupId>
          <artifactId>xalan</artifactId>
          <version>2.7.1</version>
    </dependency>

By excluding the problem dependency and adding in the generic dependency for xlan it built fine.

The harder problem was to get Eclipse to properly run the application on my JBoss server.  I am using Eclipse Indigo and  I went back and forth with m2eclipse and the eclipse project m2e.  Neither one seemed to do the trick.

In the end I used the mvn -Dwtpversion=2.0 eclipse:eclipse from the command line

No comments:

Post a Comment