sshexec

2007-09-05 Thread Shankar S
I have got the sshexec task in this format:



Ant throws up saying:

com.jcraft.jsch.JSchException: reject HostKey: xxx

Any help on this is much appreciated.

-Shanki


Re: sshexec

2007-09-05 Thread Vihan Pandey
> I have got the sshexec task in this format:
>
>  trust="true" />
>
> Ant throws up saying:
>
> com.jcraft.jsch.JSchException: reject HostKey: xxx

Does the normal shell based sshexec works as in :

# ssh [EMAIL PROTECTED] xx.sh

Is it executing the xx.sh script remotely?

Regards,

- vihan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: Defining a set of jars for classpath, jar and manifest

2007-09-05 Thread Jan.Materne
You should think about another approach:
- use Ivy for describing your dependencies
- let Ivy create the paths for you

Jan 

>-Ursprüngliche Nachricht-
>Von: Juergen Weber [mailto:[EMAIL PROTECTED] 
>Gesendet: Montag, 3. September 2007 23:17
>An: Ant Users List
>Betreff: Re: Defining a set of jars for classpath, jar and manifest
>
>Thanks for your solution, it helps a lot. Probably I'll have to cope
>with having to invent an id for each new jar.
>
>On 8/31/07, [EMAIL PROTECTED] 
><[EMAIL PROTECTED]> wrote:
>> 
>> 
>> 
>> ...
>> 
>>
>> 
>> 
>> 
>> 
>> ...
>> 
>> 
>> 
>> 
>>
>>
>>
>> Jan
>>
>>
>> >-Ursprüngliche Nachricht-
>> >Von: Juergen Weber [mailto:[EMAIL PROTECTED]
>> >Gesendet: Freitag, 31. August 2007 18:20
>> >An: user@ant.apache.org
>> >Betreff: Defining a set of jars for classpath, jar and manifest
>> >
>> >Hi,
>> >
>> >for building an ear archive I need a set of jars three times:
>> >
>> >1) for the compiler classpath
>> >2) for inclusion in the jar
>> >3) an EJB's manifest classpath
>> >
>> >OK, on the web there are solutions for automatically 
>creating Manifest
>> >classpathes, but how can you define only once the set of 
>jars and use
>> >that set for 1-3 ?
>> >The set of jars is at different places in the filesystem, e.g.
>> >
>> >/java/commons-io-1.0/commons-io-1.0.jar
>> >/java/jakarta-struts-1.2.4/lib/struts.jar
>> 
>>/java/mysql-connector-java-2.0.14/mysql-connector-java-2.0.14-bin.jar
>> >
>> >so the fileset task cannot be used, as it needs a dir attribute.
>> >
>> >But I need a fileset as input for the jar task.
>> >
>> >
>> >Has anybody an idea how this could be done?
>> >
>> >Thanks,
>> >Juergen
>> >
>> 
>>-
>> >To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



No class Def Error

2007-09-05 Thread Ramu Sethu
hi

We are working in EJB and we use jboss-all-clent.jar. We have custom
task which makes use jboss-all-cleint.jar

When we run our custom task with the taskdef which has
jboss-all-client.jar in classpath, what we get is No class found error
. We avoided this by adding the jar in environment variable class
path. But i don't know why ant doesn't take the class even though we
added the jar in class path

Also our junit task test cases uses the same jar. We don't get no
class def when we run the junit task alone.

Why custom task doesn't take  that from the classpath. Am i missing some thing ?


I have added the trace below

[MyTask] javax.naming.NoInitialContextException: Cannot instantiate
class: org.jnp.interfaces.NamingContextFactory [
Root exception is java.lang.ClassNotFoundException:
org.jnp.interfaces.NamingContextFactory]
[MyTask] at 
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
[MyTask] at 
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
[MyTask] at javax.naming.InitialContext.init(InitialContext.java:223)
[MyTask] at javax.naming.InitialContext.(InitialContext.java:197)
[MyTask] at 
com.cisco.dcbu.dcm.qatest.app.intialsetup.TelnetAccess.MyTask.execute(MyTask.java:119)
[MyTask] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[MyTask] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[MyTask] at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[MyTask] at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[MyTask] at java.lang.reflect.Method.invoke(Method.java:585)
[MyTask] at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
[MyTask] at org.apache.tools.ant.Task.perform(Task.java:348)
[MyTask] at org.apache.tools.ant.Target.execute(Target.java:357)
[MyTask] at org.apache.tools.ant.Target.performTasks(Target.java:385)
[MyTask] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
[MyTask] at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
[MyTask] at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[MyTask] at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
[MyTask] at org.apache.tools.ant.Main.runBuild(Main.java:698)
[MyTask] at org.apache.tools.ant.Main.startAnt(Main.java:199)
[MyTask] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
[MyTask] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
[MyTask] Caused by: java.lang.ClassNotFoundException:
org.jnp.interfaces.NamingContextFactory
[MyTask] at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
[MyTask] at java.security.AccessController.doPrivileged(Native Method)
[MyTask] at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
[MyTask] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
[MyTask] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
[MyTask] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
[MyTask] at java.lang.Class.forName0(Native Method)
[MyTask] at java.lang.Class.forName(Class.java:242)
[MyTask] at 
com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:42)
[MyTask] at 
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)
[MyTask] ... 24 more
[MyTask] javax.naming.NoInitialContextException: Cannot instantiate
class: org.jnp.interfaces.NamingContextFactory [
Root exception is java.lang.ClassNotFoundException:
org.jnp.interfaces.NamingContextFactory]

-- 
Thank you
Ramu S

  If A is success in life, then A equals x plus y plus z. Work is x; y
is play; and z is keeping your mouth shut.
- Albert Einstein

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: No class Def Error

2007-09-05 Thread Prashant Reddy
On Wed, 2007-09-05 at 14:56 +0530, Ramu Sethu wrote:
> hi
> 
> We are working in EJB and we use jboss-all-clent.jar. We have custom
> task which makes use jboss-all-cleint.jar
> 
> When we run our custom task with the taskdef which has
> jboss-all-client.jar in classpath, what we get is No class found error
> . We avoided this by adding the jar in environment variable class
> path. But i don't know why ant doesn't take the class even though we
> added the jar in class path
> Also our junit task test cases uses the same jar. We don't get no
> class def when we run the junit task alone.
> 
> Why custom task doesn't take  that from the classpath. Am i missing some 
> thing ?

May be ANT is dropping the jar you have arranged in classpath because it
points to non-existent file location. Run ant in verbose mode (ant
-verbose) and check if the required jars are infact set in classpath.


> 
> 
> I have added the trace below
> 
> [MyTask] javax.naming.NoInitialContextException: Cannot instantiate
> class: org.jnp.interfaces.NamingContextFactory [
> Root exception is java.lang.ClassNotFoundException:
> org.jnp.interfaces.NamingContextFactory]

Looks like org.jnp.interfaces.NamingContextFactory is not in the classpath. Is 
the jar that has this class in the classpath ?

HTH
-Prashant


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: No class Def Error

2007-09-05 Thread Ramu Sethu
Hi prashant
I did run in debug mode, verbose mode, checked the class in the jar. I
do see the jar in class path when the build in debug mode.

Actually junit task runs without any problem. Only the custom task
gives us problem

On 9/5/07, Prashant Reddy <[EMAIL PROTECTED]> wrote:
> On Wed, 2007-09-05 at 14:56 +0530, Ramu Sethu wrote:
> > hi
> >
> > We are working in EJB and we use jboss-all-clent.jar. We have custom
> > task which makes use jboss-all-cleint.jar
> >
> > When we run our custom task with the taskdef which has
> > jboss-all-client.jar in classpath, what we get is No class found error
> > . We avoided this by adding the jar in environment variable class
> > path. But i don't know why ant doesn't take the class even though we
> > added the jar in class path
> > Also our junit task test cases uses the same jar. We don't get no
> > class def when we run the junit task alone.
> >
> > Why custom task doesn't take  that from the classpath. Am i missing some 
> > thing ?
>
> May be ANT is dropping the jar you have arranged in classpath because it
> points to non-existent file location. Run ant in verbose mode (ant
> -verbose) and check if the required jars are infact set in classpath.
>
>
> >
> >
> > I have added the trace below
> >
> > [MyTask] javax.naming.NoInitialContextException: Cannot instantiate
> > class: org.jnp.interfaces.NamingContextFactory [
> > Root exception is java.lang.ClassNotFoundException:
> > org.jnp.interfaces.NamingContextFactory]
>
> Looks like org.jnp.interfaces.NamingContextFactory is not in the classpath. 
> Is the jar that has this class in the classpath ?
>
> HTH
> -Prashant
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Thank you
Ramu S

  If A is success in life, then A equals x plus y plus z. Work is x; y
is play; and z is keeping your mouth shut.
- Albert Einstein

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: sshexec

2007-09-05 Thread Manivannan Palanichamy
This page can help : http://wiki.apache.org/ant/NewAntFeaturesInDetail/Ssh

-- 
Manivannan Palanichamy
http://mani.gw.googlepages.com/index.html

On 9/5/07, Shankar S <[EMAIL PROTECTED]> wrote:
>
> I have got the sshexec task in this format:
>
>  trust="true" />
>
> Ant throws up saying:
>
> com.jcraft.jsch.JSchException: reject HostKey: xxx
>
> Any help on this is much appreciated.
>
> -Shanki
>


property files

2007-09-05 Thread ear

Hello,
is it possible to execute a an ant-task inside of a property file? I'm using
netbeans mobility, and I want to define some abilities in a separate file
and someone source it into variables. There is a file called;
   C:\myprojects\projectXYZ\nbproject\project.properties
and inside of it there are a bunch of properties for the project. 

abilities=DUMP_DOCDESC=off,JSR179=1.0,WMA=2.0,JSR75=1.0,ScreenHeight=416,CLDC=1.1,NOKIAUI=1.0,OBEX=1.0,MMAPI=1.0,JSR184=1.0,JSR172=1.0,ScreenWidth=352,ScreenColorDepth=12,MIDP=2.0,ColorScreen,JSR82=1.0
build.classes.dir=${build.dir}/compiled
build.classes.excludes=**/*.java,**/*.form,**/*.class,**/.nbintdb,**/*.mvd,**/*.wsclient
build.dir=build/${config.active}
build.root.dir=build

etc

I want to someone replace;
  
abilities=DUMP_DOCDESC=off,JSR179=1.0,WMA=2.0,JSR75=1.0,ScreenHeight=416,CLDC=1.1,NOKIAUI=1.0,OBEX=1.0,MMAPI=1.0,JSR184=1.0,JSR172=1.0,ScreenWidth=352,ScreenColorDepth=12,MIDP=2.0,ColorScreen,JSR82=1.0

with

abilities=,JSR179=1.0,WMA=2.0,JSR75=1.0,ScreenHeight=416,CLDC=1.1,NOKIAUI=1.0,OBEX=1.0,MMAPI=1.0,JSR184=1.0,JSR172=1.0,ScreenWidth=352,ScreenColorDepth=12,MIDP=2.0,ColorScreen,JSR82=1.0

is this possible?

-- 
View this message in context: 
http://www.nabble.com/property-files-tf4387165.html#a12507917
Sent from the Ant - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: property files

2007-09-05 Thread James Oltmans
The way you are trying to do it is not possible. What you probably would
want to do is either generate the project.properties file before using
it. For instance you could have a target that creates project.properties
before reading it... but most likely what you want to do is generate the
abilities property dynamically like so:

mysymbols.properties:
extra-abilities=DUMP_DOCDESC=off (etc...)

project.properties:
default-abilities=JSR179=1.0,WMA=2.0,JSR75=1.0,ScreenHeight=416,CLDC=1.1
,NOKIAUI=1.0,OBEX=1.0,MMAPI=1.0,JSR184=1.0,JSR172=1.0,ScreenWidth=352,Sc
reenColorDepth=12,MIDP=2.0,ColorScreen,JSR82=1.0

Build.xml
...

  
  
...

...

-Original Message-
From: ear [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 05, 2007 12:15 PM
To: user@ant.apache.org
Subject: property files


Hello,
is it possible to execute a an ant-task inside of a property file? I'm
using
netbeans mobility, and I want to define some abilities in a separate
file
and someone source it into variables. There is a file called;
   C:\myprojects\projectXYZ\nbproject\project.properties
and inside of it there are a bunch of properties for the project. 

abilities=DUMP_DOCDESC=off,JSR179=1.0,WMA=2.0,JSR75=1.0,ScreenHeight=416
,CLDC=1.1,NOKIAUI=1.0,OBEX=1.0,MMAPI=1.0,JSR184=1.0,JSR172=1.0,ScreenWid
th=352,ScreenColorDepth=12,MIDP=2.0,ColorScreen,JSR82=1.0
build.classes.dir=${build.dir}/compiled
build.classes.excludes=**/*.java,**/*.form,**/*.class,**/.nbintdb,**/*.m
vd,**/*.wsclient
build.dir=build/${config.active}
build.root.dir=build

etc

I want to someone replace;
  
abilities=DUMP_DOCDESC=off,JSR179=1.0,WMA=2.0,JSR75=1.0,ScreenHeight=416
,CLDC=1.1,NOKIAUI=1.0,OBEX=1.0,MMAPI=1.0,JSR184=1.0,JSR172=1.0,ScreenWid
th=352,ScreenColorDepth=12,MIDP=2.0,ColorScreen,JSR82=1.0

with

abilities=,JSR179=1.0,WMA=2.0,JSR75=1.0,ScreenHeight=
416,CLDC=1.1,NOKIAUI=1.0,OBEX=1.0,MMAPI=1.0,JSR184=1.0,JSR172=1.0,Screen
Width=352,ScreenColorDepth=12,MIDP=2.0,ColorScreen,JSR82=1.0

is this possible?

-- 
View this message in context:
http://www.nabble.com/property-files-tf4387165.html#a12507917
Sent from the Ant - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: sshexec

2007-09-05 Thread Anderson, Rob (Global Trade)
Usually this error is caused when you have not specified either
trust="true" or knownhosts="something". You have set trust="true"
though...I'm not sure what is causing the problem. Couple questions:

What version of Ant? What version of jsch? Can you ssh into the host
with an ssh client? What version is the ssh server? OpenSSH or other?

Also, produce some output with -verbose and sent it.

-Rob Anderson 

> -Original Message-
> From: Shankar S [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, September 05, 2007 12:52 AM
> To: Ant Users List
> Subject: sshexec
> 
> I have got the sshexec task in this format:
> 
>  trust="true" />
> 
> Ant throws up saying:
> 
> com.jcraft.jsch.JSchException: reject HostKey: xxx
> 
> Any help on this is much appreciated.
> 
> -Shanki
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: sshexec

2007-09-05 Thread Shankar S
Ant Version: 1.6.5
jsch version: jsch-0.1.32.jarls
i can ssh into the host using putty ,,, OpenSSH_4.5p1, OpenSSL 0.9.8d 28 Sep
2006

Apache Ant version 1.6.5 compiled on June 2 2005
Buildfile: SC-Solaris-build.xml
Detected Java version: 1.4 in: c:\j2sdk1.4.2_10\jre
Detected OS: Windows 2003
parsing buildfile C:\ci\scripts\SC-Solaris-build.xml with URI =
file:///C:/ci/sc
ripts/SC-Solaris-build.xml
Project base dir set to: C:\ci\scripts
Build sequence for target(s) `SC-Solaris' is [SC-Solaris]
Complete build sequence is [SC-Solaris, ]

SC-Solaris:
  [sshexec] Connecting to supernova:22

BUILD FAILED
C:\ci\scripts\SC-Solaris-build.xml:7: com.jcraft.jsch.JSchException: reject
Host
Key: xxx
at org.apache.tools.ant.taskdefs.optional.ssh.SSHExec.execute(
SSHExec.ja
va:211)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java
:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java
:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
(DefaultExe
cutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Caused by: com.jcraft.jsch.JSchException: reject HostKey: supernova
at com.jcraft.jsch.Session.checkHost(Session.java:706)
at com.jcraft.jsch.Session.connect(Session.java:309)
at com.jcraft.jsch.Session.connect(Session.java:145)
at org.apache.tools.ant.taskdefs.optional.ssh.SSHBase.openSession
(SSHBas
e.java:180)
at org.apache.tools.ant.taskdefs.optional.ssh.SSHExec.execute(
SSHExec.ja
va:143)
... 12 more
--- Nested Exception ---
com.jcraft.jsch.JSchException: reject HostKey: supernova
at com.jcraft.jsch.Session.checkHost(Session.java:706)
at com.jcraft.jsch.Session.connect(Session.java:309)
at com.jcraft.jsch.Session.connect(Session.java:145)
at org.apache.tools.ant.taskdefs.optional.ssh.SSHBase.openSession
(SSHBas
e.java:180)
at org.apache.tools.ant.taskdefs.optional.ssh.SSHExec.execute(
SSHExec.ja
va:143)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java
:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java
:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
(DefaultExe
cutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)

Total time: 0 seconds



On 9/6/07, Anderson, Rob (Global Trade) <[EMAIL PROTECTED] > wrote:
>
> Usually this error is caused when you have not specified either
> trust="true" or knownhosts="something". You have set trust="true"
> though...I'm not sure what is causing the problem. Couple questions:
>
> What version of Ant? What version of jsch? Can you ssh into the host
> with an ssh client? What version is the ssh server? OpenSSH or other?
>
> Also, produce some output with -verbose and sent it.
>
> -Rob Anderson
>
> > -Original Message-
> > From: Shankar S [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, September 05, 2007 12:52 AM
> > To: Ant Users List
> > Subject: sshexec
> >
> > I have got the sshexec task in this format:
> >
> >  > trust="true" />
> >
> > Ant throws up saying:
> >
> > com.jcraft.jsch.JSchException: reject HostKey: xxx
> >
> > Any help on this is much appreciated.
> >
> > -Shanki
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>