Aggregator POMs
The framework provides a number of "aggregator" POMs that act as a convenient way to aggregate together various common dependencies.
For example, when writing unit tests for your domain app, it can simply depend on the isis-mavendeps-unittests
artifact (rather than have to reference all of JUnit, AssertJ, Spring Boot, Hamcrest, Mockito and so on).
Currently five aggregator POMs are provided.
Webapp
The isis-mavendeps-webapp
aggregates the main runtime dependencies of a production webapp.
Note however that it does not include the runtime dependencies for either JDO or JPA; these have their own "mavendeps" POM, discussed below.
To use, add the following :
<dependencies>
<dependency>
<groupId>org.apache.isis.mavendeps</groupId>
<artifactId>isis-mavendeps-webapp</artifactId>
<type>pom</type>
</dependency>
</dependencies>
For convenience, it includes all of the current components available:
-
Spring Boot (spring-boot-starter-web)
-
Apache Isis Core - the Applib and underlying implementation (Runtime Services)
-
All the security implementations (Bypass,Shiro and Keycloak)
-
All the viewer implementations (Wicket, Restful Objects)
If you don’t need any of these (for example, you’ll probably only want one security implementation), then you can exclude the others.
Also, remember that adding the class onto the classpath does not make that functionality available (Apache Isis does not currently leverage Spring Boot’s auto configuration capabilities).
So, you must also add in the appropriate IsisModuleXxx
to your application’s top-level @Configuration (aka "app manifest").
For example, see the AppManifest for the SimpleApp starter app.
JDO and JPA
The isis-mavendeps-jdo
aggregates the JDO/DataNucleus dependencies, while the isis-mavendeps-jpa
similarly aggregates the JPA/EclipseLink dependencies.
Applications should use one or the other:
-
to use JDO, add:
pom.xml<dependencies> <dependency> <groupId>org.apache.isis.mavendeps</groupId> <artifactId>isis-mavendeps-jdo</artifactId> <type>pom</type> </dependency> </dependencies>
-
to use JPA, add:
pom.xml<dependencies> <dependency> <groupId>org.apache.isis.mavendeps</groupId> <artifactId>isis-mavendeps-jpa</artifactId> <type>pom</type> </dependency> </dependencies>
Testing and BDD Specs
Three aggregator POMs are provided to support unit testing, integ testing or running BDD (Cucumber) specs.
To use them when unit testing, add:
<dependencies>
<dependency>
<groupId>org.apache.isis.mavendeps</groupId>
<artifactId>isis-mavendeps-unittests</artifactId>
<type>pom</type>
<scope>test</scope>
</dependency>
</dependencies>
For integration testing, add:
<dependencies>
<dependency>
<groupId>org.apache.isis.mavendeps</groupId>
<artifactId>isis-mavendeps-integtests</artifactId>
<type>pom</type>
<scope>test</scope>
</dependency>
</dependencies>
For BDD (Cucumber) specs, within an integration testing context:
<dependencies>
<dependency>
<groupId>org.apache.isis.mavendeps</groupId>
<artifactId>isis-mavendeps-integspecs</artifactId>
<type>pom</type>
<scope>test</scope>
</dependency>
</dependencies>
The table below summarises the dependencies that each of these aggregator POMs brings in.
Dependency | mavendeps- unittests | mavendeps- integtests | mavendeps- integspecs |
---|---|---|---|
Apache Isis |
Y |
||
Apache Isis |
Y |
Y |
|
Apache Isis |
Y |
||
Apache Isis |
Y |
Y |
Y |
Apache Isis |
Y |
Y |
|
Apache Isis |
Y |
Y |
Y |
Apache Isis |
Y |
Y |
|
Y |
Y |
Y |
|
Y |
|||
Y |
Y |
Y |
|
Hamcrest (core + library) |
Y |
Y |
Y |
Y |
Y |
Y |
|
Y |
Y |
Y |
|
Y |
|||
Y |
Y |
Y |
|
PicoContainer |
Y |
||
Y |
|||
Y |
Y |
||
Y |
Y |
jdk11
While Apache Isis v2 will run happily on Java 8, it is of course also possible to it on later versions.
However, between Java 8 and Java 11 a number of packages related to JavaEE were removed from the JRE, but these packages are used by the framework, specifically
-
JAX-WS packages (
javax.jws
,javax.jws.soap
,javax.xml.soap
, andjavax.xml.ws.*
) -
JAXB packages (
javax.xml.bind.*
)
So, if you do want to run your Apache Isis application on Java 11 or later, then these dependencies need to be added in.
All you need to do is include this dependency in the webapp module:
To use, add the following :
<dependencies>
<dependency>
<groupId>org.apache.isis.mavendeps</groupId>
<artifactId>isis-mavendeps-jdk11</artifactId>
<type>pom</type>
</dependency>
</dependencies>
If you are running on JDK11, then this will activate a profile to bring in the missing packages. Otherwise it will be ignored.
For more on this topic, see:
-
JEP 320 under which the packages were removed (also includes notes on replacements)
-
this blog post on how to fix it
-
this SO answer on how to fix it