Re: [PR] Add `defaultValue` for all boolean Mojo parameters defaulting to `false` [maven-shade-plugin]

2024-06-03 Thread via GitHub


rmannibucau commented on PR #219:
URL: 
https://github.com/apache/maven-shade-plugin/pull/219#issuecomment-217277

   Some plugings use it but it since it is not static we cant handle it 
automatically.
   
   I'd prefer to fix the doc and not pollute shade plugin with unexpected code 
if possible but just my 2cts.


-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Add `defaultValue` for all boolean Mojo parameters defaulting to `false` [maven-shade-plugin]

2024-06-02 Thread via GitHub


Marcono1234 commented on PR #219:
URL: 
https://github.com/apache/maven-shade-plugin/pull/219#issuecomment-2144018082

   > The inline init case is not supposed to work
   
   But does it work currently, and are plugins relying on this? Because if 
Maven Plugin Plugin is changed to pick a different default value in the future 
in those cases, or if it starts documenting a default value which is not 
actually the default value, then I doubt that those changes will be made.
   
   Either way, I think this is getting a bit off-topic. Would you mind merging 
the changes here?
   Even if Maven Plugin Plugin is changed, that will happen at some point in 
the future, and until then the Shade plugin documentation would still be 
incomplete.
   
   If you want the Maven Plugin Plugin to change, could you or someone else 
please drive those changes, because I am neither familiar enough with Maven nor 
Maven plugin development or the internals, and I personally also doubt that 
such a change would be worth it given the compatibility risks.


-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Add `defaultValue` for all boolean Mojo parameters defaulting to `false` [maven-shade-plugin]

2024-06-02 Thread via GitHub


rmannibucau commented on PR #219:
URL: 
https://github.com/apache/maven-shade-plugin/pull/219#issuecomment-2143720004

   The 2 simple options:
   
   * Enhance plugin.xml to set defaults for primitives
   * Enhance doc generation to handle primitives
   
   (I prefer 1 since it will work for all consumers but 2 works for "us")
   
   The inline init case is not supposed to work and it is also hard since init 
can be conditional (env for ex) so let's ignore coded init and just stick to 
implicit defaults.


-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Add `defaultValue` for all boolean Mojo parameters defaulting to `false` [maven-shade-plugin]

2024-06-01 Thread via GitHub


Marcono1234 commented on PR #219:
URL: 
https://github.com/apache/maven-shade-plugin/pull/219#issuecomment-2143611680

   > doc should be aware of it somehow, either ensuring we inject the default 
for primitives in plugin.xml or let the doc handle it IMHO
   
   But how do you propose this should be done without being error-prone? Or do 
you propose to not only improve how the documentation is generated, but also 
how Maven determines the `@Parameter` default parameter?
   
   Another case which comes to my mind is:
   ```java
   @Parameter
   boolean param = true;
   ```
   
   Will the documentation plugin be aware that the default value is `true`? It 
would either need to parse the source code or analyze the byte code.
   
   Having the documentation plugin just document `false` for all `@Parameter 
boolean` without `defaultValue = "..."` would be incorrect it seems.
   
   
   
   So yes, maybe this issue could be solved generally for all plugins by doing 
a change in Maven Plugin Plugin (?). But to me it seems the solution is not 
simple (if possible at all).
   
   So would you mind accepting this pull request here the way it is for now?


-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Add `defaultValue` for all boolean Mojo parameters defaulting to `false` [maven-shade-plugin]

2024-06-01 Thread via GitHub


rmannibucau commented on PR #219:
URL: 
https://github.com/apache/maven-shade-plugin/pull/219#issuecomment-2143562745

   @Marcono1234 it is possible but will not be in the documentation (requires 
textual description) but guess the good practise stays to write the less so if 
default is automatic doc should be aware of it somehow, either ensuring we 
inject the default for primitives in plugin.xml or let the doc handle it IMHO.


-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Add `defaultValue` for all boolean Mojo parameters defaulting to `false` [maven-shade-plugin]

2024-06-01 Thread via GitHub


Marcono1234 commented on PR #219:
URL: 
https://github.com/apache/maven-shade-plugin/pull/219#issuecomment-2143562110

   That might indeed be a better solution. Can there be cases though were a 
parameter has a different default value, which is not set with 
`@Parameter(defaultValue = "...")`?
   
   For example, if the constructor of a Mojo assigns a value to a field. Does 
that act as default value then?


-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Add `defaultValue` for all boolean Mojo parameters defaulting to `false` [maven-shade-plugin]

2024-05-31 Thread via GitHub


rmannibucau commented on PR #219:
URL: 
https://github.com/apache/maven-shade-plugin/pull/219#issuecomment-2142942628

   Open question: fix pluginxml generation instead of fixing all mojo since it 
is valid to use the default value for primitives?


-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Add `defaultValue` for all boolean Mojo parameters defaulting to `false` [maven-shade-plugin]

2024-04-14 Thread via GitHub


Marcono1234 commented on code in PR #219:
URL: 
https://github.com/apache/maven-shade-plugin/pull/219#discussion_r1564938087


##
src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java:
##
@@ -197,7 +197,7 @@ public class ShadeMojo extends AbstractMojo {
  * 
  * If you like to change the name of the native artifact, you may use the 
build>finalName> setting. If this
  * is set to something different than build>finalName>, no file 
replacement will be performed, even if
- * shadedArtifactAttached is being used.
+ * {@link #shadedArtifactAttached} is false.

Review Comment:
   Ok, I have reverted that change.



-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Add `defaultValue` for all boolean Mojo parameters defaulting to `false` [maven-shade-plugin]

2024-04-13 Thread via GitHub


hboutemy commented on code in PR #219:
URL: 
https://github.com/apache/maven-shade-plugin/pull/219#discussion_r1564118467


##
src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java:
##
@@ -197,7 +197,7 @@ public class ShadeMojo extends AbstractMojo {
  * 
  * If you like to change the name of the native artifact, you may use the 
build>finalName> setting. If this
  * is set to something different than build>finalName>, no file 
replacement will be performed, even if
- * shadedArtifactAttached is being used.
+ * {@link #shadedArtifactAttached} is false.

Review Comment:
   this part of the PR should IMHO just be dropped



-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Add `defaultValue` for all boolean Mojo parameters defaulting to `false` [maven-shade-plugin]

2024-04-13 Thread via GitHub


hboutemy commented on code in PR #219:
URL: 
https://github.com/apache/maven-shade-plugin/pull/219#discussion_r1564113505


##
src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java:
##
@@ -197,7 +197,7 @@ public class ShadeMojo extends AbstractMojo {
  * 
  * If you like to change the name of the native artifact, you may use the 
build>finalName> setting. If this
  * is set to something different than build>finalName>, no file 
replacement will be performed, even if
- * shadedArtifactAttached is being used.
+ * {@link #shadedArtifactAttached} is false.

Review Comment:
   to me, "shadedArtifactAttached is being used" means setting it to `true`



-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Add `defaultValue` for all boolean Mojo parameters defaulting to `false` [maven-shade-plugin]

2024-04-13 Thread via GitHub


hboutemy commented on code in PR #219:
URL: 
https://github.com/apache/maven-shade-plugin/pull/219#discussion_r1564113505


##
src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java:
##
@@ -197,7 +197,7 @@ public class ShadeMojo extends AbstractMojo {
  * 
  * If you like to change the name of the native artifact, you may use the 
build>finalName> setting. If this
  * is set to something different than build>finalName>, no file 
replacement will be performed, even if
- * shadedArtifactAttached is being used.
+ * {@link #shadedArtifactAttached} is false.

Review Comment:
   to me, "shadedArtifactAttached is being used" means setting is t to `true`



-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org