7 Replies Latest reply on Aug 8, 2005 11:28 AM by ryan.campbell

    Buid Error: Could not create task or type of type: depend.

    jlauman

      I'm trying to build JBoss from the 4.0.x branch (clean checkout) and getting the following error. Am I missing something?

      BUILD FAILED
      /opt/java/jboss-cvs/jboss-4.0/tools/etc/buildmagic/buildmagic.ent:418: Could not create task or type of type: depend.


      Full error follows:

      Searching for build.xml ...
      Buildfile: /opt/java/jboss-cvs/jboss-4.0/build/build.xml

      check.inhibit.downloads:

      createthirdparty:

      _buildmagic:init:
      Trying to override old definition of task property

      _buildmagic:init:local-properties:

      _buildmagic:init:buildlog:

      configure:
      [echo] groups: default
      [echo] modules: common,jmx,test,system,naming,j2ee,transaction,server,deployment,security,messaging,connector,jaxrpc,jboss.net,webservice,cluster,varia,iiop,management,cache,tomcat,console,compatibility,media,aspects,ejb3x,ejb3,hibernate-int

      init:

      _buildmagic:modules:all:

      ======================================================================
      == Executing 'all' in module 'common'...
      ==

      _buildmagic:init:
      Trying to override old definition of task libraryset
      Trying to override old definition of task execmodules
      Trying to override old definition of task resolveproperties
      Trying to override old definition of task resolver
      Trying to override old definition of task require
      Trying to override old definition of task _dump
      Trying to override old definition of task _puke
      Trying to override old definition of task moduleinit
      Trying to override old definition of task moduleconfig
      Trying to override old definition of task modulelibrary
      Trying to override old definition of task projectinfo
      Trying to override old definition of task library
      Trying to override old definition of task Ant
      Trying to override old definition of task moduleinfo
      Trying to override old definition of task projecthelp
      Trying to override old definition of task propertyfilter
      Trying to override old definition of task call
      Trying to override old definition of task property

      configure:

      _default:task-init:

      init:

      _buildmagic:build-bypass-checker:

      _buildmagic:build-bypass-notice:

      _buildmagic:build-bypass-check:

      jars:

      _buildmagic:init:

      init:

      _default:compile-classes:

      BUILD FAILED
      /opt/java/jboss-cvs/jboss-4.0/tools/etc/buildmagic/buildmagic.ent:418: Could not create task or type of type: depend.

      Ant could not find the task or a class this task relies upon.

      This is common and has a number of causes; the usual
      solutions are to read the manual pages then download and
      install needed JAR files, or fix the build file:
      - You have misspelt 'depend'.
      Fix: check your spelling.
      - The task needs an external JAR file to execute
      and this is not found at the right place in the classpath.
      Fix: check the documentation for dependencies.
      Fix: declare the task.
      - The task is an Ant optional task and the JAR file and/or libraries
      implementing the functionality were not found at the time you
      yourself built your installation of Ant from the Ant sources.
      Fix: Look in the ANT_HOME/lib for the 'ant-' JAR corresponding to the
      task and make sure it contains more than merely a META-INF/MANIFEST.MF.
      If all it contains is the manifest, then rebuild Ant with the needed
      libraries present in ${ant.home}/lib/optional/ , or alternatively,
      download a pre-built release version from apache.org
      - The build file was written for a later version of Ant
      Fix: upgrade to at least the latest release version of Ant
      - The task is not an Ant core or optional task
      and needs to be declared using .
      - You are attempting to use a task defined using
      or but have spelt wrong or not
      defined it at the point of use

      Remember that for JAR files to be visible to Ant tasks implemented
      in ANT_HOME/lib, the files must be in the same directory or on the
      classpath

      Please neither file bug reports on this problem, nor email the
      Ant mailing lists, until all of these causes have been explored,
      as this is not an Ant bug.

      Total time: 4 seconds

        • 1. Re: Buid Error: Could not create task or type of type: depen

          There a few things which you can check.

          First off, please ensure that you have checked out and built in this fashion.

          mkdir test
          cd test
          cvs co -r Branch_4_0 jboss-4.0.x
          cd jboss-4.0
          cd build
          ./build.sh

          What commands are you issuing to build?

          It would be helpful if you executed:
          build/build.sh -verbose -logfile -errorlog.txt

          This will generate an error log and place it in the build directory. You can send me these results and I will take a look at them.

          Ruel Loehr
          JBoss QA

          • 2. Re: Buid Error: Could not create task or type of type: depen

            Looking at your log file I see a number of things that raise flags. First off:


            _buildmagic:init:
             [property] Loading /opt/java/jboss-cvs/jboss-4.0/build/local.properties
            Ignoring Exception java.util.zip.ZipException: error in opening zip file reading resource org/jboss/tools/buildmagic/task/config/LibrarySet.class from /opt/java/jboss-cvs/jboss-4.0/tools/lib/README
            Ignoring Exception java.util.zip.ZipException: error in opening zip file reading resource org/jboss/tools/buildmagic/task/MissingAttributeException.class from /opt/java/jboss-cvs/jboss-4.0/tools/lib/README
            Ignoring Exception java.util.zip.ZipException: error in opening zip file reading resource org/jboss/tools/buildmagic/task/module/ExecuteModules.class from /opt/java/jboss-cvs/jboss-4.0/tools/lib/README


            The target _buildmagic:init: is being executed here. This target is located in tools/etc/buildmagic/buildmagic.ent.

            The target works like this (important stuff in bold):

            <!-- Setup the project environment. -->
             <dirname property="project.root" file="${basedir}"/>
             <property name="project.build" value="${project.root}/build"/>
             <property name="project.tools" value="${project.root}/tools"/>
             <property name="project.thirdparty" value="${project.root}/thirdparty"/>
            
             <!-- Setup the module environment. -->
             <property name="module.root" value="${basedir}"/>
             <property file="${module.root}/local.properties"/>
             <property name="module.source" value="${module.root}/src"/>
             <property name="module.output" value="${module.root}/output"/>
             <property name="module.tools" value="${module.root}/tools"/>
             <property name="module.thirdparty" value="${module.root}/thirdparty"/>
            
             <!-- Load Buildmagic extention tasks. -->
             <property name="buildmagic.local.classpath" value="."/>
             <path id="buildmagic.task.classpath">
             <fileset dir="${project.tools}/lib">
             <include name="*"/>
             </fileset>
             <pathelement location="${project.tools}/lib"/>
             <pathelement location="${project.tools}/etc"/>
             <pathelement location="${project.tools}"/>
             <pathelement path="${buildmagic.local.classpath}"/>
             </path>
             <taskdef file="${project.tools}/etc/buildmagic/autoload.properties"
             classpathref="buildmagic.task.classpath"/>
             <taskdef name="property" classname="org.jboss.tools.buildmagic.task.Property"
             classpathref="buildmagic.task.classpath"/>


            Basically,
            1) Read in a property file
            2) Make a classpath
            3) Create some taskdefs

            From your logfile, it looks like it is trying to resolve the task definiton to this classpath:
            /opt/java/jboss-cvs/jboss-4.0/tools/lib/README

            Which is obviously bad.

            Things for you to verify:
            Are all of the files in tools/lib? You should be able to see many jars there. What does buildmagic.task.classpath resolve to?
            You can add an echo message to the init target and verify this.

            Something like:

            <property name="cp" refid="buildmagic.task.classpath"/>
             <echo message="Classpath is ${cp}"/>



            • 3. Re: Buid Error: Could not create task or type of type: depen
              jlauman

              Things for you to verify:
              Are all of the files in tools/lib? You should be able to see many jars there.
              Yes it looks normal

              What does buildmagic.task.classpath resolve to?
              You can add an echo message to the init target and verify this.

              [property] Loading /opt/java/jboss-cvs/jboss-4.0/build/local.properties
              [echo] Classpath is /opt/java/jboss-cvs/jboss-4.0/tools/lib/README:
              /opt/java/jboss-cvs/jboss-4.0/tools/lib/ant-javamail.jar:
              /opt/java/jboss-cvs/jboss-4.0/tools/lib/ant-junit.jar:
              /opt/java/jboss-cvs/jboss-4.0/tools/lib/ant-launcher.jar:
              /opt/java/jboss-cvs/jboss-4.0/tools/lib/ant-nodeps.jar:
              /opt/java/jboss-cvs/jboss-4.0/tools/lib/ant-trax.jar:
              /opt/java/jboss-cvs/jboss-4.0/tools/lib/ant-xalan2.jar:
              /opt/java/jboss-cvs/jboss-4.0/tools/lib/ant-xslp.jar:
              /opt/java/jboss-cvs/jboss-4.0/tools/lib/ant.jar:
              /opt/java/jboss-cvs/jboss-4.0/tools/lib/bsf.jar:
              /opt/java/jboss-cvs/jboss-4.0/tools/lib/buildmagic-tasks.jar:
              /opt/java/jboss-cvs/jboss-4.0/tools/lib/jbossbuild.jar:
              /opt/java/jboss-cvs/jboss-4.0/tools/lib/junit.jar:
              /opt/java/jboss-cvs/jboss-4.0/tools/lib/pretty.jar:
              /opt/java/jboss-cvs/jboss-4.0/tools/lib/resolver.jar:
              /opt/java/jboss-cvs/jboss-4.0/tools/lib/xalan.jar:
              /opt/java/jboss-cvs/jboss-4.0/tools/lib/xercesImpl.jar:
              /opt/java/jboss-cvs/jboss-4.0/tools/lib/xml-apis.jar:
              /opt/java/jboss-cvs/jboss-4.0/tools/lib:
              /opt/java/jboss-cvs/jboss-4.0/tools/etc:
              /opt/java/jboss-cvs/jboss-4.0/tools:
              /opt/java/jboss-cvs/jboss-4.0/build

              If I remove the "README" file from the tools/lib dir I can get rid of the Zip errors.

              The local.properties file is always overwritten by a file in etc/local.properties.example

              [property] Loading /opt/java/jboss-cvs/jboss-4.0/build/local.properties
              [property] Loading /root/.buildmagic.properties
              [property] Unable to find property file: /root/.buildmagic.properties
              [property] Loading /root/.ant.properties
              [property] Unable to find property file: /root/.ant.properties
              Ignoring Exception java.util.zip.ZipException: error in opening zip file reading resource org/jboss/tools/buildmagic/task/util/TaskLogger.class from /opt/java/jboss-cvs/jboss-4.0/tools/lib/README
              [available] Found: etc/local.properties-example

              The files it's looking for in the root dir don't exist and I don't want them to live there. I want them to stay in the build dir.

              I've been building Jboss on an almost daily basis for the last two years or so. I've never had this much trouble before.

              Any help would be appreciated.

              Jack

              • 4. Re: Buid Error: Could not create task or type of type: depen
                gamac

                I'm having this problem too!

                I'm trying to build JBoss from a fresh checkout (cvs co -r "Branch_4_0" jboss-4.0), on a Red Hat box, with Sun JDK 1.5.0_04.

                Where's what I get at the end of the build:

                /usr/jboss/jboss-Branch_4_0/media/src/main/org/jboss/media/util/registry/Registry.java:16: warning: unmappable character for encoding UTF8
                * @author Ricardo Arg�ello
                ^
                error: error reading /usr/jboss/jboss-Branch_4_0/thirdparty/sun-jmf/lib/jmf.properties; error in opening zip file
                1 error
                73 warnings

                BUILD FAILED
                /usr/jboss/jboss-Branch_4_0/media/build.xml:197: Compile failed; see the compiler error output for details.

                I've been building JBoss from the CVS on a regular basis too, and if I do a checkout off a month ago (e.g. with -r "2005-07-01") it works fine.

                It looks like the current CVS version of the 4.0.x branch is broken, since it started using this new automatic dependency checking and downloading system.

                jboss-head compiles fine, though.

                I've tried buiding 4.0.x on Windows but it failed too.

                Any suggestions?!

                Thx,
                CG

                • 5. Re: Buid Error: Could not create task or type of type: depen

                  The module you must checkout is jboss-4.0.x. Jboss-4.0 will not work.

                  Also, do not build over an existing jboss-4.0 checkout. It will cause problems as noted on the wiki:

                  http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossBuild

                  mkdir test
                  cd test
                  cvs co -r Branch_4_0 jboss-4.0.x
                  cd jboss-4.0
                  cd build
                  ./build.sh

                  The current cvs branch according to cruisecontrol seems to be fine.

                  If you are using online documentation which instructs you to use the jboss-4.0 module please post a link to it and I will make sure it is updated to reflect the latest changes.

                  • 6. Re: Buid Error: Could not create task or type of type: depen
                    jlauman

                    Sorry for the typo, but I did actually check out jboss-4.0.x. I killed the directory and checked it out again yesterday and am getting the same error.

                    It now completes a partial build but fails here:

                    _default:task-init:
                    Overriding previous definition of reference to thirdparty.classpath
                    Overriding previous definition of reference to javac.classpath
                    Property ${local.bootclasspath} has not been set
                    Overriding previous definition of reference to javadoc.classpath
                    [property] Loading /opt/java/jboss-cvs/jboss-4.0/tools/etc/buildmagic/task.properties
                    [propertyfilter] Adding filters for all properties

                    init:
                    Skipped because property 'init.disable' set.

                    _buildmagic:build-bypass-checker:
                    [uptodate] The targetfile "/opt/java/jboss-cvs/jboss-4.0/server/output/build-marker" does not exist.

                    _buildmagic:build-bypass-notice:
                    Skipped because property 'build-bypass.on' not set.

                    _buildmagic:build-bypass-check:

                    jars:
                    Build sequence for target `compile' is [_buildmagic:init, init, generate-parsers, compile-classes, compile-rmi, compile-etc, compile-resources, compile-bin, compile]
                    Complete build sequence is [_buildmagic:init, init, generate-parsers, compile-classes, compile-rmi, compile-etc, compile-resources, compile-bin, compile, _buildmagic:modules:clobber, _buildmagic:help:build, docs-javadocs, docs-api, _buildmagic:mbean-bypass-checker, _default:compile-mbean-sources, _buildmagic:modules:main, docs-javadocs-check, docs-javadocs_1_4, _buildmagic:build-bypass-checker, _buildmagic:build-bypass-notice, _buildmagic:build-bypass-check, jars, most, _buildmagic:release:zip, docs-todo-check, main, docs-todo, _buildmagic:clean, _buildmagic:modules:docs, _buildmagic:clobber, clean, _default:clobber, _default:compile-classes, _buildmagic:modules:clean, _buildmagic:clean-internal, _buildmagic:modules:tests, _buildmagic:help:standard, help, docs, all, _buildmagic:install:default, install, release, release-zip, _default:server-client-jars, _default:compile-stylesheets, _buildmagic:release:tar, _buildmagic:release:tgz, _default:compile-resources, _buildmagic:init:buildlog, _default:clean, _buildmagic:modules:all, _default:fix-bin, _buildmagic:init:show-environment, _default:compile-checksums, _default:init, rebuild, _default:compile-rmi, jmx-docs, jmx-docs-html-plain, configure, _buildmagic:modules:release, _default:task-init, _default:compile-test-classes, todo, clobber, release-tgz, release-all, javadocs, _default:compile-bin, configure-project, _default:compile-web, release-tar, _buildmagic:init:local-properties, _default:compile-xmbean-sources, _buildmagic:modules:most, _default:compile-etc, ]

                    _buildmagic:init:
                    Skipped because property 'init.disable' set.

                    init:
                    Skipped because property 'init.disable' set.

                    generate-parsers:

                    BUILD FAILED
                    /opt/java/jboss-cvs/jboss-4.0/server/build.xml:201: Could not create task or type of type: jjtree.



                    • 7. Re: Buid Error: Could not create task or type of type: depen

                      Can you run ./build.sh -verbose and provide the output?