You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Upayavira <uv...@upaya.co.uk> on 2003/02/28 00:51:11 UTC

cli in cocoon.bat

1) Just spotted that the loader.main.class was pointing to Jetty for the CLI. Got it 
working by changing to:
-Dloader.main.class=org.apache.cocoon.Main 

2) There are %2...%9, which gives you eight options. If you need to specify a 
context dir, a config file, a working directory and a destination directory, you've 
used them all up and haven't specified any targets. Switching to %* almost sorted 
it (I know that this is NT only), except that it passes 'cli' into the Main class. The 
SHIFT command didn't seem to do anything, when it should have helped. You just 
gotta love DOS. 

3) I then get a NullPointerException that seems to be something to do with Deli. 
Hmm. I'll keep working on it tomorrow.

Thanks to Stefano for all the work you've put in recently - particularly this loader 
stuff. It's gonna make Cocoon so much easier to use for the novice.

Regards, Upayavira


Re: cli in cocoon.bat

Posted by Upayavira <up...@fwbo.org>.
> > 2) There are %2...%9, which gives you eight options. If you need to
> > specify a context dir, a config file, a working directory and a
> > destination directory, you've used them all up and haven't specified
> > any targets. Switching to %* almost sorted it (I know that this is
> > NT only), except that it passes 'cli' into the Main class. The SHIFT
> > command didn't seem to do anything, when it should have helped. You
> > just gotta love DOS. 
> should be fixed. try it out.

I've modified my Main.java to tell me what options it's getting:

Option[Option  , [cli] ]
Option[Option c, [build/webapp] ]
Option[Option C, [build/webapp/WEB-INF/cocoon.xconf] ]
Option[Option d, [/desktop/site] ]
Option[Option w, [/desktop/site] ]
Option[Option  , [/] ]
Target size:2
Target: cli
Target:

So for some reason, the shift isn't working for me. I presume it worked for you?

Also, it complains that it can't find javax/servlet/http/HttpSessionBindingListener. 
Adding .\server\lib\javax.servlet.jar to the classpath in the bat file worked, but 
that's a hack that should be done using your loader, I presume.

Upayavira


Re: cli in cocoon.bat

Posted by Upayavira <uv...@upaya.co.uk>.
> > So for some reason, the shift isn't working for me. I presume it
> > worked for you?
> 
> I tried "cocoon cli -help" and it showed me the help. I thought this
> meant it was working just fine.

See the patch I've just submitted. It allows the user to specify a config (xconf) file, 
which is much better than vast numbers of command line parameters anyway.

> > Also, it complains that it can't find
> > javax/servlet/http/HttpSessionBindingListener. Adding
> > .\server\lib\javax.servlet.jar to the classpath in the bat file
> > worked, but that's a hack that should be done using your loader, I
> > presume.
> 
> Uh? why does the cli needs the servlet api at runtime? more than a
> loading problem sounds like a cocoon bug.

I'm assuming that either someone'll remove this dependency, or Stephano'll add 
.\server\lib\javax.servlet.jar to the classpath.

Also, I suggest we go back to the %2...%9 approach in cocoon.bat, as the current %* 
approach isn't yet working.

Regards, Upayavira


Re: cli in cocoon.bat

Posted by Stefano Mazzocchi <st...@apache.org>.
Upayavira wrote:
>>>2) There are %2...%9, which gives you eight options. If you need to
>>>specify a context dir, a config file, a working directory and a
>>>destination directory, you've used them all up and haven't specified
>>>any targets. Switching to %* almost sorted it (I know that this is
>>>NT only), except that it passes 'cli' into the Main class. The SHIFT
>>>command didn't seem to do anything, when it should have helped. You
>>>just gotta love DOS. 
>>
>>should be fixed. try it out.
> 
> 
> I've modified my Main.java to tell me what options it's getting:
> 
> Option[Option  , [cli] ]
> Option[Option c, [build/webapp] ]
> Option[Option C, [build/webapp/WEB-INF/cocoon.xconf] ]
> Option[Option d, [/desktop/site] ]
> Option[Option w, [/desktop/site] ]
> Option[Option  , [/] ]
> Target size:2
> Target: cli
> Target:
> 
> So for some reason, the shift isn't working for me. I presume it worked for you?

I tried "cocoon cli -help" and it showed me the help. I thought this 
meant it was working just fine.

> Also, it complains that it can't find javax/servlet/http/HttpSessionBindingListener. 
> Adding .\server\lib\javax.servlet.jar to the classpath in the bat file worked, but 
> that's a hack that should be done using your loader, I presume.

Uh? why does the cli needs the servlet api at runtime? more than a 
loading problem sounds like a cocoon bug.

-- 
Stefano Mazzocchi                               <st...@apache.org>
    Pluralitas non est ponenda sine necessitate [William of Ockham]
--------------------------------------------------------------------



Re: cli in cocoon.bat

Posted by Upayavira <uv...@upaya.co.uk>.
> > 2) There are %2...%9, which gives you eight options. If you need to
> > specify a context dir, a config file, a working directory and a
> > destination directory, you've used them all up and haven't specified
> > any targets. Switching to %* almost sorted it (I know that this is
> > NT only), except that it passes 'cli' into the Main class. The SHIFT
> > command didn't seem to do anything, when it should have helped. You
> > just gotta love DOS. 
> should be fixed. try it out.

I've modified my Main.java to tell me what options it's getting:

Option[Option  , [cli] ]
Option[Option c, [build/webapp] ]
Option[Option C, [build/webapp/WEB-INF/cocoon.xconf] ]
Option[Option d, [/desktop/site] ]
Option[Option w, [/desktop/site] ]
Option[Option  , [/] ]
Target size:2
Target: cli
Target:

So for some reason, the shift isn't working for me. I presume it worked for you?

Also, it complains that it can't find javax/servlet/http/HttpSessionBindingListener. 
Adding .\server\lib\javax.servlet.jar to the classpath in the bat file worked, but 
that's a hack that should be done using your loader, I presume.

Upayavira


Re: cli in cocoon.bat

Posted by Stefano Mazzocchi <st...@apache.org>.
Upayavira wrote:
> 1) Just spotted that the loader.main.class was pointing to Jetty for the CLI. Got it 
> working by changing to:
> -Dloader.main.class=org.apache.cocoon.Main 

fixed

> 2) There are %2...%9, which gives you eight options. If you need to specify a 
> context dir, a config file, a working directory and a destination directory, you've 
> used them all up and haven't specified any targets. Switching to %* almost sorted 
> it (I know that this is NT only), except that it passes 'cli' into the Main class. The 
> SHIFT command didn't seem to do anything, when it should have helped. You just 
> gotta love DOS. 

should be fixed. try it out.

> 3) I then get a NullPointerException that seems to be something to do with Deli. 
> Hmm. I'll keep working on it tomorrow.
> 
> Thanks to Stefano for all the work you've put in recently - particularly this loader 
> stuff. It's gonna make Cocoon so much easier to use for the novice.

Hopefully so.

-- 
Stefano Mazzocchi                               <st...@apache.org>
    Pluralitas non est ponenda sine necessitate [William of Ockham]
--------------------------------------------------------------------