How to add an extra Java library

1- Identify the library you need on maven

2- Check the compatibility with Simplicité’s librabries

  1. Add the maven-enforcer-plugin to your project’s pom.xml :
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-enforcer-plugin</artifactId>
  <version>3.0.0-M1</version>
  <executions>
    <execution>
      <id>enforce</id>
      <configuration>
        <rules>
          <dependencyConvergence/>
        </rules>
      </configuration>
      <goals>
        <goal>enforce</goal>
      </goals>
    </execution>
  </executions>
</plugin>
  1. save existing dependecy collisions
mvn validate > dep-errors-1.log
  1. add the library you’re interested in to your project’s pom.xml :
<dependency>
  <groupId>org.hsqldb</groupId>
  <artifactId>hsqldb</artifactId>
  <version>2.7.1</version>
</dependency>
  1. save new collisions:
mvn validate > dep-errors-2.log
  1. compare existing collisions to new collisions:
diff dep-errors-1.log dep-errors-2.log
  1. analyse the results:

pom_xml_—_module-demo

3- Add the library to your project

2 Likes