0 Replies Latest reply on Mar 27, 2008 12:37 PM by gumnaam suri

    JDK6 , Embedded JBoss and maven 2 PROBLEM SOLVED

    gumnaam suri Newbie

      For all those who are trying to run
      JDK 6 + maven2 + embedded JBoss and keep getting the Array error,
      The trick is to use the following system property

      -Dsun.lang.ClassLoader.allowArraySyntax=true
      


      But the trick is , that this is not needed on the mvn command line, but rather as a argument to the jvm which is forked by the maven-surefire-plugin.

      So instead of mvn -Dsun.lang.ClassLoader.allowArraySyntax=true

      What you should do is have the following in your pom.xml

      <plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-surefire-plugin</artifactId>
       <configuration>
       <!-- for JDK6 Support -->
       <argLine>-Dsun.lang.ClassLoader.allowArraySyntax=true</argLine>
       </configuration>
      </plugin>
      


      This should go under build->plugins node

      The above will do the trick.

      Hope this has helped :-)