I try to build my team project with "mvn install" and got the following error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile) on project domain: Compilation failure: Compilation failure:
[ERROR] /D:/Omena/nelson-api/domain/src/main/java/nelson/domain/property/Property.java:[5,36] package javax.validation.constraints does not exist
[ERROR] /D:/Omena/nelson-api/domain/src/main/java/nelson/domain/model/dto/MaintenanceDetails.java:[8,36] package javax.validation.constraints does not exist
[ERROR] /D:/Omena/nelson-api/domain/src/main/java/nelson/domain/property/service/PropertyService.java:[10,24] package javax.validation does not exist
[ERROR] /D:/Omena/nelson-api/domain/src/main/java/nelson/domain/property/Property.java:[15,6] cannot find symbol
[ERROR] symbol: class NotNull
[ERROR] location: class nelson.domain.property.Property
[ERROR] /D:/Omena/nelson-api/domain/src/main/java/nelson/domain/property/Property.java:[16,6] cannot find symbol
[ERROR] symbol: class NotNull
[ERROR] location: class nelson.domain.property.Property
[ERROR] /D:/Omena/nelson-api/domain/src/main/java/nelson/domain/property/Property.java:[17,6] cannot find symbol
[ERROR] symbol: class NotNull
[ERROR] location: class nelson.domain.property.Property
[ERROR] /D:/Omena/nelson-api/domain/src/main/java/nelson/domain/model/dto/MaintenanceDetails.java:[15,6] cannot find symbol
[ERROR] symbol: class NotNull
[ERROR] location: class nelson.domain.model.dto.MaintenanceDetails
[ERROR] /D:/Omena/nelson-api/domain/src/main/java/nelson/domain/model/dto/MaintenanceDetails.java:[16,6] cannot find symbol
[ERROR] symbol: class NotNull
[ERROR] location: class nelson.domain.model.dto.MaintenanceDetails
[ERROR] /D:/Omena/nelson-api/domain/src/main/java/nelson/domain/model/dto/MaintenanceDetails.java:[17,6] cannot find symbol
[ERROR] symbol: class NotNull
[ERROR] location: class nelson.domain.model.dto.MaintenanceDetails
[ERROR] /D:/Omena/nelson-api/domain/src/main/java/nelson/domain/model/dto/MaintenanceDetails.java:[18,6] cannot find symbol
[ERROR] symbol: class NotNull
[ERROR] location: class nelson.domain.model.dto.MaintenanceDetails
[ERROR] /D:/Omena/nelson-api/domain/src/main/java/nelson/domain/property/service/PropertyService.java:[75,23] cannot find symbol
Here the pom.xml file, also I don't have the permission to change this file
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
I've google a lot but no luck. For some reason, all answers about this problem surprisingly short and vague.
Update 1: UTF-8 problem solved (but there are still other error around)
Update 2: here detail import of Property.java
package nelson.domain.property;
import java.io.Serializable;
import javax.validation.constraints.NotNull;
import nelson.common.util.Struct;
Property.java:[5,36] package javax.validation.constraints does not exist
and[ERROR] symbol: class NotNull
. -- You have animport javax.validation.constraints.NotNull;
but you do not have the corresponding dependency in thepom.xml
. -- You may look for the maven dependency. – Jaime