Things like annotation processing with apt requires jdk classes (the
tools.jar) to be available during the build. This is what we do in Trails
for the same problem:
<profiles>
<profile>
<!-- NOTE: This will not be activated on OS X, since
classes.jaralready has the tools in it. -->
<id>default-tools.jar</id>
<activation>
<property>
<name>java.vendor</name>
<value>Sun Microsystems Inc.</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.5.0</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</profile>
</profiles>
Kalle
On 6/12/07, Nathan Maves <[EMAIL PROTECTED]> wrote:
I think what you have done is not considered a best practice in the Maven
world. I would do my best to remove the dependency on tools.jar. There
is
no need to use this file.
On 6/12/07, Stephane Nicoll <[EMAIL PROTECTED]> wrote:
>
> This is not needed. The Apple VM already has those classes available
> by default. What I did is creating an empty jar at the correct
> location named tools.jar.
>
> HTH,
> Stéphane
>
> On 6/11/07, Siegfried Goeschl <[EMAIL PROTECTED]> wrote:
> > I tried it recently with creating a symbolic link for tools.jarpointing
> > to classes.jar
> >
> > Cheers,
> >
> > Siegfried Goeschl
> >
> > Jerome Thibaud wrote:
> > > Are you saying that I can add an exclusion clause in a Profile
> triggered by
> > > the OS type?
> > > Would it act on the dependencies declared in the
build/plugins/plugin
> > > section ?
> > >
> > > rgds
> > >
> > > JT
> > >
> > > On 6/11/07, Gregory Kick <[EMAIL PROTECTED]> wrote:
> > >>
> > >> The deal is that tools.jar is in classes.jar (i think) and is
always
> > >> on the classpath. If you just exclude the dependency it should
work.
> > >>
> > >> On 6/11/07, Nathan Maves <[EMAIL PROTECTED]> wrote:
> > >> > What causes your project to have a dependency on tools.jar?
> > >> >
> > >> > I have been using maven on a mac for a while now and have never
had
> to
> > >> deal
> > >> > with the tools.jar.
> > >> >
> > >> > Nathan
> > >> >
> > >> > On 6/11/07, Jerome Thibaud <[EMAIL PROTECTED]> wrote:
> > >> > >
> > >> > > Hi All,
> > >> > >
> > >> > > Discovering the joy of coding Java in a Mac environment I
learned
> > >> that
> > >> > > there
> > >> > > is no tools.jar in the Mac version of the JDK.
> > >> > > Consequence is, my projects having dependencies on tools.jarfail
> to
> > >> > > build.
> > >> > >
> > >> > > So for the project with a direct dependency, I used Profile
> > >> successfully.
> > >> > > I created one profile triggered by the OS family and everything
> went
> > >> > > smooth.
> > >> > >
> > >> > > Now I got 2 problems:
> > >> > > - it seems that, when inherited through transitive
dependency,
> the
> > >> > > profile trigger is not taken into account
> > >> > > and tools.jar is added to the dependencies list anyway.
> > >> > > - I got an ant plugin setup in the build section with
> tools.jar in
> > >> the
> > >> > > dependencies section of the plugin.
> > >> > > What do I use to make the dependency conditional there?
> > >> > >
> > >> > >
> > >> > > thanks in advance
> > >> > >
> > >> > > Jerome
> > >> > >
> > >> >
> > >>
> > >>
> > >> --
> > >> Gregory Kick
> > >> http://kickstyle.net/
> > >>
> > >>
---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >> For additional commands, e-mail: [EMAIL PROTECTED]
> > >>
> > >>
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>