I tested on the latest Hibernate and its bundled instrument task and found the ‘mvn clean install’ succeeds. Below is the new pom.xml file I used for testing:
<?xml version="1.0"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <modelVersion>4.0.0</modelVersion> <groupId>org.frchen</groupId> <artifactId>hibernate-5</artifactId> <version>1.0-SNAPSHOT</version> <name>Report the instrument bug of hibernate-5.0.4.Final</name> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>5.4.4.Final</version> </dependency> <dependency> <groupId>javax.transaction</groupId> <artifactId>javax.transaction-api</artifactId> <version>1.2</version> </dependency> <dependency> <groupId>org.hsqldb</groupId> <artifactId>hsqldb-j5</artifactId> <version>2.2.4</version> <scope>runtime</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.10</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <phase>process-classes</phase> <goals> <goal>run</goal> </goals> </execution> </executions> <configuration> <tasks> <taskdef name="enhancement" classname="org.hibernate.tool.enhance.EnhancementTask"> <classpath> <path refid="maven.runtime.classpath" /> <path refid="maven.plugin.classpath" /> </classpath> </taskdef> <enhancement dir="${project.build.outputDirectory}" /> </tasks> </configuration> </plugin> </plugins> </build> </project>