You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Jacques Le Roux (JIRA)" <ji...@apache.org> on 2014/10/16 21:32:34 UTC

[jira] [Commented] (OFBIZ-5819) Improve the build-dev ant target

    [ https://issues.apache.org/jira/browse/OFBIZ-5819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14174129#comment-14174129 ] 

Jacques Le Roux commented on OFBIZ-5819:
----------------------------------------

Maybe I should explain the rationale behind the code and a bit more about what I have in mind.

The "svn patch"'command is great because, even if you create patches on a Windows plaform an apply them on a *nix platform (for exemple for test, da and production), there will be no patching issues. This is notably true when, like me, you are using a double repo strategy. This means I use Git for my custom project but have embedded in them an Apache OFBiz svn working copy. This has many advantages, but I will not detail them. A minor drawback of this strategy (but it comes also randomly when using a simple custom svn repo) is you have to change the EOLs of the patched file on the *nix servers to always be of Linux format (ie LF).

But as I said in the description there is also a major drawback with the "svn patch" command when used with the exec ant task: you can't reliably check patching issues. So the idea is to benefit of the advantages of "svn patch" on the development platform (smoother than patch ant task in all cases, and notably on Windows) but still have the reliability of the patch ant task  during deployment on servers. 

This is what does the new code of the build-dev target, which use a new custom patch target inspired by ManifoldCF.

> Improve the build-dev ant target
> --------------------------------
>
>                 Key: OFBIZ-5819
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5819
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: Trunk
>            Reporter: Jacques Le Roux
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: Upcoming Branch
>
>
> Currently the build-dev ant target always use "svn patch" to apply patches from the runtime/patches directory in a dev environment (so typically on your local dev machine).
> That was fine as long as we did not chain the build-dev in the build target. Since we do that (few weeks ago), there is a drawback which was already existing with the other build-* targets (test, qa, production) where I ommitted to use the failonerror="true" parameter for these targets.
> Thought I never got a problem, to guarantee a safe deployment path, I figured it would be better to catch a patching issue as early as possible. 
> So for the other build-* targets (test, qa, production), I simply added the failonerror="true", so far so good.
> But for the build-dev ant target, it was not possible because it uses the exec ant task and always returns no errors but an output with the echos of the "svn patch" command where there might be some issues.
> I tried hard to find a solution with the "svn patch" command, but decided parsing the echos in the output was not reliable at all (think different languages, number of possible issues, etc.).
> So I searched another way and found [the Apache ManifoldCF project had one|https://svn.apache.org/repos/asf/manifoldcf/trunk/common-build.xml], it's great to be in good company ;) !
> So I will soon commit an adaptation of their work to replace the current build-dev ant target 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)