daily pastebin goal
46%
SHARE
TWEET

Untitled

a guest Jan 28th, 2016 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project spring-jqgrid-tutorial: Compilation failure
  2.  
  3. [ERROR] /D:/Project/spring-jqgrid-tutorial/src/main/java/org/krams/controller/UserController.java:[92,62] package QUser.user does not exist
  4.    
  5. <properties>
  6.     <querydsl.version>3.3.2</querydsl.version>
  7.     <maven.compiler.plugin.version>3.1</maven.compiler.plugin.version>
  8.     <maven.apt.plugin.version>1.1.1</maven.apt.plugin.version
  9.     <maven.build.helper.plugin.version>1.8</maven.build.helper.plugin.version>
  10. <properties>
  11.  
  12. <dependencies>
  13.     <dependency>
  14.         <groupId>com.mysema.querydsl</groupId>
  15.         <artifactId>querydsl-jpa</artifactId>
  16.         <version>${querydsl.version}</version>
  17.         </dependency>
  18.     <dependency>
  19.         <groupId>com.mysema.querydsl</groupId>
  20.         <artifactId>querydsl-apt</artifactId>
  21.         <version>${querydsl.version}</version>
  22.         <scope>provided</scope>
  23.     </dependency>
  24.  <dependencies>
  25.  
  26. <plugins>
  27.         <plugin>
  28.             <groupId>org.apache.maven.plugins</groupId>
  29.             <artifactId>maven-compiler-plugin</artifactId>
  30.             <version>${maven.compiler.plugin.version}</version>
  31.             <configuration>
  32.                 <source>1.7</source>
  33.                 <target>1.7</target>
  34.             </configuration>
  35.         </plugin>
  36.  
  37.         <plugin>
  38.             <groupId>org.codehaus.mojo</groupId>
  39.             <artifactId>build-helper-maven-plugin</artifactId>
  40.                 <version>${maven.build.helper.plugin.version}</version>
  41.             <executions>
  42.                 <execution>
  43.                     <id>add-source</id>
  44.                     <phase>process-classes</phase>
  45.                     <goals>
  46.                         <goal>add-source</goal>
  47.                     </goals>
  48.                     <configuration>
  49.                         <sources>
  50.                             <source>target/generated-sources/java</source>
  51.                         </sources>
  52.                     </configuration>
  53.                 </execution>
  54.             </executions>
  55.         </plugin>
  56.  
  57.         <plugin>
  58.             <groupId>com.mysema.maven</groupId>
  59.             <artifactId>apt-maven-plugin</artifactId>
  60.             <version>${maven.apt.plugin.version}</version>
  61.             <executions>
  62.                 <execution>
  63.                     <goals>
  64.                         <goal>process</goal>
  65.                     </goals>
  66.                     <configuration>
  67.                         <outputDirectory>target/generated-sources/java</outputDirectory>
  68.                         <processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
  69.                         <additionalSourceRoots>
  70.                             <additionalSourceRoot>target/generated-sources/java</additionalSourceRoot>
  71.                         </additionalSourceRoots>
  72.                     </configuration>
  73.                 </execution>
  74.             </executions>
  75.         </plugin>
  76. <plugins>
  77.    
  78. package org.krams.domain;
  79.  
  80. import static com.mysema.query.types.PathMetadataFactory.*;
  81.  
  82. import com.mysema.query.types.path.*;
  83.  
  84. import com.mysema.query.types.PathMetadata;
  85. import javax.annotation.Generated;
  86. import com.mysema.query.types.Path;
  87. import com.mysema.query.types.path.PathInits;
  88.  
  89.  
  90. /**
  91.  * QUser is a Querydsl query type for User
  92.  */
  93. @Generated("com.mysema.query.codegen.EntitySerializer")
  94. public class QUser extends EntityPathBase<User> {
  95.  
  96.     private static final long serialVersionUID = -1712499619L;
  97.  
  98.     private static final PathInits INITS = PathInits.DIRECT2;
  99.  
  100.     public static final QUser user = new QUser("user");
  101.  
  102.     public final NumberPath<Integer> age = createNumber("age", Integer.class);
  103.  
  104.     public final StringPath firstName = createString("firstName");
  105.  
  106.     public final NumberPath<Long> id = createNumber("id", Long.class);
  107.  
  108.     public final StringPath lastName = createString("lastName");
  109.  
  110.     public final StringPath password = createString("password");
  111.  
  112.     public final QRole role;
  113.  
  114.     public final StringPath username = createString("username");
  115.  
  116.     public QUser(String variable) {
  117.         this(User.class, forVariable(variable), INITS);
  118.     }
  119.  
  120.     public QUser(Path<? extends User> path) {
  121.         this(path.getType(), path.getMetadata(), path.getMetadata().isRoot() ? INITS : PathInits.DEFAULT);
  122.     }
  123.  
  124.     public QUser(PathMetadata<?> metadata) {
  125.         this(metadata, metadata.isRoot() ? INITS : PathInits.DEFAULT);
  126.     }
  127.  
  128.     public QUser(PathMetadata<?> metadata, PathInits inits) {
  129.         this(User.class, metadata, inits);
  130.     }
  131.  
  132.     public QUser(Class<? extends User> type, PathMetadata<?> metadata, PathInits inits) {
  133.         super(type, metadata, inits);
  134.         this.role = inits.isInitialized("role") ? new QRole(forProperty("role"), inits.get("role")) : null;
  135.     }
  136.  
  137. }
  138.    
  139. package org.krams.controller;
  140.  
  141. import java.util.List;
  142.  
  143. import org.krams.domain.QUser;
  144. import org.krams.domain.Role;
  145. import org.krams.domain.User;
  146. import org.krams.repository.UserRepository;
  147. import org.krams.response.JqgridResponse;
  148. import org.krams.response.StatusResponse;
  149. import org.krams.response.UserDto;
  150. import org.krams.service.UserService;
  151. import org.krams.util.JqgridFilter;
  152. import org.krams.util.JqgridObjectMapper;
  153. import org.krams.util.UserMapper;
  154. import org.springframework.beans.factory.annotation.Autowired;
  155. import org.springframework.data.domain.Page;
  156. import org.springframework.data.domain.PageRequest;
  157. import org.springframework.data.domain.Pageable;
  158. import org.springframework.stereotype.Controller;
  159. import org.springframework.web.bind.annotation.RequestBody;
  160. import org.springframework.web.bind.annotation.RequestMapping;
  161. import org.springframework.web.bind.annotation.RequestMethod;
  162. import org.springframework.web.bind.annotation.RequestParam;
  163. import org.springframework.web.bind.annotation.ResponseBody;
  164.  
  165. ...
  166.  
  167. if (qUsername != null)
  168.             users = repository.findAll(QUser.user.username.like(qUsername), pageRequest);
  169.    
  170. <!-- MYSEMA generates a lot of query classes for the model in a pre-process step -->
  171.   <plugin>
  172.     <groupId>org.codehaus.mojo</groupId>
  173.     <artifactId>build-helper-maven-plugin</artifactId>
  174.     <version>${version.org.codehaus.mojo.build-helper-maven-plugin}</version>
  175.     <executions>
  176.       <execution>
  177.         <id>add-source</id>
  178.         <phase>generate-sources</phase>
  179.         <goals>
  180.           <goal>add-source</goal>
  181.         </goals>
  182.         <configuration>
  183.           <sources>
  184.             <source>${project.build.directory}/generated-sources/apt/</source>
  185.             <source>${project.build.directory}/generated-sources/annotations/</source>
  186.           </sources>
  187.         </configuration>
  188.       </execution>
  189.     </executions>
  190.   </plugin>
  191.   <plugin>
  192.     <groupId>com.mysema.maven</groupId>
  193.     <artifactId>apt-maven-plugin</artifactId>
  194.     <version>${version.com.mysema.maven.apt-maven-plugin}</version>
  195.     <executions>
  196.       <execution>
  197.         <goals>
  198.           <goal>process</goal>
  199.         </goals>
  200.         <configuration>
  201.           <outputDirectory>target/generated-sources/apt</outputDirectory>
  202.           <processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
  203.         </configuration>
  204.       </execution>
  205.     </executions>
  206.   </plugin>
  207.    
  208. <plugin>
  209.             <groupId>org.codehaus.mojo</groupId>
  210.             <artifactId>build-helper-maven-plugin</artifactId>
  211.             <version>1.10</version>
  212.             <executions>
  213.                 <execution>
  214.                     <id>add-resource</id>
  215.                     <phase>initialize</phase>
  216.                     <goals>
  217.                         <goal>add-resource</goal>
  218.                     </goals>
  219.                     <configuration>
  220.                         <resources>
  221.                             <resource>
  222.                                 <directory>src/main/generated-sources</directory>
  223.                             </resource>
  224.                         </resources>
  225.                     </configuration>
  226.                 </execution>
  227.             </executions>
  228.         </plugin>
  229.  
  230.         <plugin>
  231.             <groupId>com.mysema.maven</groupId>
  232.             <artifactId>apt-maven-plugin</artifactId>
  233.             <version>1.1.3</version>
  234.             <executions>
  235.                 <execution>
  236.                     <goals>
  237.                         <goal>process</goal>
  238.                     </goals>
  239.                     <configuration>
  240.                         <outputDirectory>src/main/generated-sources</outputDirectory>
  241.                         <processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
  242.                     </configuration>
  243.                 </execution>
  244.             </executions>
  245.             <dependencies>
  246.                 <dependency>
  247.                     <groupId>com.mysema.querydsl</groupId>
  248.                     <artifactId>querydsl-apt</artifactId>
  249.                     <version>3.4.3</version>
  250.                 </dependency>
  251.             </dependencies>
  252.         </plugin>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top