title: package-info.java + Hibernate annotation @TypeDefs + Maven
body: <p>How can I declare @TypeDefs on separate package-info.java class and use it package level with @Type. Currently I have declared it according to following manner. But when I compile the application with Maven it will give following error. Thanks. </p>
  
  <p><strong>package-info.java class</strong>  </p>
  
  <pre><code>@TypeDefs
          ({
                  @TypeDef(
                          name="encryptedString",
                          typeClass=EncryptedStringType.class,
                          parameters={
                                  @Parameter(name="encryptorRegisteredName",
                                          value="rcmHibernateStringEncryptor")
                          }
                  )
          })
  
  package com.core.model;
  import org.hibernate.annotations.TypeDef;
  import org.hibernate.annotations.TypeDefs;
  import org.hibernate.annotations.Parameter;
  import org.jasypt.hibernate4.type.EncryptedStringType;
  </code></pre>
  
  <p><strong>Maven Error</strong></p>
  
  <pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project MyApp: Compilation failure
  [ERROR] com\core\model\package-infor.java:[2,0] error: package annotations should be in file package-info.java
  </code></pre>