-
Notifications
You must be signed in to change notification settings - Fork 81
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
[SHRINKWRAP-261] Maven shortcut API #6
Conversation
Andrew, there is a reason for this, from https://issues.jboss.org/browse/SHRINKWRAP-261:
Should we move |
Samuel, why you recopied all the MavenBuilderImpl internals into MavenResolver? Any tough points to use it directly? I don't like the idea of having similar functionality twice in the code. Andrew, indirection requires rewriting of DependencyBuilderInstantiator. It would make sense to have it done similarly to LoadableExtension which is in Arquillian. I think this might be done during API cleanup, where we should actually think of hiding all of impl classes, which might confuse user. I have no problem to accept in impl-maven and refactor later. |
Karel, honestly I don't remember the reason anymore. I will have a closer look at this by the weekend. |
Hi Karel and Andrew, I'm pretty confident that this is very close to the best we can do with the current API. Only a very compact class (Maven class) is exposed to the user under the Maven API. The new Shortcut API can be used like this:
|
Collection<ARCHIVEVIEW> archiveViews = new MavenBuilderImpl(system, session, settings, dependencies, versionManagement) | ||
.resolveAs(archiveView); | ||
|
||
return (archiveViews == null || archiveViews.isEmpty()) ? null : archiveViews.iterator().next(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This condition is not enough, you should verify there was exactly one jar
All changes done, please validate. |
Merged and pushed upstream as c2367b5. Thanks! |
Shorthand for including maven artifacts
https://issues.jboss.org/browse/SHRINKWRAP-261