How can I deploy artifacts from a Maven build to the SourceForge File Release System?

后端 未结 9 1373
耶瑟儿~
耶瑟儿~ 2020-12-31 11:28

I am using SourceForge for some Open Source projects and I want to automate the deployment of releases to the SourceForge File Release System. I use Maven for my builds and

9条回答
  •  醉话见心
    2020-12-31 11:40

    I'm not able to test this to confirm, but I believe it is possible without writing any plugins.

    You can deploy to SourceForge using SCP, and the maven-deploy-plugin can be configured to use SCP so it should work. You can also deploy your site to SourceForge via SCP.

    You would configure the SourceForge server in your settings.xml to use a "combined" username with a comma separator. With these credentials:

    SourceForge username: foo
    SourceForge user password: secret
    SourceForge project name: bar
    Path: /home/frs/project/P/PR/PROJECT_UNIX_NAME/ 
        - Substitute your project UNIX name data for /P/PR/PROJECT_UNIX_NAME 
    

    The server element would look like this:

    
      sourceforge
      foo,bar
      secret
    
    

    And the distributionManagement section in your POM would look like this:

    
    
      
        ssh-repository
        
    scpexe://frs.sourceforge.net:/home/frs/project/P/PR/PROJECT_UNIX_NAME
      
    
    

    Finally declare that ssh-external is to be used:

    
      
        
          org.apache.maven.wagon
           wagon-ssh-external
           1.0-alpha-5
        
      
    
    

    If this doesn't work, you may be able to use the recommended approach in the site reference above, i.e. create a shell on shell.sourceforge.net with your username and project group:

    ssh -t ,@shell.sf.net create
    

    Then use shell.sourceforge.net (instead of web.sourceforge.net) in your site URL in the diestributionManagement section:

    scp://shell.sourceforge.net/home/frs/project/P/PR/PROJECT_UNIX_NAME/
    

提交回复
热议问题