Mavenプラグインaspectj-maven-pluginを使用してサードパーティのjarをウィービングするように構成しました。
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.4</version>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${aspectj.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<configuration>
<!--<proceedOnError>true</proceedOnError>-->
<weaveDependencies>
<weaveDependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
</weaveDependency>
</weaveDependencies>
<aspectLibraries>
<aspectLibrary>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
</aspectLibrary>
</aspectLibraries>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
欠落しているJavaクラスへの参照に問題があります。Quartz jarにはJMSとの統合がいくつかありますが、私のアプリケーションはJMSを使用しないため、これらのクォーツファイルはロードされません。
私はproceedOnError=trueの松葉杖を見つけましたが、アスペクト注釈付きクラスへのエラーの発生により、動作が停止すると思います。
shadow-maven-pluginは、パッケージフェーズによってのみトリガーされる可能性があり、aspectjはコンパイルフェーズで起動するため、ここには適合しません。
[INFO] --- aspectj-maven-plugin:1.4:compile (default) @ aspectj-demo ---
[ERROR] can't determine implemented interfaces of missing type javax.servlet.ServletContextListener
when processing declare parents org.quartz.ee.servlet.QuartzInitializerListener
when processing type mungers
when weaving
when batch building BuildConfig[null] #Files=5 AopXmls=#0
[Xlint:cantFindType]
[ERROR] can't determine implemented interfaces of missing type javax.servlet.http.HttpServlet
when processing declare parents org.quartz.ee.servlet.QuartzInitializerServlet
when processing type mungers
when weaving
when batch building BuildConfig[null] #Files=5 AopXmls=#0
[Xlint:cantFindType]