desruisseaux commented on code in PR #508:
URL: https://github.com/apache/maven-jar-plugin/pull/508#discussion_r3891816647
##########
src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java:
##########
@@ -207,167 +205,208 @@ protected final Log getLog() {
protected abstract String getType();
/**
- * Returns the JAR file to generate, based on an optional classifier.
+ * {@return the scope of dependencies}
+ * It should be {@link PathScope#MAIN_COMPILE} or {@link
PathScope#TEST_COMPILE}.
+ * Note that we use compile scope rather than runtime scope because
dependencies
+ * cannot appear in {@code requires} statement if they didn't had compile
scope.
+ */
+ protected abstract PathScope getDependencyScope();
Review Comment:
Since this method is `abstract`, the `AbstractMojo` class become impossible
to subclass outside its package if this method is not protected. We may argue
that this class is not intended to be subclassed outside its package and I
would tend to agree. But the previous version was sub-classeable.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]