workflow-plugin development issue on windows

29 views
Skip to first unread message

Jacob Vallejo

unread,
Aug 21, 2014, 1:24:51 PM8/21/14
to jenkin...@googlegroups.com

Hi there,

I'm working on adding a BatchScriptStep (in the same style as ShellStep) to the workflow-plugin to run scripts on Windows, but I am having issues building and testing the plugins. As of now I'm using mvn compile and mvn test to compile and test respectively. The compile step fails with an error in the cps compiling step: Failure to find org.jenkins-ci.plugins.workflow:workflow-support. My apologies for the lack of true log output, PS and cmd offered little help when I was trying to copy output.

Additionally testing components that did succeed in compiling results in a test failure: Failure to find org.jenkins-ci.plugins.workflow:workflow-support. That whole stack trace looks familiar to https://issues.jenkins-ci.org/browse/JENKINS-21977. Though perhaps that's best ignored until I can get a good compile run done.

I'd really like to get this compiling and be able to test this locally (hpi:run style if possible). Can someone point me in the right direction for compiling and running this properly?

Thanks!

--
Jake Vallejo

Jesse Glick

unread,
Aug 21, 2014, 5:06:23 PM8/21/14
to Jenkins Dev
On Thu, Aug 21, 2014 at 1:24 PM, Jacob Vallejo
<jacob....@xamarin.com> wrote:
> I'm working on adding a BatchScriptStep (in the same style as ShellStep) to
> the workflow-plugin to run scripts on Windows

Great!

> As of now I'm using mvn compile and mvn
> test to compile and test respectively. The compile step fails with an error
> in the cps compiling step: Failure to find
> org.jenkins-ci.plugins.workflow:workflow-support.

From root level, try:

mvn -DskipTests clean install

> I'd really like to get this compiling and be able to test this locally
> (hpi:run style if possible).

After doing a build of everything, you can use

mvn -f aggregator hpi:run

to test. If you are using an IDE with support for this kind of thing,
you can get the usual hpi:run features for sources in any of the
plugins in the suite:

· Edit src/main/resources/**, save, and reload the page to see changes
immediately.
· Edit src/main/java/**, save, and rerun hpi:run (or use JPDA hot
swap) to see code changes without a Maven rebuild.

Jacob Vallejo

unread,
Aug 22, 2014, 11:53:02 AM8/22/14
to jenkin...@googlegroups.com
Thanks for the help Jesse! I did end up trying 'mvn build' (I believe it was - thanks to danielbeck for that - from the root level) and that worked. I'm not sure if that worked properly though. I'll give this try today and see if I can run my fork locally with everything working. I'll send along a PR if it does work as expected.

Jacob Vallejo

unread,
Aug 22, 2014, 11:54:02 AM8/22/14
to jenkin...@googlegroups.com
Err, I meant 'mvn install', with no '-DskiTests' as per danielbeck's advice.

Jesse Glick

unread,
Aug 22, 2014, 11:58:30 AM8/22/14
to Jenkins Dev
On Fri, Aug 22, 2014 at 11:54 AM, Jacob Vallejo
<jacob....@xamarin.com> wrote:
> I meant 'mvn install', with no '-DskipTests'

At least on Linux this ought to work. I have not tried running tests
from Windows and expect that many will fail since they rely on the
‘sh’ step.

Tom Fennelly

unread,
Aug 26, 2014, 6:28:16 AM8/26/14
to jenkin...@googlegroups.com
Hey Jacob... did you try building through cygwin?  A ton of tests would fail on Windows since they depend on sh.  Not sure if cygwin will help but am curious to know.

Jacob Vallejo

unread,
Aug 26, 2014, 10:28:58 AM8/26/14
to jenkin...@googlegroups.com
Hey Tom,

That's not a bad idea, I'll give cygwin a shot. I've been pulled onto
other tasks but I will try to get back to this ASAP. Thanks for the
suggestion!


--
Jake Vallejo
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Developers" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jenkinsci-dev/rV4538E4e4o/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-de...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages