Commit 12676c9d authored by Noel Alonso's avatar Noel Alonso
Browse files

Merge branch 'dev' into 'master'

Actualiza imagen de compilación

See merge request redmic-project/server/library/exceptions!1
parents 9749a152 e04bf85f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ stages:

maven-build:
  stage: build
  image: redmic/maven-gitlab
  image: registry.gitlab.com/redmic-project/docker/maven
  variables:
    MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
  only:
+74 −6
Original line number Diff line number Diff line
@@ -2,19 +2,32 @@
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

	<parent>
		<groupId>es.redmic.lib</groupId>
		<artifactId>libs</artifactId>
		<version>0.6.0</version>
		<groupId>org.springframework.boot</groupId>
   		<artifactId>spring-boot-starter-parent</artifactId>
    	<version>2.0.0.RELEASE</version>
		<relativePath/>
	</parent>

	<modelVersion>4.0.0</modelVersion>
	<groupId>es.redmic.lib</groupId>
	<artifactId>exceptions</artifactId>
	<packaging>jar</packaging>
	<version>0.6.0</version>
	<name>Exceptions</name>
	<description>Exceptions</description>
	<description>Exceptions utils and management</description>

	<properties>
		<checkstyle.config.location>src/main/resources/checkstyle.xml</checkstyle.config.location>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<java.version>1.8</java.version>
		
		<!-- Version plugins -->
		<jacoco.version>0.8.1</jacoco.version>

		<!-- Environment variables -->
		<env.MAVEN_REPO_URL>https://artifactory.redmic.net/artifactory</env.MAVEN_REPO_URL>
	</properties>

	<dependencies>
@@ -54,5 +67,60 @@
			</exclusions>
		</dependency>
		
		<!-- Logs -->
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-api</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-core</artifactId>
			<scope>provided</scope>
		</dependency>
		
		<!-- TEST -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>
	<distributionManagement>
		<repository>
			<id>central</id>
			<name>redmic-releases</name>
			<url>${env.MAVEN_REPO_URL}/libs-release-local</url>
		</repository>
		<snapshotRepository>
			<id>snapshots</id>
			<name>redmic-snapshots</name>
			<url>${env.MAVEN_REPO_URL}/libs-snapshot-local</url>
			<uniqueVersion>false</uniqueVersion>
		</snapshotRepository>
	</distributionManagement>
	<build>
		<plugins>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>${jacoco.version}</version>
				<executions>
					<execution>
						<id>pre-unit-test</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
					<execution>
						<id>post-unit-test</id>
						<phase>test</phase>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>
+2 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ public enum ExceptionType implements ExceptionTypeItfc {
	PASSWORD_NOT_MATCH(Constants.PASSWORD_NOT_MATCH),
	RESET_PASSWORD_TIMEOUT(Constants.RESET_PASSWORD_TIMEOUT),
	TOKEN_NOT_FOUND(Constants.TOKEN_NOT_FOUND),
	RECAPTCHA_NOT_VALID(Constants.RECAPTCHA_NOT_VALID),
	
	// Security
	NOT_ALLOWED_EXCEPTION(Constants.NOT_ALLOWED_EXCEPTION),
@@ -160,6 +161,7 @@ public enum ExceptionType implements ExceptionTypeItfc {
			PASSWORD_NOT_MATCH = "PasswordNotMatch",
			RESET_PASSWORD_TIMEOUT = "ResetPasswordTimeOut",
			TOKEN_NOT_FOUND = "TokenNotFound",
			RECAPTCHA_NOT_VALID = "RecaptchaNotValid",

			// Security
			NOT_ALLOWED_EXCEPTION = "NotAllowedException",
+14 −0
Original line number Diff line number Diff line
package es.redmic.exception.user;

import es.redmic.exception.common.BadRequestException;
import es.redmic.exception.common.ExceptionType;

public class RecaptchaNotValidException extends BadRequestException {

	private static final long serialVersionUID = 6714485190161856195L;

	public RecaptchaNotValidException() {

		super(ExceptionType.RECAPTCHA_NOT_VALID);
	}
}
+1 −0
Original line number Diff line number Diff line
@@ -80,6 +80,7 @@ ActivateAccountTimeOut=Error. Tiempo para activar la cuenta excedido.
PasswordNotMatch=Error. The password does not match the old one.
ResetPasswordTimeOut=Error. Time to change the password exceeded.
TokenNotFound=Error. Resource not accessible.
RecaptchaNotValid=Error. Recaptcha is'nt valid.

#Task
IngestPersistenceDataException=Error. The data could not be saved.
Loading