Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not seem to work when running MVN by individual targets #9

Open
droidkfx opened this issue Mar 10, 2020 · 1 comment
Open

Does not seem to work when running MVN by individual targets #9

droidkfx opened this issue Mar 10, 2020 · 1 comment

Comments

@droidkfx
Copy link

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>
@droidkfx
Copy link
Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant