You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Caleb Powell <ca...@gmail.com> on 2008/03/05 19:35:06 UTC

javac's -cp flag (a buildr compilation bug?)

Hi,

I was using buildr (1.2.1) to compile code in an existing Maven project. The
compile task failed because the Java compiler (Sun JDK1.4.2_13 on Windows)
does not accept the
'-cp' alias. From what I can tell, the '-cp' alias was not introduced until
the 1.5 compiler. Here was the output where JAVA_HOME was set to the Sun
1.4.2_13 JDK;

Compiling 403 source files in pharmacy-core:compile
javac: invalid flag: -cp
Usage: javac <options> <source files>
where possible options include:
  -g                        Generate all debugging info
  -g:none                   Generate no debugging info
  -g:{lines,vars,source}    Generate only some debugging info
  -nowarn                   Generate no warnings
  -verbose                  Output messages about what the compiler is doing
  -deprecation              Output source locations where deprecated APIs
are used
  -classpath <path>         Specify where to find user class files
  -sourcepath <path>        Specify where to find input source files
  -bootclasspath <path>     Override location of bootstrap class files
  -extdirs <dirs>           Override location of installed extensions
  -d <directory>            Specify where to place generated class files
  -encoding <encoding>      Specify character encoding used by source files
  -source <release>         Provide source compatibility with specified
release
  -target <release>         Generate class files for specific VM version
  -help                     Print a synopsis of standard options

rake aborted!

Assuming that buildr should be compatible with the 1.4.x JDK's (is this
assumption wrong), than I think this qualifies as a bug (which could be
easily addressed by using 'classpath').

In the meantime, is there any workaround to this issue (short of using the
1.5 JDK)?

Cheers!

-- 
Caleb

"I do not know which makes a man more conservative—to know nothing but the
present, or nothing but the past."
 - John Maynard Keynes

Re: Downloading dojo fails

Posted by Assaf Arkin <ar...@intalio.com>.
On Thu, Mar 13, 2008 at 8:12 PM, niko <he...@gmail.com> wrote:

> Hi,
>
> I am using the regular dojo trick as described in the artifacts section:
> http://incubator.apache.org/buildr/artifacts.html
>
> I had to update my gems yesterday, and it looks like from now on the
> download of the dojo zip file is failing with the following message:
> ============================================================
> Note: Some input files use unchecked or unsafe operations.
> Note: Recompile with -Xlint:unchecked for details.
> rake aborted!
> Zip end of central directory signature not found
>
> (See full trace by running task with --trace)
> ============================================================
>

Just tested:

"No errors detected in compressed data of
/Users/assaf/.m2/repository/dojo/dojo/0.2.2/dojo-0.2.2-widget.zip."

Assaf


>
> I'm sure that was working before.
>
> If I download the dojo zip file manually and put it at the proper place in
> the maven repository then everything works fine.
>
> There are 3 other people have the same problem, so was wondering if there
> was any hints as to what could be possibly go wrong ?
> I am thinking about a gem that was updated while it shouldn't have...
>
> Thanks,
>
> Niko,
>
>
>

Downloading dojo fails

Posted by niko <he...@gmail.com>.
Hi,

I am using the regular dojo trick as described in the artifacts section:
http://incubator.apache.org/buildr/artifacts.html

I had to update my gems yesterday, and it looks like from now on the
download of the dojo zip file is failing with the following message:
============================================================
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
rake aborted!
Zip end of central directory signature not found

(See full trace by running task with --trace)
============================================================

I'm sure that was working before.

If I download the dojo zip file manually and put it at the proper place in
the maven repository then everything works fine.

There are 3 other people have the same problem, so was wondering if there
was any hints as to what could be possibly go wrong ?
I am thinking about a gem that was updated while it shouldn't have...

Thanks,

Niko, 



Re: javac's -cp flag (a buildr compilation bug?)

Posted by Assaf Arkin <ar...@intalio.com>.
On 3/5/08, Caleb Powell <ca...@gmail.com> wrote:
>
> Assaf,
>
> my mistake when I reported the version as 1.2.1. I am in fact using the
> latest buildr (version 1.2.10). So this problem does in fact apply to this
> release.
>
> The problem is on line 215 of the 'lib/java/java.rb' file. I changed the
> '-cp' string to '-classpath' and it managed to compile my code.
>
> cmd_args << "-classpath" << classpath.join(File::PATH_SEPARATOR) unless
> classpath.empty?
>
> I thought I saw the same problem on the trunk, but I don't have that code
> in
> front of me at the moment.



Fixed in trunk, it was basically the same code, and only tested against 1.5
/1.6.

Assaf

On Wed, Mar 5, 2008 at 2:36 PM, Assaf Arkin <ar...@intalio.com> wrote:
>
> > On 3/5/08, Caleb Powell <ca...@gmail.com> wrote:
> > >
> > > Are any of these later version available for download as a gem (on
> some
> > > other external repository besides RubyForge)
> >
> >
> > All the way up to 1.2.10:
> > http://rubyforge.org/frs/?group_id=3180&release_id=16645
> >
> >
> >
> > Assaf
> >
> > Wed, Mar 5, 2008 at 1:42 PM, Assaf Arkin <ar...@intalio.com> wrote:
> > >
> > > > On 3/5/08, Caleb Powell <ca...@gmail.com> wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > I was using buildr (1.2.1) to compile code in an existing Maven
> > > project.
> > > > > The
> > > > > compile task failed because the Java compiler (Sun JDK1.4.2_13 on
> > > > Windows)
> > > > > does not accept the
> > > > > '-cp' alias. From what I can tell, the '-cp' alias was not
> > introduced
> > > > > until
> > > > > the 1.5 compiler. Here was the output where JAVA_HOME was set to
> the
> > > Sun
> > > > > 1.4.2_13 JDK;
> > > > >
> > > > > Compiling 403 source files in pharmacy-core:compile
> > > > > javac: invalid flag: -cp
> > > > > Usage: javac <options> <source files>
> > > > > where possible options include:
> > > > >   -g                        Generate all debugging info
> > > > >   -g:none                   Generate no debugging info
> > > > >   -g:{lines,vars,source}    Generate only some debugging info
> > > > >   -nowarn                   Generate no warnings
> > > > >   -verbose                  Output messages about what the
> compiler
> > is
> > > > > doing
> > > > >   -deprecation              Output source locations where
> deprecated
> > > > APIs
> > > > > are used
> > > > >   -classpath <path>         Specify where to find user class files
> > > > >   -sourcepath <path>        Specify where to find input source
> files
> > > > >   -bootclasspath <path>     Override location of bootstrap class
> > files
> > > > >   -extdirs <dirs>           Override location of installed
> > extensions
> > > > >   -d <directory>            Specify where to place generated class
> > > files
> > > > >   -encoding <encoding>      Specify character encoding used by
> > source
> > > > > files
> > > > >   -source <release>         Provide source compatibility with
> > > specified
> > > > > release
> > > > >   -target <release>         Generate class files for specific VM
> > > version
> > > > >   -help                     Print a synopsis of standard options
> > > > >
> > > > > rake aborted!
> > > > >
> > > > > Assuming that buildr should be compatible with the 1.4.x JDK's (is
> > > this
> > > > > assumption wrong), than I think this qualifies as a bug (which
> could
> > > be
> > > > > easily addressed by using 'classpath').
> > > > >
> > > > > In the meantime, is there any workaround to this issue (short of
> > using
> > > > the
> > > > > 1.5 JDK)?
> > > > >
> > > > > Cheers!
> > > >
> > > >
> > > > Newer versions of Buildr invoke the Java compiler through RJB, so
> > > they're
> > > > not affected but this and also run the build substantially faster.
> > > >
> > > > Assaf
> > > >
> > > >
> > > > --
> > > > > Caleb
> > > > >
> > > > > "I do not know which makes a man more conservative—to know nothing
> > but
> > > > the
> > > > > present, or nothing but the past."
> > > > >   - John Maynard Keynes
> > > > >
> > > >
> > >
> > >
> > >
> > >
> > > --
> > >
> > > Caleb
> > >
> > > "I do not know which makes a man more conservative—to know nothing but
> > the
> > > present, or nothing but the past."
> > >   - John Maynard Keynes
> > >
> >
>
>
>
>
> --
>
> Caleb
>
> "I do not know which makes a man more conservative—to know nothing but the
> present, or nothing but the past."
>   - John Maynard Keynes
>

Re: javac's -cp flag (a buildr compilation bug?)

Posted by Caleb Powell <ca...@gmail.com>.
Assaf,

my mistake when I reported the version as 1.2.1. I am in fact using the
latest buildr (version 1.2.10). So this problem does in fact apply to this
release.

The problem is on line 215 of the 'lib/java/java.rb' file. I changed the
'-cp' string to '-classpath' and it managed to compile my code.

cmd_args << "-classpath" << classpath.join(File::PATH_SEPARATOR) unless
classpath.empty?

I thought I saw the same problem on the trunk, but I don't have that code in
front of me at the moment.

On Wed, Mar 5, 2008 at 2:36 PM, Assaf Arkin <ar...@intalio.com> wrote:

> On 3/5/08, Caleb Powell <ca...@gmail.com> wrote:
> >
> > Are any of these later version available for download as a gem (on some
> > other external repository besides RubyForge)
>
>
> All the way up to 1.2.10:
> http://rubyforge.org/frs/?group_id=3180&release_id=16645
>
>
>
> Assaf
>
> Wed, Mar 5, 2008 at 1:42 PM, Assaf Arkin <ar...@intalio.com> wrote:
> >
> > > On 3/5/08, Caleb Powell <ca...@gmail.com> wrote:
> > > >
> > > > Hi,
> > > >
> > > > I was using buildr (1.2.1) to compile code in an existing Maven
> > project.
> > > > The
> > > > compile task failed because the Java compiler (Sun JDK1.4.2_13 on
> > > Windows)
> > > > does not accept the
> > > > '-cp' alias. From what I can tell, the '-cp' alias was not
> introduced
> > > > until
> > > > the 1.5 compiler. Here was the output where JAVA_HOME was set to the
> > Sun
> > > > 1.4.2_13 JDK;
> > > >
> > > > Compiling 403 source files in pharmacy-core:compile
> > > > javac: invalid flag: -cp
> > > > Usage: javac <options> <source files>
> > > > where possible options include:
> > > >   -g                        Generate all debugging info
> > > >   -g:none                   Generate no debugging info
> > > >   -g:{lines,vars,source}    Generate only some debugging info
> > > >   -nowarn                   Generate no warnings
> > > >   -verbose                  Output messages about what the compiler
> is
> > > > doing
> > > >   -deprecation              Output source locations where deprecated
> > > APIs
> > > > are used
> > > >   -classpath <path>         Specify where to find user class files
> > > >   -sourcepath <path>        Specify where to find input source files
> > > >   -bootclasspath <path>     Override location of bootstrap class
> files
> > > >   -extdirs <dirs>           Override location of installed
> extensions
> > > >   -d <directory>            Specify where to place generated class
> > files
> > > >   -encoding <encoding>      Specify character encoding used by
> source
> > > > files
> > > >   -source <release>         Provide source compatibility with
> > specified
> > > > release
> > > >   -target <release>         Generate class files for specific VM
> > version
> > > >   -help                     Print a synopsis of standard options
> > > >
> > > > rake aborted!
> > > >
> > > > Assuming that buildr should be compatible with the 1.4.x JDK's (is
> > this
> > > > assumption wrong), than I think this qualifies as a bug (which could
> > be
> > > > easily addressed by using 'classpath').
> > > >
> > > > In the meantime, is there any workaround to this issue (short of
> using
> > > the
> > > > 1.5 JDK)?
> > > >
> > > > Cheers!
> > >
> > >
> > > Newer versions of Buildr invoke the Java compiler through RJB, so
> > they're
> > > not affected but this and also run the build substantially faster.
> > >
> > > Assaf
> > >
> > >
> > > --
> > > > Caleb
> > > >
> > > > "I do not know which makes a man more conservative—to know nothing
> but
> > > the
> > > > present, or nothing but the past."
> > > >   - John Maynard Keynes
> > > >
> > >
> >
> >
> >
> >
> > --
> >
> > Caleb
> >
> > "I do not know which makes a man more conservative—to know nothing but
> the
> > present, or nothing but the past."
> >   - John Maynard Keynes
> >
>



-- 
Caleb

"I do not know which makes a man more conservative—to know nothing but the
present, or nothing but the past."
 - John Maynard Keynes

Re: javac's -cp flag (a buildr compilation bug?)

Posted by Assaf Arkin <ar...@intalio.com>.
On 3/5/08, Caleb Powell <ca...@gmail.com> wrote:
>
> Are any of these later version available for download as a gem (on some
> other external repository besides RubyForge)


All the way up to 1.2.10:
http://rubyforge.org/frs/?group_id=3180&release_id=16645



Assaf

Wed, Mar 5, 2008 at 1:42 PM, Assaf Arkin <ar...@intalio.com> wrote:
>
> > On 3/5/08, Caleb Powell <ca...@gmail.com> wrote:
> > >
> > > Hi,
> > >
> > > I was using buildr (1.2.1) to compile code in an existing Maven
> project.
> > > The
> > > compile task failed because the Java compiler (Sun JDK1.4.2_13 on
> > Windows)
> > > does not accept the
> > > '-cp' alias. From what I can tell, the '-cp' alias was not introduced
> > > until
> > > the 1.5 compiler. Here was the output where JAVA_HOME was set to the
> Sun
> > > 1.4.2_13 JDK;
> > >
> > > Compiling 403 source files in pharmacy-core:compile
> > > javac: invalid flag: -cp
> > > Usage: javac <options> <source files>
> > > where possible options include:
> > >   -g                        Generate all debugging info
> > >   -g:none                   Generate no debugging info
> > >   -g:{lines,vars,source}    Generate only some debugging info
> > >   -nowarn                   Generate no warnings
> > >   -verbose                  Output messages about what the compiler is
> > > doing
> > >   -deprecation              Output source locations where deprecated
> > APIs
> > > are used
> > >   -classpath <path>         Specify where to find user class files
> > >   -sourcepath <path>        Specify where to find input source files
> > >   -bootclasspath <path>     Override location of bootstrap class files
> > >   -extdirs <dirs>           Override location of installed extensions
> > >   -d <directory>            Specify where to place generated class
> files
> > >   -encoding <encoding>      Specify character encoding used by source
> > > files
> > >   -source <release>         Provide source compatibility with
> specified
> > > release
> > >   -target <release>         Generate class files for specific VM
> version
> > >   -help                     Print a synopsis of standard options
> > >
> > > rake aborted!
> > >
> > > Assuming that buildr should be compatible with the 1.4.x JDK's (is
> this
> > > assumption wrong), than I think this qualifies as a bug (which could
> be
> > > easily addressed by using 'classpath').
> > >
> > > In the meantime, is there any workaround to this issue (short of using
> > the
> > > 1.5 JDK)?
> > >
> > > Cheers!
> >
> >
> > Newer versions of Buildr invoke the Java compiler through RJB, so
> they're
> > not affected but this and also run the build substantially faster.
> >
> > Assaf
> >
> >
> > --
> > > Caleb
> > >
> > > "I do not know which makes a man more conservative—to know nothing but
> > the
> > > present, or nothing but the past."
> > >   - John Maynard Keynes
> > >
> >
>
>
>
>
> --
>
> Caleb
>
> "I do not know which makes a man more conservative—to know nothing but the
> present, or nothing but the past."
>   - John Maynard Keynes
>

Re: javac's -cp flag (a buildr compilation bug?)

Posted by Caleb Powell <ca...@gmail.com>.
Are any of these later version available for download as a gem (on some
other external repository besides RubyForge)

Wed, Mar 5, 2008 at 1:42 PM, Assaf Arkin <ar...@intalio.com> wrote:

> On 3/5/08, Caleb Powell <ca...@gmail.com> wrote:
> >
> > Hi,
> >
> > I was using buildr (1.2.1) to compile code in an existing Maven project.
> > The
> > compile task failed because the Java compiler (Sun JDK1.4.2_13 on
> Windows)
> > does not accept the
> > '-cp' alias. From what I can tell, the '-cp' alias was not introduced
> > until
> > the 1.5 compiler. Here was the output where JAVA_HOME was set to the Sun
> > 1.4.2_13 JDK;
> >
> > Compiling 403 source files in pharmacy-core:compile
> > javac: invalid flag: -cp
> > Usage: javac <options> <source files>
> > where possible options include:
> >   -g                        Generate all debugging info
> >   -g:none                   Generate no debugging info
> >   -g:{lines,vars,source}    Generate only some debugging info
> >   -nowarn                   Generate no warnings
> >   -verbose                  Output messages about what the compiler is
> > doing
> >   -deprecation              Output source locations where deprecated
> APIs
> > are used
> >   -classpath <path>         Specify where to find user class files
> >   -sourcepath <path>        Specify where to find input source files
> >   -bootclasspath <path>     Override location of bootstrap class files
> >   -extdirs <dirs>           Override location of installed extensions
> >   -d <directory>            Specify where to place generated class files
> >   -encoding <encoding>      Specify character encoding used by source
> > files
> >   -source <release>         Provide source compatibility with specified
> > release
> >   -target <release>         Generate class files for specific VM version
> >   -help                     Print a synopsis of standard options
> >
> > rake aborted!
> >
> > Assuming that buildr should be compatible with the 1.4.x JDK's (is this
> > assumption wrong), than I think this qualifies as a bug (which could be
> > easily addressed by using 'classpath').
> >
> > In the meantime, is there any workaround to this issue (short of using
> the
> > 1.5 JDK)?
> >
> > Cheers!
>
>
> Newer versions of Buildr invoke the Java compiler through RJB, so they're
> not affected but this and also run the build substantially faster.
>
> Assaf
>
>
> --
> > Caleb
> >
> > "I do not know which makes a man more conservative—to know nothing but
> the
> > present, or nothing but the past."
> >   - John Maynard Keynes
> >
>



-- 
Caleb

"I do not know which makes a man more conservative—to know nothing but the
present, or nothing but the past."
 - John Maynard Keynes

Re: javac's -cp flag (a buildr compilation bug?)

Posted by Assaf Arkin <ar...@intalio.com>.
On 3/5/08, Caleb Powell <ca...@gmail.com> wrote:
>
> Hi,
>
> I was using buildr (1.2.1) to compile code in an existing Maven project.
> The
> compile task failed because the Java compiler (Sun JDK1.4.2_13 on Windows)
> does not accept the
> '-cp' alias. From what I can tell, the '-cp' alias was not introduced
> until
> the 1.5 compiler. Here was the output where JAVA_HOME was set to the Sun
> 1.4.2_13 JDK;
>
> Compiling 403 source files in pharmacy-core:compile
> javac: invalid flag: -cp
> Usage: javac <options> <source files>
> where possible options include:
>   -g                        Generate all debugging info
>   -g:none                   Generate no debugging info
>   -g:{lines,vars,source}    Generate only some debugging info
>   -nowarn                   Generate no warnings
>   -verbose                  Output messages about what the compiler is
> doing
>   -deprecation              Output source locations where deprecated APIs
> are used
>   -classpath <path>         Specify where to find user class files
>   -sourcepath <path>        Specify where to find input source files
>   -bootclasspath <path>     Override location of bootstrap class files
>   -extdirs <dirs>           Override location of installed extensions
>   -d <directory>            Specify where to place generated class files
>   -encoding <encoding>      Specify character encoding used by source
> files
>   -source <release>         Provide source compatibility with specified
> release
>   -target <release>         Generate class files for specific VM version
>   -help                     Print a synopsis of standard options
>
> rake aborted!
>
> Assuming that buildr should be compatible with the 1.4.x JDK's (is this
> assumption wrong), than I think this qualifies as a bug (which could be
> easily addressed by using 'classpath').
>
> In the meantime, is there any workaround to this issue (short of using the
> 1.5 JDK)?
>
> Cheers!


Newer versions of Buildr invoke the Java compiler through RJB, so they're
not affected but this and also run the build substantially faster.

Assaf


--
> Caleb
>
> "I do not know which makes a man more conservative—to know nothing but the
> present, or nothing but the past."
>   - John Maynard Keynes
>