Opened on 04/14/2017 at 07:45:50 AM

Closed on 10/23/2018 at 09:58:46 AM

#5139 closed defect (rejected)

Can't build with Ant/Maven

Reported by: asmirnov Assignee:
Priority: P4 Milestone:
Module: Libadblockplus-Android Keywords:
Cc: Blocked By: #6300
Blocking: Platform: Android
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):



We do support Ant, Maven and Gradle for building. However starting some time i'm unable to build with Ant and Maven.

How to reproduce

  1. clone libadblockplus-android repo
  2. create files
  3. run Maven to build the project
  4. make sure build fails


Observed behaviour

build error:

$mvn clean compile
[INFO] Scanning for projects...
[WARNING] The POM for is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] parent
[INFO] libadblockplus-android
[INFO] libadblockplus-android-webview
[INFO] libadblockplus-android-settings
[INFO] libadblockplus-android-webviewapp
[INFO] ------------------------------------------------------------------------
[INFO] Building parent 1.0
[INFO] ------------------------------------------------------------------------
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ parent ---
[INFO] ------------------------------------------------------------------------
[INFO] Building libadblockplus-android 1.0
[INFO] ------------------------------------------------------------------------
[INFO] --- maven-antrun-plugin:1.8:run (ant-clean) @ library ---
[INFO] Executing tasks

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] parent ............................................. SUCCESS [  0.055 s]
[INFO] libadblockplus-android ............................. FAILURE [  0.418 s]
[INFO] libadblockplus-android-webview ..................... SKIPPED
[INFO] libadblockplus-android-settings .................... SKIPPED
[INFO] libadblockplus-android-webviewapp .................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.402 s
[INFO] Finished at: 2017-04-14T12:44:11+05:00
[INFO] Final Memory: 21M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (ant-clean) on project library: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] /Users/asmirnov/Documents/dev/src/libadblockplus-android.ssh/libadblockplus-android/build.xml:75: Cannot find /Users/asmirnov/Library/Android/sdk/tools/ant/build.xml imported from /Users/asmirnov/Documents/dev/src/libadblockplus-android.ssh/libadblockplus-android/build.xml
[ERROR] around Ant part ...<ant antfile="/Users/asmirnov/Documents/dev/src/libadblockplus-android.ssh/libadblockplus-android/build.xml" target="-pre-clean"/>... @ 4:133 in /Users/asmirnov/Documents/dev/src/libadblockplus-android.ssh/libadblockplus-android/target/antrun/build-main.xml
[ERROR] -> [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :library

Expected behaviour

The build succeeds

Attachments (0)

Change History (4)

comment:1 Changed on 04/14/2017 at 07:52:03 AM by asmirnov

It's because Android team has removed Ant scripts from SDK in 25.3.0 (as they consider Ant to be deprecated tool for Android):

SDK Tools, Revision 25.3.0 (March 2017)
Obsolete/deprecated tools have been removed:
ant scripts

So "build.xml" is not just missing in tools/ant/build.xml as whole tools/ant directory is missing.
I believe we should remove Ant support too. Otherwise we should mention about max SDK Tools version in README.

The problem is that Maven depends on Ant tasks and runs it . behind the scene.
So we should remove it too or make it independent of Ant.

comment:2 Changed on 01/23/2018 at 07:09:47 AM by asmirnov

  • Blocked By 6300 added

comment:3 Changed on 10/23/2018 at 09:58:33 AM by asmirnov

We've removed Ant and Maven support because Gradle is now mostly used for building of Android projects.

comment:4 Changed on 10/23/2018 at 09:58:46 AM by asmirnov

  • Resolution set to rejected
  • Status changed from new to closed

Add Comment

Modify Ticket

Change Properties
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none).
Note: See TracTickets for help on using tickets.