5 Replies Latest reply on Oct 21, 2010 11:39 AM by rnappert

    How to build a ear file with JBOSS Tools outside of Eclipse

    rnappert

      Hi, I am able to build an ear file with the JProject Archive Builder, however I want to be able to build the ear file outside of eclipse, without writing a new ant build.xml file, doing exactly what the Project Archive Builder does.

      I wrote a build.xml wuth a taskdef, which supposed to do exactly that:

      <project name="Name" default="run-packaging">
        <property name="eclipse.home" location="c:/eclipse" />

       

        <path id="generate-archives-classpath">
          <fileset dir="${eclipse.home}/plugins">
            <include name="org.eclipse.equinox.common_*.jar" />
            <include name="org.jboss.ide.eclipse.archives.core_3.2**/archivescore.jar" />
            <include name="org.jboss.ide.eclipse.archives.core_3.2**/lib/*.jar" />
          </fileset>
        </path>

       

        <taskdef name="generate-archives" classpathref="generate-archives-classpath" classname="org.jboss.ide.eclipse.archives.core.ant.GenerateArchivesTask" />

       

        <target name="run-packaging">
            <generate-archives projectPath="C:/Workspaces/Project" />
        </target>
      </project>

       

      However, when I run ant -f <filename> run-packaging, I get the following error message:

      Cannot build archive "Project.ear" due to a problem in the archive's configuration

       

      I would assume that the archive's configuration is fine, otherwise it would not build within eclipse.

       

      Any pointers are appreciated.

      Thanks,

      -Reinhard