[ODLPARENT-101] Karaf 4 distribution local build fails on Windows (missing "patch") Created: 13/Jun/17 Updated: 24/Jan/18 Resolved: 04/Jul/17 |
|
| Status: | Resolved |
| Project: | odlparent |
| Component/s: | General |
| Affects Version/s: | 2.0.5 |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Faseela K | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| Issue Links: |
|
||||||||
| External issue ID: | 8677 | ||||||||
| Description |
|
Would be better to document that "patch" needs to be on execution path for building on windows [INFO] ODL :: genius :: fcapsapplication .................. SUCCESS [ 0.863 s] |
| Comments |
| Comment by Michael Vorburger [ 13/Jun/17 ] |
|
This is because https://ant.apache.org/manual/Tasks/patch.html 'requires "patch" to be on the execution path' - which Windows does not have. Running ODL mvn under "Git Bash" <https://git-for-windows.github.io> on Windows, or Cygwin <https://www.cygwin.com> is a workaround to get around this (Bug reporter has confirmed on IRC this works for her). I'm not crystal clear on why this is a Karaf 4 specific problem (or is it not and locally building Karaf distributions never worked on Windows) - didn't we patch configuration files with Karaf 3 already? Or did we do it "earlier" there, during the odlparent build, not each project? (Would it be imaginable to do something similar for Karaf 4 again?) Linking, as Faseela found this in |
| Comment by Stephen Kitt [ 13/Jun/17 ] |
|
(In reply to Michael Vorburger from comment #1) We carried patched Karaf files in our repositories, which isn’t really maintainable in the long term. (Although I’m sure some people would argue over that — it really depends on how comfortable you are with patch management tools.) |
| Comment by Michael Vorburger [ 19/Jun/17 ] |
|
> if some day we can find a way to avoid that, it would be better I guess "fixing" this would come down to either: (a) doing the 'patch' earlier during the build, like have this happen during odlparent's build and keep the result as an artifact used by projects, without them have to run patch (b) replacing https://ant.apache.org/manual/Tasks/patch.html with a pure Java implementation? In https://github.com/opendaylight/mdsal/blob/af55eed5432a28761ef474175933779de7f3a13e/binding/mdsal-binding-test-utils/src/main/java/org/opendaylight/mdsal/binding/testutils/DiffUtil.java (which is related to https://github.com/vorburger/xtendbeans) I've used a "difflib" found on Maven central which can do "diff" and AFAIK also "patch" in Java, so if someone is motivated to wrap that as an Ant task... |
| Comment by Michael Vorburger [ 23/Jun/17 ] |
|
> (a) doing the 'patch' earlier during the build |
| Comment by Michael Vorburger [ 04/Jul/17 ] |