MVN wagon-maven配置不能正確執行命令

<profiles>
    <profile>
        <id>dev</id>
        <properties>
            <env>dev</env>
        </properties>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>wagon-maven-plugin</artifactId>
                    <version>1.0</version>
                    <executions>
                        <execution>
                            <id>upload</id>
                            <phase>package</phase>
                            <goals>
                                <goal>upload</goal>
                                <goal>sshexec</goal>
                            </goals>
                            <configuration>
                                <skip>${wagon-skip}</skip>
                                <fromDir>target/</fromDir>
                                <includes>asset-service-server-1.0.0-SNAPSHOT.jar,conf/**</includes>
                                <excludes>pom.xml</excludes>
                                <url>scp://lxy:2330ncf@10.20.88.78/</url>
                                <toDir>/home/lxy/asset-service</toDir>
                                <commands>
                                    <command>cd /home/lxy/asset-service/bin/ &amp;&amp;sh shutdown.sh &amp;&amp; sh startup.sh</command>
                                    <!--<command>sh /apps/product/fae/asset-service-server-1.0.0-SNAPSHOT/remote.sh</command>-->
                                </commands>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>

    </profile>

問題,沒有正確啓動程序java

1排查啓動SH腳本,添加上絕對目錄後任然不行app

2profile 增長輸出 SSH命令節點 ssh

<displayCommandOutputs>true</displayCommandOutputs>

無異常輸出maven

3.start腳本的 nohup java 去掉 nohup後臺執行後報錯,說找不到JAVAui

4.恍然大悟 java沒有使用絕對路徑,增長目錄,一鍵發佈成功url

相關文章
相關標籤/搜索