[seam-dev] How to handle conditional dependencies in Seam 3?
marcel at meandi.nl
Thu Aug 5 17:05:26 EDT 2010
For the external authentication support in the seam security module, I need a dependency on JAXB and a dependency on the XML digital signature API (JSR 105). The environment where Seam is deployed (JDK and application server) determines whether these dependent artifacts are "provided" or not. For example, JDK 6 has both JAXB and JSR 105 support, but when using JDK 5 it depends on the application server (and the version of the application server) whether JAXB and JSR 105 are provided. I see no way to express this kind of "conditional dependency" in module pom files. Two possible solutions:
1) Package the module with the dependent jars that are most likely not provided by the runtime environment. Use the reference documentation to instruct the Seam user to exclude/add dependencies based on his environment.
2) Create different artifacts for different runtime environments (the most used ones). This would have impact on how Seam distributions are made.
Is there already some best practice in Seam 3 regarding this?
More information about the seam-dev