You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@buildr.apache.org by Assaf Arkin <ar...@intalio.com> on 2009/07/01 02:25:15 UTC

Re: svn commit: r786830 - in /buildr/trunk: doc/languages.textile lib/buildr/scala/compiler.rb

On Mon, Jun 22, 2009 at 5:22 PM, Daniel Spiewak <dj...@gmail.com> wrote:

> Ah, didn't know that.  Would you be able to write up a documentation how-to
> thingy?  One of the things I noticed just in trying to document the
> interactive shell support is that I really don't know how to work the
> system
> even for little things like highlighting-free preformatted blocks.  A few
> words of wisdom in this area would be greatly appreciated, at least by me.


I fixed the documentation, since it talked about Docter and we're using
Jekyll.  Best reference for Textile is the Redcloth site:
http://redcloth.org/textile

You're looking for this section:
http://redcloth.org/textile/html-integration-and-escapement/#no-textile

You can also use {% highlight text %}, which doesn't do any highlighting.

Assaf



>
> :-)
>
> Daniel
>
> On Mon, Jun 22, 2009 at 7:11 PM, Assaf Arkin <ar...@intalio.com> wrote:
>
> > FYI: the version of RedCloth that we're using defaults to the original
> > Textile behavior which is to replace newlines with <br>, so formatting a
> > paragraph with line breaks ends looks good in a text editor, but badly
> > justified in HTML/PDF.  That option can be toggled, but I learned the
> hard
> > way not to argue with RedCloth.
> >
> > Assaf
> >
> > On Sat, Jun 20, 2009 at 7:30 AM, <dj...@apache.org> wrote:
> >
> > > Author: djspiewak
> > > Date: Sat Jun 20 14:30:19 2009
> > > New Revision: 786830
> > >
> > > URL: http://svn.apache.org/viewvc?rev=786830&view=rev
> > > Log:
> > > Added documentation for Scala auto-download
> > >
> > > Modified:
> > >    buildr/trunk/doc/languages.textile
> > >    buildr/trunk/lib/buildr/scala/compiler.rb
> > >
> > > Modified: buildr/trunk/doc/languages.textile
> > > URL:
> > >
> >
> http://svn.apache.org/viewvc/buildr/trunk/doc/languages.textile?rev=786830&r1=786829&r2=786830&view=diff
> > >
> > >
> >
> ==============================================================================
> > > --- buildr/trunk/doc/languages.textile (original)
> > > +++ buildr/trunk/doc/languages.textile Sat Jun 20 14:30:19 2009
> > > @@ -128,26 +128,47 @@
> > >
> > >  h2(#scala). Scala
> > >
> > > -Before using Scala features, you must first set the
> > @SCALA_HOME@environment variable to point to the root of your Scala
> > distribution.
> > > +Before using Scala, you must first @require@ the Scala compiler:
> > >
> > > -On Windows:
> > > -
> > > -{% highlight sh %}
> > > -> set SCALA_HOME=C:\Path\To\Scala-2.7.3
> > > +{% highlight ruby %}
> > > +require 'buildr/scala'
> > >  {% endhighlight %}
> > >
> > > -On Linux and other Unix variants,
> > > +By default, Buildr will attempt to use any version of Scala which is
> > > already
> > > +installed on your system.  However, Buildr isn't *quite* smart enough
> to
> > > intuit
> > > +such things on its own, so for most cases, it requires the
> @SCALA_HOME@
> > > +environment variable to be set pointing to the root of the Scala
> > > installation
> > > +(e.g. @/usr/local/scala-2.7.5.final@).  The only exception to this is
> > if
> > > you have
> > > +installed Scala via "MacPorts":http://www.macports.org/  Buildr will
> > look
> > > in the
> > > +@/opt/local/share/scala/@ directory *before* it uses the
> > @SCALA_HOME@envar.
> > > +
> > > +However, if @SCALA_HOME@ is not set, or if it points to an invalid
> > Scala
> > > +installation, then Buildr has a fallback option.  The Scala compiler
> and
> > > standard
> > > +library are both available from the "Scala Tools repository":
> > > http://scala-tools.org/.
> > > +If no other Scala installation can be found, Buildr will download the
> > > appropriate
> > > +artifacts and use them instead of a full install.  The only drawback
> to
> > > this
> > > +approach is the FSC compiler is *not* available when Scala has been
> > > downloaded
> > > +in this fashion.
> > > +
> > > +When Scala is downloaded from the Maven2 repository, Buildr will
> attempt
> > > to use
> > > +the very latest version (starting from version 2.7.5).  If you wish to
> > > override
> > > +this default, you will need to make use of the @artifact_ns@construct
> > > *before*
> > > +you @require@ Scala support in your buildfile:
> > >
> > > -{% highlight sh %}
> > > -> export SCALA_HOME=/path/to/scala-2.7.3
> > > +{% highlight ruby %}
> > > +artifact_ns['Buildr::Compiler::Scalac'].library = '2.7.5'
> > > +
> > > +require 'buildr/scala'
> > >  {% endhighlight %}
> > >
> > > -The @SCALA_HOME@ base directory should be such that Scala core
> > libraries
> > > are located directly under the "lib" subdirectory, and Scala scripts
> are
> > > under the "bin" directory. This step is not necessary if you installed
> > Scala
> > > using MacPorts (OS X).
> > > +This snippet tells Buildr to use exactly version 2.7.5 of Scala when
> it
> > > downloads
> > > +the JARs from Scala-Tools, regardless of what the latest version may
> be.
> > >
> > > -You must also require the Scala compiler in your buildfile:
> > > +Regardless of how Scala has been obtained, you may determine the
> version
> > > in use
> > > +by querying the @Scala.version@ attribute:
> > >
> > >  {% highlight ruby %}
> > > -require 'buildr/scala'
> > > +Scala.version       # => '2.7.5'
> > >  {% endhighlight %}
> > >
> > >  h3. Compiling Scala
> > >
> > > Modified: buildr/trunk/lib/buildr/scala/compiler.rb
> > > URL:
> > >
> >
> http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/scala/compiler.rb?rev=786830&r1=786829&r2=786830&view=diff
> > >
> > >
> >
> ==============================================================================
> > > --- buildr/trunk/lib/buildr/scala/compiler.rb (original)
> > > +++ buildr/trunk/lib/buildr/scala/compiler.rb Sat Jun 20 14:30:19 2009
> > > @@ -42,7 +42,7 @@
> > >           fail "Unable to parse Scala version: #{version_str} "
> > >         match[0].sub(/.$/, "") # remove trailing dot, if any
> > >       else
> > > -        DEFAULT_VERSION
> > > +        DEFAULT_VERSION       # TODO return the version installed from
> > > Maven repo
> > >       end
> > >     end
> > >   end
> > >
> > >
> > >
> >
>