You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Artem Barger <ar...@bargr.net> on 2016/10/26 00:14:59 UTC
[ALL] Maven plugins common configuration.
Hi,
While working on creating multi module configuration for commons-rng
component I've extracted all configurations for maven plugins such as: pmd,
findbugs, checkstyle into separate module "commons-rng-build-tools". Such
that parent project can now refer to it within build plugins section and
will imply it for all modules reducing the need to repeat it for each
module again (or copy same files into new modules).
Now I think that it could be beneficial to have this "build-tools" common
component across all Apache Commons, so it will provide same configurations
for checkstyle, pmd and etc at once.
For example configuration of pmd could look something like:
<build>
<plugins>
<plugin>
<artifactId>maven-pmd-plugin</artifactId>
<version>${pmd.version}</version>
<configuration>
<targetJdk>${maven.compiler.target}</targetJdk>
<skipEmptyReport>false</skipEmptyReport>
<rulesets>
<ruleset>pmd/pmd-ruleset.xml</ruleset>
</rulesets>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-build-tools</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
And reporting section:
<reporting>
<plugins>
<plugin>
<artifactId>maven-pmd-plugin</artifactId>
<version>${pmd.version}</version>
<configuration>
<targetJdk>${maven.compiler.target}</targetJdk>
<skipEmptyReport>false</skipEmptyReport>
<rulesets>
<ruleset>pmd/pmd-ruleset.xml</ruleset>
</rulesets>
</configuration>
<reportSets>
<reportSet>
<reports>
<report>pmd</report>
<report>cpd</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
At some sense this will be similar to "commons-parent", while keeping only
configuration resources for report generating plugins and for static
analysis tools.
WDYT?
PS. There is temporal example within "commons-rng" git repo inside
"multimodule" branch.
Best regards,
Artem Barger.
Re: [ALL] Maven plugins common configuration.
Posted by Artem Barger <ar...@bargr.net>.
On Wed, Oct 26, 2016 at 10:36 AM, Jörg Schaible <
joerg.schaible@bpm-inspire.com> wrote:
> Because you must have a mechanism to trigger the e.g. the PMD plugin
> individually, if you put the declarationsof it into the commons parent
> (pluginManagement as well as report).
>
>
Ok, I see, I didn't mean to put these into commons parent though.
> > I just wanted to put all these configurations for build plugins which
> > executed during
> > "mvn site" into some common place and reuse them later.
>
> So you've put all those configuration *files* into this new artifact? Can
> those plugins access their configuration files when provided as resource?
>
Yes, and yes, you can see how it works in "commons-rng", there is
a branch "multimodule" I have added my POC there.
Best regards,
Artem Barger.
Re: [ALL] Maven plugins common configuration.
Posted by Jörg Schaible <jo...@bpm-inspire.com>.
Hi Artem,
Artem Barger wrote:
> On Wed, Oct 26, 2016 at 10:08 AM, J�rg Schaible <
> joerg.schaible@bpm-inspire.com> wrote:
>
>> You may put both parts into an own profile that is activated
>> automatically at the extistence of pmd/pmd-ruleset.xml. Each component
>> has then a chance to use it or not simply by providing that file.
>>
>
> \u200bNot sure I follow you in the given context. I mean why one would create a
> profile for
> pmd plugin activated on presence of\u200b rule set xml?
Because you must have a mechanism to trigger the e.g. the PMD plugin
individually, if you put the declarationsof it into the commons parent
(pluginManagement as well as report).
> I just wanted to put all these configurations for build plugins which
> executed during
> "mvn site" into some common place and reuse them later.
So you've put all those configuration *files* into this new artifact? Can
those plugins access their configuration files when provided as resource?
Cheers,
J�rg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [ALL] Maven plugins common configuration.
Posted by Artem Barger <ar...@bargr.net>.
On Wed, Oct 26, 2016 at 10:08 AM, Jörg Schaible <
joerg.schaible@bpm-inspire.com> wrote:
> You may put both parts into an own profile that is activated automatically
> at the extistence of pmd/pmd-ruleset.xml. Each component has then a chance
> to use it or not simply by providing that file.
>
Not sure I follow you in the given context. I mean why one would create a
profile for
pmd plugin activated on presence of rule set xml?
I just wanted to put all these configurations for build plugins which
executed during
"mvn site" into some common place and reuse them later.
Best regards,
Artem Barger.
Re: [ALL] Maven plugins common configuration.
Posted by Jörg Schaible <jo...@bpm-inspire.com>.
Artem Barger wrote:
> Hi,
>
> While working on creating multi module configuration for commons-rng
> component I've extracted all configurations for maven plugins such as:
> pmd, findbugs, checkstyle into separate module "commons-rng-build-tools".
> Such that parent project can now refer to it within build plugins section
> and will imply it for all modules reducing the need to repeat it for each
> module again (or copy same files into new modules).
>
> Now I think that it could be beneficial to have this "build-tools" common
> component across all Apache Commons, so it will provide same
> configurations for checkstyle, pmd and etc at once.
>
> For example configuration of pmd could look something like:
>
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-pmd-plugin</artifactId>
> <version>${pmd.version}</version>
> <configuration>
> <targetJdk>${maven.compiler.target}</targetJdk>
> <skipEmptyReport>false</skipEmptyReport>
> <rulesets>
> <ruleset>pmd/pmd-ruleset.xml</ruleset>
> </rulesets>
> </configuration>
> <dependencies>
> <dependency>
> <groupId>org.apache.commons</groupId>
> <artifactId>commons-build-tools</artifactId>
> <version>1.0-SNAPSHOT</version>
> </dependency>
> </dependencies>
> </plugin>
> </plugins>
> </build>
>
> And reporting section:
>
> <reporting>
> <plugins>
> <plugin>
> <artifactId>maven-pmd-plugin</artifactId>
> <version>${pmd.version}</version>
> <configuration>
> <targetJdk>${maven.compiler.target}</targetJdk>
> <skipEmptyReport>false</skipEmptyReport>
> <rulesets>
> <ruleset>pmd/pmd-ruleset.xml</ruleset>
> </rulesets>
> </configuration>
> <reportSets>
> <reportSet>
> <reports>
> <report>pmd</report>
> <report>cpd</report>
> </reports>
> </reportSet>
> </reportSets>
> </plugin>
> </plugins>
> </reporting>
>
> At some sense this will be similar to "commons-parent", while keeping only
> configuration resources for report generating plugins and for static
> analysis tools.
>
> WDYT?
You may put both parts into an own profile that is activated automatically
at the extistence of pmd/pmd-ruleset.xml. Each component has then a chance
to use it or not simply by providing that file.
> PS. There is temporal example within "commons-rng" git repo inside
> "multimodule" branch.
Cheers,
J�rg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [ALL] Maven plugins common configuration.
Posted by Artem Barger <ar...@bargr.net>.
On Wed, Oct 26, 2016 at 3:20 AM, sebb <se...@gmail.com> wrote:
> Why not include it in commons parent?
>
Because than it will introduce cyclic dependencies I guess. You will
declare "commons-parent"
is parent module and later add it as dependency for maven plugin config.
Best regards,
Artem Barger.
Re: [ALL] Maven plugins common configuration.
Posted by sebb <se...@gmail.com>.
On 26 October 2016 at 01:14, Artem Barger <ar...@bargr.net> wrote:
> Hi,
>
> While working on creating multi module configuration for commons-rng
> component I've extracted all configurations for maven plugins such as: pmd,
> findbugs, checkstyle into separate module "commons-rng-build-tools". Such
> that parent project can now refer to it within build plugins section and
> will imply it for all modules reducing the need to repeat it for each
> module again (or copy same files into new modules).
>
> Now I think that it could be beneficial to have this "build-tools" common
> component across all Apache Commons, so it will provide same configurations
> for checkstyle, pmd and etc at once.
>
> For example configuration of pmd could look something like:
>
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-pmd-plugin</artifactId>
> <version>${pmd.version}</version>
> <configuration>
> <targetJdk>${maven.compiler.target}</targetJdk>
> <skipEmptyReport>false</skipEmptyReport>
> <rulesets>
> <ruleset>pmd/pmd-ruleset.xml</ruleset>
> </rulesets>
> </configuration>
> <dependencies>
> <dependency>
> <groupId>org.apache.commons</groupId>
> <artifactId>commons-build-tools</artifactId>
> <version>1.0-SNAPSHOT</version>
> </dependency>
> </dependencies>
> </plugin>
> </plugins>
> </build>
>
> And reporting section:
>
> <reporting>
> <plugins>
> <plugin>
> <artifactId>maven-pmd-plugin</artifactId>
> <version>${pmd.version}</version>
> <configuration>
> <targetJdk>${maven.compiler.target}</targetJdk>
> <skipEmptyReport>false</skipEmptyReport>
> <rulesets>
> <ruleset>pmd/pmd-ruleset.xml</ruleset>
> </rulesets>
> </configuration>
> <reportSets>
> <reportSet>
> <reports>
> <report>pmd</report>
> <report>cpd</report>
> </reports>
> </reportSet>
> </reportSets>
> </plugin>
> </plugins>
> </reporting>
>
> At some sense this will be similar to "commons-parent", while keeping only
> configuration resources for report generating plugins and for static
> analysis tools.
>
> WDYT?
Why not include it in commons parent?
> PS. There is temporal example within "commons-rng" git repo inside
> "multimodule" branch.
>
> Best regards,
> Artem Barger.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [ALL] Maven plugins common configuration.
Posted by Jörg Schaible <jo...@gmx.de>.
Hi Sebb,
sebb wrote:
> On 26 October 2016 at 17:50, J�rg Schaible <jo...@gmx.de> wrote:
[snip]
>> We have commons-build in proper. Don't know what it is used for, but it
>> looks like an old Maven 1 project ;-)
>
> Commons-build is current.
> It is even documented. See:
>
> http://commons.apache.org/proper/commons-build-plugin/index.html
you should have a look at subversion. What you desribe is commons-build-
plugin.
Cheers,
J�rg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [ALL] Maven plugins common configuration.
Posted by sebb <se...@gmail.com>.
On 26 October 2016 at 17:50, Jörg Schaible <jo...@gmx.de> wrote:
> Artem Barger wrote:
>
>> On Wed, Oct 26, 2016 at 7:14 PM, Gilles <gi...@harfang.homelinux.org>
>> wrote:
>>
>>> could not find "commons-rng-build-tools" (posted a question in maven ML
>>>>> list).
>>>>>
>>>>
>>>> The reactor of Maven does not consider plugins itself or dependencies to
>>>> plugins for its build order (by design). To support something like this,
>>>> you
>>>> will have to produce a released artifact first.
>>>>
>>>
>>> As maven-ignoramus, I do not follow.
>>> Does it mean that Artem's proposal is not feasible (according to
>>> Commons policy)?
>>
>>
>> If only we could have build-tools as stand-alone component, that might
>> solve
>> all the problems. :/
>
> We have commons-build in proper. Don't know what it is used for, but it
> looks like an old Maven 1 project ;-)
Commons-build is current.
It is even documented. See:
http://commons.apache.org/proper/commons-build-plugin/index.html
> Cheers,
> Jörg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [ALL] Maven plugins common configuration.
Posted by Jörg Schaible <jo...@gmx.de>.
Artem Barger wrote:
> On Wed, Oct 26, 2016 at 7:14 PM, Gilles <gi...@harfang.homelinux.org>
> wrote:
>
>> could not find "commons-rng-build-tools" (posted a question in maven ML
>>>> list).
>>>>
>>>
>>> The reactor of Maven does not consider plugins itself or dependencies to
>>> plugins for its build order (by design). To support something like this,
>>> you
>>> will have to produce a released artifact first.
>>>
>>
>> As maven-ignoramus, I do not follow.
>> Does it mean that Artem's proposal is not feasible (according to
>> Commons policy)?
>
>
> \u200bIf only we could have build-tools as stand-alone component, that might
> solve
> all the problems.\u200b :/
We have commons-build in proper. Don't know what it is used for, but it
looks like an old Maven 1 project ;-)
Cheers,
J�rg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [ALL] Maven plugins common configuration.
Posted by Artem Barger <ar...@bargr.net>.
On Wed, Oct 26, 2016 at 7:14 PM, Gilles <gi...@harfang.homelinux.org>
wrote:
> could not find "commons-rng-build-tools" (posted a question in maven ML
>>> list).
>>>
>>
>> The reactor of Maven does not consider plugins itself or dependencies to
>> plugins for its build order (by design). To support something like this,
>> you
>> will have to produce a released artifact first.
>>
>
> As maven-ignoramus, I do not follow.
> Does it mean that Artem's proposal is not feasible (according to
> Commons policy)?
If only we could have build-tools as stand-alone component, that might
solve
all the problems. :/
Best regards,
Artem Barger.
Re: [RNG] More grunt work... (Was: [ALL] Maven plugins common configuration)
Posted by Artem Barger <ar...@bargr.net>.
On Wed, Nov 2, 2016 at 1:25 AM, Gilles <gi...@harfang.homelinux.org> wrote:
> Hello.
>
> Could you please have a look at the changes in "multimodule"
> branch?
>
Sure.
> I created an issue:
> https://issues.apache.org/jira/browse/RNG-23
>
> You are most welcome to create the corresponding sub-tasks, and
> tackle some of them. Top-priority is IMO:
> * the web site duplication issue,
> * how to now run the JMH benchmarks,
> * how to run the examples
>
>
Ok, I will start with 3 of these, while some of the items from the list is
pretty straight forward :)
Best regards,
Artem Barger.
[RNG] More grunt work... (Was: [ALL] Maven plugins common
configuration)
Posted by Gilles <gi...@harfang.homelinux.org>.
Hello.
Could you please have a look at the changes in "multimodule"
branch?
I created an issue:
https://issues.apache.org/jira/browse/RNG-23
You are most welcome to create the corresponding sub-tasks, and
tackle some of them. Top-priority is IMO:
* the web site duplication issue,
* how to now run the JMH benchmarks,
* how to run the examples
Then we can merge into "master" and see how Jenkins handles the
build...
Thanks,
Gilles
On Sun, 30 Oct 2016 01:34:03 +0200, Artem Barger wrote:
> \u200bHi Gilles,\u200b
>
> On Wed, Oct 26, 2016 at 7:42 PM, Gilles
> <gi...@harfang.homelinux.org>
> wrote:
>
>>
>> $ mvn clean install site site:stage
>>
>> succeeds. :-)
>>
>> But the modules link are still dead.
>> [E.g. there is no "apidocs".]
>
>
> \u200bDid you have chance to work that javadoc aggregation serves your
> need and
> now
> links are not broken anymore?
> \u200b
>
>
> Best regards,
> Artem Barger.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [ALL] Maven plugins common configuration.
Posted by Gilles <gi...@harfang.homelinux.org>.
Hi.
On Sun, 30 Oct 2016 01:34:03 +0200, Artem Barger wrote:
> \u200bHi Gilles,\u200b
>
> On Wed, Oct 26, 2016 at 7:42 PM, Gilles
> <gi...@harfang.homelinux.org>
> wrote:
>
>>
>> $ mvn clean install site site:stage
>>
>> succeeds. :-)
>>
>> But the modules link are still dead.
>> [E.g. there is no "apidocs".]
>
>
> \u200bDid you have chance to work that javadoc aggregation serves your
> need
No, I don't think that all the apidocs should be aggregated: It
could be confusing as to which JAR provides which functionality.
Rather each module should have its apidocs.
Only the userguide would be (manually) "aggregated" since it is
so small that a single read should be sufficient to get any user
on track...
> and
> now
> links are not broken anymore?
As of my latest updates to branch "multimodule", the links are
still broken.
Regards,
Gilles
P.S. See also my other email (about the check-list on JIRA).
> \u200b
>
>
> Best regards,
> Artem Barger.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [ALL] Maven plugins common configuration.
Posted by Artem Barger <ar...@bargr.net>.
Hi Gilles,
On Wed, Oct 26, 2016 at 7:42 PM, Gilles <gi...@harfang.homelinux.org>
wrote:
>
> $ mvn clean install site site:stage
>
> succeeds. :-)
>
> But the modules link are still dead.
> [E.g. there is no "apidocs".]
Did you have chance to work that javadoc aggregation serves your need and
now
links are not broken anymore?
Best regards,
Artem Barger.
Re: [ALL] Maven plugins common configuration.
Posted by Artem Barger <ar...@bargr.net>.
On Wed, Oct 26, 2016 at 7:42 PM, Gilles <gi...@harfang.homelinux.org>
wrote:
>
> But the modules link are still dead.
> [E.g. there is no "apidocs".]
Added aggregation of javadocs for parent project.
Best regards,
Artem Barger.
Re: [ALL] Maven plugins common configuration.
Posted by Gilles <gi...@harfang.homelinux.org>.
On Wed, 26 Oct 2016 19:31:18 +0300, Artem Barger wrote:
> On Wed, Oct 26, 2016 at 7:14 PM, Gilles
> <gi...@harfang.homelinux.org>
> wrote:
>
>> \u200bTry "mvn install site"
>>>>
>>>
>> That works but does not build the complete site, for which I'd
>> invoke
>>
>> $ mvn site:stage
>
>
> \u200bCan you try now? I've pushed some changes.\u200b
$ mvn clean install site site:stage
succeeds. :-)
But the modules link are still dead.
[E.g. there is no "apidocs".]
Best,
Gilles
>
> Best regards,
> Artem Barger.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [ALL] Maven plugins common configuration.
Posted by Artem Barger <ar...@bargr.net>.
On Wed, Oct 26, 2016 at 7:14 PM, Gilles <gi...@harfang.homelinux.org>
wrote:
> Try "mvn install site"
>>>
>>
> That works but does not build the complete site, for which I'd
> invoke
>
> $ mvn site:stage
Can you try now? I've pushed some changes.
Best regards,
Artem Barger.
Re: [ALL] Maven plugins common configuration.
Posted by Gilles <gi...@harfang.homelinux.org>.
On Wed, 26 Oct 2016 17:30:45 +0200, J�rg Schaible wrote:
> Hi Artem,
>
> Artem Barger wrote:
>
>> \u200bHi,
>>
>> On Wed, Oct 26, 2016 at 5:53 PM, Gilles
>> <gi...@harfang.homelinux.org>
>> wrote:
>>
>>> What is the command to "build everything"?
>>>
>>>
>>
>>> I tried
>>> $ mvn site
>>>
>>
>> \u200bTry "mvn install site"
That works but does not build the complete site, for which I'd
invoke
$ mvn site:stage
But this then fail with:
... skipped ...
[INFO] Build Tools ........................................ FAILURE [
0.610 s]
[INFO] Apache Commons Parent RNG .......................... SKIPPED
[INFO] Apache Commons RNG Core ............................ SKIPPED
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 0.972 s
[INFO] Finished at: 2016-10-26T18:09:23+02:00
[INFO] Final Memory: 14M/221M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-site-plugin:3.3:stage (default-cli) on
project commons-rng-build-tools: Missing distribution management in
project Build Tools
(org.apache.commons:commons-rng-build-tools:1.0-SNAPSHOT) -> [Help 1]
>> \u200b instead. For some reason dependencies between is not sorted out
>> and
>> maven
>> could not find "commons-rng-build-tools" (posted a question in maven
>> ML
>> list).
>
> The reactor of Maven does not consider plugins itself or dependencies
> to
> plugins for its build order (by design). To support something like
> this, you
> will have to produce a released artifact first.
As maven-ignoramus, I do not follow.
Does it mean that Artem's proposal is not feasible (according to
Commons policy)?
Gilles
>
> - J�rg
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [ALL] Maven plugins common configuration.
Posted by Jörg Schaible <jo...@gmx.de>.
Artem Barger wrote:
> On Wed, Oct 26, 2016 at 6:30 PM, J�rg Schaible <
> joerg.schaible@bpm-inspire.com> wrote:
>
>>
>> The reactor of Maven does not consider plugins itself or dependencies to
>> plugins for its build order (by design). To support something like this,
>> you
>> will have to produce a released artifact first.
>
>
> \u200bIn that case I guess following tutorial has a bug:
> https://maven.apache.org/plugins/maven-checkstyle-plugin/examples/multi-module-config.html
No, it uses a released version as dependency. You're currently using a
SNAPSHOT version that is part of the same reactor and should be build first
(apart from the fact that the dependencies of a plugin are resolved at a
completely different stage).
When you've built the subproject once (i.e. you have such a SNAPSHOT version
in your local repo), the situation is slightly different, but you will
probably not using the correct SNAPSHOT version.
Cheers,
J�rg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [ALL] Maven plugins common configuration.
Posted by Artem Barger <ar...@bargr.net>.
On Wed, Oct 26, 2016 at 6:30 PM, Jörg Schaible <
joerg.schaible@bpm-inspire.com> wrote:
>
> The reactor of Maven does not consider plugins itself or dependencies to
> plugins for its build order (by design). To support something like this,
> you
> will have to produce a released artifact first.
In that case I guess following tutorial has a bug:
https://maven.apache.org/plugins/maven-checkstyle-plugin/examples/multi-module-config.html
Best regards,
Artem Barger.
Re: [ALL] Maven plugins common configuration.
Posted by Jörg Schaible <jo...@bpm-inspire.com>.
Hi Artem,
Artem Barger wrote:
> \u200bHi,
>
> On Wed, Oct 26, 2016 at 5:53 PM, Gilles <gi...@harfang.homelinux.org>
> wrote:
>
>> What is the command to "build everything"?
>>
>>
>
>> I tried
>> $ mvn site
>>
>
> \u200bTry "mvn install site"
> \u200b instead. For some reason dependencies between is not sorted out and
> maven
> could not find "commons-rng-build-tools" (posted a question in maven ML
> list).
The reactor of Maven does not consider plugins itself or dependencies to
plugins for its build order (by design). To support something like this, you
will have to produce a released artifact first.
- J�rg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [ALL] Maven plugins common configuration.
Posted by Artem Barger <ar...@bargr.net>.
Hi,
On Wed, Oct 26, 2016 at 5:53 PM, Gilles <gi...@harfang.homelinux.org>
wrote:
> What is the command to "build everything"?
>
>
> I tried
> $ mvn site
>
Try "mvn install site"
instead. For some reason dependencies between is not sorted out and
maven
could not find "commons-rng-build-tools" (posted a question in maven ML
list).
> Apart from that, the setup looks nice although I have no idea if
> it can fit the "Commons" way of handling each of its sub-project.
>
>
Well, IMO this is fits into "Commons" pretty good, since it
provide common basic set of configs for maven plugins which
used by almost every common component.
> Please let me know whether this can be sorted out so that a
> release of "Commons RNG" will not be invalidated because of an
> "unusual" project build layout or other incompatibility with the
> release policy.
>
>
Working on it.
> When this is settled, we must review the
> doc/release/release.howto.txt
> document and update according to the new layout.
>
Sure thing.
Best regards,
Artem Barger.
Re: [ALL] Maven plugins common configuration.
Posted by Gilles <gi...@harfang.homelinux.org>.
Hello.
On Wed, 26 Oct 2016 03:14:59 +0300, Artem Barger wrote:
> Hi,
>
> While working on creating multi module configuration for commons-rng
> component I've extracted all configurations for maven plugins such
> as: pmd,
> findbugs, checkstyle into separate module "commons-rng-build-tools".
> Such
> that parent project can now refer to it within build plugins section
> and
> will imply it for all modules reducing the need to repeat it for each
> module again (or copy same files into new modules).
>
> Now I think that it could be beneficial to have this "build-tools"
> common
> component across all Apache Commons, so it will provide same
> configurations
> for checkstyle, pmd and etc at once.
>
> For example configuration of pmd could look something like:
>
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-pmd-plugin</artifactId>
> <version>${pmd.version}</version>
> <configuration>
> <targetJdk>${maven.compiler.target}</targetJdk>
> <skipEmptyReport>false</skipEmptyReport>
> <rulesets>
> <ruleset>pmd/pmd-ruleset.xml</ruleset>
> </rulesets>
> </configuration>
> <dependencies>
> <dependency>
> <groupId>org.apache.commons</groupId>
> <artifactId>commons-build-tools</artifactId>
> <version>1.0-SNAPSHOT</version>
> </dependency>
> </dependencies>
> </plugin>
> </plugins>
> </build>
>
> And reporting section:
>
> <reporting>
> <plugins>
> <plugin>
> <artifactId>maven-pmd-plugin</artifactId>
> <version>${pmd.version}</version>
> <configuration>
> <targetJdk>${maven.compiler.target}</targetJdk>
> <skipEmptyReport>false</skipEmptyReport>
> <rulesets>
> <ruleset>pmd/pmd-ruleset.xml</ruleset>
> </rulesets>
> </configuration>
> <reportSets>
> <reportSet>
> <reports>
> <report>pmd</report>
> <report>cpd</report>
> </reports>
> </reportSet>
> </reportSets>
> </plugin>
> </plugins>
> </reporting>
>
> At some sense this will be similar to "commons-parent", while keeping
> only
> configuration resources for report generating plugins and for static
> analysis tools.
>
> WDYT?
What is the command to "build everything"?
I tried
$ mvn site
and got an error:
... skipped ...
[INFO] Reactor Summary:
[INFO]
[INFO] Build Tools ........................................ SUCCESS [
17.979 s]
[INFO] Apache Commons Parent RNG .......................... FAILURE [
4.274 s]
[INFO] Apache Commons RNG Core ............................ SKIPPED
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 22.455 s
[INFO] Finished at: 2016-10-26T16:37:27+02:00
[INFO] Final Memory: 43M/451M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-site-plugin:3.4:site (default-site) on
project commons-rng: failed to get report for
org.apache.maven.plugins:maven-javadoc-plugin: Failed to execute goal
org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check (validate)
on project commons-rng: Execution validate of goal
org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check failed:
Plugin org.apache.maven.plugins:maven-checkstyle-plugin:2.17 or one of
its dependencies could not be resolved: Could not find artifact
org.apache.commons:commons-rng-build-tools:jar:1.0-SNAPSHOT in
apache.snapshots (http://repository.apache.org/snapshots) -> [Help 1]
Apart from that, the setup looks nice although I have no idea if
it can fit the "Commons" way of handling each of its sub-project.
Please let me know whether this can be sorted out so that a
release of "Commons RNG" will not be invalidated because of an
"unusual" project build layout or other incompatibility with the
release policy.
When this is settled, we must review the
doc/release/release.howto.txt
document and update according to the new layout.
Thanks,
Gilles
>
> PS. There is temporal example within "commons-rng" git repo inside
> "multimodule" branch.
>
> Best regards,
> Artem Barger.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org