Как правильно генерировать мету для spring jpa? Почему то не гуглится однозначный ответ на этот вопрос. У меня сабпроект persistence, с несколькими entity классами.
./src/main/java/vamos/persistence/entities/AddressEntity.java
./src/main/java/vamos/persistence/entities/CarrierEntity.java
...
В pom.xml добавил вот такой кусок, нагугленный, только версии поставил последние
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<version>2.0.5</version>
<executions>
<execution>
<id>process</id>
<goals>
<goal>process</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<processors>
<processor>org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor</processor>
</processors>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>6.0.1.Final</version>
</dependency>
</dependencies>
</plugin>
Когда запускаю mvn install то в консоле выдает выхлоп ниже. Но в target нету сгенерированных классов с метой. Только сами entity классы (class файлы). Никаких ошибок не выдает. Просто ничего не генерит. В чем может быть проблема? Пробовал вручную запускать
javac -cp %CP% -proc:only
с параметрами из выхлопа, он пишет только "error: no source files or class names". --source-path пробовал передавать. Что то не то делаю, а не пойму что. Памагите пожалуйста, дайте линк на рабочую инструкцию.
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------------< vamos:persistence >--------------------------
[INFO] Building persistence 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-processor-plugin:2.0.5:process (process) @ persistence ---
[INFO] Source directory: C:\projects\VANIS\gitview\vamos-backend\persistence\target\generated-sources\apt added
[INFO] javac option: -cp
[INFO] javac option: C:\Users\....
[INFO] javac option: -proc:only
[INFO] javac option: -processor
[INFO] javac option: org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor
[INFO] javac option: -d
[INFO] javac option: C:\projects\VANIS\gitview\vamos-backend\persistence\target\classes
[INFO] javac option: -s
[INFO] javac option: C:\projects\VANIS\gitview\vamos-backend\persistence\target\generated-sources\apt
[INFO] diagnostic Note: Hibernate JPA 2 Static-Metamodel Generator 6.0.1.Final
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ persistence ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] skip non existing resourceDirectory C:\projects\VANIS\gitview\vamos-backend\persistence\src\main\resources
[INFO] skip non existing resourceDirectory C:\projects\VANIS\gitview\vamos-backend\persistence\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ persistence ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ persistence ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] skip non existing resourceDirectory C:\projects\VANIS\gitview\vamos-backend\persistence\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ persistence ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ persistence ---
[INFO]
[INFO] --- maven-jar-plugin:3.2.2:jar (default-jar) @ persistence ---
[INFO] Building jar: C:\projects\VANIS\gitview\vamos-backend\persistence\target\persistence-0.0.1-SNAPSHOT.jar
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ persistence ---
[INFO] Installing C:\projects\VANIS\gitview\vamos-backend\persistence\target\persistence-0.0.1-SNAPSHOT.jar to C:\Users\...
[INFO] Installing C:\projects\VANIS\gitview\vamos-backend\persistence\pom.xml to C:\Users\...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS