Hi all, I would like to include or exclude a dependency based on the presence of an artifact on the global class path.
For example, I have a database project. The user will include a dependency on it in his own pom. The user will also add a JDBC driver artifact. My database project should be able to declare additional dependencies depending on the presence of specific JDBC drivers artifacts, for example a database-mysql-dialect if the mysql-connector is used, or the database-postgres-dialect if the postgres driver is used. Whle it is possible to check at runtime, using reflection and the like, the presence of a given class, it lacks versioning, it is not a clean way, it clutters the main package code with stuff that could (and should) be placed in different artifacts. I don't know any way to do this in Maven right now. Theoretically, it could be achieved with profile activation, if there was a profile activation based on the presence of an artifact or at least on the presence of classpath resources instead of plain files. Is it possible to implement such a profile activator? Has anybody ever done something like this? Has anybody had the same need and investigated a way to solve it? Thanks in advance, Simone -- Simone Gianni CEO Semeru s.r.l. Apache Committer MALE human being programming a computer http://www.simonegianni.it/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]