You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jerome Thibaud <th...@gmail.com> on 2007/06/11 18:50:34 UTC

tools.jar dependency and MacOSX

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.jar fail 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

Re: tools.jar dependency and MacOSX

Posted by Kalle Korhonen <ka...@gmail.com>.
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 <na...@gmail.com> 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 <st...@gmail.com> 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 <si...@it20one.at> 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 <gk...@gmail.com> 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 <na...@gmail.com> 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 <th...@gmail.com> 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: users-unsubscribe@maven.apache.org
> > > >> For additional commands, e-mail: users-help@maven.apache.org
> > > >>
> > > >>
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

Re: tools.jar dependency and MacOSX

Posted by Nathan Maves <na...@gmail.com>.
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 <st...@gmail.com> 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 <si...@it20one.at> wrote:
> > I tried it recently with creating a symbolic link for tools.jar pointing
> > 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 <gk...@gmail.com> 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 <na...@gmail.com> 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 <th...@gmail.com> 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.jar fail
> 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: users-unsubscribe@maven.apache.org
> > >> For additional commands, e-mail: users-help@maven.apache.org
> > >>
> > >>
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: tools.jar dependency and MacOSX

Posted by Stephane Nicoll <st...@gmail.com>.
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 <si...@it20one.at> wrote:
> I tried it recently with creating a symbolic link for tools.jar pointing
> 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 <gk...@gmail.com> 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 <na...@gmail.com> 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 <th...@gmail.com> 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.jar fail 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: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: tools.jar dependency and MacOSX

Posted by Wayne Fay <wa...@gmail.com>.
There might be a better way (or more Maven-ish way) to do it, but a
symbolic link is certainly the simplest.

Wayne

On 6/11/07, Siegfried Goeschl <si...@it20one.at> wrote:
> I tried it recently with creating a symbolic link for tools.jar pointing
> 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 <gk...@gmail.com> 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 <na...@gmail.com> 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 <th...@gmail.com> 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.jar fail 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: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: tools.jar dependency and MacOSX

Posted by Siegfried Goeschl <si...@it20one.at>.
I tried it recently with creating a symbolic link for tools.jar pointing 
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 <gk...@gmail.com> 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 <na...@gmail.com> 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 <th...@gmail.com> 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.jar fail 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: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 

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


Re: tools.jar dependency and MacOSX

Posted by Jerome Thibaud <th...@gmail.com>.
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 <gk...@gmail.com> 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 <na...@gmail.com> 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 <th...@gmail.com> 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.jar fail 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: tools.jar dependency and MacOSX

Posted by Russ Tremain <Ru...@Sun.COM>.
warning, for some reason the symlink does not work on the intel macs.
here is what I do (tcsh/csh syntax):

setenv JAVABASE /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0
setenv JAVAVERS Home
setenv JAVA_HOME $JAVABASE/$JAVAVERS

if (! -d $JAVA_HOME/jre || ! -r $JAVA_HOME/../lib/tools.jar ) then
    cat << EOF
WARNING:  you need to fix up your java installation (OSX ONLY):
    # cd $JAVA_HOME
    # sudo mkdir jre
    # cd jre
    # sudo ln -s ../bin
    # sudo ln -s ../lib
    # cd $JAVA_HOME/..
    # sudo ln -s Classes lib
    # cd lib
    # sudo touch tools.jar
EOF
endif


I.e., since classes.jar is already in the path, just create a dummy tools.jar
to satisfy maven.  I used to symlink it but for some reason this did not
work correctly on the macbooks (works fine on ppc macs).
/r


At 2:04 PM -0700 6/11/07, Jerome Thibaud wrote:
>The symbolic link sounds like a nice trick, I'll try that.
>In the meantime, I was expecting something more mainstream.
>Also you guys realize that If i remove the dependency to tools.jar, my build
>will work on Mac but will stop working on Windows and Linux.
>
>rgds
>
>JT
>
>On 6/11/07, Nathan Maves <na...@gmail.com> wrote:
>>
>>I agree with Gregory,
>>
>>I would remove the dependency all-together.
>>
>>Everything should just work.
>>
>>On 6/11/07, Gregory Kick <gk...@gmail.com> 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 <na...@gmail.com> 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 <th...@gmail.com> 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.jar fail 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.jarin
>>> 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: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>


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


Re: tools.jar dependency and MacOSX

Posted by Gregory Kick <gk...@gmail.com>.
put it in a profile with os activation

On 6/11/07, Jerome Thibaud <th...@gmail.com> wrote:
> The symbolic link sounds like a nice trick, I'll try that.
> In the meantime, I was expecting something more mainstream.
> Also you guys realize that If i remove the dependency to tools.jar, my build
> will work on Mac but will stop working on Windows and Linux.
>
> rgds
>
> JT
>
> On 6/11/07, Nathan Maves <na...@gmail.com> wrote:
> >
> > I agree with Gregory,
> >
> > I would remove the dependency all-together.
> >
> > Everything should just work.
> >
> > On 6/11/07, Gregory Kick <gk...@gmail.com> 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 <na...@gmail.com> 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 <th...@gmail.com> 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.jar fail 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.jarin
> > > 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: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
>


-- 
Gregory Kick
http://kickstyle.net/

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


Re: tools.jar dependency and MacOSX

Posted by Jerome Thibaud <th...@gmail.com>.
The symbolic link sounds like a nice trick, I'll try that.
In the meantime, I was expecting something more mainstream.
Also you guys realize that If i remove the dependency to tools.jar, my build
will work on Mac but will stop working on Windows and Linux.

rgds

JT

On 6/11/07, Nathan Maves <na...@gmail.com> wrote:
>
> I agree with Gregory,
>
> I would remove the dependency all-together.
>
> Everything should just work.
>
> On 6/11/07, Gregory Kick <gk...@gmail.com> 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 <na...@gmail.com> 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 <th...@gmail.com> 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.jar fail 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.jarin
> > 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: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

Re: tools.jar dependency and MacOSX

Posted by Nathan Maves <na...@gmail.com>.
I agree with Gregory,

I would remove the dependency all-together.

Everything should just work.

On 6/11/07, Gregory Kick <gk...@gmail.com> 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 <na...@gmail.com> 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 <th...@gmail.com> 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.jar fail 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: tools.jar dependency and MacOSX

Posted by Gregory Kick <gk...@gmail.com>.
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 <na...@gmail.com> 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 <th...@gmail.com> 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.jar fail 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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: tools.jar dependency and MacOSX

Posted by Graham Leggett <mi...@sharp.fm>.
Jerome Thibaud wrote:

> The project is not Mac specific, the developers use Windows, Linux etc.
> Someone introduced a dependency using the com.sun.tools.javac classes.

Using Sun's internal implementation classes in JDK v1.6 and above 
triggers a compile error. The correct fix is to stop using those classes.

Regards,
Graham
--

Re: tools.jar dependency and MacOSX

Posted by Jerome Thibaud <th...@gmail.com>.
The project is not Mac specific, the developers use Windows, Linux etc.
Someone introduced a dependency using the com.sun.tools.javac classes.

rgds

JT

On 6/11/07, Nathan Maves <na...@gmail.com> 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 <th...@gmail.com> 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.jar fail 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
> >
>

Re: tools.jar dependency and MacOSX

Posted by Nathan Maves <na...@gmail.com>.
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 <th...@gmail.com> 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.jar fail 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
>