You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Adrian Shum <tc...@taifook.com> on 2007/03/12 11:51:03 UTC

Handling to certain kind of dependent artifacts?

Dear all,

For example, in my company, I would like to develop a kind of lib, but apart from normal classes etc, it also includes some special resources file (e.g. in myRes/ directory under the JAR).

For the app using such lib, I need to extract those special resources file, prepare it base on my app's setting, and put those generated resources in my final artifact/assembly.

I would like to try to write a plugin to achieve this, can someone tell me if it is the correct direction (I have no experience, nor have really studied in Maven plugin development  yet):
1) The Plugin will looked at the dependency list of the project
2) Determin each dependent artifact to see if it belongs to the above-mentioned special kind of lib
3) For each special lib, extract the resource files to target/special-resources
4) do my massaging in target/special-resources
5) Include target/special-resources as a resource directory of project

Is it a 'right' direction?

In order to archieve 2), what can I do? I need a special packaging (use another extension instead of JAR), or I can make use of the META-INF/ to put some meta info to let the lib 'declare' itself as 'special lib'?

Thanks a lot   :)

Adrian



This email is confidential. If you are not the intended recipient, please delete it from your system and notify the sender immediately. Any unauthorized use, disclosure, dissemination or copying of this email is prohibited. Taifook Securities Group, its group companies and their content providers ("Parties") shall not be responsible for the accuracy or completeness of this email or its attachment, if any, which could contain virus, be corrupted, destroyed, incomplete, intercepted, lost or arrive late.   The Parties do not accept liability for any damage caused by this email.