You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by mjohnsonaz74 <mj...@hotmail.com> on 2006/04/28 23:09:46 UTC

Re: [m2] ant task problem

Although this answer is a bit after the question, I thought I'd post here for
any future problems that might be related here.  I had this same problem and
it's caused by classpath issues between Maven and Ant.  I actually had to
modify a portion of the plugin source to get it to work right, but I
digress.  I believe your specific problem can be addressed by creating a
system level dependency to the tools.jar file in the %JAVA_HOME% directory
for your system.  Try adding this dependency to your POM.xml and see if it
helps.

<dependency>
    <groupId>sun.jdk</groupId>
    <artifactId>tools</artifactId>
    <version>1.4.2</version>
    <scope>system</scope>
    <systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>	  

-- MJ
--
View this message in context: http://www.nabble.com/-m2-ant-task-problem-t886291.html#a4147688
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] ant task problem

Posted by dan tran <da...@gmail.com>.
See if this helps

http://jira.codehaus.org/browse/MANTRUN-49


The work around is to pass classpath string to your taskdef

-Dan


On 4/28/06, mjohnsonaz74 <mj...@hotmail.com> wrote:
>
>
> Although this answer is a bit after the question, I thought I'd post here
> for
> any future problems that might be related here.  I had this same problem
> and
> it's caused by classpath issues between Maven and Ant.  I actually had to
> modify a portion of the plugin source to get it to work right, but I
> digress.  I believe your specific problem can be addressed by creating a
> system level dependency to the tools.jar file in the %JAVA_HOME% directory
> for your system.  Try adding this dependency to your POM.xml and see if it
> helps.
>
> <dependency>
>    <groupId>sun.jdk</groupId>
>    <artifactId>tools</artifactId>
>    <version>1.4.2</version>
>    <scope>system</scope>
>    <systemPath>${java.home}/../lib/tools.jar</systemPath>
> </dependency>
>
> -- MJ
> --
> View this message in context:
> http://www.nabble.com/-m2-ant-task-problem-t886291.html#a4147688
> Sent from the Maven - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>