如何将Maven构建中的工件部署到SourceForge文件发布系统?

时间:2022-07-11 23:56:37

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 the standard SFTP deployment mechanism doesn't seem to work unless you do some manual preparation work. I have come across some old postings on other forums suggesting that the only approach is to write a Wagon specifically for SourceForge.

我正在为一些开放源码项目使用SourceForge,并且我想将发布的部署自动化到SourceForge文件发布系统。我在构建中使用Maven,标准的SFTP部署机制似乎不能工作,除非您做一些手工准备工作。我在其他论坛上看到过一些旧的帖子,认为唯一的方法是专门为SourceForge编写一个包。

Has anybody had any recent experience with this?

有人最近有过这样的经历吗?

9 个解决方案

#1


9  

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.

您可以使用SCP部署到SourceForge,可以将maven- deployment -plugin配置为使用SCP,以便它能够工作。您还可以通过SCP将站点部署到SourceForge上。

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

您将在设置中配置SourceForge服务器。使用“组合”用户名和逗号分隔符的xml。这些凭证:

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:

服务器元素如下所示:

<server>
  <id>sourceforge</id>
  <username>foo,bar</username>
  <password>secret</password>
</server>

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

POM中的分布管理部分是这样的:

<!-- Enabling the use of FTP -->
<distributionManagement>
  <repository>
    <id>ssh-repository</id>
    <url>
scpexe://frs.sourceforge.net:/home/frs/project/P/PR/PROJECT_UNIX_NAME</url>
  </repository>
</distributionManagement>

Finally declare that ssh-external is to be used:

最后声明使用ssh-external:

<build>
  <extensions>
    <extension>
      <groupId>org.apache.maven.wagon</groupId>
       <artifactId>wagon-ssh-external</artifactId>
       <version>1.0-alpha-5</version>
    </extension>
  </extensions>
</build>

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:

如果这不起作用,您可以在上面的站点引用中使用推荐的方法,例如,使用您的用户名和项目组在shell.sourceforge.net上创建一个shell。

ssh -t <username>,<project name>@shell.sf.net create

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

然后在diestributionManagement部分的站点URL中使用shell.sourceforge.net(而不是web.sourceforge.net):

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

#2


3  

I have uploaded an example to sourceforge.net at: http://sf-mvn-plugins.sourceforge.net/example-1jar-thinlet/

我已经上传了一个例子到sourceforge.net: http://sf-mvn-plugins.sourceforge.net/example-1jar-thinlet/

You can check out it via svn - so you can see how to use plugins for upload and download of and to sourceforge.net file system area and web site.

您可以通过svn查看它——这样您就可以看到如何使用插件来上传和下载sourceforge.net文件系统区域和web站点。

The main points to upload are to use sftp:

上传的要点是使用sftp:

Add this similar code to your pom.xml

将类似的代码添加到您的pom.xml中

<distributionManagement>
                <!-- use the following if you're not using a snapshot version. -->
                <repository>
                    <id>sourceforge-sf-mvn-plugins</id>
                    <name>FRS Area</name>
                    <uniqueVersion>false</uniqueVersion>
                    <url>sftp://web.sourceforge.net/home/frs/project/s/sf/sf-mvn-plugins/m2-repo</url>
                </repository>
                <site>
                    <id>sourceforge-sf-mvn-plugins</id>
                    <name>Web Area</name>
                    <url>
                        sftp://web.sourceforge.net/home/groups/s/sf/sf-mvn-plugins/htdocs/${artifactId}
                    </url>
                </site>
</distributionManagement>

Add similar code to settings.xml

向settings.xml添加类似的代码

   <server>
      <id>sourceforge-sf-mvn-plugins-svn</id>
      <username>tmichel,sf-mvn-plugins</username>
      <password>secret</password>
    </server>

    <server>
      <id>sourceforge-sf-mvn-plugins</id>
      <username>user,project</username>
      <password>secret</password>
    </server>

The main point for download is to use the wagon-http-sourceforge maven plugin - please see at: sf-mvn-plugins.sourceforge.net/wagon-http-sourceforge/FAQ.html

下载的主要目的是使用wagon-http-sourceforge maven插件——请参见:sf-mvn-plugin .sourceforge.net/wagon-http- sourceforge/faq.html。

Please add the following code to your pom.xml

请在您的pom.xml中添加以下代码

    <repositories>
        <repository>
            <id>sourceforge-svn</id>
            <name>SF Maven Plugin SVN Repository</name>
            <url>http://sf-mvn-plugins.svn.sourceforge.net/svnroot/sf-mvn-plugins/_m2-repo/trunk</url>
        </repository>
    </repositories>


    <pluginRepositories>
        <pluginRepository>
            <id>sourceforge-frs</id>
            <name>SF Maven Plugin Repository</name>
            <url>http://sourceforge.net/projects/sf-mvn-plugins/files/m2-repo</url>
        </pluginRepository>
    </pluginRepositories>

    <build>
    <extensions>
        <extension>
            <groupId>net.sf.maven.plugins</groupId>
            <artifactId>wagon-http-sourceforge</artifactId>
            <version>0.4</version>
        </extension>
    </extensions>
   :
   </build>

#3


2  

It looks like I am going to have to write this myself.

看来我得自己写了。

https://sourceforge.net/projects/wagon-sf/

https://sourceforge.net/projects/wagon-sf/

#4


1  

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.

在尝试了多次之后,我终于让它起作用了——使用sftp而不是scp。这应该是unix(或Mac)的工作——我不确定Windoze的sftp客户端是什么。我使用的是mvn版本2.2.0,我认为我没有安装任何特殊的插件。这将把各种mvn包部署到我的项目页面的Files部分。

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

您需要在您的设置中更改以下内容以使其工作:

  • user -- replace with your sourceforce username
  • user——用你的sourceforce用户名替换
  • secret -- replace with your password
  • 秘密——用你的密码替换。
  • ormlite -- replace with your project name
  • ormlite——用您的项目名替换
  • /o/or/ -- replace with the first char and first 2 chars of your project name
  • /o/或/——替换为项目名称的第一个字符和前两个字符

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

在我的$ HOME / .m2 /设置。SF服务器的xml文件如下:

<server>
  <id>sourceforge</id>
  <password>secret</password>
  <filePermissions>775</filePermissions>
  <directoryPermissions>775</directoryPermissions>
</server>

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:

我没有在设置中指定用户名。xml文件,因为它需要用户名、项目和我想将多个包部署到SF。然后,砰的一声。ormlite包的xml文件如下:

<distributionManagement>
 <repository>
  <id>sourceforge</id>
  <name>SourceForge</name>
  <url>sftp://user,ormlite@frs.sourceforge.net:/home/frs/project/o/or/ormlite/releases
  </url>
 </repository>
 <snapshotRepository>
  <id>sourceforge</id>
  <name>SourceForge</name>
  <url>sftp://user,ormlite@frs.sourceforge.net:/home/frs/project/o/or/ormlite/snapshots
  </url>
 </snapshotRepository>
</distributionManagement>

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

显然,可以根据文件层次结构修改/发布和/快照目录后缀。

#5


1  

Where timp = user and webmacro = project

timp = user和webmacro = project在哪里

scp url does not work:

scp url不工作:

scp://timp,webmacro@shell.sourceforge.net:/home/groups/w/we/webmacro/htdocs/maven2/

sftp url works:

sftp url工作原理:

 sftp://timp,webmacro@web.sourceforge.net:/home/groups/w/we/webmacro/htdocs/maven2

or for project release artifacts:

或者用于项目发布构件:

sftp://timp,webmacro@web.sourceforge.net:/home/frs/project/w/we/webmacro/releases

scp will work to shell.sourceforge.net, but you have to create the shell before use with

scp将用于shell.sourceforge.net,但是在使用之前必须先创建shell

ssh -t timp,webmacro@shell.sourceforge.net create

#6


1  

This really did not turn out to be that hard. First up I had the mvn site:deploy working following the instructions at this sourceforge site. Basically you start the sourceforge shell with

这真的没有那么难。首先,我有了mvn站点:根据sourceforge站点的说明部署。基本上你用sourceforge shell启动

ssh -t user,project@shell.sourceforge.net create

That will create the shell at their end with a folder mounted to your project on a path such as (depending on your projects name):

这将在其末尾创建shell,并在路径上为项目安装一个文件夹,例如(取决于项目名称):

/home/groups/c/ch/chex4j/

In that shell I on the sourceforge server I created a folder for my repo under the project apache folder "htdocs" with

在sourceforge服务器上的shell中,我在项目apache文件夹“htdocs”下为我的repo创建了一个文件夹

mkdir /home/groups/c/ch/chex4j/htdocs/maven2

In my settings.xml I set the username and password to that shell server so that maven can login:

在我的设置。我将用户名和密码设置为shell服务器,以便maven可以登录:

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd/"> 
  <servers>
        <server>
            <id>chex4j.sf.net</id>
            <username>me,myproject</username>
            <password>password</password>
            <filePermissions>775</filePermissions>
            <directoryPermissions>775</directoryPermissions>
        </server>
    </servers>
</settings>

In the pom.xml you just need your distibutionManagement section setup to name the server by ID that you set the password for in your settings file:

砰的一声。您只需要设置distibutionManagement一节,就可以通过在设置文件中设置密码的ID为服务器命名:

<distributionManagement>
    <site>
        <id>chex4j.sf.net</id>
        <url>scp://shell.sourceforge.net/home/groups/c/ch/chex4j/htdocs/
        </url>
    </site>
    <repository>
        <id>chex4j.sf.net</id>
        <name>SourceForge shell repo</name>
        <url>scp://shell.sourceforge.net/home/groups/c/ch/chex4j/htdocs/maven2</url>
    </repository>
</distributionManagement>

There the repository entry is the one for the mvn deploy command and the site entry is for the mvn site:deploy command. Then all I have to do is start the shell connection to bring up the server side then on my local side just run:

在那里,存储库条目是mvn部署命令的条目,而站点条目是针对mvn站点:deploy命令的。然后我要做的就是启动shell连接,打开服务器端,然后在本地端运行:

mvn deploy

which uploads the jar, pom and sources and the like onto my sourceforge projects website. If you try to hit the /maven2 folder on your project website sourceforge kindly tell you that directory listing is off by default and how to fix it. To do this on the server shell you create a .htaccess file in your htdocs/maven2 folder containing the following apache options

它将jar、pom和源代码等内容上传到我的sourceforge项目网站上。如果您试图点击项目网站sourceforge上的/maven2文件夹,请告诉您默认目录列表是关闭的,以及如何修复它。要在服务器shell上执行此操作,您需要在htdocs/maven2文件夹中创建一个.htaccess文件,其中包含以下apache选项

Options +Indexes

Then bingo, you have a maven repo which looks like:

然后bingo,你有一个maven repo,看起来是:

http://chex4j.sourceforge.net/maven2/net/sf/chex4j/chex4j-core/1.0.0/

http://chex4j.sourceforge.net/maven2/net/sf/chex4j/chex4j-core/1.0.0/

Your sf.net shell it shuts down after a number of hours to not hog resources; so you run the "ssh -t ... create" when you want to deploy the site or your build artifacts.

您的sf.net shell在几个小时后关闭,以避免占用资源;运行“ssh -t…”创建“当您想部署站点或构建工件时”。

You can browse all my maven project code under sourceforge to see my working settings:

您可以在sourceforge下浏览我的所有maven项目代码,查看我的工作设置:

http://chex4j.svn.sourceforge.net/viewvc/chex4j/branches/1.0.x/chex4j-core/

http://chex4j.svn.sourceforge.net/viewvc/chex4j/branches/1.0.x/chex4j-core/

#7


1  

SCP URL does work. But do not use ":" after server name. MVN tries to read the following test as integer (port number).

SCP URL是否工作。但是不要使用“:”后的服务器名。MVN尝试以整数(端口号)读取以下测试。

You do not need to establish tunnels as simbo1905 did.

你不需要像辛波1905那样建立隧道。

#8


0  

The Maven SourceForge plug-in does not work with Maven 2. Also I believe this plug-in uses FTP which is no longer supported.

Maven SourceForge插件不能与Maven 2一起工作。而且我认为这个插件使用的是不支持的FTP。

#9


0  

I found that CruiseControl can upload releases to SFEE and also works with Maven and Maven2

我发现CruiseControl可以向SFEE上传发布,也可以与Maven和Maven2一起工作

#1


9  

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.

您可以使用SCP部署到SourceForge,可以将maven- deployment -plugin配置为使用SCP,以便它能够工作。您还可以通过SCP将站点部署到SourceForge上。

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

您将在设置中配置SourceForge服务器。使用“组合”用户名和逗号分隔符的xml。这些凭证:

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:

服务器元素如下所示:

<server>
  <id>sourceforge</id>
  <username>foo,bar</username>
  <password>secret</password>
</server>

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

POM中的分布管理部分是这样的:

<!-- Enabling the use of FTP -->
<distributionManagement>
  <repository>
    <id>ssh-repository</id>
    <url>
scpexe://frs.sourceforge.net:/home/frs/project/P/PR/PROJECT_UNIX_NAME</url>
  </repository>
</distributionManagement>

Finally declare that ssh-external is to be used:

最后声明使用ssh-external:

<build>
  <extensions>
    <extension>
      <groupId>org.apache.maven.wagon</groupId>
       <artifactId>wagon-ssh-external</artifactId>
       <version>1.0-alpha-5</version>
    </extension>
  </extensions>
</build>

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:

如果这不起作用,您可以在上面的站点引用中使用推荐的方法,例如,使用您的用户名和项目组在shell.sourceforge.net上创建一个shell。

ssh -t <username>,<project name>@shell.sf.net create

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

然后在diestributionManagement部分的站点URL中使用shell.sourceforge.net(而不是web.sourceforge.net):

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

#2


3  

I have uploaded an example to sourceforge.net at: http://sf-mvn-plugins.sourceforge.net/example-1jar-thinlet/

我已经上传了一个例子到sourceforge.net: http://sf-mvn-plugins.sourceforge.net/example-1jar-thinlet/

You can check out it via svn - so you can see how to use plugins for upload and download of and to sourceforge.net file system area and web site.

您可以通过svn查看它——这样您就可以看到如何使用插件来上传和下载sourceforge.net文件系统区域和web站点。

The main points to upload are to use sftp:

上传的要点是使用sftp:

Add this similar code to your pom.xml

将类似的代码添加到您的pom.xml中

<distributionManagement>
                <!-- use the following if you're not using a snapshot version. -->
                <repository>
                    <id>sourceforge-sf-mvn-plugins</id>
                    <name>FRS Area</name>
                    <uniqueVersion>false</uniqueVersion>
                    <url>sftp://web.sourceforge.net/home/frs/project/s/sf/sf-mvn-plugins/m2-repo</url>
                </repository>
                <site>
                    <id>sourceforge-sf-mvn-plugins</id>
                    <name>Web Area</name>
                    <url>
                        sftp://web.sourceforge.net/home/groups/s/sf/sf-mvn-plugins/htdocs/${artifactId}
                    </url>
                </site>
</distributionManagement>

Add similar code to settings.xml

向settings.xml添加类似的代码

   <server>
      <id>sourceforge-sf-mvn-plugins-svn</id>
      <username>tmichel,sf-mvn-plugins</username>
      <password>secret</password>
    </server>

    <server>
      <id>sourceforge-sf-mvn-plugins</id>
      <username>user,project</username>
      <password>secret</password>
    </server>

The main point for download is to use the wagon-http-sourceforge maven plugin - please see at: sf-mvn-plugins.sourceforge.net/wagon-http-sourceforge/FAQ.html

下载的主要目的是使用wagon-http-sourceforge maven插件——请参见:sf-mvn-plugin .sourceforge.net/wagon-http- sourceforge/faq.html。

Please add the following code to your pom.xml

请在您的pom.xml中添加以下代码

    <repositories>
        <repository>
            <id>sourceforge-svn</id>
            <name>SF Maven Plugin SVN Repository</name>
            <url>http://sf-mvn-plugins.svn.sourceforge.net/svnroot/sf-mvn-plugins/_m2-repo/trunk</url>
        </repository>
    </repositories>


    <pluginRepositories>
        <pluginRepository>
            <id>sourceforge-frs</id>
            <name>SF Maven Plugin Repository</name>
            <url>http://sourceforge.net/projects/sf-mvn-plugins/files/m2-repo</url>
        </pluginRepository>
    </pluginRepositories>

    <build>
    <extensions>
        <extension>
            <groupId>net.sf.maven.plugins</groupId>
            <artifactId>wagon-http-sourceforge</artifactId>
            <version>0.4</version>
        </extension>
    </extensions>
   :
   </build>

#3


2  

It looks like I am going to have to write this myself.

看来我得自己写了。

https://sourceforge.net/projects/wagon-sf/

https://sourceforge.net/projects/wagon-sf/

#4


1  

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.

在尝试了多次之后,我终于让它起作用了——使用sftp而不是scp。这应该是unix(或Mac)的工作——我不确定Windoze的sftp客户端是什么。我使用的是mvn版本2.2.0,我认为我没有安装任何特殊的插件。这将把各种mvn包部署到我的项目页面的Files部分。

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

您需要在您的设置中更改以下内容以使其工作:

  • user -- replace with your sourceforce username
  • user——用你的sourceforce用户名替换
  • secret -- replace with your password
  • 秘密——用你的密码替换。
  • ormlite -- replace with your project name
  • ormlite——用您的项目名替换
  • /o/or/ -- replace with the first char and first 2 chars of your project name
  • /o/或/——替换为项目名称的第一个字符和前两个字符

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

在我的$ HOME / .m2 /设置。SF服务器的xml文件如下:

<server>
  <id>sourceforge</id>
  <password>secret</password>
  <filePermissions>775</filePermissions>
  <directoryPermissions>775</directoryPermissions>
</server>

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:

我没有在设置中指定用户名。xml文件,因为它需要用户名、项目和我想将多个包部署到SF。然后,砰的一声。ormlite包的xml文件如下:

<distributionManagement>
 <repository>
  <id>sourceforge</id>
  <name>SourceForge</name>
  <url>sftp://user,ormlite@frs.sourceforge.net:/home/frs/project/o/or/ormlite/releases
  </url>
 </repository>
 <snapshotRepository>
  <id>sourceforge</id>
  <name>SourceForge</name>
  <url>sftp://user,ormlite@frs.sourceforge.net:/home/frs/project/o/or/ormlite/snapshots
  </url>
 </snapshotRepository>
</distributionManagement>

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

显然,可以根据文件层次结构修改/发布和/快照目录后缀。

#5


1  

Where timp = user and webmacro = project

timp = user和webmacro = project在哪里

scp url does not work:

scp url不工作:

scp://timp,webmacro@shell.sourceforge.net:/home/groups/w/we/webmacro/htdocs/maven2/

sftp url works:

sftp url工作原理:

 sftp://timp,webmacro@web.sourceforge.net:/home/groups/w/we/webmacro/htdocs/maven2

or for project release artifacts:

或者用于项目发布构件:

sftp://timp,webmacro@web.sourceforge.net:/home/frs/project/w/we/webmacro/releases

scp will work to shell.sourceforge.net, but you have to create the shell before use with

scp将用于shell.sourceforge.net,但是在使用之前必须先创建shell

ssh -t timp,webmacro@shell.sourceforge.net create

#6


1  

This really did not turn out to be that hard. First up I had the mvn site:deploy working following the instructions at this sourceforge site. Basically you start the sourceforge shell with

这真的没有那么难。首先,我有了mvn站点:根据sourceforge站点的说明部署。基本上你用sourceforge shell启动

ssh -t user,project@shell.sourceforge.net create

That will create the shell at their end with a folder mounted to your project on a path such as (depending on your projects name):

这将在其末尾创建shell,并在路径上为项目安装一个文件夹,例如(取决于项目名称):

/home/groups/c/ch/chex4j/

In that shell I on the sourceforge server I created a folder for my repo under the project apache folder "htdocs" with

在sourceforge服务器上的shell中,我在项目apache文件夹“htdocs”下为我的repo创建了一个文件夹

mkdir /home/groups/c/ch/chex4j/htdocs/maven2

In my settings.xml I set the username and password to that shell server so that maven can login:

在我的设置。我将用户名和密码设置为shell服务器,以便maven可以登录:

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd/"> 
  <servers>
        <server>
            <id>chex4j.sf.net</id>
            <username>me,myproject</username>
            <password>password</password>
            <filePermissions>775</filePermissions>
            <directoryPermissions>775</directoryPermissions>
        </server>
    </servers>
</settings>

In the pom.xml you just need your distibutionManagement section setup to name the server by ID that you set the password for in your settings file:

砰的一声。您只需要设置distibutionManagement一节,就可以通过在设置文件中设置密码的ID为服务器命名:

<distributionManagement>
    <site>
        <id>chex4j.sf.net</id>
        <url>scp://shell.sourceforge.net/home/groups/c/ch/chex4j/htdocs/
        </url>
    </site>
    <repository>
        <id>chex4j.sf.net</id>
        <name>SourceForge shell repo</name>
        <url>scp://shell.sourceforge.net/home/groups/c/ch/chex4j/htdocs/maven2</url>
    </repository>
</distributionManagement>

There the repository entry is the one for the mvn deploy command and the site entry is for the mvn site:deploy command. Then all I have to do is start the shell connection to bring up the server side then on my local side just run:

在那里,存储库条目是mvn部署命令的条目,而站点条目是针对mvn站点:deploy命令的。然后我要做的就是启动shell连接,打开服务器端,然后在本地端运行:

mvn deploy

which uploads the jar, pom and sources and the like onto my sourceforge projects website. If you try to hit the /maven2 folder on your project website sourceforge kindly tell you that directory listing is off by default and how to fix it. To do this on the server shell you create a .htaccess file in your htdocs/maven2 folder containing the following apache options

它将jar、pom和源代码等内容上传到我的sourceforge项目网站上。如果您试图点击项目网站sourceforge上的/maven2文件夹,请告诉您默认目录列表是关闭的,以及如何修复它。要在服务器shell上执行此操作,您需要在htdocs/maven2文件夹中创建一个.htaccess文件,其中包含以下apache选项

Options +Indexes

Then bingo, you have a maven repo which looks like:

然后bingo,你有一个maven repo,看起来是:

http://chex4j.sourceforge.net/maven2/net/sf/chex4j/chex4j-core/1.0.0/

http://chex4j.sourceforge.net/maven2/net/sf/chex4j/chex4j-core/1.0.0/

Your sf.net shell it shuts down after a number of hours to not hog resources; so you run the "ssh -t ... create" when you want to deploy the site or your build artifacts.

您的sf.net shell在几个小时后关闭,以避免占用资源;运行“ssh -t…”创建“当您想部署站点或构建工件时”。

You can browse all my maven project code under sourceforge to see my working settings:

您可以在sourceforge下浏览我的所有maven项目代码,查看我的工作设置:

http://chex4j.svn.sourceforge.net/viewvc/chex4j/branches/1.0.x/chex4j-core/

http://chex4j.svn.sourceforge.net/viewvc/chex4j/branches/1.0.x/chex4j-core/

#7


1  

SCP URL does work. But do not use ":" after server name. MVN tries to read the following test as integer (port number).

SCP URL是否工作。但是不要使用“:”后的服务器名。MVN尝试以整数(端口号)读取以下测试。

You do not need to establish tunnels as simbo1905 did.

你不需要像辛波1905那样建立隧道。

#8


0  

The Maven SourceForge plug-in does not work with Maven 2. Also I believe this plug-in uses FTP which is no longer supported.

Maven SourceForge插件不能与Maven 2一起工作。而且我认为这个插件使用的是不支持的FTP。

#9


0  

I found that CruiseControl can upload releases to SFEE and also works with Maven and Maven2

我发现CruiseControl可以向SFEE上传发布,也可以与Maven和Maven2一起工作