I was trying to deploy my project into a fat jar, but it failed, I'v tried to run the mvn clean
before the mvn install
, and everything is looks fine, but the error still happens on all the classes of my project.
here is the error (of 1 class):
CMD
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile <default-compile> on project application: Compilation failure: Compilation failure:
[ERROR] /C:/Workspace/MyProject/src/main/com/project/Customer.java [35, 41] cannot find symbol
pom.xml
<groupId>project</groupId>
<artifactId>application</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.5.RELEASE</version>
<relativePath />
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-ws</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.jgroups</groupId>
<artifactId>jgroups</artifactId>
<version>3.6.4.Final</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<executable>true</executable>
</configuration>
</plugin>
</plugins>
<finalName>executableJar</finalName>
</build>
Any ideas on how to solve this issue?
The line form the code
line 35 / ^ = 41
public int deleteUser (long id, Regi^on region) throws MyException;
Answer
So after a few hours of searching The problem was that the pom.xml didn't had the dependency that was needed to read this classes, I'v just added the dependency to my pom.xml file and everything is working fine!