[ 
https://issues.apache.org/jira/browse/MSOURCES-148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17845896#comment-17845896
 ] 

Benjamin Muschko edited comment on MSOURCES-148 at 5/13/24 12:10 PM:
---------------------------------------------------------------------

I can work on an example project and post it here. I am talking about this 
flag. Sorry, I misspelled the flag in my initial posting.
{quote} -U,--update-snapshots                  Forces a check for missing
                                        releases and updated snapshots on
                                        remote repositories
{quote}
 

You can access Maven runtime configuration via the following code for example:

{{@Parameter(defaultValue = "${session}", readonly = true)}}
{{private MavenSession session;}}

{{public void execute() {}}
{{    if (session.getRequest().isNoSnapshotUpdates()) {}}
{{        ...}}
         }

}


was (Author: bmuschko):
I can work on an example project and post it here. I am talking about this 
flag. Sorry, I misspelled the flag in my initial posting.

{{ {-}U,{-}-update-snapshots                  Forces a check for missing}}
{{                                        releases and updated snapshots on}}
{{                                        remote repositories}}

 

You can access Maven runtime configuration via the following code for example:

{{@Parameter(defaultValue = "${session}", readonly = true)}}
{{private MavenSession session;}}

{{public void execute() {}}
{{    if (session.getRequest().isNoSnapshotUpdates()) {}}
{{        ...}}
         }

}

> The plugin should respect the --update-snapshots for final versions
> -------------------------------------------------------------------
>
>                 Key: MSOURCES-148
>                 URL: https://issues.apache.org/jira/browse/MSOURCES-148
>             Project: Maven Source Plugin
>          Issue Type: New Feature
>            Reporter: Benjamin Muschko
>            Priority: Major
>
> Executing the build with the flag {{--update-snapshots}} should only update 
> SNAPSHOT dependencies. The plugin doesn't seem to evaluate this flag. Running 
> the build with the flag will update SNAPSHOT _and_ final dependencies leading 
> to a much longer build time.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to