0

別のスレッドで二次的な質問としてすでにそれを尋ねましたが、残っている唯一の問題です。
だから、私は継続的な統合のために Maven2 を使用しています。これがどのように機能しているかです:

1. Unit test the server side   
2. Build the application  
3. Build the war  
4. Start a Jetty container => Blocks everything  
5. Start a Selenium server   
6. Unit test the client side   
7. Close the Selenium server   
8. Close the Jetty container

Jetty がデーモンとして起動しない点を除いて、すべて正常に動作しています(jetty のデータソース、プラグインの依存関係にある postgresql、ロードされた selenium ユーザー拡張機能... 提供してくれたすべてのヘルプに感謝します!) .

これが私のjettyプラグインの構成です:

<plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>maven-jetty-plugin</artifactId>
            <version>6.1.9</version>
            <executions>
                <execution>
                    <id>start-jetty</id>
                    <phase>pre-integration-test</phase>
                    <goals>
                        <goal>run</goal>
                    </goals>
                    <configuration>
                        <daemon>true</daemon>
                        <contextPath>agepro-prototype</contextPath>
                        <webApp>${project.build.directory}/agepro-prototype.war</webApp>
                    </configuration>
                </execution>
                <execution>
                    <id>stop-jetty</id>
                    <phase>post-integration-test</phase>
                    <goals>
                        <goal>stop</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <connectors>
                    <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
                        <port>9091</port> 
                    </connector>
                </connectors>
                <stopPort>9092</stopPort>
                <stopKey>test</stopKey>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>postgresql</groupId>
                    <artifactId>postgresql</artifactId>
                    <version>9.1-901.jdbc4</version>
                </dependency>
            </dependencies>
        </plugin>

ここで私が間違っていることを誰かが知っていますか?
Jetty コンテナーが起動しますが、それを強制終了 (ctrl + c) し、残りのライフサイクルを実行できないまで、すべてがブロックされます。

繰り返しになりますが、再投稿して申し訳ありません(前回のスレッドで私を大いに助けてくれた誰かの答えを受け入れましたが、彼はそれに値するものでしたが、もう誰も答えに来ません笑)、文法の問題で申し訳ありませんxD

4

1 に答える 1

2

わかりました、それでは私はそれに答えます。

「7.6.x リリース バージョンのどこかで jetty-maven-plugin を使用することをお勧めします。7.6.3.v20120416 が最新です。使用しているプラ​​グインは .. 4 ~ 5 年以上前のものですか?」

したがって、jetty の依存関係を jetty 7 の新しいバージョンに更新した後 (サーブレット 2.5 をサポートする場合、jetty 8 はサーブレット 3.0 をサポートします)、最新の org.mortbay.jetty:jetty-maven-plugin:7.6.3.v20120416 で実行する必要があります。 maven cliからjettyを起動します。maven-jetty-plugin は数年前に廃止されました。当時、maven-*-plugin 形式は、maven プロジェクト自体によって開発されたプラグインの理想的な規則であったためです。その慣習は何年にもわたってなくなったようですが、後になって名前を少し変更したことを後悔しています。

于 2012-05-10T14:58:59.923 に答える