- 2008-02-08 (Fri) 17:47
- 늘그런날들
maven의 maven-complier-plugin을 이용해서 빌드를 할 때, 다음과 같은 오류가 발생한다면, JDK의 버전이 다르기 때문일 수 있다.
Problem
[INFO] compiler:compile [INFO] Compiling 76 source files to D:\devx\workspace\able-core\target\classes org.apache.maven.plugin.CompilationFailureException: Compilation failure at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:516) at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:578) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:508) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:328) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:151) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:220) at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:813) at org.maven.ide.eclipse.embedder.Maven2Executor.main(Maven2Executor.java:85) [INFO] ---------------------------------------------------------------------------- [ERROR] BUILD FAILURE com.opensymphony.able:able-core:jar:1.0-SNAPSHOT ( task-segment: [install] ) [INFO] ---------------------------------------------------------------------------- [INFO] Build for project: com.opensymphony.able:able-core:jar:1.0-SNAPSHOT failed during execution of mojo: org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile [INFO] ----------------------------------------------------------------------------
Solution
maven의 pom.xml이 아래와 같다면, configuration의 source와 target에 적혀있는 버전을 현재 사용하는 JDK의 버전과 일치하도록 수정한다.
... <plugin> <artifactid>maven-compiler-plugin</artifactid> <configuration> <source>1.5</source> <target>1.5</target> </configuration> </plugin> ...
- Newer: 로스:타임:라이프 (ロス:タイム:ライフ 2008) 第04話 그리고 우니(うに)
- Older: 이런 저런 선입견들
코맨트:0
Trackbacks:0
- Trackback URL for this entry
- http://www.duppio.com/blog/610.html/trackback
- Listed below are links to weblogs that reference
- org.apache.maven.plugin.CompilationFailureException: Compilation failure from duppio.com