On 31 August 2011 11:27, Olivier Lamy <ol...@apache.org> wrote:
> 2011/8/31 sebb <seb...@gmail.com>:
>> On 31 August 2011 08:29, Olivier Lamy <ol...@apache.org> wrote:
>>> Hello,
>>> The solution I see is to have an artifact (call it build-resources or
>>> something like that) which contains those .properties
>>
>> The modules all have a common parent pom - is it possible to use that
>> to contain the resources, rather than creating another module?
>>
>>> And use it tru remote-resources or dependency plugin.
>>
>> The remote-resources sharing example shows that the resources will be
>> made available under
>>
>> ${project.build.directory}/maven-shared-archive-resources
>>
>> but the reports customBundle expects to find the file under
>>
>> ${project.basedir}/src/site/custom/project-info-report.properties
>>
>> Looks like I would also have to configure the reports to pick up the
>> custom bundle from elsewhere, or change the outputDirectory (but that
>> would probably mess up the packaging/assembly phases).
>>
>> Seems simpler to just create copies of the bundle in each module in
>> the first place.
>>
>> I'm not sure how to use the dependency plugin - how do I configure the
>> reports to pick up the properties from a jar?
>
> use the dependency to unpack you properties file from your
> artifact/jar to a dedicated path in your project.

I see - much the same as using remote-resources to unpack the file.

> Then configure the mojo.
>
>      <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>        <artifactId>maven-project-info-reports-plugin</artifactId>
>        <configuration>
>          <customBundle>path to unpacked properties file</customBundle>
>        </configuration>
>      </plugin>
>
> IMHO a little complicated and a lot of xml to write but should work
> (not tested).

I assume that the report mojo can be configured once in the parent?
Otherwise it's a lot more work.

And each module has to unpack the file locally.

> I would prefer add a feature for the maven-project-info-reports-plugin
> (and maybe others) to be able to load properties file from
> artifact/jar with adding this artifact/jar in the plugin
> configuration.
>
>      <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>        <artifactId>maven-project-info-reports-plugin</artifactId>
>        <configuration>
>          <customBundleArtifact>
>            <artifact>org.foo:my-properties:1.0</artifact>
>            <customBundlePath>path in the jar</customBundlePath>
>          </customBundleArtifact>
>        </configuration>
>      </plugin>
>
> Makes sense ? (less xml than using dependency unpack)

This is a generic solution and would simplify the process somewhat,
but one would still have to create and deploy the properties artifact.

I would expect the reports plugin to be able to inherit properties
directly from the parent pom.

Rather like the site.xml can be inherited.

>>
>>> --
>>> Olivier Lamy
>>> Talend : http://talend.com
>>> http://twitter.com/olamy | http://linkedin.com/in/olamy
>>>
>>> 2011/8/31 sebb <seb...@gmail.com>:
>>>> On 23 August 2011 14:43, sebb <seb...@gmail.com> wrote:
>>>>> The default customBundle is located at
>>>>>
>>>>> ${project.basedir}/src/site/custom/project-info-report.properties
>>>>>
>>>>> which works fine for single module projects.
>>>>>
>>>>> However, it does not seem to work for multi-module projects.
>>>>>
>>>>> How can one share the same bundle between multiple modules?
>>>>>
>>>>> The modules all share a common parent, but do not seem to pick up the
>>>>> bundle from the parent.
>>>>
>>>> Anyone?
>>>>
>>>> Or is the only solution to duplicate the bundle in all projects?
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>>>> For additional commands, e-mail: users-h...@maven.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>>> For additional commands, e-mail: users-h...@maven.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>>
>
>
>
> --
> Olivier Lamy
> Talend : http://talend.com
> http://twitter.com/olamy | http://linkedin.com/in/olamy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to