On Wed, 2004-05-12 at 11:11, David Bock wrote:
> I am converting a project to maven, and I have some classes that depend
> on com.sun.javadoc package, which lives in the tools.jar file in a java
> install.
> 
> My maven build is complaining because it can't find that dependency... I
> would have expected this to be automatically provided by maven, since it
> is part of the java install.
> 
> How can I adjust my build to find this jar file?

project.properties
------------------

maven.jar.override = true
maven.jar.tools = /path/to/your/tools.jar

project.xml
------------------
<project>
  ...
  <dependencies>
    <dependency>
      <groupId>sun</groupId>
      <!-- This is the element used for maven.jar.tools above -->
      <artifactId>tools</artifactId>
      <version>1.4.2</version>
    </dependency>
  </dependencies>
</project>

Alternatively you can use a strategy like use here:

http://cvs.plexus.codehaus.org/plexus/plexus-components/native/compiler/src/main/org/codehaus/plexus/compiler/javac/

Just create classloader, pull in the tools jar, load the compiler and go
to town. I haven't decided myself what the best approach is. Hope that
helps.

> -db
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
jvz.

Jason van Zyl
[EMAIL PROTECTED]
http://maven.apache.org

happiness is like a butterfly: the more you chase it, the more it will
elude you, but if you turn your attention to other things, it will come
and sit softly on your shoulder ...

 -- Thoreau 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to