Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-102982

ant snapshot-bundle does not work on newly cloned repository due to missing maven-ant-tasks.jar

    Details

    • Branch Version/s:
      7.2.x, 7.1.x
    • Backported to Branch:
      Committed

      Description

      1. Assume you have just forked & cloned https://github.com/liferay/liferay-portal so your local copy is fresh, does not have any additional dependencies downloaded that the build env may need
      2. Run ant snapshot-bundle to obtain a fresh bundle

      Expected Result: Snapshot bundles is downloaded and extracted successfully.
      Actual Result: Build fails with:

      Buildfile: /home/tibusz/git/liferay/ce/liferay-portal/build.xml
        [typedef] Could not load definitions from resource org/apache/maven/artifact/ant/antlib.xml. It could not be found.
        [taskdef] Could not load definitions from resource org/jacoco/ant/antlib.xml. It could not be found.
         [delete] Deleting: /home/tibusz/git/liferay/ce/liferay-portal/null347419570.properties
      
      snapshot-bundle:
      [mirrors-get] Copying /home/tibusz/.liferay/mirrors/releases.liferay.com/portal/snapshot-master/latest/liferay-portal-tomcat-master.7z.sha256 to /home/tibusz/git/liferay/ce/liferay-portal/tmp/liferay-portal-tomcat-master.7z.snapshot.bundle.sha256.original.
      [mirrors-get] Downloading http://mirrors.lax.liferay.com/releases.liferay.com/portal/snapshot-master/latest/liferay-portal-tomcat-master.7z.sha256 to /home/tibusz/.liferay/mirrors/releases.liferay.com/portal/snapshot-master/latest/liferay-portal-tomcat-master.7z.sha256.
      [mirrors-get] Copying /home/tibusz/.liferay/mirrors/releases.liferay.com/portal/snapshot-master/latest/liferay-portal-tomcat-master.7z.sha256 to /home/tibusz/git/liferay/ce/liferay-portal/tmp/liferay-portal-tomcat-master.7z.snapshot.bundle.sha256.new.
      [mirrors-get] Downloading http://mirrors.lax.liferay.com/releases.liferay.com/portal/snapshot-master/latest/liferay-portal-tomcat-master.7z to /home/tibusz/.liferay/mirrors/releases.liferay.com/portal/snapshot-master/latest/liferay-portal-tomcat-master.7z.
      [mirrors-get] Copying /home/tibusz/.liferay/mirrors/releases.liferay.com/portal/snapshot-master/latest/liferay-portal-tomcat-master.7z to /home/tibusz/git/liferay/ce/liferay-portal/tmp/liferay-portal-tomcat-master.7z.
      
      BUILD FAILED
      /home/tibusz/git/liferay/ce/liferay-portal/build.xml:1098: Problem: failed to create task or type antlib:org.apache.maven.artifact.ant:dependencies
      Cause: The name is undefined.
      Action: Check the spelling.
      Action: Check that any custom tasks/types have been declared.
      Action: Check that any <presetdef>/<macrodef> declarations have taken place.
      No types or tasks have been defined in this namespace yet
      
      This appears to be an antlib declaration. 
      Action: Check that the implementing library exists in one of:
              -/home/tibusz/dev/ant/lib
              -/home/tibusz/.ant/lib
              -a directory added on the command line with the -lib argument
      
      
      Total time: 4 minutes 8 seconds
      

      Background
      This is because https://github.com/liferay/liferay-portal/tree/master/lib/development does not have maven-ant-tasks.jar by default. It's downloaded when you run "ant all" by the "setup-libs" task.

      Maybe we could include that JAR in the repo permanently.

      Workaround: Run ant setup-libs before executing "ant snapshot-bundle".

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 weeks, 2 days ago

                  Packages

                  Version Package
                  7.1.X
                  7.2.10 DXP FP3
                  7.2.X
                  7.2.1 CE GA2
                  Master