buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <alex.boisv...@gmail.com>
Subject Re: Buildr and Webstart
Date Wed, 08 Sep 2010 19:43:21 GMT
Hi Travis,

Here's how Buildr locates "tools.jar" internally, which happens to be needed
for a lot of things.  The code handles all platforms we currently support.

  def tools_jar #:nodoc:
    @tools_jar ||= begin
      home = ENV['JAVA_HOME'] or fail 'Are we forgetting something?
JAVA_HOME not set.'
      ['lib/tools.jar', '../lib/tools.jar'].map { |path|
File.expand_path(path, home) }.
        find { |path| File.exist?(path) }
    end
  end

You could do something similar and you can safely assume that JAVA_HOME is
set since it's required by Buildr.

alex


On Wed, Sep 8, 2010 at 12:36 PM, Travis Jensen <travis.jensen@gmail.com>wrote:

> javaws.jar is in the JRE/lib directory, but is not included in the
> classpath
> by default (Googling around, I found I'm not the only one surprised by
> that).  There are several classes in the javax.jnlp package that we depend
> on that are part of that jar.  Part of what the JNLP plugins for maven and
> ant do is get that jar into the classpath.
>
> Access to JAVA_HOME (or the system property java.home) is exactly what I
> need, because the path should always be $JAVA_HOME/lib/javaws.jar.  Is it
> possible to get access to that at runtime or do I need to plan on setting
> that in my environment and accessing it from there?
>
> Thanks.
>
> tj
>
> *Travis Jensen*
> ***
> *Read the Software Maven @ http://softwaremaven.innerbrane.com/
> Read my LinkedIn profile @ http://www.linkedin.com/in/travisjensen
> Read my Twitter mumblings @ http://twitter.com/SoftwareMaven
> Send me email @ travis.jensen@gmail.com
>
> **What kind of guy calls himself the Software Maven???**
>
>
>
> On Wed, Sep 8, 2010 at 1:14 PM, Mark Petrovic <mspetrovic@gmail.com>
> wrote:
>
> > It's been a while since I worked with WebStart.  Why do you need this jar
> > on the classpath?  What needs it during the build?
> >
> >
> > On Sep 8, 2010, at 12:10 PM, Travis Jensen wrote:
> >
> > > I'm asking for a variable for the JDK because I don't want it tied to
> my
> > > machine. There is no maven artifact for this, because it is distributed
> > with
> > > the JDK, so that option is a non-option.  I don't want to build a maven
> > > repository for a single jar that every developer already has on their
> > > system.
> > >
> > > I also would prefer not to add a file that is part of the JDK to my
> > project
> > > because that gives me an additional dependency that is specific to the
> > JDK
> > > I'm using but not obviously tied to it.
> > >
> > > Maven and ant both have extensions that manage this, including the
> > compiling
> > > with the jar in the classpath. While that would be ideal, I recognize
> > buildr
> > > is a lot younger, so I'm willing to "work around" that for the time
> > being.
> > > The whole reason I chose buildr was the ruby base *enables* me to do
> that
> > > kind of workaround.
> > >
> > > tj
> > >
> > > *Travis Jensen*
> > > ***
> > > *Read the Software Maven @ http://softwaremaven.innerbrane.com/
> > > Read my LinkedIn profile @ http://www.linkedin.com/in/travisjensen
> > > Read my Twitter mumblings @ http://twitter.com/SoftwareMaven
> > > Send me email @ travis.jensen@gmail.com
> > >
> > > **What kind of guy calls himself the Software Maven???**
> > >
> > >
> > >
> > > On Wed, Sep 8, 2010 at 12:52 PM, Antoine Toulme <
> antoine@lunar-ocean.com
> > >wrote:
> > >
> > >> Hi Travis,
> > >>
> > >> you should not reference local artifacts so easily. It might work on
> > your
> > >> machine, but your coworker on Mac or Windows might have issues.
> > >> For that reason, I heartily recommend you use a jar located in a Maven
> > repo
> > >> rather than a local jar from your JDK.
> > >> At the very least, push the jar to your local maven repo and reference
> > it.
> > >> Your build will be much more stable that way.
> > >>
> > >> We have no support AFAIK of java webstart. If you could specify what
> you
> > >> need in a request for enhancement, that would help determine the scope
> > of
> > >> such a plugin ?
> > >>
> > >> Finally, we have no support for signing. It's not very hard to call a
> > >> command line with system and sign your jar with jarsigner.
> > >> I wish it'd be easier though, so if you feel like coding something
> > around
> > >> it, feel free ! That's the kind of functionality I think is missing in
> > >> Buildr.
> > >>
> > >> HTH
> > >>
> > >> Antoine
> > >>
> > >> On Wed, Sep 8, 2010 at 11:43, Travis Jensen <travis.jensen@gmail.com>
> > >> wrote:
> > >>
> > >>> I've been digging around and can't find any documentation on this.
I
> > need
> > >>> to
> > >>> produce a signed webstart jar. This implies a couple of things:
> > including
> > >>> javaws.jar from the JDK in the compile and running jarsigner with my
> > >>> certificate to sign the jar.
> > >>>
> > >>> Is there a native webstart plugin for buildr that I'm just missing?
>  If
> > >>> not,
> > >>> I can do the signing manually, but I'm not sure the best way to add
> > >>> javaws.jar to the compile path, since it is sitting in the JRE.  Is
> > there
> > >> a
> > >>> variable that points to the JDK that I could use build the classpath
> I
> > >>> need?
> > >>>
> > >>> I'm not quite ready to build a plugin myself for this, thought I'm
> > >> getting
> > >>> closer. :)
> > >>>
> > >>> Thanks.
> > >>>
> > >>> tj
> > >>>
> > >>> *Travis Jensen*
> > >>> ***
> > >>> *Read the Software Maven @ http://softwaremaven.innerbrane.com/
> > >>> Read my LinkedIn profile @ http://www.linkedin.com/in/travisjensen
> > >>> Read my Twitter mumblings @ http://twitter.com/SoftwareMaven
> > >>> Send me email @ travis.jensen@gmail.com
> > >>>
> > >>> **What kind of guy calls himself the Software Maven???**
> > >>>
> > >>
> >
> >
> > --
> > Mark Petrovic
> >
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message