Hi Daniel
Okay, this is the second question on the subject of "How do I get WOJenkins to build my modifications to WOnder"
I'll work on creating a Wiki page to cover this as it seems it isn't a well understood a topic. For now, read below.
On Mar 9, 2012, at 3:34 AM, Daniel Roy wrote:
Hi,
I've setup Jenkins in test to start building our frameworks and applications. WOJenkins is excellent - thank you so much for providing this David Avendasora (and anyone else who may have helped)!
You're welcome! Glad it's making your life easier.
We build our own ERPrototypes because we have some custom types we need to use.
Okay, hold on. This is a bit of a unique situation.
While you might need to modify WOnder source code in many WOnder Frameworks, ERPrototypes isn't one that you should probably do this with. There are better ways.
According to Anjo, ERPrototypes was originally created just to provide prototypes for the example apps in WOnder. While just about everyone uses it as the source for prototypes for their own Apps, it's really *horribly* broken in a lot of ways and since there's no way to fix it without breaking everyone's existing applications that depend on it, it's going to stay broken.
Anjo's advice, and the advice I'm going to give you is to create your own Prototypes either directly in your EOModel, or create your own MyPrototypes EOModel and put it in a MyCore framework that you use as the basis of all your Apps.
No? Don't want to go through all of that right now? Okay then, read below for the instructions that should work for getting WOJenkins to build your modifications to any of the Wonder Frameworks.
Our frameworks use this ERPrototypes framework instead of the vanilla Wonder ERPrototypes. We reference our ERPrototypes framework as a Project dependency in the build path instead of a Library (framework) dependency. This works fine in Eclipse because Eclipse can magically account for the linked project and include the linked project's files in the build process. However, Jenkins can't resolve the dependency.
Using the scripts provided in WOJenkins, the build process never pulls in the required framework because the .classpath entry in the affected Eclipe project is as follows:
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/ERPrototypes"/>
Stop! Don't touch that. Ignore it. It's not what you want to be looking at or messing with.
I've tried modifying the WOJenkins setup script to unpack the ERPrototypes framework into the correct location of the affected project, but that doesn't make any difference during build time because ant doesn't know about the dependency.
Ouch. Bzzzzt. No, don't do that.
Does anyone have any ideas how the build can be accomplished? I could modify the .classpath file of the affected project after it's pulled down from SVN and change the ERPrototypes line to be the standard "WOFramework/ERPrototypes", since our ERPrototype is build before all other frameworks in the Jenkins build process.
You're thinking in the wrong direction. WOJenkins is here to make your life easier, not harder and more complicated.
Or, is there possibly another way?
Yes!!!
It's simple. You're thinking about it backwards. You are thinking: "I need to substitute the WonderX.framework in WOJenkins' WOFrameworksRepository with my customized version so my project will build correctly."
The correct way to think of it is: "I want to build Wonder."
We now live in a Git world. This is a fundamental change in how you should think of working with third-party source code.
You don't want to build "Their" Project Wonder, you want to build "Your" Project Wonder.
If you are going to make changes to Wonder, you should have your Fork of WOnder on github. It's easy, create an account on Github, go to
https://github.com/projectwonder/wonder and click the "Fork" button!
Make your changes to Wonder and commit them to your *own* Wonder repository, then tell InstallWOAndWOnder Jenkins job to check the WOnder source code out from THERE instead! That way the Wonder frameworks that the InstallWOAndWOnder job is building have your modifications in them.
Basically, instead of the SCM repository being:
https://github.com/projectwonder/wonder.gitIt should be:
https://github.com/mygithubaccount/wonder.gitDave