Using remote-client-deps - eclipse

Libor Zoubek lzoubek at redhat.com
Thu Apr 4 09:47:00 UTC 2013


Hi,

I am writing a java remote client and I am depending on  
remote-client-deps:4.6.0 artifact. I have a little issue with my eclipse,  
which shows me errors (not compile errors) whenever I import/reference  
org.rhq.domain class that has hibernate or JPA annotations.

Errors I get are like this:
- The type javax.persistence.GenerationType cannot be resolved. It is  
indirectly referenced from required .class files
- The type javax.persistence.CascadeType cannot be resolved. It is  
indirectly referenced from required .class files
- The type javax.persistence.FetchType cannot be resolved. It is  
indirectly referenced from required .class files
- The type org.hibernate.annotations.CascadeType cannot be resolved. It is  
indirectly referenced from required .class files
- The type javax.persistence.EnumType cannot be resolved. It is indirectly  
referenced from required .class files

I was digging around and found out that remote-client-deps had an  
exclusion for <artifactId>rhq-remoting-client-api</artifactId>

<exclusion>
  <groupId>hibernate-annotations</groupId>
  <artifactId>hibernate-annotations</artifactId>
</exclusion>

commenting it out in remote-client-deps pom didn't help. This is because  
rhq-remoting-client-api no longer depends on such atrifact, because it  
uses different artifacts provided by AS7.

I fixed remote-client-deps myself and added this: (taken from  
rhq-remoting-client-api:4.6.0 pom)

<dependency>
  <groupId>org.hibernate.javax.persistence</groupId>
  <artifactId>hibernate-jpa-2.0-api</artifactId>
</dependency>
<dependency>
  <groupId>org.hibernate</groupId>
  <artifactId>hibernate-core</artifactId>
</dependency>

This fixed my eclipse issue, but it introduced 10 more dependencies.

Can anyone from you guys confirm this fix is correct? I'll create a BZ  
with patch.

Thank you

-- 
Libor Zoubek
JBoss ON QE


More information about the rhq-devel mailing list