我正在嘗試創建一個基本的mojo(只是你好世界)。但是當我嘗試編譯Maven插件時,JVM會崩潰,如下所示:當試圖在OSX中編譯Maven插件時JVM崩潰
[INFO] --- maven-plugin-plugin:3.3:descriptor (default-descriptor) @ xyz-compiler-plugin ---
[INFO] Using 'UTF-8' encoding to read mojo metadata.
[INFO] Applying mojo extractor for language: java
[INFO] Mojo extractor for language: java found 0 mojo descriptors.
[INFO] Applying mojo extractor for language: bsh
[INFO] Mojo extractor for language: bsh found 0 mojo descriptors.
[INFO] Applying mojo extractor for language: java-annotations
[INFO] Mojo extractor for language: java-annotations found 1 mojo descriptors.
2016-06-13 22:14:58.813 java[36254:2194441] Apple AWT Internal Exception: Critical error: required built-in appearance SystemAppearance not found
2016-06-13 22:14:58.814 java[36254:2194441] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Critical error: required built-in appearance SystemAppearance not found'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff9997a4f2 __exceptionPreprocess + 178
1 libobjc.A.dylib 0x00007fff8f27bf7e objc_exception_throw + 48
2 CoreFoundation 0x00007fff999e14bd +[NSException raise:format:] + 205
3 libdispatch.dylib 0x00007fff8f7a640b _dispatch_client_callout + 8
4 libdispatch.dylib 0x00007fff8f7a6303 dispatch_once_f + 67
5 AppKit 0x00007fff981c12ad +[NSAppearance _defaultAppearance] + 22
6 AppKit 0x00007fff981c113b +[NSAppearance appearanceNamed:] + 24
7 AppKit 0x00007fff981c09ee +[NSWindow initialize] + 166
8 libobjc.A.dylib 0x00007fff8f2723c8 _class_initialize + 711
9 libobjc.A.dylib 0x00007fff8f271d08 lookUpImpOrForward + 179
10 libobjc.A.dylib 0x00007fff8f26c591 objc_msgSend + 209
11 AppKit 0x00007fff981c05ed +[NSApplication initialize] + 719
12 libobjc.A.dylib 0x00007fff8f2723c8 _class_initialize + 711
13 libobjc.A.dylib 0x00007fff8f272156 _class_initialize + 85
14 libobjc.A.dylib 0x00007fff8f271d08 lookUpImpOrForward + 179
15 libobjc.A.dylib 0x00007fff8f26c591 objc_msgSend + 209
16 libawt_lwawt.dylib 0x0000000125cef2dc -[AWTStarter starter:] + 266
17 Foundation 0x00007fff8a0b3f5e __NSThreadPerformPerform + 279
18 CoreFoundation 0x00007fff9990f881 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
19 CoreFoundation 0x00007fff998eefbc __CFRunLoopDoSources0 + 556
20 CoreFoundation 0x00007fff998ee4df __CFRunLoopRun + 927
21 CoreFoundation 0x00007fff998eded8 CFRunLoopRunSpecific + 296
22 java 0x0000000103edc463 CreateExecutionEnvironment + 871
23 java 0x0000000103ed81ac JLI_Launch + 1952
24 java 0x0000000103ede4c0 main + 101
25 java 0x0000000103ed7a04 start + 52
26 ??? 0x000000000000000c 0x0 + 12
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6
該項目有一個父POM項目。我嘗試從IntelliJ和終端進行編譯,但問題仍然存在。
我的課很簡單
@Mojo(name="test")
public class BasicMojo extends AbstractMojo
{
public void execute() throws MojoExecutionException
{
getLog().info("Hello, this is a test.");
}
}
我的POM依賴關係是這樣的:
<dependencies>
<dependency>
<groupId>com.xyz.network.tools</groupId>
<artifactId>xyz-compiler</artifactId>
<version>${micro.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.4</version>
</dependency>
</dependencies>
任何線索?
您使用Apple Java JDK或Oracle嗎?它看起來你正在使用蘋果一.. ..?此外,如果您顯示完整的pom文件和代碼也會很有幫助... – khmarbaise
我正在使用Oracle的Java 8 –
您正在使用哪個版本的JDK? 1.8。? – khmarbaise