Springアプリケーションに対してmavenを使用して単体テストを行った後でビルドを完了する際に問題が発生しました。私は、mvnのインストールが完了していないことに気づき、すべてのユニットテストを実行した後にハングアップしたように見えました。 mvn install
私が実行した場合、CMDラインから私はテストが完了し得るが、ビルドはそれの終わり厥Spring JUnitテストの実行後にMavenがハングする
Results :
Tests run: 34, Failures: 0, Errors: 0, Skipped: 0
14:20:15,588 [Thread-3] INFO GenericApplicationContext - Closing [email protected]a3b24: startup date [Wed Apr 25 14:20:08 EDT 2012]; root of context hierarchy
14:20:15,589 [Thread-3] INFO DefaultListableBeanFactory - Destroying singletons in org.s[email protected]16c163f: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,sysModel,alarmList,resourcePool,sysParams,stationHelper,commandTracker,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0]; root of factory hierarchy
14:20:15,595 [Thread-7] INFO GenericApplicationContext - Closing [email protected]577c: startup date [Wed Apr 25 14:20:10 EDT 2012]; root of context hierarchy
14:20:15,596 [Thread-7] INFO DefaultListableBeanFactory - Destroying singletons in org.s[email protected]10952e8: defining beans [alarmDao,purgeDao,xactionDao,dataSource,sysModel,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0]; root of factory hierarchy
をハングアップします。 2つのスレッドが実行されている、私はそこで何をしたのか分からない。とにかく、私はすべてのテストを削除し、完全に構築するプログラムを得た解決するために。 mvn install -DskipTests
を実行すると、完了するようになります。最後に、基本的にsystem.out.println( "hello world");というJUnitテストを1つ追加しました。テストを実行し、JUnitの注釈 "@RunWith(SpringJUnit4ClassRunner.class)"をコメントアウトすることでインストールを完了することができます。私はSpring 3.1.0を使用しています。
ビルドに関するこの問題は、Windows7の私の開発マシンからですが、私たちのLinuxベース(Ubuntu 11.10)です。 Hudson CIサーバは、同じSVNリポジトリを使用して、時間プロジェクトのMavenインストールを同じプロジェクトで正常に実行します。
ええ、手動スレッドの作成を行っているかどうか、または@Asynchronous、またはSpringのタイマー/エグゼキュータコードを使用しているかどうかを確認してください。 – sdouglass