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

Dave Roberge commented on MDEPLOY-131:
--------------------------------------

Hey, I'm attempting to implement this, and am hoping to get some feedback. I 
ran into an issue when writing a test in DeployFileMojoTest. I created a 
plugin-config.xml file similar to the others for deploy-file goal, it looks 
like:

{code}
<project>
  <distributionManagement>
    <repository>
      <uniqueVersion>false</uniqueVersion>
      <id>deploy-test</id>
      <name>Test Repository</name>
      <url>file://${basedir}/target/remote-repo/deploy-file-dist-mgmt</url>
      <layout>default</layout>
    </repository>
  </distributionManagement>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-deploy-plugin</artifactId>
        <configuration>
          ...
          
<pomFile>${basedir}/src/test/resources/unit/deploy-file-dist-mgmt/plugin-config.xml</pomFile>
          ...
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
{code}

The problem is that basedir variable in distribution management section is not 
interpolated when being read in so it installs the artifact at the root of the 
filesystem. Does anyone have ideas on how fix that, or should I look for 
alternative approaches?
                
> use default repository when no url specified
> --------------------------------------------
>
>                 Key: MDEPLOY-131
>                 URL: https://jira.codehaus.org/browse/MDEPLOY-131
>             Project: Maven 2.x and 3.x Deploy Plugin
>          Issue Type: Improvement
>          Components: deploy:deploy-file
>            Reporter: raymond domingo
>              Labels: contributers-welcome
>         Attachments: DeployFileMojo.java, 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to