Help us understand the problem. What is going on with this article?

Maven tomcat-maven-plugin を使うための設定例

More than 5 years have passed since last update.

なぜかcodehausのUsage通りに書いても上手く行かなかったのでメモ。

まずpom.xmlの設定。

pom.xml
<project>
...
    <build>
    ...
        <plugins>
            ...
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>tomcat-maven-plugin</artifactId>
                <!-- 1.0までしか使えないっぽい。 -->
                <version>1.0-SNAPSHOT</version>
                <configuration>
                    <!-- ここはプロジェクトに合わせて適宜変更する。 -->
                    <server>tomcat</server>
                    <url>http://localhost:8080/manager</url>
                    <path>/</path>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <pluginRepositories>
        ...
        <pluginRepository>
            <id>Codehaus Snapshots</id>
            <url>http://snapshots.repository.codehaus.org/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </pluginRepository>
    </pluginRepositories>
</project>

$M2_HOME/settings.xmlの設定。

settings.xml
<settings>
    ...
    <servers>
        ...
        <server>
            <id>tomcat</id>
            <!-- Tomcatのtomcat-users.xmlに書いたusername, password を入れる。 -->
            <username>username</username>
            <password>password</password>
        </server>
    </servers>
</settings>
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした