English 中文(简体)
在 Maven 公司部署到 BFTP- Server 由于写保护失败
原标题:Deploy to BFTP-Server with Maven fails due to write protection

我有一个8号喷气式服务器运行在Achletinux VM上。 我安装了作为 FTP 服务器的 bftpd, 并配置了我的马文工程如下:

...
<distributionManagement>
    <repository>
        <id>personal-ftp-repository</id>
        <url>ftp://www.example.com</url>
    </repository>
</distributionManagement>
...
<extension>
    <groupId>org.apache.maven.wagon</groupId>
    <artifactId>wagon-ftp</artifactId>
    <version>1.0-beta-6</version>
</extension>
...

在我设置. xml 和部署工程中正确定义了分配管理的名称,因为它在运行 mvn 部署时正确上传了组装的战争。

但上传文件获得不需要的文件权限 。 我设置了 bftpd UMASK 到 000 权限, 导致上传目录777 权限, 上传文件666 权限 。 但服务器无法执行这些权限, 因此防波堤无法为它们服务 。

When I manually switch the WAR file s permissions to 777 the file is served as intended. But when I then try to upload a newer version of the WAR via mvn deploy it reports that FTP Server response: 553 Error: Remote file is write protected. even if the jetty server has been stopped.

一定有办法部署战争, 而不手动删除旧的, 部署,然后手动设置文件权限, 但我找不到一个权限 。

最佳回答

默认情况下, FTP 的 DELE 命令在 BFTPD 中被禁用。 在 / etc/ bftpd. conf 中打开它解决了失败的部署。 因此, 部署目标似乎首先试图删除旧文件, 然后上传更新的文件。 也不清楚这一点 。

问题回答

I don t know what service you are using, but if you re using tomcat.. Maybe you can try this one..

  1. Open cmd,
  2. Navigate to the directory where the pom.xml exist
  3. Type command --> mvn clean install tomcat:deploy. (Use tomcat:undeploy tomcat:deploy, or simply tomcat:redeploy, on subsequent runs to first remove the previous deployment.)

此单一个命令字符串执行以下全部任务 :

  • Deletes the service/target output folder if it already exists (same as mvn clean alone)
  • Recreates the folder and generates and compiles the Java classes into it (mvn package)
  • Creates a WAR file for the web service provider and JAR file
  • Installs the JAR and WAR into your local Maven repository (mvn install)
  • Undeploys the previous WAR file (if also using tomcat:undeploy or tomcat:redeploy)
  • Deploys the new WAR file onto Tomcat. (mvn tomcat:deploy)




相关问题
VS 2008 : How to publish with out DLLs?

I have developed a web application in Visual Studio 2008 and want to publish it in to the production server. I see a publish option there.But its producing files with DLL. I dont want to publish only ...

Apache: Deploying a new site to the server

I have a site currently live on a domain. I would like to switch it to a new site, that is currently in a password protected sub directory on this server. I have a "Site Maintenance in Progress" page....

Appropriate strategy for tagging and hotfixing with git

I was wondering if the strategy I m using for tagging and hotfixing tags (which then I use for deploying rails applications) with git is appropriate. For tagging I just tag a commit of the master ...

Pylons deployment questions

I m a beginner with Pylons and I ve mostly developed on my localhost using the built-in web server. I think it s time to start deployment for my personal blog, I have a Debian Lenny server with ...

Do I want Publish or Release Build in VB.net?

I wrote a little (like 40 lines little) Winforms application with VB.net in Visual Studio 2010. Now I ve released the code as a Google Code project. It s easy for a developer to get the source but I d ...

Need advice on my PHP development solution

Here is how our current php development solution is set up: Each developer work on their local machine. Each developer commit their change to a common SVN server (intranet). A commit hook upload the ...

loading from JAR files during deployment vs development

when i am loading some data into my java program, i usually use FileInputStream. however i deploy the program as a jar file and webstart, so i have to use getRessource() or getRessourceAsStream() to ...

热门标签