Skip to content

Commit

Permalink
Merge pull request #1 from Bernardo-MG/release
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
Bernardo-MG committed Nov 1, 2020
2 parents fc61b39 + 78e9ec6 commit 2a1c569
Show file tree
Hide file tree
Showing 67 changed files with 531 additions and 348 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/testing.yml
Expand Up @@ -17,5 +17,9 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.jdk }}
- name: Update apt-get
run: sudo apt-get update
- name: Update Chrome
run: sudo apt-get upgrade google-chrome-stable -y
- name: Run all tests
run: mvn clean verify
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -24,7 +24,7 @@

<groupId>com.bernardomg.maven.archetypes</groupId>
<artifactId>spring-mvc-angular-archetype</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.0</version>
<packaging>maven-archetype</packaging>

<name>Spring MVC with Angular Maven Archetype</name>
Expand Down
14 changes: 9 additions & 5 deletions src/main/resources/META-INF/maven/archetype-metadata.xml
Expand Up @@ -57,8 +57,11 @@
<directory>src/main/js</directory>
<includes>
<include>**/*.js</include>
<include>**/*.scss</include>
<include>**/*.json</include>
<include>**/*.sass</include>
<include>**/*.ts</include>
<include>**/*.html</include>
<include>**/*.gitkeep</include>
</includes>
</fileSet>
<fileSet filtered="false" encoding="UTF-8">
Expand Down Expand Up @@ -166,17 +169,18 @@
<!-- Frontend project files -->
<directory></directory>
<includes>
<include>angular.json</include>
<include>package.json</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8">
<!-- Frontend files -->
<directory></directory>
<includes>
<include>webpack.*.js</include>
<include>.babelrc</include>
<include>.eslintrc</include>
<include>.nvmrc</include>
<include>.browserslistrc</include>
<include>.editorconfig</include>
<include>karma.conf.js</include>
<include>tslint.json</include>
</includes>
</fileSet>
</fileSets>
Expand Down
30 changes: 15 additions & 15 deletions src/main/resources/archetype-resources/angular.json
Expand Up @@ -3,15 +3,15 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"dnd5-api-angular-client": {
"${artifactId}": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "sass"
}
},
"root": "",
"sourceRoot": "src/main/js",
"root": "src/main/js",
"sourceRoot": ".",
"prefix": "app",
"architect": {
"build": {
Expand All @@ -21,7 +21,7 @@
"index": "src/main/js/index.html",
"main": "src/main/js/main.ts",
"polyfills": "src/main/js/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"tsConfig": "src/main/js/tsconfig.app.json",
"aot": true,
"assets": [
"src/main/js/assets"
Expand Down Expand Up @@ -66,26 +66,26 @@
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "dnd5-api-angular-client:build"
"browserTarget": "${artifactId}:build"
},
"configurations": {
"production": {
"browserTarget": "dnd5-api-angular-client:build:production"
"browserTarget": "${artifactId}:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "dnd5-api-angular-client:build"
"browserTarget": "${artifactId}:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/main/js/test.ts",
"polyfills": "src/main/js/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"tsConfig": "src/main/js/tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/main/js/assets"
Expand All @@ -98,7 +98,7 @@
},
"configurations": {
"production": {
"devServerTarget": "dnd5-api-angular-client:serve:production"
"devServerTarget": "${artifactId}:serve:production"
},
"ci": {
"watch": false,
Expand All @@ -111,8 +111,8 @@
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json",
"src/main/js/tsconfig.app.json",
"src/main/js/tsconfig.spec.json",
"src/main/js/e2e/tsconfig.json"
],
"exclude": [
Expand All @@ -124,20 +124,20 @@
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "src/main/js/e2e/protractor.conf.js",
"devServerTarget": "dnd5-api-angular-client:serve"
"devServerTarget": "${artifactId}:serve"
},
"configurations": {
"production": {
"devServerTarget": "dnd5-api-angular-client:serve:production"
"devServerTarget": "${artifactId}:serve:production"
},
"ci": {
"devServerTarget": "dnd5-api-angular-client:serve:production",
"devServerTarget": "${artifactId}:serve:production",
"protractorConfig": "src/main/js/e2e/protractor-ci.conf.js"
}
}
}
}
}
},
"defaultProject": "dnd5-api-angular-client"
"defaultProject": "${artifactId}"
}
2 changes: 1 addition & 1 deletion src/main/resources/archetype-resources/karma.conf.js
Expand Up @@ -16,7 +16,7 @@ module.exports = function (config) {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/dnd5-api-angular-client'),
dir: require('path').join(__dirname, './coverage/${artifactId}'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
Expand Down
16 changes: 8 additions & 8 deletions src/main/resources/archetype-resources/package.json
@@ -1,19 +1,19 @@
{
"name": "test",
"version": "0.0.1-SNAPSHOT",
"description": "A Spring MVC project using React+Redux for the views.",
"author": "Bernardo Martínez Garrido",
"homepage": "https://github.com/bernardo-mg/test",
"name": "${artifactId}",
"version": "${version}",
"description": "${projectDescription}",
"author": "${developerName}",
"homepage": "https://github.com/${repoUserId}/${artifactId}",
"license": "MIT",
"keywords": [
"keywords"
${keywords}
],
"repository": {
"type": "git",
"url": "git@github.com:bernardo-mg/test.git"
"url": "git@github.com:${repoUserId}/${artifactId}.git"
},
"bugs": {
"url": "https://www.github.com/bernardo-mg/test/issues"
"url": "https://www.github.com/${repoUserId}/${artifactId}/issues"
},
"scripts": {
"ng": "ng",
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/archetype-resources/pom.xml
Expand Up @@ -809,6 +809,12 @@

<build>
<defaultGoal>clean package</defaultGoal>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
Expand Down
11 changes: 11 additions & 0 deletions src/main/resources/archetype-resources/src/main/js/app/api-page.ts
@@ -0,0 +1,11 @@
export interface ApiPage<T> {
content: T;
empty: boolean;
first: boolean;
last: boolean;
number: number;
numberOfElements: number;
size: number;
totalElements: number;
totalPages: number;
}
@@ -1,4 +1,6 @@
import { ApiPage } from './api-page';

export interface ApiResponse<T> {
count: number;
results: T;
content: ApiPage<T>;
status: T;
}
@@ -1,11 +1,14 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { CharclassComponent } from './charclass-view/charclass/charclass.component';
import { DataViewSearchComponent } from './data-view/data-view-search/data-view-search.component';
import { DataFormViewComponent } from './data-form/data-form-view/data-form-view.component';
import { DataReportComponent } from './data-report/data-report.component';

const routes: Routes = [
{ path: '', redirectTo: '/classes', pathMatch: 'full' },
{ path: 'classes', redirectTo: 'classes/', pathMatch: 'full' },
{ path: 'classes/:id', component: CharclassComponent }
{ path: '', redirectTo: '/data', pathMatch: 'full' },
{ path: 'data', component: DataViewSearchComponent },
{ path: 'form', component: DataFormViewComponent },
{ path: 'report', component: DataReportComponent }
];

@NgModule({
Expand Down
Expand Up @@ -20,16 +20,16 @@ describe('AppComponent', () => {
expect(app).toBeTruthy();
});

it(`should have as title 'dnd5-api-angular-client'`, () => {
it(`should have as title '${artifactId}'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('dnd5-api-angular-client');
expect(app.title).toEqual('${artifactId}');
});

// it('should render title', () => {
// const fixture = TestBed.createComponent(AppComponent);
// fixture.detectChanges();
// const compiled = fixture.nativeElement;
// expect(compiled.querySelector('.content span').textContent).toContain('dnd5-api-angular-client app is running!');
// expect(compiled.querySelector('.content span').textContent).toContain('${artifactId} app is running!');
// });
});
Expand Up @@ -6,5 +6,5 @@ import { Component } from '@angular/core';
styleUrls: ['./app.component.sass']
})
export class AppComponent {
title = 'dnd5-api-angular-client';
title = '${artifactId}';
}
Expand Up @@ -6,30 +6,36 @@ import { LayoutModule } from '@angular/cdk/layout';

import { MatButtonModule } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';
import { MatListModule } from '@angular/material/list';
import { MatSidenavModule } from '@angular/material/sidenav';
import { MatToolbarModule } from '@angular/material/toolbar';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { CharclassViewModule } from './charclass-view/charclass-view.module';
import { NavigationComponent } from './navigation/navigation.component';
import { DataViewModule } from './data-view/data-view.module';
import { DataFormModule } from './data-form/data-form.module';
import { DataReportComponent } from './data-report/data-report.component';

@NgModule({
declarations: [
AppComponent,
NavigationComponent
NavigationComponent,
DataReportComponent
],
imports: [
AppRoutingModule,
BrowserModule,
HttpClientModule,
BrowserAnimationsModule,
LayoutModule,
CharclassViewModule,
MatButtonModule,
MatIconModule,
MatListModule,
MatSidenavModule,
MatToolbarModule
MatToolbarModule,
DataViewModule,
DataFormModule
],
providers: [],
bootstrap: [AppComponent]
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit 2a1c569

Please sign in to comment.