Commit c914257d authored by Administrator's avatar Administrator

Updates project for the new course

Angular has been updated to the version 11.

In addition, some minor changes have been done to update the project
and adapt it to some depencencies updates.
parent 7eb5e25d
......@@ -15,3 +15,6 @@ WebContent
# Testing
/servers
C:\\nppdf32Log\\debuglog.txt
# Angular
src/main/angular
......@@ -5,6 +5,16 @@ Aplicación y arquitectura de ejemplo para la asignatura Desarrollo Ágil de
Aplicaciones del Grado en Ingeniería Informática de la Escuela Superior de
Ingeniería Informática de la Universidad de Vigo.
## Dependencias
Este proyecto está diseñado para ser desarrollado en un entorno con:
* Maven 3
* Java 8
* MySQL 5.7.6+ o 8+
Además, se recomienda emplear la última versión de Eclipse IDE for Enterprise
Java Developers.
## Ejecución con Maven
La configuración de Maven ha sido preparada para permitir varios tipos de
ejecución.
......
DROP DATABASE IF EXISTS `daaexample`;
CREATE DATABASE `daaexample`;
CREATE TABLE `daaexample`.`people` (
......@@ -14,7 +15,7 @@ CREATE TABLE `daaexample`.`users` (
PRIMARY KEY (`login`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE USER 'daa'@'localhost' IDENTIFIED WITH mysql_native_password BY 'daa';
CREATE USER IF NOT EXISTS 'daa'@'localhost' IDENTIFIED WITH mysql_native_password BY 'daa';
GRANT ALL ON `daaexample`.* TO 'daa'@'localhost';
INSERT INTO `daaexample`.`people` (`id`,`name`,`surname`) VALUES (0,'Antón','Pérez');
......
DROP DATABASE IF EXISTS `daaexample`;
CREATE DATABASE `daaexample`;
CREATE TABLE `daaexample`.`people` (
......@@ -14,5 +15,5 @@ CREATE TABLE `daaexample`.`users` (
PRIMARY KEY (`login`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE USER 'daa'@'localhost' IDENTIFIED WITH mysql_native_password BY 'daa';
CREATE USER IF NOT EXISTS 'daa'@'localhost' IDENTIFIED WITH mysql_native_password BY 'daa';
GRANT ALL ON `daaexample`.* TO 'daa'@'localhost';
......@@ -36,7 +36,7 @@
<slf4j-jdk14.version>1.7.21</slf4j-jdk14.version>
<!-- Tests dependencies -->
<junit.version>4.12</junit.version>
<junit.version>4.13.2</junit.version>
<java-hamcrest.version>2.0.0.0</java-hamcrest.version>
<easymock.version>3.5.1</easymock.version>
<selenium-java.version>3.141.59</selenium-java.version>
......@@ -45,13 +45,14 @@
<spring-test-dbunit.version>1.3.0</spring-test-dbunit.version>
<hsqldb.version>2.3.3</hsqldb.version>
<mysql.version>5.1.45</mysql.version>
<geckodriver.version>v0.26.0</geckodriver.version>
<geckodriver.version>v0.29.0</geckodriver.version>
<equalsverifier.version>2.4.2</equalsverifier.version>
<!-- Plugins -->
<exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
<maven-failsafe-plugin.version>2.20.1</maven-failsafe-plugin.version>
<maven-jxr-plugin>3.0.0</maven-jxr-plugin>
<maven-surefire-plugin.version>2.20.1</maven-surefire-plugin.version>
<maven-surefire-report-plugin.version>2.20.1</maven-surefire-report-plugin.version>
<maven-war-plugin.version>3.2.0</maven-war-plugin.version>
......@@ -187,6 +188,16 @@
</dependency>
</dependencies>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>${maven-jxr-plugin.version}</version>
</plugin>
</plugins>
</reporting>
<build>
<finalName>DAAExample</finalName>
......@@ -247,7 +258,7 @@
<id>exec-npm-ng-build</id>
<phase>generate-sources</phase>
<configuration>
<skip>${skip-npm-build}</skip>
<skip>${skip-npm-build}</skip>
<workingDirectory>${project.basedir}/src/main/angular</workingDirectory>
<executable>npm</executable>
<arguments>
......@@ -361,10 +372,11 @@
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
......@@ -667,7 +679,7 @@
<cargo.datasource.datasource.h2>
cargo.datasource.jndi=jdbc/daaexample|
cargo.datasource.driver=com.mysql.jdbc.Driver|
cargo.datasource.url=jdbc:mysql://localhost/daaexample|
cargo.datasource.url=jdbc:mysql://localhost/daaexample?useSSL=false|
cargo.datasource.username=daa|
cargo.datasource.password=daa|
cargo.datasource.maxActive=8|
......@@ -782,7 +794,7 @@
<cargo.datasource.datasource.h2>
cargo.datasource.jndi=jdbc/daaexample|
cargo.datasource.driver=com.mysql.jdbc.Driver|
cargo.datasource.url=jdbc:mysql://localhost/daaexample|
cargo.datasource.url=jdbc:mysql://localhost/daaexample?useSSL=false|
cargo.datasource.username=daa|
cargo.datasource.password=daa|
cargo.datasource.maxActive=8|
......
......@@ -10,13 +10,14 @@
"prefix": "app",
"schematics": {
"@schematics/angular:component": {
"styleext": "scss"
"style": "scss"
}
},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "dist/angular",
"index": "src/index.html",
"main": "src/main.ts",
......@@ -43,7 +44,6 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
......@@ -54,6 +54,10 @@
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
]
}
......
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
#
# For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed
> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11
\ No newline at end of file
This diff is collapsed.
{
"name": "daa-example",
"version": "0.2.0-alpha.13",
"version": "0.2.0-alpha.14",
"scripts": {
"ng": "./node_modules/.bin/ng",
"start": "./node_modules/.bin/ng serve",
......@@ -11,43 +11,43 @@
},
"private": true,
"dependencies": {
"@angular/animations": "~8.2.14",
"@angular/cdk": "^8.2.3",
"@angular/common": "~8.2.14",
"@angular/compiler": "~8.2.14",
"@angular/core": "~8.2.14",
"@angular/forms": "~8.2.14",
"@angular/platform-browser": "~8.2.14",
"@angular/platform-browser-dynamic": "~8.2.14",
"@angular/router": "~8.2.14",
"angular2-notifications": "^3.0.0",
"@angular/animations": "~11.2.1",
"@angular/cdk": "^11.2.1",
"@angular/common": "~11.2.1",
"@angular/compiler": "~11.2.1",
"@angular/core": "~11.2.1",
"@angular/forms": "~11.2.1",
"@angular/platform-browser": "~11.2.1",
"@angular/platform-browser-dynamic": "~11.2.1",
"@angular/router": "~11.2.1",
"angular2-notifications": "^9.0.0",
"bootstrap": "^4.4.1",
"jquery": "^3.4.1",
"popper.js": "^1.16.1",
"core-js": "^2.5.4",
"rxjs": "~6.5.4",
"tslib": "^1.9.0",
"zone.js": "~0.9.1"
"jquery": "^3.5.1",
"popper.js": "^1.16.1",
"rxjs": "~6.6.3",
"tslib": "^2.0.0",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.803.25",
"@angular/cli": "~8.3.25",
"@angular/compiler-cli": "~8.2.14",
"@angular/language-service": "~8.2.14",
"@types/jasmine": "~2.8.8",
"@angular-devkit/build-angular": "~0.1102.1",
"@angular/cli": "~11.2.1",
"@angular/compiler-cli": "~11.2.1",
"@angular/language-service": "~11.2.1",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "^5.0.1",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~3.1.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.4.0",
"@types/node": "^12.11.1",
"codelyzer": "^6.0.0",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.1.1",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~7.0.0",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "~3.5.3"
"tslint": "~6.1.0",
"typescript": "~4.0.7"
}
}
......@@ -50,7 +50,7 @@ const routes: Routes = [
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
imports: [RouterModule.forRoot(routes, { relativeLinkResolution: 'legacy' })],
exports: [RouterModule]
})
export class AppRoutingModule { }
......@@ -17,12 +17,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { TestBed, async } from '@angular/core/testing';
import { TestBed, waitForAsync } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
RouterTestingModule
......
......@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { LoginPanelComponent } from './login-panel.component';
......@@ -25,7 +25,7 @@ describe('LoginPanelComponent', () => {
let component: LoginPanelComponent;
let fixture: ComponentFixture<LoginPanelComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ LoginPanelComponent ]
})
......
......@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { MainPanelComponent } from './main-panel.component';
......@@ -25,7 +25,7 @@ describe('MainPanelComponent', () => {
let component: MainPanelComponent;
let fixture: ComponentFixture<MainPanelComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ MainPanelComponent ]
})
......
......@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { PeopleFormComponent } from './people-form.component';
......@@ -25,7 +25,7 @@ describe('PeopleFormComponent', () => {
let component: PeopleFormComponent;
let fixture: ComponentFixture<PeopleFormComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ PeopleFormComponent ]
})
......
......@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { PeopleListComponent } from './people-list.component';
......@@ -25,7 +25,7 @@ describe('PeopleListComponent', () => {
let component: PeopleListComponent;
let fixture: ComponentFixture<PeopleListComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ PeopleListComponent ]
})
......
......@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { PeopleMainComponent } from './people-main.component';
......@@ -25,7 +25,7 @@ describe('PeopleMainComponent', () => {
let component: PeopleMainComponent;
let fixture: ComponentFixture<PeopleMainComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ PeopleMainComponent ]
})
......
......@@ -20,7 +20,7 @@
import {Injectable} from '@angular/core';
import {BehaviorSubject, Observable, of} from 'rxjs';
import {UserModel} from '../models';
import {HttpClient, HttpHeaders, HttpParams} from '@angular/common/http';
import {HttpClient, HttpHeaders} from '@angular/common/http';
import {environment} from '../../environments/environment';
import {catchError, tap} from 'rxjs/operators';
......
......@@ -4,8 +4,11 @@
"outDir": "../out-tsc/app",
"types": []
},
"exclude": [
"test.ts",
"**/*.spec.ts"
"files": [
"main.ts",
"polyfills.ts"
],
"include": [
"src/**/*.d.ts"
]
}
......@@ -6,7 +6,7 @@
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"module": "esnext",
"module": "es2020",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
......
......@@ -73,7 +73,6 @@
"no-trailing-whitespace": true,
"no-unnecessary-initializer": true,
"no-unused-expression": true,
"no-use-before-declare": true,
"no-var-keyword": true,
"object-literal-sort-keys": false,
"one-line": [
......
......@@ -12,7 +12,7 @@ import static es.uvigo.esei.daa.dataset.PeopleDataset.peopleWithout;
import static es.uvigo.esei.daa.matchers.IsEqualToPerson.containsPeopleInAnyOrder;
import static es.uvigo.esei.daa.matchers.IsEqualToPerson.equalsToPerson;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import static org.hamcrest.MatcherAssert.assertThat;
import javax.sql.DataSource;
......
......@@ -14,7 +14,7 @@ import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.reset;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import static org.hamcrest.MatcherAssert.assertThat;
import java.sql.SQLException;
......
......@@ -2,7 +2,7 @@ package es.uvigo.esei.daa.entities;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
......
......@@ -18,7 +18,7 @@ import static es.uvigo.esei.daa.matchers.IsEqualToPerson.equalsToPerson;
import static javax.ws.rs.client.Entity.entity;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import static org.hamcrest.MatcherAssert.assertThat;
import java.io.IOException;
import java.util.List;
......
......@@ -22,7 +22,7 @@ import static org.easymock.EasyMock.replay;
import static org.easymock.EasyMock.verify;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
import static org.hamcrest.MatcherAssert.assertThat;
import java.util.List;
......
......@@ -8,7 +8,7 @@ import static es.uvigo.esei.daa.matchers.HasHttpStatus.hasOkStatus;
import static es.uvigo.esei.daa.matchers.HasHttpStatus.hasUnauthorized;
import static es.uvigo.esei.daa.matchers.IsEqualToUser.equalsToUser;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import static org.hamcrest.MatcherAssert.assertThat;
import java.io.IOException;
......
......@@ -10,7 +10,7 @@ import static es.uvigo.esei.daa.matchers.IsEqualToPerson.containsPeopleInAnyOrde
import static es.uvigo.esei.daa.matchers.IsEqualToPerson.equalsToPerson;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.hamcrest.MatcherAssert.assertThat;
import java.util.concurrent.TimeUnit;
......
......@@ -138,7 +138,7 @@
<Realm className="org.apache.catalina.realm.JDBCRealm"
driverName="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://localhost/daaexample"
connectionURL="jdbc:mysql://localhost/daaexample?useSSL=false"
connectionName="daa"
connectionPassword="daa"
userTable="users" userNameCol="login" userCredCol="password"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment