Re: Update of properties

Daniel Tihelka <[email protected]>
Newsgroups gmane.comp.java.cruise-control.user
Message-ID <[email protected]>
Hallo everybody.

Temporarily I have solved it by this UGGLY HACK:

I have pre-defined the 'onsuccess' publisher plugin as follows (together with 
the comment which is VERY important):

  <!-- !!! UGGLY HACK !!!
       free to change: . :egnahc ot eerf
    -->
  <plugin name="forceconfigreread" 
classname="net.sourceforge.cruisecontrol.publishers.OnSuccessPublisher" >
      <execute command="sed -r -i 's|^(\s*free to change:) ([^\s]*) (:egnahc 
ot eerf\s*)$|\1 \2. \3|' ${cruise.projects.dir}/config.allprojects.cruise" />
  </plugin>

and in each related "secondary" project I have add 

    <publishers>
       ....
       <forceconfigreread/>
    </publishers>

among publishers. Each succesfull build causes the addition of one dot into 
the moddle of "free to change: ...... :egnahc ot eerf"; it actually changes 
md5sum of the config file, which is detected by cruisecontrol and resulting 
in the re-reading of the configuration again.

It seems to be working, however I would like to replace it by something more 
robust in a future. If you have any suggestion or concepts, please write it 
to me. I would like to code patch for cruise control sources, if the idea is 
accepted by CC developpers ...

Best regards
Dan T.



On Wednesday 05 of August 2009, Daniel Tihelka wrote:
> Dear CruiseControl comunity,
>
> I am creating an quite complicated CruiseControl (CC) project (let's call
> it "primary"), where a build uses results of other "secondary" CC projects.
> Among others, I need some properties which are DYNAMICALLY defined by
> the "secondary" builds (stored into property files). There is no problem to
> create/update the properties in a defined file/s each time any of
> "secondary" projects is built.
>
> What I need to help with is how to tell CC that it should update properties
> when the "primary" project is built. I use  definitions like:
>
>     <property
> file="${cruise.buildutils.dir}/utils-current/utils.properties"  />
>     <property
> file="${cruise.buildutils.dir}/imgbuilder-current/imgbuilder.properties" 
> /> <property file="${cruise.builddata.dir}/${spkr.id}/data.properties"  />
>
> in the "primary" poject definition, which reads the properties from the
> defined files being generated by "secondary" projects (*-current is the
> automatically created link to the latest build of the "secondary" project).
>
> Therefore, is there a way ho to force the update of properties (defined in
> a file) when a project is built? Note that I do not want to build the
> project when a property file is changed (I could use <modificationset
> <filesyste/> /> to achive this), the the trigger of build must be a SVN
> change (as it is usual).
>
> Thank you very much for your help.
> Best regards,
> Dan T.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

_______________________________________________
Cruisecontrol-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cruisecontrol-user
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (GNU/Linux)

iEYEABECAAYFAkp6ugYACgkQuYlVhxo/P1FmIgCeM5OJGYnH38sYjrAilK9IG669
JhUAoKvS8ZTW7c1xMMI8jHhBeEOhmaZt
=BhxJ
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.