[ 
https://jira.codehaus.org/browse/MDEPLOY-150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=360533#comment-360533
 ] 

Robert Scholte commented on MDEPLOY-150:
----------------------------------------

I'm thinking of closing this issue as {{won't fix}}. The {{deploy-file}} goal 
is intended to upload third party artifacts (in which case the {{url}} is of 
course different). In this case you seem to own the project, so why not use 
{{deploy}}?

> deploy-file does not use repository <url>  in the same way as deploy
> --------------------------------------------------------------------
>
>                 Key: MDEPLOY-150
>                 URL: https://jira.codehaus.org/browse/MDEPLOY-150
>             Project: Maven Deploy Plugin
>          Issue Type: Bug
>          Components: deploy:deploy-file
>    Affects Versions: 2.7
>         Environment: Windows 7, Maven 2.2.1
>            Reporter: Kai Hofmann
>            Assignee: Robert Scholte
>            Priority: Critical
>
> We use an own lifecycle here which creates a zip file instead of a jar file.
> So we use 
> {noformat}org.apache.maven.plugins:maven-install-plugin:install,org.apache.maven.plugins:maven-install-plugin:install-file{noformat}
>  which installs the zip file correctly.
> Additionally I now wanted to also allow deploying of this zip file to nexus 
> by:
> {noformat}org.apache.maven.plugins:maven-deploy-plugin:deploy,org.apache.maven.plugins:maven-deploy-plugin:deploy-file{noformat}
> in the pom I have then:
> {code:xml}
>       <properties>
>               
> <file>${project.build.directory}/${project.artifactId}-${project.version}.zip</file>
>         </properties>
>       <build>
>               <pluginManagement>
>                       <plugins>
>                               <plugin>
>                                       
> <groupId>org.apache.maven.plugins</groupId>
>                                       
> <artifactId>maven-install-plugin</artifactId>
>           <version>2.3.1</version>
>                                       <executions>
>                                               <execution>
>                                                       
> <id>install-service-zip</id>
>                                                       <goals>
>                                                               
> <goal>install-file</goal>
>                                                       </goals>
>                                               </execution>
>                                       </executions>
>                               </plugin>
>         
>         <plugin>
>                                       
> <groupId>org.apache.maven.plugins</groupId>
>                                       
> <artifactId>maven-deploy-plugin</artifactId>
>           <version>2.7</version>
>                                       <executions>
>                                               <execution>
>                                                       
> <id>deploy-service-zip</id>
>                                                       <goals>
>                                                               
> <goal>deploy-file</goal>
>                                                       </goals>
>                                               </execution>
>                                       </executions>
>                               </plugin>
>                       </plugins>
>               </pluginManagement>
> {code}
> as well as settings for the repositories within the maven {{settings.xml}}.
> As said the install process works perfectly, but I have trouble with the 
> {{deploy-file}}.
> When working without the {{deploy-file}} (only with the {{deploy}}) 
> everything also works correct for the deployment.
> After adding the {{deploy-file}} as shown above I come into trouble, because 
> beside the <file> property the deploy-plugin requests for the required <url> 
> parameter.
> I wonder about this, because I assumed that the <url> parameter will come 
> from the choosen repository (release vs snapshot) settings?
> When I set the <url> as property beside the <file> property, then I can 
> deploy a snapshot.
> But to deploying snapshot/release this will not work.
> In {{deploy}} the url parameter is implicitly correctly choosen, why not in 
> {{deploy-file}}? this would make the url parameter optional.
> So I see this as a bug/feature, because when deploy works in this way, then 
> {{deploy-file}} should work analogous. Or have I missed something here?



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to