[hibernate-issues] [Hibernate-JIRA] Commented: (METAGEN-59) no metadata is created for mapped superclasses in other directories

Hardy Ferentschik (JIRA) noreply at atlassian.com
Thu Jul 7 10:58:53 EDT 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/METAGEN-59?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42805#action_42805 ] 

Hardy Ferentschik commented on METAGEN-59:
------------------------------------------

That looks more like a setup/configuration problem. The classes under _src/generated/java_ are not part of the sourcepath and hence not added to the compilation unit for the annotation processor. You probably want to add something like this:

{code}
<!-- Plugin to add source path to build cycle -->
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>build-helper-maven-plugin</artifactId>
   <executions>
      <execution>
           <id>add-source</id>
           <phase>generate-sources</phase>
           <goals>
              <goal>add-source</goal>
           </goals>
           <configuration>
               <sources>
                    <source>${basedir}/generated/src/main/java</source>
               </sources>
           </configuration>
      </execution>
   </executions>
</plugin>
{code}

You might need some tweaking of the phases so that everything happens in the right order, but I think that's the problem

> no metadata is created for mapped superclasses in other directories
> -------------------------------------------------------------------
>
>                 Key: METAGEN-59
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/METAGEN-59
>             Project: Hibernate Metamodel Generator
>          Issue Type: Bug
>          Components: processor
>    Affects Versions: 1.1.0.Final
>         Environment: Hibernate 3.5.6
>            Reporter: Martin Trummer
>            Assignee: Hardy Ferentschik
>             Fix For: 1.2.next
>
>         Attachments: pom.xml
>
>
> my entites are in package A (directory src/main/java) and extend base-entities which are also in package A (but in src/generated/java). No metadata is produced for the base-entities. If i move the base-entities to the _src/main/java_ (to the same dir where the entities are), everything is working as expected. Attached is the relevant part of the maven pom.xml file

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list