commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles <gil...@harfang.homelinux.org>
Subject Re: [ALL] Maven plugins common configuration.
Date Wed, 26 Oct 2016 14:53:23 GMT
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


Mime
View raw message