The Apache project log4cxx is implemented in C++, but uses Maven for historical reasons to manage web site and stuff. Some of the unit tests even require Java with e.g. log4j
and at least that dependency is modeled in pom.xml
like the following:
<dependencies>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
<scope>test</scope>
</dependency>
The good thing about this is that a page containing that dependency is automatically generated when building the web site. The bad thing about this approach is that it reads pretty much like those are ALL dependencies necessary at all, which is not the case. There are some additional ones to successfully build, like APR
, and some shell tools like sed
necessary to successfully run tests. It would be great to be able to maintain those dependency using the already available plugin as well.
For test purposes, I came up with the following:
<dependency>
<groupId>apr</groupId>
<artifactId>util</artifactId>
<version>1.5.4</version>
<scope>system</scope>
<systemPath>${user.home}/Documents/Svn/Src/Libs/trunk/C/X-OS/APR/apr-util/1.5.4/build/RAD 10.2/libs/libapr-util/Win32/Debug/out/libapr-util.lib</systemPath>
<type>lib</type>
</dependency>
This adds an additional dependency to the page and let's the build succeed in the end, but still prints the following error message on the shell:
[ERROR] Artifact: apr:util:lib:1.5.4 has no file.
That is interesting, because using ProcMon I can see that the configured file is accessed and I don't see any other APR-named file requested at all.
13:57:58,5662686 java.exe 8312 CloseFile C:\Users\tschoening\Documents\Svn\Src\Libs\trunk\C\X-OS\APR\apr-util\1.5.4\build\RAD 10.2\libs\libapr-util\Win32\Debug\out\libapr-util.lib SUCCESS
Additionally, this only seems to work in case of using scope system
, while I would like to model e.g. sed
as being necessary for scope test
instead. system
is documented to be deprecated at all as well.
So, is there some way to model additional dependencies in a way that Maven only uses them to create the corresponding page? Would be great if one could tell Maven to not resolve some dependencies at all, but using provided
or anything else than the above system
didn't succeed.
Thanks!