2011/8/31 sebb <[email protected]>:
> On 31 August 2011 08:29, Olivier Lamy <[email protected]> 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.
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 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)

>
>> --
>> Olivier Lamy
>> Talend : http://talend.com
>> http://twitter.com/olamy | http://linkedin.com/in/olamy
>>
>> 2011/8/31 sebb <[email protected]>:
>>> On 23 August 2011 14:43, sebb <[email protected]> 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: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>



-- 
Olivier Lamy
Talend : http://talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to