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

upload-single skip option removed 1.0 -> 2.0.0 #29

Closed
jessefarinacci opened this issue May 12, 2018 · 9 comments
Closed

upload-single skip option removed 1.0 -> 2.0.0 #29

jessefarinacci opened this issue May 12, 2018 · 9 comments
Milestone

Comments

@jessefarinacci
Copy link

Please bring back this option. It is valuable for specifying common configuration in higher level poms and then unskipping in a wide number of child poms. DRY. Please bring back the option, it is nice. :) Thanks.

@jessefarinacci
Copy link
Author

bash$ mvn help:describe -Dplugin=org.codehaus.mojo:wagon-maven-plugin:1.0 -Dgoal=upload-single -Ddetail

wagon:upload-single
  Description: Upload a single file with option to change name
  Implementation: org.codehaus.mojo.wagon.UploadSingleMojo
  Language: java

  Available parameters:

    fromFile
      Required: true
      User property: wagon.fromFile
      Path to a local file to be uploaded

    serverId (Default: serverId)
      User property: wagon.serverId
      settings.xml's server id for the URL. This is used when wagon needs extra
      authentication information.

    skip (Default: false)
      User property: wagon.skip
      When true, skip the execution.

    toFile
      User property: wagon.toFile
      Relative path to the URL. When blank, default to fromFile's file name.

    url
      Required: true
      User property: wagon.url
      URL to upload to or download from or list. Must exist and point to a
      directory.

versus

bash$ mvn help:describe -Dplugin=org.codehaus.mojo:wagon-maven-plugin:2.0.0 -Dgoal=upload-single -Ddetail

wagon:upload-single
  Description: Upload a single file with option to change name
  Implementation: org.codehaus.mojo.wagon.UploadSingleMojo
  Language: java

  Available parameters:

    fromFile
      Required: true
      User property: wagon.fromFile
      Path to a local file to be uploaded.

    serverId (Default: serverId)
      User property: wagon.serverId
      settings.xml's server id for the URL. This is used when wagon needs extra
      authentication information.

    toFile
      User property: wagon.toFile
      Relative path to the URL. When blank, default to fromFile's file name.

    url
      Required: true
      User property: wagon.url
      URL to upload to or download from or list. Must exist and point to a
      directory.

@afel
Copy link

afel commented Jul 13, 2018

Same for "upload" goal

@dantran
Copy link
Contributor

dantran commented Jul 19, 2018

fixed at 4b4f1d3

@dantran dantran closed this as completed Jul 19, 2018
@dantran dantran added this to the 2.0.1 milestone Jul 19, 2018
@jpraet
Copy link

jpraet commented May 4, 2020

Any ETA on release 2.0.1?

@jpraet
Copy link

jpraet commented Jan 13, 2021

The fix was reverted again just before the 2.0.1 release? 4d67a10

@dantran
Copy link
Contributor

dantran commented Jan 14, 2021

It was accidentally reverted due to javadoc annotation no longer support and failed 2.0.1 release build
will put it back in 2.0.2 soon

@dantran
Copy link
Contributor

dantran commented Jan 14, 2021

@jpraet please help to verify again 2.0.2 currently at staging repo https://oss.sonatype.org/content/groups/staging/

@jpraet
Copy link

jpraet commented Jan 14, 2021

@dantran yes, it works with the 2.0.2

@cdprete
Copy link

cdprete commented Apr 1, 2022

Hi.
I think the property is evaluated too early.

I've a (in version 2.0.2) a configuration like

<plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>wagon-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>deploy-rpm</id>
                                <phase>deploy</phase>
                                <goals>
                                    <goal>upload-single</goal>
                                </goals>
                                <configuration>
                                    <skip>${rpm.build.skip}</skip>
                                    <fromFile>${rpm.file-path}</fromFile>
                                    <serverId>${rpm.repository.id}</serverId>
                                    <url>${rpm.repository.url}/${rpm.file-name}/${rpm.file-version}</url>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

where rpm.build.skip is dynamically set in a Groovy script. I've other plugins reading the exact same property in other phases and they're all skipped correctly but the wagon-maven-plugin.

[2022-04-01T12:27:39.537Z] [ERROR] Failed to execute goal org.codehaus.mojo:wagon-maven-plugin:2.0.2:upload-single (deploy-rpm) on project parent: The parameters 'fromFile' for goal org.codehaus.mojo:wagon-maven-plugin:2.0.2:upload-single are missing or invalid -> [Help 1]

where such property (as well as the others) are unset since I want to skip the execution.

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

No branches or pull requests

5 participants