Re: maven-eclipse-plugin failing on hudson - help needed.

2009-06-24 Thread Brian Fox
use new File(basedir,)

On Tue, Jun 23, 2009 at 4:21 PM, Barrie Treloarbaerr...@gmail.com wrote:
 Interesting...

 [INFO] Executing tasks
     [echo] script =
 /home/hudson/workspace/plugins-CI-with-maven-2.1.x/jdk/1.5/label/ubuntu/trunk/maven-eclipse-plugin/verify-integration-tests-checks.bsh
 Jun 23, 2009 5:10:38 PM org.apache.bsf.BSFManager exec
 SEVERE: Exception :
 java.security.PrivilegedActionException: org.apache.bsf.BSFException:
 The application script threw an exception:
 java.io.FileNotFoundException:
 /home/hudson/workspace/plugins-CI-with-maven-2.1.x/jdk/1.5/label/ubuntu/trunk/maven-antrun.bsh
 (No such file or directory) BSF info: ANT at line: 0 column: columnNo

 So a relative file resolved via ant points to the correct location,
 yet the relative location resolved in the script points to the parent
 location. Wierd.

 -
 To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
 For additional commands, e-mail: dev-h...@maven.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: maven-eclipse-plugin failing on hudson - help needed.

2009-06-24 Thread Barrie Treloar
From inside an the antrun plugin?

On Thu, Jun 25, 2009 at 1:42 AM, Brian Foxbri...@infinity.nu wrote:
 use new File(basedir,)

 On Tue, Jun 23, 2009 at 4:21 PM, Barrie Treloarbaerr...@gmail.com wrote:
 Interesting...

 [INFO] Executing tasks
     [echo] script =
 /home/hudson/workspace/plugins-CI-with-maven-2.1.x/jdk/1.5/label/ubuntu/trunk/maven-eclipse-plugin/verify-integration-tests-checks.bsh
 Jun 23, 2009 5:10:38 PM org.apache.bsf.BSFManager exec
 SEVERE: Exception :
 java.security.PrivilegedActionException: org.apache.bsf.BSFException:
 The application script threw an exception:
 java.io.FileNotFoundException:
 /home/hudson/workspace/plugins-CI-with-maven-2.1.x/jdk/1.5/label/ubuntu/trunk/maven-antrun.bsh
 (No such file or directory) BSF info: ANT at line: 0 column: columnNo

 So a relative file resolved via ant points to the correct location,
 yet the relative location resolved in the script points to the parent
 location. Wierd.

 -
 To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
 For additional commands, e-mail: dev-h...@maven.apache.org



 -
 To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
 For additional commands, e-mail: dev-h...@maven.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: maven-eclipse-plugin failing on hudson - help needed.

2009-06-23 Thread Benjamin Bentmann

Barrie Treloar wrote:


This builds fine on my machine (windows xp) and on people.apache.org.

I dont know why this is failing on hudson.


Likely because Hudson does a reactor build with the current working 
directory being trunk/ and not maven-eclipse-plugin/. E.g. doing


  cd ..
  mvn integration-test -P run-its -f maven-eclipse-plugin/pom.xml

from the maven-eclipse-plugin directory should also fail for you.


And if by chance someone knows what the problems is please let me know.


From [0]:

/**
 * Load the script from an external file ; optional.
 *
 * @param fileName the name of the file containing the script source.
 */
public void setSrc(String fileName) {
helper.setSrc(new File(fileName));
}

I suspect that the call new File(fileName) is missing a check for a 
relative path to resolve that against the project base dir.



Benjamin


[0] 
http://svn.apache.org/repos/asf/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/Script.java


-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: maven-eclipse-plugin failing on hudson - help needed.

2009-06-23 Thread Barrie Treloar
On Wed, Jun 24, 2009 at 6:33 AM, Benjamin
Bentmannbenjamin.bentm...@udo.edu wrote:
 Barrie Treloar wrote:

 This builds fine on my machine (windows xp) and on people.apache.org.

 I dont know why this is failing on hudson.

 Likely because Hudson does a reactor build with the current working
 directory being trunk/ and not maven-eclipse-plugin/. E.g. doing

  cd ..
  mvn integration-test -P run-its -f maven-eclipse-plugin/pom.xml

 from the maven-eclipse-plugin directory should also fail for you.

Hmm, the echo via

property name=cwd location=./
echo message=cwd = ${cwd}/
returns
[echo] cwd = 
/home/hudson/workspace/plugins-CI-with-maven-2.1.x/jdk/1.5/label/ubuntu/trunk/maven-eclipse-plugin

which would indicate that it is the correct directory.

I will try using An't property location to expand the path for me:

property name=script
location=verify-integration-tests-checks.bsh/
echo message=script = ${script}/
script language=beanshell src=${script} /

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: maven-eclipse-plugin failing on hudson - help needed.

2009-06-23 Thread Barrie Treloar
Interesting...

[INFO] Executing tasks
 [echo] script =
/home/hudson/workspace/plugins-CI-with-maven-2.1.x/jdk/1.5/label/ubuntu/trunk/maven-eclipse-plugin/verify-integration-tests-checks.bsh
Jun 23, 2009 5:10:38 PM org.apache.bsf.BSFManager exec
SEVERE: Exception :
java.security.PrivilegedActionException: org.apache.bsf.BSFException:
The application script threw an exception:
java.io.FileNotFoundException:
/home/hudson/workspace/plugins-CI-with-maven-2.1.x/jdk/1.5/label/ubuntu/trunk/maven-antrun.bsh
(No such file or directory) BSF info: ANT at line: 0 column: columnNo

So a relative file resolved via ant points to the correct location,
yet the relative location resolved in the script points to the parent
location. Wierd.

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: maven-eclipse-plugin failing on hudson - help needed.

2009-06-22 Thread John Casey
This would seem to be the result of some path that's taken for granted 
to be a certain way, but for some reason is different out on hudson.


Have you tried to echo.. the path from the antrun plugin, or else use 
an absolute path like:


${project.basedir}/verify-integration-tests-checks.bsh

Just a few ideas...

-john

Barrie Treloar wrote:

This builds fine on my machine (windows xp) and on people.apache.org.

I dont know why this is failing on hudson. I do not have ANT on my
path for either of the machines that build successfully - that is why
the dependencies are included in the antrun plugin configuration.

Could I ask for some more devs to checkout and install with -Prun-its
and see that it works on their environment.

And if by chance someone knows what the problems is please let me know.

=== pom.xml plugin def ===
  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-antrun-plugin/artifactId
executions
  execution
idverify-integration-tests-checks/id
phasepost-integration-test/phase
configuration
  tasks
script language=beanshell
src=verify-integration-tests-checks.bsh /
  /tasks
/configuration
goals
  goalrun/goal
/goals
  /execution
/executions
dependencies
  dependency
groupIdorg.apache.ant/groupId
artifactIdant-nodeps/artifactId
version1.7.1/version
  /dependency
  dependency
  groupIdorg.apache.ant/groupId
  artifactIdant-apache-bsf/artifactId
  version1.7.1/version
  /dependency
  dependency
groupIdorg.beanshell/groupId
artifactIdbsh/artifactId
version2.0b4/version
  /dependency
/dependencies
  /plugin

=== hudson console output ===
org.apache.maven.lifecycle.LifecycleExecutionException: An Ant
BuildException has occured: file verify-integration-tests-checks.bsh
not found.
   at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:703)
   at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540)
   at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:519)
   at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
   at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332)
   at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
   at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
   at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
   at org.apache.maven.cli.MavenCli.main(MavenCli.java:356)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
   at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
   at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
   at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: An Ant
BuildException has occured: file verify-integration-tests-checks.bsh
not found.
   at 
org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:131)
   at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:98)
   at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
   at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
   ... 16 more
Caused by: file verify-integration-tests-checks.bsh not found.
   at 
org.apache.tools.ant.util.ScriptRunnerBase.setSrc(ScriptRunnerBase.java:197)
   at 
org.apache.tools.ant.util.ScriptRunnerHelper.getScriptRunner(ScriptRunnerHelper.java:57)
   at org.apache.tools.ant.taskdefs.optional.Script.execute(Script.java:52)
   at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
   at 

Re: maven-eclipse-plugin failing on hudson - help needed.

2009-06-22 Thread Brett Porter
You might try adding ${basedir} into the src attribute, but strange  
that it would try to run anywhere but the current directory. I assume  
that that file is properly checked out, which you should be able to  
check in Hudson.


FTR, it runs fine on my machine too (Mac).

- Brett

On 23/06/2009, at 10:44 AM, John Casey wrote:

This would seem to be the result of some path that's taken for  
granted to be a certain way, but for some reason is different out on  
hudson.


Have you tried to echo.. the path from the antrun plugin, or else  
use an absolute path like:


${project.basedir}/verify-integration-tests-checks.bsh

Just a few ideas...

-john

Barrie Treloar wrote:

This builds fine on my machine (windows xp) and on people.apache.org.
I dont know why this is failing on hudson. I do not have ANT on my
path for either of the machines that build successfully - that is why
the dependencies are included in the antrun plugin configuration.
Could I ask for some more devs to checkout and install with -Prun-its
and see that it works on their environment.
And if by chance someone knows what the problems is please let me  
know.

=== pom.xml plugin def ===
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-antrun-plugin/artifactId
   executions
 execution
   idverify-integration-tests-checks/id
   phasepost-integration-test/phase
   configuration
 tasks
   script language=beanshell
src=verify-integration-tests-checks.bsh /
 /tasks
   /configuration
   goals
 goalrun/goal
   /goals
 /execution
   /executions
   dependencies
 dependency
   groupIdorg.apache.ant/groupId
   artifactIdant-nodeps/artifactId
   version1.7.1/version
 /dependency
 dependency
 groupIdorg.apache.ant/groupId
 artifactIdant-apache-bsf/artifactId
 version1.7.1/version
 /dependency
 dependency
   groupIdorg.beanshell/groupId
   artifactIdbsh/artifactId
   version2.0b4/version
 /dependency
   /dependencies
 /plugin
=== hudson console output ===
org.apache.maven.lifecycle.LifecycleExecutionException: An Ant
BuildException has occured: file verify-integration-tests-checks.bsh
not found.
  at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor 
.executeGoals(DefaultLifecycleExecutor.java:703)
  at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor 
.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540)
  at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java: 
519)
  at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor 
.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
  at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor 
.executeTaskSegments(DefaultLifecycleExecutor.java:332)
  at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
  at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java: 
356)

  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
  at org.apache.maven.cli.MavenCli.main(MavenCli.java:356)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at  
sun 
.reflect 
.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at  
sun 
.reflect 
.DelegatingMethodAccessorImpl 
.invoke(DelegatingMethodAccessorImpl.java:25)

  at java.lang.reflect.Method.invoke(Method.java:585)
  at  
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)

  at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
  at  
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

  at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: An Ant
BuildException has occured: file verify-integration-tests-checks.bsh
not found.
  at  
org 
.apache 
.maven 
.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:131)
  at  
org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:98)
  at  
org 
.apache 
.maven 
.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java: 
483)
  at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor 
.executeGoals(DefaultLifecycleExecutor.java:678)

  ... 16 more
Caused by: file verify-integration-tests-checks.bsh not found.
  at  
org 
.apache 
.tools.ant.util.ScriptRunnerBase.setSrc(ScriptRunnerBase.java:197)
  at  
org 
.apache 
.tools 
.ant 
.util.ScriptRunnerHelper.getScriptRunner(ScriptRunnerHelper.java:57)
  at  
org.apache.tools.ant.taskdefs.optional.Script.execute(Script.java:52)
  at  
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)

  at 

Re: maven-eclipse-plugin failing on hudson - help needed.

2009-06-22 Thread Barrie Treloar
On Tue, Jun 23, 2009 at 10:14 AM, John Caseyjdca...@commonjava.org wrote:
 This would seem to be the result of some path that's taken for granted to be
 a certain way, but for some reason is different out on hudson.

 Have you tried to echo.. the path from the antrun plugin, or else use an
 absolute path like:

 ${project.basedir}/verify-integration-tests-checks.bsh

 Just a few ideas...

Thanks, they should help me.
I'm reluctant to add ${project.basedir} as I suspect that the other
file I am sourcing will need basedir too.
Oh well, if it does I can hack around that.

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: maven-eclipse-plugin failing on hudson - help needed.

2009-06-22 Thread Barrie Treloar
On Tue, Jun 23, 2009 at 1:46 PM, Barrie Treloarbaerr...@gmail.com wrote:
 On Tue, Jun 23, 2009 at 10:14 AM, John Caseyjdca...@commonjava.org wrote:
 This would seem to be the result of some path that's taken for granted to be
 a certain way, but for some reason is different out on hudson.

 Have you tried to echo.. the path from the antrun plugin, or else use an
 absolute path like:

 ${project.basedir}/verify-integration-tests-checks.bsh

 Just a few ideas...

 Thanks, they should help me.
 I'm reluctant to add ${project.basedir} as I suspect that the other
 file I am sourcing will need basedir too.
 Oh well, if it does I can hack around that.


[echo] cwd = 
/home/hudson/workspace/plugins-CI-with-maven-2.1.x/jdk/1.5/label/ubuntu/trunk/maven-eclipse-plugin

Which makes me go hmm why can't it find the file then.
Its in the workspace
https://grid.sonatype.org/ci/job/plugins-CI-with-maven-2.1.x/jdk=1.5,label=ubuntu/ws/trunk/maven-eclipse-plugin/

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org