Skip to content

Using directory-maven-plugin to initialize legal.source.folder property#285

Open
senivam wants to merge 2 commits intojakartaee:mainfrom
senivam:mvn_plugin
Open

Using directory-maven-plugin to initialize legal.source.folder property#285
senivam wants to merge 2 commits intojakartaee:mainfrom
senivam:mvn_plugin

Conversation

@senivam
Copy link
Contributor

@senivam senivam commented Jan 7, 2020

improving #284 by using plugin to initialize property instead of internal maven property

Signed-off-by: Maxim Nesen maxim.nesen@oracle.com

Signed-off-by: Maxim Nesen <maxim.nesen@oracle.com>
@senivam
Copy link
Contributor Author

senivam commented Jan 7, 2020

@bshannon - required change implemented, could you please take a look?

Copy link
Contributor

@bshannon bshannon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That probably works, but I've done it in two steps. First, use the plugin to define a more general but descriptive property, then use that property in other configuration, or use to define other properties.

                    <execution>
                        <id>directories</id>
                        <goals>
                            <goal>highest-basedir</goal>
                        </goals>
                        <phase>initialize</phase>
                        <configuration>
                            <property>main.basedir</property>
                        </configuration>
                    </execution>

Also, I'm not sure execution-root is really what you want if someone runs mvn from a lower level directory.

Signed-off-by: Maxim Nesen <maxim.nesen@oracle.com>
@senivam
Copy link
Contributor Author

senivam commented Jan 8, 2020

yes, you are right, the target for plugin shall be adjusted in order to work from the lower lever directory. However in order to work, the api's parent shall be adjusted as well. So, I've done required modifications to allow property initialization from any folder.

@markt-asf markt-asf changed the base branch from master to main October 15, 2025 13:03
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