Hi all,

is there a way to provide users of a plugin a way of easily switching dependencies of it?

Background: I'm developing a Maven plugin (jQAssistant) that comes with a dependency to Neo4j (graph database). Currently I'm using Neo4j 2.3.x which has been compiled against Java 7 but I would like to offer users of the Maven plugin an easy option to use the newer Neo4j 3.x releases which offer some new features but require Java 8.

I know that it's possible to overwrite an existing dependency for a plugin, e.g.

<plugin>
  <groupId>com.buschmais.jqassistant</groupId>
  <artifactId>jqassistant-maven-plugin</artifactId>
  <version>1.3.0</version>
  <dependencies>
    <dependency>
      <groupId>org.neo4j</groupId>
      <artifactId>neo4j</artifactId>
      <version>3.1.3</version> <!-- instead of the default 2.3.10 -->
    </dependency>
  </dependencies>
</plugin>

The problem is that in my case the old version comes with another set of dependencies than the new one:

old:

<dependencies>
     <dependency>
         <groupId>org.neo4j</groupId>
         <artifactId>neo4j</artifactId>
         <version>2.3.10</version>
     </dependency>
     <dependency>
         <groupId>org.neo4j.app</groupId>
         <artifactId>neo4j-server</artifactId>
         <version>2.3.10</version>
     </dependency>
     <dependency>
         <groupId>org.neo4j.app</groupId>
         <artifactId>neo4j-server</artifactId>
         <classifier>static-web</classifier>
         <version>2.3.10</version>
     </dependency>
</dependencies>

new:

<dependencies>
     <dependency>
         <groupId>org.neo4j</groupId>
         <artifactId>neo4j</artifactId>
         <version>3.1.3</version>
     </dependency>
     <dependency>
         <groupId>org.neo4j.app</groupId>
         <artifactId>neo4j-server</artifactId>
         <version>3.1.3</version>
     </dependency>
</dependencies>

Is there a good way to deal with it such that a user of the jqassistant-maven-plugin can easily switch between both variants?

Cheers,

Dirk

Senior Consultant IT
buschmais GbR

-----------------------------------------------------------------
Inhaber Torsten Busch, Frank Schwarz, Dirk Mahler, Tobias Israel
Adresse buschmais GbR, Leipziger Straße 93, 01127 Dresden
Telefon  +49 (0) 351 3209 23-0
Fax      +49 (0) 351 3209 23-29
Mobil    +49 (0) 177 3137411
E-Mail   dirk.mah...@buschmais.com
Internet http://www.buschmais.de
-----------------------------------------------------------------

Diese E-Mail enthält vertrauliche undoder rechtlich geschützte
Informationen. Wenn Sie diese E-Mail irrtümlich erhalten haben,
bitten wir Sie diese E-Mail umgehend zu löschen. Das unerlaubte
Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht
gestattet.

This e-mail may contain confidential or privileged information. If
you are not the intended recipient we kindly request you to delete
this e-mail immediately. Any unauthorized copying, disclosure or
distribution of the material in this e-mail is strictly forbidden.


Reply via email to