Hi,

I need some advice regarding the correct approach to the simple
inheritance problem as follows.
I have defined a parent and a child project using Maven 2. The parent
project's POM specifies the use of the checkstyle plugin:

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-checkstyle-plugin</artifactId>
   <configuration>
       <configLocation>my-company-style.xml</configLocation>
   </configuration>
</plugin>

I.e., the checkstyle configuration file is located at the root of the
parent project. When I try to build the site of the child project, it
fails because Maven can't locate the file. I then decided to use
something like this on the parent POM:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-checkstyle-plugin</artifactId>
    <configuration>
        
<configLocation>../path-to-parent-project/my-company-style.xml</configLocation>
    </configuration>
</plugin>

And it worked, as the parent and child projects are at the same level.
However, this solution isn't satisfatory because it assume the working
directory is the child project's root. When I tried to build the child
project using the above POM under Continuum, the build failed with a
message like "Unable to find location 'my-company-style.xml' as URL,
File or Resource." I believe this happened because Continuum uses a
different working directory.

So, what's the correct approach to refer the checkstyle settings file
at the parent POM level?

Thanks in advance,

--
------------------------------
Tatiana Escovedo
[EMAIL PROTECTED]

Longadata
Tecnologia da Informação
------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to