On Monday 23 June 2008 André Kelpe wrote:
> Hi Martin!
>
> 2008/6/23 Martin Höller <[EMAIL PROTECTED]>:
> > You probably didn't define a version for the maven-javadoc-plugin in
> > this projects pom or a parent pom, so maven (prior to 2.0.9) defaults
> > to RELEASE.
>
> You were right, I didn't do that. I updated the parent pom and now I
> can enter the validation phase but there I encounter the next problem:
>
> The forked validate tries to compile all sources with compliance level
> 1.3 which will fail b/c we use generics etc. The strange thing is that
> the parent pom sets the compiler plugin to compliance level 1.6, which
> was never a problem, but somehow this setting is not carried over into
> the release-pom.xml. Here is how the compiler plugin is configured in
> the parent pom:
>
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-compiler-plugin</artifactId>
>         <version>2.0.2</version>
>         <configuration>
>           <!-- force to use JDK 1.6 -->
>           <encoding>UTF-8</encoding>
>           <source>1.6</source>
>           <target>1.6</target>
>         </configuration>
>       </plugin>
>
> Why is this not present in the release-pom?

First, the configuration needs not to be in the release-pom, as it's 
(probably) inherited from the parent which is specified in the release-pom 
and therefore available via a repository.

Second, where exactly do you specify this section? Within a 
<pluginManagement> section? I'm not sure wheter it is inherited if it is in 
<plugins><plugin> or not. What works for me is having the following in my 
parent pom:

<project
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.0.2</version>
          <configuration>
            <source>1.5</source>
            <target>1.5</target>
            <encoding>ISO-8859-1</encoding>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
</project>

> > Just define the version of all plugins you are using (best in a
> > <dependencyManagement> section), which is a best practice anyway. This
> > should solve your problem.
>
> Never heard of the dependencyManagement before, will take a look.

I mixed things up a little bit in my first mail: <dependencyManagement> is 
for defining version of dependencies and <pluginManagement> is for defining 
versions of plugins. What I wanted to write was:

| Just define the version of all plugins you are using (best in a
| <pluginyManagement> section),...

hth,
- martin

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to