For our application, we make one small change to hibernate. Since Hibernate 3.6 Final was released, we tried making this change again and building our own hibernate jar. I downloaded the source code and built it. I did this without making any changes to it first, as a test. The code builds fine, but when I add the jar to my application and try to run it, I get the following exception:
java.lang.ClassNotFoundException: org.hibernate.annotations.common.reflection.ReflectionManager
The jar is missing the entire org.hibernate.annotations.common package, but I do not know what I did wrong when building it. I used maven on windows to build the jar. Here is the command and settings.xml file I used:
mvn clean install -Dmaven.test.failure.ignore=true -DdisableDistribution=true
Code:
<settings>
<profiles>
<profile>
<id>jboss-public-repository</id>
<properties>
<!-- Here we point to our local JDK 1.6 home -->
<jdk16_home>C:\Program Files (x86)\Java\jdk1.6.0_22</jdk16_home>
</properties>
<!-- Here we define the JBoss release and snapshot repos -->
<repositories>
<repository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Maven Repository Group</name>
<url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Maven Repository Group</name>
<url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<!-- Here we add our profile defined in settings.xml to the active profiles -->
<activeProfiles>
<activeProfile>jboss-public-repository</activeProfile>
</activeProfiles>
</settings>