You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by tim tim <ti...@googlemail.com> on 2009/02/06 12:11:38 UTC
checkstyle plugin error on multimodule project
hello
i have a simple multimodule project
pom.xml
|
proj1---- pom.xml
|
proj2----pom.xml
in the main pom.xml:
<modules>
<module>proj1<module>
<module>proj2<module>
<modules>
proj2 depends on proj1.
<dependency>
<groupId>myComp</groupId>
<artifactId>proj1</artifactId>
<version>0.1-SNAPSHOT</version>
</dependency>
this dependency is resolved correctly when i call
mvn test
or when i open the projects via m2eclipse
but when i call
mvn checkstyle:checkstyle
the checkstyle plugin creates correct reports for proj1
but when it tries to work on proj2 i get the following error:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
----------
1) myComp:proj1:jar:0.1-SNAPSHOT
it tries to load the missing dependency from a repository instead of using the
files in the other submodule like the test and the compile plugins do.
i can not imagine that i have to deploy all jars before i use checkstyle?
how do i use checkstyle for multimodule projects?
thanks, tim
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: checkstyle plugin error on multimodule project
Posted by ossi petz <os...@gmail.com>.
hallo
the trick is to reference the checkstyle config as a dependency and not
directly as a file.
there are some hints at:
http://maven.apache.org/plugins/maven-checkstyle-plugin/examples/multi-module-config.html
we created a module containing only the checkstyle config. the parent
pom then gets this checkstyle-plugin configuration with a dependency to
that artifact.
that should work :)
good luck
regards
ossi
tim tim schrieb:
> hello
>
> i have a simple multimodule project
>
> pom.xml
> |
> proj1---- pom.xml
> |
> proj2----pom.xml
>
> in the main pom.xml:
> <modules>
> <module>proj1<module>
> <module>proj2<module>
> <modules>
>
>
> proj2 depends on proj1.
>
> <dependency>
> <groupId>myComp</groupId>
> <artifactId>proj1</artifactId>
> <version>0.1-SNAPSHOT</version>
> </dependency>
>
>
> this dependency is resolved correctly when i call
>
> mvn test
>
> or when i open the projects via m2eclipse
>
> but when i call
>
> mvn checkstyle:checkstyle
>
> the checkstyle plugin creates correct reports for proj1
>
> but when it tries to work on proj2 i get the following error:
>
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Failed to resolve artifact.
>
> Missing:
> ----------
> 1) myComp:proj1:jar:0.1-SNAPSHOT
>
>
> it tries to load the missing dependency from a repository instead of using the
> files in the other submodule like the test and the compile plugins do.
>
> i can not imagine that i have to deploy all jars before i use checkstyle?
>
> how do i use checkstyle for multimodule projects?
>
>
>
> thanks, tim
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org