[ 
https://issues.apache.org/jira/browse/IVY-897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628934#action_12628934
 ] 

Nascif Abousalh-Neto commented on IVY-897:
------------------------------------------

Hi Xavier, 
It sure can be kept stand-alone and called with any XSLT tool. But that means 
the user has to go over the extra work to provide the "glue" to find the 
resolved report in the cache and then doing the transformation.

What I did was to clone the repreport task and add new methods to enable vpf as 
an output option, just like you already have for graphml and dot:

            if (vpf) {
              genvpf(cacheMgr, md.getModuleRevisionId().getOrganisation(), md
                        .getModuleRevisionId().getName());
            }

    private void genvpf(ResolutionCacheManager cache, String organisation, 
String module)
    throws IOException {
      gen(cache, organisation, module, 
          getLocalStylePath(cache.getResolutionCacheRoot(), "/vpf.xsl"), "vpf");
    }

But I the real important change I made to repreport was exposing the "download" 
option from ResolverOptions. Running repreport as is was blowing away my disk 
quota!

            ResolveOptions ro = new ResolveOptions()
            .setDownload(download)
            .setResolveId(resolveId)
            .setCache(ivy.getCacheManager(cache))
            .setValidate(doValidate(settings));

But if you meant integration of the vpf files with the resolution process, the 
trick is to include it with the properties command in your ivysettings:

<ivysettings>
  <settings defaultResolver="${default.resolver}" />
  <properties file="${vpf.file}" />

Now the user has a the flexbility of dealing with versions in a centralized 
way, by selecting the appropriate vpf.file. He even implement a global version 
promotion mechanism.

Of course it is your call - a short article on the wiki would work as well. 




> Add VPF as a report output format
> ---------------------------------
>
>                 Key: IVY-897
>                 URL: https://issues.apache.org/jira/browse/IVY-897
>             Project: Ivy
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 2.0.0-beta-1
>            Reporter: Nascif Abousalh-Neto
>            Priority: Minor
>             Fix For: unspecified
>
>         Attachments: vpf.xsl
>
>
> One of the best practices in the use of Ivy for large organizations is to 
> replace all the revision values in the ivy.xml files with properties. 
>   <dependency name="my.module" revision="${my.module.revision}" ... />
> This approach allows an administrator to control all revisions values used by 
> all modules in one single place - a Version Property File (or VPF for short). 
> This way versions can be controlled in a uniform way, with minimum 
> maintenance and reduced chance of error. For example, you can upgrade all 
> your modules dependencies from Log4J 3.5 to 4.0 with one single line change - 
> and be sure that you didn't forget any of them behind.
> Creating and maintaining VPFs is not trival though. One  way to automate the 
> process is to "harvest" the module names and their latest versions from the 
> repository, using the repreport task to create a resolution report for the 
> entire repo and then converting it to a property file format using a XSL 
> spreadsheet (attached).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to