Guy
 
Thanks for your answer. This is little but unfortunate, as 
it prevents us from having a proper modular desing where POJO domain 
objects and DAO interfaces are be defined in one OSGi bundle, and another 
OSGi bundle with DAO implementations and mapping files using specific ORM 
framework (EclipseLink in our case).
 
However, I have found a workaround which is based on having 
linked folder in Eclipse linking source folder from Project A to 
Project B, so when Project B is built, classes from Project A are built too and 
metamodel is generated for them. Classes from a linked folder are built into 
separate output dir, so they are not mixed with classes defined in source folder 
of Project B.
 
I can post a complete Eclipse project config if anyone is 
interested.
 
Regards
 
Jaro
I can't think of a good way to do this off hand. The model gen hooks 
into the compiler using APT. Therefore, EntityA would never be a round element 
when compiling ProjectB.
You may want to open a bug to have it 
investigated further.
In the mean time, you'd have to turn on the model 
gen for Project A with the same persistence.xml.
Cheers,
Guy
On 
15/04/2010 12:41 PM, Kuruc, Jaro wrote: 
  
  Hi
   
  I am testing out 
  the JPA2 Metamodel generation in Eclipse and it looks like that 
  EclipseLink's Modelgen Processor is only supporting metamodel generation 
  for entities defined in the same Eclipse project in which persistence.xml is 
  defined.
   
  Here's my 
  setup
   
  Project A:
  - defines entity 
  class EntityA
   
  Project 
  B:
  - depends on 
  Project A, hence having EntityA on classpath
  - defines entity 
  class EntityB
  - defines 
  persistence.xml
  - annotation 
  processor is switched on
   
  The result is that 
  EntityB_ is generated, but not EntityA_. I have tried both annotation based 
  mappings and mappings in orm.xml, but the result is the same. 
  Is there 
  a way to tell EclipseLink Annotation Processor to generate metadata for all 
  classes on classpath? Maybe even restricting it by specifying package to scan? 
  Thanks.
   
  Regards
  
  
  Jaro Kuruc
Java/SQL 
  Developer
  
  Commerzbank AG
Corporates & Markets
Market Risk
  Office 
  address: 30 Gresham Street, London EC2V 
  7PG, United 
  Kingdom
  
  Phone +44 
  (0)20 7475 8258
  
  jaro.kuruc@xxxxxxxxxxxxxxx
  
  http://www.commerzbank.com
  
  Commerzbank Aktiengesellschaft, Frankfurt am 
  Main
Handelsregister/Commercial Register: Amtsgericht Frankfurt am 
  Main, HRB 32000
Vorsitzender des Aufsichtsrates/Chairman of the Supervisory Board: 
  Klaus-Peter Müller
Vorstand/Board of Managing Directors: 
  Martin Blessing (Vorsitzender/Chairman), Frank Annuscheit, Markus Beumer, Achim Kassow, Jochen Klösges, Michael Reuther, 
  Stefan Schmittmann, Ulrich Sieber, Eric Strutz
  
   
This e-mail is confidential and is intended only for the person to whom it is 
addressed.  It may be privileged and should not be read, copied or used by
anyone other than the intended recipient.  If you are not that person, you are
not permitted to make use of the information and you are requested to notify
the sender immediately that you have received it and then destroy the copy in
your possession without disclosing its contents to any person.
Commerzbank AG may monitor outgoing and incoming e-mails.  By replying to this
e-mail you consent to such monitoring.  We believe, but do not warrant, that 
this e-mail and any attachments are virus free, but you must take full 
responsibility for virus checking.
This e-mail was sent either by Commerzbank AG, London Branch, or by Commerzbank
Corporates & Markets, a division of Commerzbank AG.  Commerzbank AG is a 
company incorporated in the Federal Republic of Germany and registered in 
England (registered number FC008139, place of business 30 Gresham Street, 
London EC2V 7PG) and is authorised by Bundesanstalt fuer 
Finanzdienstleistungsaufsicht (BaFin) and authorised and subject to limited 
regulation by the Financial Services Authority (FSA).
  
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
  
This e-mail is confidential and is intended only for the person to whom it is 
addressed.  It may be privileged and should not be read, copied or used by
anyone other than the intended recipient.  If you are not that person, you are
not permitted to make use of the information and you are requested to notify
the sender immediately that you have received it and then destroy the copy in
your possession without disclosing its contents to any person.
Commerzbank AG may monitor outgoing and incoming e-mails.  By replying to this
e-mail you consent to such monitoring.  We believe, but do not warrant, that 
this e-mail and any attachments are virus free, but you must take full 
responsibility for virus checking.
This e-mail was sent either by Commerzbank AG, London Branch, or by Commerzbank
Corporates & Markets, a division of Commerzbank AG.  Commerzbank AG is a 
company incorporated in the Federal Republic of Germany and registered in 
England (registered number FC008139, place of business 30 Gresham Street, 
London EC2V 7PG) and is authorised by Bundesanstalt fuer 
Finanzdienstleistungsaufsicht (BaFin) and authorised and subject to limited 
regulation by the Financial Services Authority (FSA).