sonar:
[taskdef] Could not load definitions from resource org/sonar/ant/antlib.xml. It could not be found.
adding /usr/share/ant/lib/sonarqube-ant-task-*.jar which contains wildcards and may not do what you intend it to do depending on your OS or version of Java
[taskdef] Could not load definitions from resource org/sonar/ant/antlib.xml. It could not be found.
[antlib:org.sonar.ant] Could not load definitions from resource org/sonar/ant/antlib.xml. It could not be found.
BUILD FAILED
/tmp/sonar-scanning-examples-master/sonarqube-scanner-ant/build.xml:48: Problem: failed to create task or type antlib:org.sonar.ant:sonar
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:
-/usr/share/ant/lib
-/root/.ant/lib
-a directory added on the command line with the -lib argument
at org.apache.tools.ant.UnknownElement.getNotFoundException(UnknownElement.java:499)
at org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:431)
at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:163)
at org.apache.tools.ant.Task.perform(Task.java:347)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Total time: 0 seconds
<!-- ========= Define SonarQube Scanner for Ant Target ========= -->
<target name="sonar" depends="compile">
<taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">
<!-- Update the following line, or put the "sonar-ant-task-*.jar" file in your "$HOME/.ant/lib" folder -->
<classpath path="/usr/share/ant/lib/sonarqube-ant-task-*.jar" />
</taskdef>
<!-- Execute SonarQube Scanner for Ant Analysis -->
<sonar:sonar />
</target>
Please can you suggest what steps i could do to fix this problem, Thank you.