The dependency should be for the antrun-plugin. The definition of jacocoant as a plugin is just wrong I think, it's not a plugin. Also, I don't think you should put any xmlns in the maven project tag. Maven is not using this, it's the antrun-plugin (which is a separated space). Maybe you want to take this to the sonar list and ask them as it's their stuff? /Anders On Wed, Nov 3, 2010 at 07:08, Hari shankar wrote: > Thanks Anders. > > I installed jacocoant.jar to local repo now and ensured plugin dependencies > are resolved correctly using dependency:resolve-plugins goal. It went fine. > But upon mvn clean package, the ant task still throws the same error. > > This is the modified pom.xml. (Also i have added plugin dependencies in 2 > places - one for antrun plugin itself and other as normal build dependency, > not sure which one is right). Any pointers? > > > > > maven-antrun-plugin > 1.6 > > > package > > > > > resource="org/jacoco/ant/antlib.xml" > > *classpathref="maven.plugin.classpath">* > ** > > > > > > > > > > > > > > > > dir="C:\Workspaces\all-learning\tycho-maven-headless-build\com.ebay.sample.main\bin" > /> > > > > > dir="C:\Workspaces\all-learning\tycho-maven-headless-build\com.ebay.sample.main\src" > /> > > > > > > > > > > run > > > > * > > org.sonar > jacocoant > 0.4.1 > > > > > org.sonar > jacocoant > 0.4.1 > * > > > > > Also this is the xmlns in project tag: > > project > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/xsd/maven-4.0.0.xsd" > xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi=" > http://www.w3.org/2001/XMLSchema-instance" > xmlns:jacoco="antlib:org.jacoco.ant"> > > > Thanks, > Hari > > On Tue, Nov 2, 2010 at 3:43 PM, Anders Hammar wrote: > > > > > > http://maven.apache.org/plugins/maven-antrun-plugin/examples/customTasks.html > > > > You need to define a plugin dependency to jacocoant.jar. If that artifact > > is > > not already in the repo, you need to ad it to your repo manager. > > > > /Anderfs > > > > On Tue, Nov 2, 2010 at 10:59, Hari shankar wrote: > > > > > I got a ant build.xml invoked properly via maven antrun plugin but when > i > > > define it inline, it doesn't work. Please assist. > > > I think it has to do with xmlns but not sure where to define it > properly. > > > (To be specific am using a jacoco ant task for code coverage as > described > > > here ) > > > > > > The error that i got is > > > > > > *[ERROR] Failed to execute goal > > > org.apache.maven.plugins:maven-antrun-plugin:1.6: > > > run (default) on project xxx.sample.suite: An Ant BuildException has > > occure > > > d: The prefix "jacoco" for element "jacoco:report" is not bound. -> > [Help > > > 1] > > > * > > > > > > > > > > > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > > > http://maven.apache.org/xsd/maven-4.0.0.xsd" > > > xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi=" > > > http://www.w3.org/2001/XMLSchema-instance" > > > * xmlns:jacoco="antlib:org.jacoco.ant">* > > > 4.0.0 > > > > > > xxx.sample > > > xxx.sample.suite > > > 1.0.0-SNAPSHOT > > > jar > > > > > > > > > > > > > > > maven-antrun-plugin > > > 1.6 > > > > > > > > > package > > > > > > > > > > > > > > > > > resource="org/jacoco/ant/antlib.xml"> > > > > > > > > path="C:\SOFTWARES\JAVA\Java-external-jars\Jacoco\lib\jacocoant.jar" /> > > > > > > > > > > > > > > > > > > > > > > > > > > > file="C:/coverage.exec" > > /> > > > > > > > > > > > > > > > > > dir="C:\..\bin" /> > > > > > > encoding="UTF-8"> > > > > > dir="C:\..\src" /> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > run > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks, > > > Hari > > > > > >