Skip to content

Conversation

@schegolevalex
Copy link
Contributor

PR for #26 issue

@Tcharl
Copy link

Tcharl commented Dec 28, 2023

I agree that repositories should ideally be generated in ${project.build.directory}/generated-sources (at least, a subfolder is even better), then, the build-helper-maven-plugin can be used to add these generated sources to the build path.
This is how common generation plugins are configured: mapstruct, hibernated tools, ...
Also, target should not be dependent on the executed command, but from where the plugin is declared.

Still, wonderful plugin, on my side, to fix the first issue, I just

<plugin>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>generate-sources</phase>
                                <configuration>
                                    <target>
                                        <mkdir dir="${project.build.directory}/generated-sources/repositories" />
                                        <move todir="${project.build.directory}/generated-sources/repositories">
                                            <fileset dir="${project.basedir}/src/main/java" includes="**/repository/*.java" />
                                        </move>
                                    </target>
                                </configuration>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

@sonarqubecloud
Copy link

Quality Gate Passed Quality Gate passed

Issues
4 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

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

Successfully merging this pull request may close these issues.

2 participants