Commit 5fff1fb3 authored by Noel's avatar Noel
Browse files

Initial commit

parents
Loading
Loading
Loading
Loading

.gitignore

0 → 100644
+4 −0
Original line number Diff line number Diff line
.*
!.gitignore
!.gitlab-ci.yml
target

.gitlab-ci.yml

0 → 100644
+24 −0
Original line number Diff line number Diff line
stages:
  - build

maven-build:
  stage: build
  image: redmic/maven-gitlab
  variables:
    MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
  only:
    - branches
  cache:
    paths:
      - .m2/repository/
  script:
    - mvn deploy -B
    - "COVERAGE=$(xmllint --html --xpath '//table[@id=\"coveragetable\"]/tfoot//td[@class=\"ctr2\"][1]/text()' target/site/jacoco/index.html)"
    - 'echo "Coverage: $COVERAGE"'
  after_script:
    - rm -r .m2/repository/es
  artifacts:
    name: "$CI_PROJECT_NAME"
    expire_in: '6 months'
    paths:
      - target/*.jar

README.md

0 → 100644
+2 −0
Original line number Diff line number Diff line
[![pipeline status](https://git.redmic.net/redmic-server/exceptions/badges/dev/pipeline.svg)](https://git.redmic.net/redmic-server/exceptions/commits/dev) [![coverage report](https://git.redmic.net/redmic-server/exceptions/badges/dev/coverage.svg)](https://git.redmic.net/redmic-server/exceptions/commits/dev)
 No newline at end of file

pom.xml

0 → 100644
+58 −0
Original line number Diff line number Diff line
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	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>
	</parent>

	<modelVersion>4.0.0</modelVersion>
	<artifactId>exceptions</artifactId>
	<packaging>jar</packaging>
	<name>Exceptions</name>
	<description>Exceptions</description>

	<properties>
		<checkstyle.config.location>src/main/resources/checkstyle.xml</checkstyle.config.location>
	</properties>

	<dependencies>
		<!-- Spring -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-tx</artifactId>
			<scope>provided</scope>
		</dependency>

		<!-- Hibernate para excepciones propias -->
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-core</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-validation</artifactId>
			<scope>provided</scope>
			<exclusions>
				<exclusion>
					<groupId>org.slf4j</groupId>
					<artifactId>log4j-over-slf4j</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.slf4j</groupId>
					<artifactId>slf4j-log4j12</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

	</dependencies>
</project>
+17 −0
Original line number Diff line number Diff line
package es.redmic.exception.atlas;

import java.util.Arrays;

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

public class LayerNotFoundException extends BaseException {

	private static final long serialVersionUID = 3658782399097632577L;

	public LayerNotFoundException(String layer, String url) {
		super(ExceptionType.LAYER_NOT_FOUND);
		setFieldErrors(Arrays.asList(layer, url));
	}
}
 No newline at end of file