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

[MNG-7157] [MNG-6843] Provide a better design for obtaining artifacts… #475

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

gnodet
Copy link
Contributor

@gnodet gnodet commented Jun 1, 2021

… from a MavenProject inside a mojo

Follow-up on #413 ...

…ies in MavenProject

This make the code shorter and easier to understand and also removes the risk of hitting the 2000 lines barrier for a single file
…enProject inside a mojo

# Conflicts:
#	maven-core/src/main/java/org/apache/maven/project/MavenProject.java
@famod
Copy link
Contributor

famod commented Jun 4, 2021

Is this really a follow-up? Instead, to me it seems like an alternative, more comprehensive solution than #413?

@@ -347,84 351,62 @@ public void addTestCompileSourceRoot( String path )
return testCompileSourceRoots;
}

@Deprecated
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be nice to document what to use instead (and why) via JavaDoc @deprecated ....

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm willing to provide more doc once there's a consensus.
Honestly, I'm not even sure we need such an API, unless there's a clear path for the deprecation and for moving to a more immutable MavenProject. What are the deprecation rules ? Will 4.0 remove things deprecated in 3.x ? If they stay forever, there's really no point in deprecating and trying to find slightly better APIs... I'm just asking here, but 3.0 is very old I think there are quite a few things that are deprecated since early 3.x versions, which looks like 10 years or so.

@gnodet
Copy link
Contributor Author

gnodet commented Jun 6, 2021

Is this really a follow-up? Instead, to me it seems like an alternative, more comprehensive solution than #413?

Yes, the wording is wrong. I originally went to only extend and provide an alternative api, but then refactored your original proposal a bit, so it's now more an extended alternative....

@@ -244,6 246,10 @@ else if ( "mojoExecution".equals( expression ) )
{
value = mojoExecution;
}
else if ( "artifactFilter".equals( expression ) )
Copy link
Contributor

Choose a reason for hiding this comment

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

We should investigate if we can solve this with MPLUGIN-302 instead of exposing this a new expression.

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.

3 participants