Deploying prebuilt WAR with tomcat-maven-plugin

I have a WAR file correctly created by Warbler, and it works when I do it all manually.

I am trying to use maven (via Hudson) to

1) Call shock (successful)

<phase>package</phase>
<configuration>
    <executable>/bin/bash</executable>
    <workingDirectory>.</workingDirectory>
    <arguments>
        <argument>-c</argument>
        <argument>
            echo "Sourcing bashrc"
            source ~/.bashrc
            rvm use jruby
            echo "Path is $PATH"
            echo "Gem path is $GEM_PATH"
            warble --trace
            rm -R target/*
            mv workspace.war target/yams.war
        </argument>
    </arguments>
</configuration>

2) deploy to tomcat

This is the second part that I came across. I just want to tell maven to take the WAR file that I just generated (and was useful in the target /, as expected) and deploy it.

, , ( " -WAR" ). WAR-, WAR, , (webxml ..), WAR, .

, : " , //, , WAR WAR", maven?

+3
1

:)

, . , maven-war, . tomcat , . POM, WAR prebuild -:

<project>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>Probe</artifactId>
    <packaging>war</packaging>

    <name>Probe</name>  

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.1.1</version>
                <executions>
                    <execution>
                        <id>default-war</id>
                        <phase>none</phase>
                    </execution>
                </executions>                    
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>tomcat-maven-plugin</artifactId>
                <configuration>
                    <warFile>Probe.war</warFile>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

waffel Weblog , , maven-war.:)

* edit: maven-install-plugin, maven "mvn clean install" ( :)

[ERROR] org.apache.maven.plugins: Maven--: 2.3.1: ( -install) :

POM:

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-install-plugin</artifactId>
            <version>2.3.1</version>
            <executions>
                <execution>
                    <id>default-install</id>
                    <phase>none</phase>
                </execution>
            </executions>
        </plugin>

, , , maven-install-plugin install: install-file.

+8

All Articles