http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0<artifactId>yyy-data</artifactId><name>VS yyy (data)</name><parent> <groupId>de.xxx</groupId> <artifactId>yyy-server</artifactId> <version>8.1.0-SNAPSHOT</version></parent><properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> <distribution.outputDirectory>${project.build.directory}/dist</distribution.outputDirectory></properties><dependencies> <dependency> <groupId>com.mysema.querydsl</groupId> <artifactId>querydsl-apt</artifactId> </dependency> <dependency> <groupId>com.mysema.querydsl</groupId> <artifactId>querydsl-jpa</artifactId> </dependency> <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId> <version>2.2.8</version> </dependency> <dependency> <groupId>com.sun.xml.bind</groupId> <artifactId>jaxb-core</artifactId> <version>2.2.8-b01</version> </dependency> <dependency> <groupId>com.sun.xml.bind</groupId> <artifactId>jaxb-impl</artifactId> <version>2.2.8-b01</version> </dependency>我需要一些幫助來mapstruct在我的project. 我已經(jīng)有一些注釋處理器需要在pom.xmlmaven 中命名。 建議在pom.xml中Mapstruct添加。annotationProcessorPaths似乎不可能在同一個 pom.xml 中同時使用注釋 (annotationProcessorPaths和)。annotationProcessor如果我這樣做,我會收到錯誤無法在項目 yyy-data 上執(zhí)行目標 org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (默認): 編譯失敗 [錯誤] 注釋處理器 'de.zzz.annotation.processor.GenerateHibernateTypeForEnumProcessor'未找到我確實縮短了pom。因此,依賴項可能比實際需要的多。
1 回答

qq_花開花謝_0
TA貢獻1835條經(jīng)驗 獲得超7個贊
您仍然可以使用annotationProcessor
. 您需要mapstruct-processor
在依賴項中添加,然后org.mapstruct.ap.MappingProcessor
在annotationProcessor
.
您看到錯誤的原因是,當您定義時,annotationProcessorPaths
將maven-compiler-plugin
僅使用那些來查找注釋處理器,而不使用其他依賴項。
annotationProcessoPaths
或者,您也可以在依賴項中添加所有注釋處理器。
添加回答
舉報
0/150
提交
取消