Ori Liel has posted comments on this change.

Change subject: restapi: RSDL generation at build time
......................................................................


Patch Set 3:

(8 comments)

http://gerrit.ovirt.org/#/c/23574/3/backend/manager/modules/pom.xml
File backend/manager/modules/pom.xml:

Line 45:       <plugin>
Line 46:         <artifactId>maven-checkstyle-plugin</artifactId>
Line 47:         <configuration>
Line 48:          <excludes>**/RsdlManager.java</excludes>
Line 49:         </configuration>        
> Fix whitespace.
Done
Line 50:       </plugin>
Line 51:     </plugins>
Line 52:   </build>
Line 53: 


http://gerrit.ovirt.org/#/c/23574/3/backend/manager/modules/restapi/interface/definition/pom.xml
File backend/manager/modules/restapi/interface/definition/pom.xml:

Line 17:     <dependency>
Line 18:       <groupId>org.jboss.resteasy</groupId>
Line 19:       <artifactId>resteasy-jaxrs</artifactId>
Line 20:       <version>${resteasy.version}</version>
Line 21:       <scope>compile</scope>
> Why is this needed?
This is what happens without it: 

mvn install 

Generating RSDL files...

Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:java (default) 
on project restapi-definition: An exception occured while executing the Java 
class. null: InvocationTargetException: javax/ws/rs/core/MediaType: 
javax.ws.rs.core.MediaType -> [Help 1]

During RSDL generation annotations on the business interfaces are scanned by 
reflection (looking for @GET, @PUT, @POST, @Path...) probably what happens here 
is that the first annotation found: MediaType is unrecognised to the compiler 
because the dependency or resteasy-jarxs artifact is defined in scope 
<provided>. This was not an issue when RsdlBuilder was running under jboss 
(then the jar was indeed provided). Changing the scope of the dependency solved 
this issue.
Line 22:     </dependency>
Line 23: 
Line 24:     <dependency>
Line 25:       <groupId>org.jboss.resteasy</groupId>


Line 55:     
Line 56:         <dependency>
Line 57:       <groupId>org.yaml</groupId>
Line 58:       <artifactId>snakeyaml</artifactId>
Line 59:       <version>1.8</version>
> No need to speicify the version here, it is already in the dependencies man
Done
Line 60:     </dependency>
Line 61:     
Line 62:   </dependencies>
Line 63: 


Line 57:       <groupId>org.yaml</groupId>
Line 58:       <artifactId>snakeyaml</artifactId>
Line 59:       <version>1.8</version>
Line 60:     </dependency>
Line 61:     
> Fix indentation and whitespace.
Done
Line 62:   </dependencies>
Line 63: 
Line 64:   <build>
Line 65:     <plugins>


Line 107:           </execution>
Line 108:         </executions>
Line 109:       </plugin>
Line 110: 
Line 111:     </plugins>  
> Fix whitespace.
Done
Line 112:   </build>
Line 113: 
Line 114:   <profiles>
Line 115:     <profile>


Line 154:                   
<mainClass>org.ovirt.engine.api.rsdl.RsdlManager</mainClass>
Line 155:                   <arguments>
Line 156:                     <argument>${application.baseuri}</argument>
Line 157:                           
<argument>${project.build.outputDirectory}/rsdl.xml</argument>
Line 158:                           
<argument>${project.build.outputDirectory}/rsdl_gluster.xml</argument>
> Don't use tabs.
Done
Line 159:                   </arguments>
Line 160:                 </configuration>
Line 161:               </execution>
Line 162:             </executions>


Line 163:           </plugin>
Line 164:         </plugins>
Line 165:       </build>
Line 166:     </profile>
Line 167:     
> Fix whitespace.
Done
Line 168:     <profile>
Line 169:         <id>findbugs-general</id>
Line 170:         <build>
Line 171:             <plugins>


http://gerrit.ovirt.org/#/c/23574/3/backend/manager/modules/restapi/jaxrs/pom.xml
File backend/manager/modules/restapi/jaxrs/pom.xml:

Line 59
Line 60
Line 61
Line 62
Line 63
> Don't specify the version here, it is already in the root POM.
This is a deletion...


-- 
To view, visit http://gerrit.ovirt.org/23574
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Idc13fb2feab8d065f38cecbda7da568463c30453
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ori Liel <ol...@redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: Ori Liel <ol...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to