A thread is necro at best, but to my taste - trying to do something clean and tidy - the javamonkey79 approach is too much of a problem.
Here is what I put into my pom.xml to make it work:
<profiles> <profile> <id>endorsed</id> <activation> <property> <name>sun.boot.class.path</name> </property> </activation> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <compilerArguments> <bootclasspath>${settings.localRepository}/javax/javaee-endorsed-api/6.0/javaee-endorsed-api-6.0.jar${path.separator}${sun.boot.class.path}</bootclasspath> </compilerArguments> </configuration> <dependencies> <dependency> <groupId>javax</groupId> <artifactId>javaee-endorsed-api</artifactId> <version>6.0</version> </dependency> </dependencies> </plugin> </plugins> </build> </profile> </profiles>
By the way, I found it here . Thanks so much Frederick!
source share