简体   繁体   English

使用cargo Maven插件将Spring项目部署到远程服务器

[英]using cargo maven plugin to deploy spring project to remote server

I'm using eclipse for developing. 我正在使用Eclipse进行开发。 I tried to deploy to remote server using cargo plugin, but I got an error. 我尝试使用货运插件部署到远程服务器,但是出现错误。 I'm using EC2 as my server, with tomcat 8.I used cargo:deploy when I tried to run or debug. 我将EC2与tomcat 8一起用作服务器,在尝试运行或调试时使用了cargo:deploy

here is my error 这是我的错误

Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.6.3:deploy (default-cli) on project travelplanner: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.6.3:deploy failed: Failed to create deployable with implementation class org.codehaus.cargo.container.tomcat.TomcatWAR for the parameters (container [id = [tomcat8x]], deployable type [war]). Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.6.3:deploy (default-cli) on project travelplanner: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.6.3:deploy failed: Failed to create deployable with implementation class org.codehaus.cargo.container.tomcat.TomcatWAR for the parameters (container [id = [tomcat8x]], deployable type [war]). InvocationTargetException: Failed to parse Tomcat WAR file in [my workingspace\\travelplanner-1.0.0-BUILD-SNAPSHOT.war]: Failed to find file [my workingspace\\travelplanner-1.0.0-BUILD-SNAPSHOT.war]: my workingspace\\travelplanner-1.0.0-BUILD-SNAPSHOT.war -> [Help 1] [ERROR]

and here is my pom.xml 这是我的pom.xml

<build>
    <plugins>
        <plugin>
            <artifactId>maven-eclipse-plugin</artifactId>
            <version>2.9</version>
            <configuration>
                <additionalProjectnatures>
                    <projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
                </additionalProjectnatures>
                <additionalBuildcommands>
                    <buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>
                </additionalBuildcommands>
                <downloadSources>true</downloadSources>
                <downloadJavadocs>true</downloadJavadocs>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.5.1</version>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
                <compilerArgument>-Xlint:all</compilerArgument>
                <showWarnings>true</showWarnings>
                <showDeprecation>true</showDeprecation>
            </configuration>
        </plugin>
        <plugin>
        <groupId>org.codehaus.cargo</groupId>
        <artifactId>cargo-maven2-plugin</artifactId>
        <version>1.6.3</version>
        <configuration>
            <container>
                <containerId>tomcat8x</containerId>
                <type>remote</type>
            </container>
            <configuration>
                <type>runtime</type>
                <properties>
                    <cargo.hostname>myIPaddress</cargo.hostname>
                    <cargo.remote.username>myId</cargo.remote.username>
                    <cargo.remote.password>myPassword</cargo.remote.password>
                    <cargo.tomcat.manager.url>http://myIpAddress:8080/manager/text
                    </cargo.tomcat.manager.url>
                </properties>
            </configuration>
            <deployables>
                    <deployable>
                        <groupId>com.rosem</groupId>
                        <artifactId>travelplanner</artifactId>
                        <type>war</type>
                    </deployable>
                </deployables>
        </configuration>
   </plugin>

    </plugins>
</build>

You need to specify the location where the war file can be found. 您需要指定可找到war文件的位置。 Check the location tag under deployable tag in plugin configuration. 检查插件配置中可部署标签下的位置标签。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 通过Cargo Maven插件远程部署项目 - Project deployment on remote via Cargo maven plugin maven-tomcat插件部署在远程服务器上 - maven-tomcat plugin deploy on Remote server Maven:使用依赖项将本地项目部署到远程服务器 - Maven : Deploy Local Project to Remote Server with dependencies 未能在项目 duke 辅导上执行目标 org.codehaus.cargo:cargo-maven2-plugin:1.4.4:redeploy (deploy) - Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.4:redeploy (deploy) on project duke tutoring 如何使用Cargo maven插件将EAR远程部署到JBoss 5.1.0.GA? - How to deploy remotely EAR to JBoss 5.1.0.GA using Cargo maven plugin? 由maven部署JavaEE 8教程失败,无法在项目hello1上执行目标org.codehaus.cargo:cargo-maven2-plugin:1.6.4:redeploy(deploy) - Deploying the JavaEE 8 Tutorial, by maven gets Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.6.4:redeploy (deploy) on project hello1 无法使用Grago的Cargo插件在本地部署 - Cannot deploy locally using Cargo plugin for Gradle 如何使用cargo Maven插件在两个不同的glassfish域上进行部署? - How to deploy on two different glassfish domains with cargo maven plugin? 使用Cargo with Maven远程部署WAR而无需HOT部署 - Using Cargo with Maven to remotely deploy WAR without HOT deployment 将 gradle 项目部署到远程服务器 - Deploy gradle project to remote server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM