Hi!

I try to automate HTML batching with Jenkins. I execute this script:

/Applications/WireframeSketcher.app/Contents/MacOS/WireframeSketcher -application com.wireframesketcher.ui.screenExport -format HTML -source $WORKSPACE/path-to/my-project/SomeStory.story -noSplash -dest $WORKSPACE/exported

And I get this message:

Error: Cannot find workspace file for location: /Users/Shared/Jenkins/Home/workspace/path-to/my-project/SomeStory.story

What does it mean and what I must to do to fix it?

Hi Max,

The error means that the source file you have on the command line cannot be mapped to the corresponding file in the workspace. I think this is because you have missed the "-data" argument. It's also best to make sure that your $WORKSPACE path is absolute. Here's an example:

$ WireframeSketcher.app/Contents/MacOS/WireframeSketcher 
-application com.wireframesketcher.ui.screenExport
-format HTML
-source /Users/peter/Documents/WireframeSketcher/wireframing-tutorial/Tutorial.story
-noSplash
-dest /tmp/exported
-data /Users/peter/Documents/WireframeSketcher

Let me know if this works for you.

Thank you, Peter, it works!

I ran into a problem that also related to workspaces. Look at the command I try to execute via Jenkins:

/Applications/WireframeSketcher.app/Contents/MacOS/WireframeSketcher \ -application com.wireframesketcher.ui.screenExport \ -data ~/Documents/WireframeSketcher \ -noSplash \ -source $WORKSPACE/path-to/my-project/SomeStory.story \ -dest $WORKSPACE/html \ -format HTML

Here $WORKSPACE – is a Jenkins's workspace – an folder that connected to Jenkins installation and that doesn't have any relation to the WireframeSketcher's or Eclipse's workspace. As the "data" parameter I entered a location of WireframeSketcher's workspace folder that is installed for the "jenkins" system user.

Here is the error that I see when the script executing: "!MESSAGE Error: Cannot find workspace file for location: /Users/Shared/Jenkins/Home/workspace/path-to/my-project/SomeStory.story"

I guess that it was caused by following: I set a simple folder, not a WireframeSketcher's project as "source" parameter. If it is truth – I just want to get the possibility to create a WireframeSketcher's project from command line (e.g. using command like "com.wireframesketcher.ui.convertFolderToProject", or something like that)

Can you help me?

Max,

-data parameter should point to the same workspace that your project is located in. In your specific case it should be the same as $WORKSPACE I think.

In any case you need to have a valid workspace to perform the export. You should probably create a new workspace for Jenkins, either by duplicating your existing workspace or creating a new one. You need at least pre-create your projects, but you could copy project files later manually in your script. If you do this then you should use "-refresh" argument when launching the export so that WireframeSketcher refreshes the workspace first and see your modifications.

Let me know if you need more assistance.

Peter,

I guess that the main problem is that the my checked out from Git folders are not WS project. So, I think that the solution is "emulate" a real project. I create ".project" file in the folder %FOLDER_NAME%, and place this content to the file:

<?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>%FOLDER_NAME%</name> <comment></comment> <projects> </projects> <buildSpec> </buildSpec> <natures> </natures> </projectDescription>

But it's not enough – WS still don't consider a folder as "real" WS project. What else should I do for "emulating" real project?

Max,

WireframeSketcher is based on Eclipse and there is some workspace metadata stored in .metadata folder. This includes the information about projects. I don't think there is a way to create projects from the command line, but try to see if you can hack things by adding some information under .metadata folder.

One other option would be to create projects by running WireframeSketcher. WireframeSketcher supports EGit plugin so that you can checkout your Git projects directly from it. You would need to checkout projects manually at first, but then you could update them to the latest version using command line git. Just don't forget to use the -refresh option when running WireframeSketcher command line afterwards.