- 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
- Run ant snapshot-bundle to obtain a fresh bundle
Expected Result: Snapshot bundles is downloaded and extracted successfully.
Actual Result: Build fails with:
[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
[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-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-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.
/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:
-a directory added on the command line with the -lib argument
Total time: 4 minutes 8 seconds
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".