Hi,

i have a problem and i hope somebody can help me. I'm kinda new to this
things so maybe my approach is generaly wrong.

i'm having a parent for example like this:

<modelVersion>4.0.0</modelVersion>
    <groupId>org.test</groupId>
    <artifactId>parent</artifactId>
    <version>1</version>
    <build>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>${pom.parent.groupId}</groupId>
                        <artifactId>${pom.parent.artifactId}</artifactId>
                        <version>${pom.parent.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
    <reporting>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <configuration>
                <configLocation>checkstyle.xml</configLocation>
            </configuration>
        </plugin>
        </plugins>
    </reporting>
</project>

And a child like this:

    <parent>
        <groupId>org.test</groupId>
        <artifactId>parent</artifactId>
        <version>1</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <groupId>org.test</groupId>
    <artifactId>child</artifactId>

When i use Maven 2.0.9 i get the error that parent packaging has to be pom.
But it has to be jar so my child can access the checkstyle.xml which is in
the parent projects resource folder.
With Maven 2.1-SNAPSHOT it works as expected (checkstyle runs with my rules
which are in the parents resource folder). Is there maybe a better way to
solve this or somehow make it work with both versions? I don't want to use
packaging jar, run clean install for my parent and then change it to pom so
that it will work with 2.0.9.


Thanks in advance

kukudas

Reply via email to