[seam-dev] How to handle conditional dependencies in Seam 3?

Pete Muir pmuir at redhat.com
Thu Aug 5 17:09:37 EDT 2010

On 5 Aug 2010, at 22:05, Marcel Kolsteren wrote:

> 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.

We normally do this, with JBoss AS 6 as the default runtime environment (which requires Java 6).

> 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?
> Kind regards,
> Marcel
> _______________________________________________
> seam-dev mailing list
> seam-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/seam-dev

More information about the seam-dev mailing list