You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Evan Worley <ev...@gmail.com> on 2007/12/27 23:26:58 UTC

[Tobago] apt-plugin JDK tools.jar dependency

Hello all,

Below is a thread that originated on the maven developers list.  It seems
that the maven-apt-plugin could use some more infrastructure around
resolving the dependency on the JDK's tools.jar.  Here is the original
thread, any thoughts would be great.

Thanks,
Evan Worley

On Dec 27, 2007 2:13 PM, Brett Porter <br...@apache.org> wrote:
I think you can use ${java.home}/../lib/tools.jar (and remember to
omit it on non-Sun JVM platforms), and document that the user must be
running Java from the JDK, not a JRE (and present a helpful error
message if the class you are looking for cannot be found). You might
look at the source for plexus-compiler-javac for some guidance. I'm
not sure if that is all in the scope of what you are doing or
something the apt plugin should be doing (aren't there other
implementations of the apt plugin too?)

- Brett

On 28/12/2007, at 9:03 AM, Evan Worley wrote:

> Thanks for the info Brett,
>
> I am loading it via a dependency.  I depend on the maven-apt-plugin (
> http://myfaces.apache.org/tobago/tobago-tool/maven-apt-plugin/)
> which has a
> system scoped dependency on tools.jar
>
> So if we can't ensure that java.home is set to a JDK, how can we
> recommend
> people use the java.home relative path to find the tools.jar?
>
> Thanks,
> Evan
>
> On Dec 27, 2007 1:56 PM, Brett Porter <br...@apache.org> wrote:
>
>> It's set by the JVM itself - you will probably need profiles for the
>> different possibilities (like the Mac one, where there is no
>> tools.jar).
>>
>> Are you loading this via a dependency, or creating your own
>> classloader?
>>
>> - Brett
>>
>> On 28/12/2007, at 5:24 AM, Evan Worley wrote:
>>
>>> Hi All,
>>>
>>> I need to have the JDK's tools.jar on my classpath and have been
>>> fumbling
>>> through the configuration to make this happen.  I found the
>>> following page
>>> which describes how to use the java.home property to locate the
>>> tools.jar,
>>> http://maven.apache.org/general.html#tools-jar-dependency.  But I
>>> have also
>>> found several pages, such as
>>> http://docs.codehaus.org/display/MAVENUSER/MavenPropertiesGuide
>>> which point
>>> out that java.home might be a JRE and not a JDK.  How can we ensure
>>> that
>>> tools.jar can be found using a relative path from ${java.home}?
>>>
>>> Does anyone know how java.home is computed?  I have read that it is
>>> not
>>> always equal to the JAVA_HOME environment variable.
>>>
>>> Also if context might help, I need the tools.jar to use the
>>> maven-apt-plugin.
>>>
>>> Thanks for any help,
>>> Evan

Re: [Tobago] apt-plugin JDK tools.jar dependency

Posted by Evan Worley <ev...@gmail.com>.
Hi Wendy,

I think it would make a lot of sense because annotation processing is hardly
related to JSFs and was probably only created as a supporting technology.
Who can work on pulling this out to the Codehaus Mojo project?

Thanks,
Evan

On Dec 27, 2007 5:51 PM, Wendy Smoak <ws...@gmail.com> wrote:

> On Dec 27, 2007 3:26 PM, Evan Worley <ev...@gmail.com> wrote:
> > Hello all,
> >
> > Below is a thread that originated on the maven developers list.  It
> seems
> > that the maven-apt-plugin could use some more infrastructure around
> > resolving the dependency on the JDK's tools.jar.  Here is the original
> > thread, any thoughts would be great.
>
> Struts 2 is also using this plugin... if it's not JSF-specific, does
> it make sense to take it over to the Codehaus Mojo project where it
> would be easier to collaborate on?
>
> Brett pointed out that there is another apt plugin over there in the
> sandbox;  I'm not sure if they're related.
>
> --
> Wendy
>

Re: [Tobago] apt-plugin JDK tools.jar dependency

Posted by Wendy Smoak <ws...@gmail.com>.
On Dec 27, 2007 3:26 PM, Evan Worley <ev...@gmail.com> wrote:
> Hello all,
>
> Below is a thread that originated on the maven developers list.  It seems
> that the maven-apt-plugin could use some more infrastructure around
> resolving the dependency on the JDK's tools.jar.  Here is the original
> thread, any thoughts would be great.

Struts 2 is also using this plugin... if it's not JSF-specific, does
it make sense to take it over to the Codehaus Mojo project where it
would be easier to collaborate on?

Brett pointed out that there is another apt plugin over there in the
sandbox;  I'm not sure if they're related.

-- 
Wendy