maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scholte (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MDEPLOY-131) use default repository when no url specified
Date Tue, 21 Mar 2017 20:22:41 GMT

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

Robert Scholte commented on MDEPLOY-131:
----------------------------------------

{{deploy-file}} is designed for uploading artifacts of which you only got the files. By uploading
these files you can make them available as dependencies. These jars come from a third party
and you want to deploy them to your repository, so providing a URL makes sense.
If you have the sources and these are packaged to an artifact, then there's a clear build
lifecycle. In this case you should make use of the {{deploy}} goal.

Your situation matches the latter, so there should be +no+ need to use {{deploy-file}}.

Abusing {{deploy-file}} is code-smell to me. Allowing such hacks tend to lead to the old ant-buildmaster,
where only one or a few understand what's happening by the build tool. Maven says: a pom/GAV
can only have main artifact. If you have multiple main artifacts, you should have more pom.xml
files. That's something everybody will understand.
If one pom.xml generates multiple main artifacts with different GA's a lot of people will
be confused.

I'm willing to think of a solution, but not by letting the {{deploy-file}} goal use the default
repository.

So no matter the number of lines, the patch or the number people who are interested, the code-smell
is really bad so there must be a better solution.

> use default repository when no url specified
> --------------------------------------------
>
>                 Key: MDEPLOY-131
>                 URL: https://issues.apache.org/jira/browse/MDEPLOY-131
>             Project: Maven Deploy Plugin
>          Issue Type: Improvement
>          Components: deploy:deploy-file
>            Reporter: raymond domingo
>              Labels: contributers-welcome
>         Attachments: DeployFileMojo.java, maven-deploy-useProjectRepo-20170319.patch,
patch_deploy_file_mojo.diff
>
>
> When using the deploy goal there is no need to specify the url of the repository.
> When using deploy-file you DO need to specify the url. This is a problem, because during
development I like to deploy to snapshot repository and when releasing i deploy to release
repository and I can't add this logic to the pom.
> Thas is why I like the url paramter to become optional (backwards compatible) and add
default behaviour when it is null. It should just like the deploy plugin use the default repository.
Snapshot for snapshots and release for none snapshot versions.
> I added a patch file fixing this.
> I also added complete source of patched Mojo



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message