yaml-properties-maven-plugin
yaml-properties-maven-plugin copied to clipboard
Does not seem to work when running MVN by individual targets
mvn install
will run correctly and the configuration files are read in like expected.
mvn yaml-properties:read-project-properties jooq-codegen:generate -f pom.xml
will not read in the properties and the plugins that depend on them fail to execute as a result.
Is this a limitation of maven plugins or this plugin in particular? Is there any way this could be fixed?
Sample POM:
<project>
...
<build>
...
<plugins>
...
<plugin>
<groupId>it.ozimov</groupId>
<artifactId>yaml-properties-maven-plugin</artifactId>
<version>1.1.3</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>src/main/resources/application.yaml</file>
<!-- Assume this file actually exists and contains the required data -->
</files>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jooq</groupId>
<artifactId>jooq-codegen-maven</artifactId>
<executions>
<execution>
<id>generate-mysql</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<jdbc>
<url>${spring.datasource.url}</url>
<user>${spring.datasource.username}</user>
<password>${spring.datasource.password}</password>
</jdbc>
<generator>
<database>
<name>org.jooq.meta.mysql.MySQLDatabase</name>
<includes>.*</includes>
<!-- this is handled elseware ignore this -->
<inputSchema>${database.schema}</inputSchema>
</database>
<generate>
<deprecated>false</deprecated>
<instanceFields>true</instanceFields>
<pojos>true</pojos>
</generate>
<target>
<packageName>com.example.jooq.core</packageName>
<directory>target/generated-sources/jooq/core-db</directory>
</target>
</generator>
</configuration>
</execution>
</executions>
</plugin>
<plugins>
<build>
</project>
Also on this note, I would be happy to help but I do not know alot about plugins. If the owner cannot fix this can they point me to how it could be done?