Bug#705565: more detail

2013-08-30 Thread Rogério Brito
Hi, Daniel and others,

On Fri, Aug 30, 2013 at 4:56 AM, Daniel Pocock  wrote:
> On 30/08/13 05:11, Rogério Brito wrote:
>> Can we have an update of this package? BTW, shouldn't the package provide a
>> wrapper like, say, /usr/bin/closure-compiler, instead of having the user
>> type such a long line?  Or, at least, a README.Debian telling the user how
>> to run the compiler?
>
> It should be a runnable JAR, that means declaring the dependencies and
> main class in the manifest

Nice to know. My knowledge of Java ended in 1999, after I wrote a
compiler for school. Never used it again and have not kept up with the
advances since then.

> Then you can just run the JAR, e.g.
>
> ln -s /usr/share/java/closure-compiler.jar /usr/bin/closure-compiler
>
> and then just run "closure-compiler"

Can this be done for the users? I surely wouldn't expect users to know
this if this were my package...

Thanks for the information,

-- 
Rogério Brito : rbrito@{ime.usp.br,gmail.com} : GPG key 4096R/BCFC
http://cynic.cc/blog/ : github.com/rbrito : profiles.google.com/rbrito
DebianQA: http://qa.debian.org/developer.php?login=rbrito%40ime.usp.br

__
This is the maintainer address of Debian's Java team
. 
Please use
debian-j...@lists.debian.org for discussions and questions.

Bug#705565: more detail

2013-08-30 Thread Daniel Pocock


On 30/08/13 05:11, Rogério Brito wrote:
> Hi there.
> 
> On Aug 27 2013, Daniel Pocock wrote:
>> Easily fixed though
> (...)
>> finally, it works with this command line:
>>
>> java -classpath
>> /usr/share/java/closure-compiler.jar:/usr/share/java/args4j.jar:/usr/share/java/guava.jar:/usr/share/java/json.jar
>> com.google.javascript.jscomp.CommandLineRunner
>>
>> and these dependencies:
>>
>> libargs4-java libguava-java libandroid-json-org-java
>   ^
>   This should be libargs4j-java (note the missing j after the number 4).
> 

That was just a typo - libargs4j-java is what I used


> Just tried Daniel's recipe of installing the dependencies and it fixes the
> unusability of version 20130227+dfsg1-2 (the problem was reported with
> version 20130227+dfsg1-1 and it is still present).
> 
> Can we have an update of this package? BTW, shouldn't the package provide a
> wrapper like, say, /usr/bin/closure-compiler, instead of having the user
> type such a long line?  Or, at least, a README.Debian telling the user how
> to run the compiler?

It should be a runnable JAR, that means declaring the dependencies and
main class in the manifest

Then you can just run the JAR, e.g.

ln -s /usr/share/java/closure-compiler.jar /usr/bin/closure-compiler

and then just run "closure-compiler"

__
This is the maintainer address of Debian's Java team
. 
Please use
debian-j...@lists.debian.org for discussions and questions.

Bug#705565: more detail

2013-08-29 Thread Rogério Brito
Hi there.

On Aug 27 2013, Daniel Pocock wrote:
> Easily fixed though
(...)
> finally, it works with this command line:
> 
> java -classpath
> /usr/share/java/closure-compiler.jar:/usr/share/java/args4j.jar:/usr/share/java/guava.jar:/usr/share/java/json.jar
> com.google.javascript.jscomp.CommandLineRunner
> 
> and these dependencies:
> 
> libargs4-java libguava-java libandroid-json-org-java
  ^
  This should be libargs4j-java (note the missing j after the number 4).

Just tried Daniel's recipe of installing the dependencies and it fixes the
unusability of version 20130227+dfsg1-2 (the problem was reported with
version 20130227+dfsg1-1 and it is still present).

Can we have an update of this package? BTW, shouldn't the package provide a
wrapper like, say, /usr/bin/closure-compiler, instead of having the user
type such a long line?  Or, at least, a README.Debian telling the user how
to run the compiler?


Thanks,

-- 
Rogério Brito : rbrito@{ime.usp.br,gmail.com} : GPG key 4096R/BCFC
http://cynic.cc/blog/ : github.com/rbrito : profiles.google.com/rbrito
DebianQA: http://qa.debian.org/developer.php?login=rbrito%40ime.usp.br

__
This is the maintainer address of Debian's Java team
. 
Please use
debian-j...@lists.debian.org for discussions and questions.

Bug#705565: more detail

2013-08-27 Thread Daniel Pocock
severity -1 grave

Not usable currently

Easily fixed though

It needs the main class declared in the manifest, from upstream, that
appears to be com.google.javascript.jscomp.CommandLineRunner


I tried running the JAR from this package manually:

java -classpath /usr/share/java/closure-compiler.jar
com.google.javascript.jscomp.CommandLineRunner

and it fails with

Exception in thread "main" java.lang.NoClassDefFoundError:
org/kohsuke/args4j/CmdLineException
Caused by: java.lang.ClassNotFoundException:
org.kohsuke.args4j.CmdLineException
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class:
com.google.javascript.jscomp.CommandLineRunner.  Program will exit.

Comparing the JAR with upstream's JAR, it looks like org/kohsuke has
been stripped out.  If that is in another package then it needs to be a
dependency and it also needs to be listed in the manifest of
closure-compiler.jar so that it will be found automatically

I manually installed libargs4-java and I then get

Exception in thread "main" java.lang.NoClassDefFoundError:
com/google/common/io/LimitInputStream
Caused by: java.lang.ClassNotFoundException:
com.google.common.io.LimitInputStream
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class:
com.google.javascript.jscomp.CommandLineRunner.  Program will exit.



and adding libguava-java I then get another exception about
org/json/JSONException





finally, it works with this command line:

java -classpath
/usr/share/java/closure-compiler.jar:/usr/share/java/args4j.jar:/usr/share/java/guava.jar:/usr/share/java/json.jar
com.google.javascript.jscomp.CommandLineRunner

and these dependencies:

libargs4-java libguava-java libandroid-json-org-java

__
This is the maintainer address of Debian's Java team
. 
Please use
debian-j...@lists.debian.org for discussions and questions.