[JIRA] Commented: (CC-803) Nested include.projects uses relative path from top, not "current" configuration file.

View: New views
1 Messages — Rating Filter:   Alert me  

Parent Message unknown [JIRA] Commented: (CC-803) Nested include.projects uses relative path from top, not "current" configuration file.

by JIRA jira@users.public.thoughtworks.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://jira.public.thoughtworks.org/browse/CC-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_16561 ]

Baris Acar commented on CC-803:
-------------------------------

ant? I mean CC :)

> Nested include.projects uses relative path from top, not "current" configuration file.
> --------------------------------------------------------------------------------------
>
>                 Key: CC-803
>                 URL: http://jira.public.thoughtworks.org/browse/CC-803
>             Project: CruiseControl
>          Issue Type: Bug
>    Affects Versions: 2.7.1
>         Environment: Win XP, running as a service.
>            Reporter: Baris Acar
>         Assigned To: Jeffrey Fredrick
>
> Apparently nested include.projects are supported (although the config ref doesn't seem to mention this). It does say, however, that the file attribute is:
>    Relative path from current configuration file to the configuration file to process.
> Unfortunately, if I specify a relative path in a <include.projects> that is inside an included config file, the path that it tries to load ends up being relative to the top level configuration file, NOT to the included file. (loading <properties> from a relative path also either does not work at all, or perhaps attempts to load relative to the top config's path)
> The use case for me is as follows: we use perforce and as such has branches as folders. We wish CC to build multiple branches, so we use include.projects to include a CC config file for each branch from its own folder:
> <cruisecontrol>
> <include.projects file="_main.br\cc.xml"/>
> <include.projects file="_branch1\cc.xml"/>
> <include.projects file="_branch2\cc.xml"/>
> </cruisecontrol>
> However, each of those configs file needs to know its path, in order to get artifacts, construct absolute file paths for various tools etc - which it can only specify if it knows which location it is in. I couldn't find a predefined property that represented the location of the *current* config file.
> So we have to specify the location (or just the part of the path that differs for each branch) as a property within the included file itself. So _branch1\cc.xml would specify <property name="branch" value="_branch1"/> etc. Then we can construct a full path because we already have the P4 root as a property.
>  
> However, this makes branch-to-branch merges of the included cc.xml files require specific manual intervention because they contain branch-specific info. I'd like to refactor that information out into a set of branch-specific files that should *never* be merged - a  properties file or yet another config include would work - but I can't do this because I can't load either from a path relative to the included cc.xml.
> Hope this makes sense.
> Thanks,
> Baris.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.public.thoughtworks.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Cruisecontrol-devel mailing list
Cruisecontrol-devel@...
https://lists.sourceforge.net/lists/listinfo/cruisecontrol-devel
LightInTheBox - Buy quality products at wholesale price!