2017-12-20 12 views
0

Java Devs 가이드의 설명에 따라 vertx-service-proxy를 사용하려고합니다.vertx fabric8 플러그인에서 서비스 프록시를 사용하는 방법

<annotationProcessors> 
    <annotationProcessor>io.vertx.codegen.CodeGenProcessor</annotationProcessor> 
</annotationProcessors> 
<generatedSourcesDirectory>${project.basedir}/src/main/generated</generatedSourcesDirectory> 
<compilerArgs> 
    <arg>-AoutputDirectory=${project.basedir}/src/main</arg> 
</compilerArgs> 

그러나, 나는 fabric8의 vertx - 받는다는 - 플러그인을 사용하려면, 대신 받는다는 컴파일러 플러그인의 : 그것에서 , 그것은 내 치어에 다음을 추가해야했다. fabric8 vertex-maven-plugin을 사용하고 vertx-service-proxy를 사용할 수 있습니까? codegen annotationProcessors 섹션은 어디에 두어야합니까?

<build> 
    <plugins> 
     <plugin> 
      <groupId>io.fabric8</groupId> 
      <artifactId>vertx-maven-plugin</artifactId> 
      <version>${vertx-maven-plugin.version}</version> 
      <executions> 
       <execution> 
        <id>vmp</id> 
        <goals> 
         <goal>initialize</goal> 
         <goal>package</goal> 
        </goals> 
       </execution> 
      </executions> 
      <configuration> 
       <redeploy>true</redeploy> 
      </configuration> 
     </plugin> 

    </plugins> 
</build> 

내가 위의 구성 태그에 annotationProcessors 태그를 추가했지만 그것은 유효하지 않습니다 :

이 내 빌드 플러그인이 같은 모습입니다.

아이디어가 있으십니까? 고맙습니다.

답변

0

글쎄, 난 .. 내가 게시하기 전에 설명서를 자세히 했어야

난 그냥 내 치어에 <classifier>processor</classifier>을 추가하는 데 필요한 :

<dependency> 
    <groupId>io.vertx</groupId> 
    <artifactId>vertx-service-proxy</artifactId> 
    <version>3.5.0</version> 
    <classifier>processor</classifier> 
</dependency> 

그리고 나는 또한 필요가 package-info.java 파일 어디에 정의 내 서비스 클래스가있었습니다. 그런 다음 프록시는 fabric8 vertx-maven-plugin을 사용해도 괜찮 았습니다.

+0

실제로 Fabric8 Maven 플러그인이 있든 없든 Maven 컴파일러 플러그인이 없으면 편집 할 필요가 없습니다. – tsegismont

+0

사실입니다.하지만 Fabric8 메이븐 플러그인을 사용하면 제 설정으로 메이븐 컴파일러 플러그인을 명시 적으로 정의 할 필요가 없습니다. 꼭 vertex-maven-plugin이 자동으로 뒤에서 그것을 당길 것이라고 확신합니다. –