[
https://issues.apache.org/jira/browse/CODEC-109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984218#action_12984218
]
Gary Gregory edited comment on CODEC-109 at 1/20/11 10:26 AM:
--------------------------------------------------------------
Maven 2.2.1:
This fixes it:
http://jira.codehaus.org/browse/MPIR-197?focusedCommentId=224508&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_224508
"Seems that I should put maven-site-plugin and
maven-project-info-reports-plugin into build tags except the reporting tags."
So I added this to the build section:
{code:xml}
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
{code}
Which is also in the reporting section.
On Maven 3.0.2, it seems to mess up the build:
{noformat}
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for
commons-codec:commons-codec:jar:1.4.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for
org.apache.maven.plugins:maven-idea-plugin is missing. @
org.apache.commons:commons-parent:17, C:\Users\ggregory\.m2\repository\or
g\apache\commons\commons-parent\17\commons-parent-17.pom, line 317, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten
the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support
building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Commons Codec 1.4.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4:clean (default-clean) @ commons-codec ---
[INFO] Deleting C:\Users\ggregory\b\svn\apache.org\commons\codec\trunk\target
[INFO]
[INFO] --- maven-site-plugin:2.2:site (default-site) @ commons-codec ---
[INFO] Parent project loaded from repository:
org.apache.commons:commons-parent:pom:17
[INFO] Parent project loaded from repository: org.apache:apache:pom:7
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.936s
[INFO] Finished at: Thu Jan 20 10:20:36 EST 2011
[INFO] Final Memory: 9M/106M
[INFO] ------------------------------------------------------------------------
{noformat}
What? How can that be?
Is the 2.x site plugin in the build section overriding my maven-3 profile?
Here is the full POM:
{code:xml}
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.apache.commons</groupId>
<artifactId>commons-parent</artifactId>
<version>17</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.4.1-SNAPSHOT</version>
<name>Commons Codec</name>
<inceptionYear>2002</inceptionYear>
<description>
The codec package contains simple encoder and decoders for
various formats such as Base64 and Hexadecimal. In addition to these
widely used encoders and decoders, the codec package also maintains a
collection of phonetic encoding utilities.
</description>
<url>http://commons.apache.org/codec/</url>
<issueManagement>
<system>jira</system>
<url>http://issues.apache.org/jira/browse/CODEC</url>
</issueManagement>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/commons/proper/codec/trunk</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/commons/proper/codec/trunk</developerConnection>
<url>http://svn.apache.org/viewvc/commons/proper/codec/trunk</url>
</scm>
<profiles>
<!--
Use maven-site-plugin 2.x with Maven 2.x and maven-site-plugin 3.x
with Maven 3.x
See
http://maven.apache.org/plugins/maven-site-plugin-3.0-beta-3/maven-3.html
-->
<profile>
<id>maven-3</id>
<activation>
<file>
<!-- The basedir expression is only recognized by Maven 3.x (see
MNG-2363) -->
<exists>${basedir}</exists>
</file>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.0-beta-3</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<executions>
<execution>
<id>attach-descriptor</id>
<goals>
<goal>attach-descriptor</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<developers>
<developer>
<name>Henri Yandell</name>
<id>bayard</id>
<email>[email protected]</email>
</developer>
<developer>
<name>Tim OBrien</name>
<id>tobrien</id>
<email>[email protected]</email>
<timezone>-6</timezone>
</developer>
<developer>
<name>Scott Sanders</name>
<id>sanders</id>
<email>[email protected]</email>
</developer>
<developer>
<name>Rodney Waldhoff</name>
<id>rwaldhoff</id>
<email>[email protected]</email>
</developer>
<developer>
<name>Daniel Rall</name>
<id>dlr</id>
<email>[email protected]</email>
</developer>
<developer>
<name>Jon S. Stevens</name>
<id>jon</id>
<email>[email protected]</email>
</developer>
<developer>
<name>Gary D. Gregory</name>
<id>ggregory</id>
<email>[email protected]</email>
<url>http://www.garygregory.com</url>
<organization>Seagull Software</organization>
<organizationUrl>http://www.seagullsoftware.com</organizationUrl>
<timezone>-5</timezone>
</developer>
<developer>
<name>David Graham</name>
<id>dgraham</id>
<email>[email protected]</email>
</developer>
<developer>
<name>Julius Davies</name>
<id>julius</id>
<email>[email protected]</email>
<organizationUrl>http://juliusdavies.ca/</organizationUrl>
<timezone>-8</timezone>
</developer>
</developers>
<contributors>
<contributor>
<name>Christopher O'Brien</name>
<email>[email protected]</email>
<roles>
<role>hex</role>
<role>md5</role>
<role>architecture</role>
</roles>
</contributor>
<contributor>
<name>Martin Redington</name>
<roles><role>Representing xml-rpc</role></roles>
</contributor>
<contributor>
<name>Jeffery Dever</name>
<roles><role>Representing http-client</role></roles>
</contributor>
<contributor>
<name>Steve Zimmermann</name>
<email>[email protected]</email>
<roles><role>Documentation</role></roles>
</contributor>
<contributor>
<name>Benjamin Walstrum</name>
<email>[email protected]</email>
</contributor>
<contributor>
<name>Oleg Kalnichevski</name>
<email>[email protected]</email>
<roles><role>Representing http-client</role></roles>
</contributor>
<contributor>
<name>Dave Dribin</name>
<email>[email protected]</email>
<roles><role>DigestUtil</role></roles>
</contributor>
<contributor>
<name>Alex Karasulu</name>
<email>aok123 at bellsouth.net</email>
<roles><role>Submitted Binary class and test</role></roles>
</contributor>
<contributor>
<name>Matthew Inger</name>
<email>mattinger at yahoo.com</email>
<roles><role>Submitted DIFFERENCE algorithm for Soundex and
RefinedSoundex</role></roles>
</contributor>
<contributor>
<name>Jochen Wiedmann</name>
<email>[email protected]</email>
<roles><role>Base64 code [CODEC-69]</role></roles>
</contributor>
<contributor>
<name>Sebastian Bazley</name>
<email>[email protected]</email>
<roles><role>Streaming Base64</role></roles>
</contributor>
</contributors>
<!-- Codec should depend on very little -->
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
<maven.compile.source>1.4</maven.compile.source>
<maven.compile.target>1.4</maven.compile.target>
<commons.componentid>codec</commons.componentid>
<commons.release.version>1.4</commons.release.version>
<commons.jira.id>CODEC</commons.jira.id>
<commons.jira.pid>12310464</commons.jira.pid>
<!-- Ensure copies work OK (can be removed later when this is in parent
POM) -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<build>
<sourceDirectory>src/java</sourceDirectory>
<testSourceDirectory>src/test</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/*Test.java</include>
<include>**/Test*.java</include>
</includes>
<excludes>
<exclude>**/*AbstractTest.java</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>src/assembly/bin.xml</descriptor>
<descriptor>src/assembly/src.xml</descriptor>
</descriptors>
<tarLongFileMode>gnu</tarLongFileMode>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changes-plugin</artifactId>
<version>2.1</version>
<configuration>
<xmlPath>${basedir}/src/changes/changes.xml</xmlPath>
<issueLinkTemplate>%URL%/%ISSUE%</issueLinkTemplate>
</configuration>
<reportSets>
<reportSet>
<reports>
<report>changes-report</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.6</version>
<configuration>
<configLocation>${basedir}/checkstyle.xml</configLocation>
<enableRulesSummary>false</enableRulesSummary>
<headerFile>${basedir}/LICENSE-header.txt</headerFile>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.3.1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>clirr-maven-plugin</artifactId>
<version>2.2.2</version>
<configuration>
<comparisonVersion>1.4</comparisonVersion>
<minSeverity>info</minSeverity>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.7</version>
<configuration>
<linksource>true</linksource>
<links>
<link>http://java.sun.com/j2se/1.4.2/docs/api/</link>
</links>
</configuration>
</plugin>
</plugins>
</reporting>
</project>
{code}
was (Author: [email protected]):
This fixes it:
http://jira.codehaus.org/browse/MPIR-197?focusedCommentId=224508&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_224508
"Seems that I should put maven-site-plugin and
maven-project-info-reports-plugin into build tags except the reporting tags."
> Allow the build to run with Maven 2 and Maven 3
> -----------------------------------------------
>
> Key: CODEC-109
> URL: https://issues.apache.org/jira/browse/CODEC-109
> Project: Commons Codec
> Issue Type: Improvement
> Affects Versions: 1.4
> Environment: Apache Maven 2.2.1 (r801777; 2009-08-06 15:16:01-0400)
> Apache Maven 3.0.2 (r1056850; 2011-01-08 19:58:10-0500)
> Java version: 1.6.0_23
> Java home: C:\Program Files\Java\jdk1.6.0_23\jre
> Default locale: en_US, platform encoding: Cp1252
> OS name: "windows vista" version: "6.0" arch: "amd64" Family: "windows"
> Reporter: Gary Gregory
> Assignee: Gary Gregory
>
> Allow the build to run with Maven 2 and Maven 3
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.