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

后端 未结 9 1309
耶瑟儿~
耶瑟儿~ 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:29

    After trying this a number of times, I finally got it to work -- with sftp not scp. This should work from a unix box (or Mac) -- I'm not sure about sftp clients for Windoze. I am using mvn version 2.2.0 and I don't think I have any special plugins installed. This deploys the various mvn packages to the Files section of my project page.

    You'll need to change the following in your settings to get it to work:

    • user -- replace with your sourceforce username
    • secret -- replace with your password
    • ormlite -- replace with your project name
    • /o/or/ -- replace with the first char and first 2 chars of your project name

    In my $HOME/.m2/settings.xml file I have the following for the SF server:

    
      sourceforge
      secret
      775
      775
    
    

    I don't specify the username in the settings.xml file because it needs to be username,project and I want to deploy multiple packages to SF. Then, in my pom.xml file for the ormlite package I have the following:

    
     
      sourceforge
      SourceForge
      sftp://user,ormlite@frs.sourceforge.net:/home/frs/project/o/or/ormlite/releases
      
     
     
      sourceforge
      SourceForge
      sftp://user,ormlite@frs.sourceforge.net:/home/frs/project/o/or/ormlite/snapshots
      
     
    
    

    Obviously the /releases and /snapshots directory suffixes can be changed depending on your file hierarchy.

提交回复
热议问题