Skip to content
This repository has been archived by the owner on Nov 22, 2019. It is now read-only.

Commit

Permalink
Karma tests will use exec plugin in as front-end-maven using Karma st…
Browse files Browse the repository at this point in the history
…art rather than ng test
  • Loading branch information
rareddy committed Nov 7, 2018
1 parent 97274f3 commit 0a48fea
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 62 deletions.
2 changes: 1 addition & 1 deletion ui/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = function (config) {
],
junitReporter : {
// .../beetle-studio/target/karma-reports/*.xml
outputDir : '../../target/karma-reports/'
outputDir : './target/karma-reports/'
},
angularCli: {
environment: 'dev'
Expand Down
127 changes: 67 additions & 60 deletions ui/pom.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
<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"
>
<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>org.teiid</groupId>
<artifactId>komodo-parent</artifactId>
<version>0.0.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
<groupId>org.teiid</groupId>
<artifactId>komodo-parent</artifactId>
<version>0.0.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<!-- ================================================================== -->
<!-- Self -->
Expand Down Expand Up @@ -60,64 +57,20 @@
<!-- Properties -->
<!-- ================================================================== -->
<properties>
<maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss</maven.build.timestamp.format>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<timestamp>${maven.build.timestamp}</timestamp>
<version.exec-maven-plugin>1.5.0</version.exec-maven-plugin>
<version.maven-antrun-plugin>1.8</version.maven-antrun-plugin>
<version.maven-clean-plugin>3.0.0</version.maven-clean-plugin>
<version.maven-compiler-plugin>3.5.1</version.maven-compiler-plugin>
<version.maven-resources-plugin>2.7</version.maven-resources-plugin>
<version.maven-war-plugin>2.6</version.maven-war-plugin>
<finalName>beetle-studio</finalName>
<version.exec-maven-plugin>1.5.0</version.exec-maven-plugin>
</properties>

<!-- ================================================================== -->
<!-- Build -->
<!-- ================================================================== -->
<build>
<finalName>${finalName}</finalName>

<plugins>
<!-- Copy the Angular UI sources to target to build.
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<version>${version.maven-resources-plugin}</version>
<executions>
<execution>
<id>copy-angular-sources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>target</outputDirectory>
<resources>
<resource>
<directory>${basedir}</directory>
<includes>
<include>**/*</include>
</includes>
<excludes>
<exclude>**/node_modules/**</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
-->
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<!--
<configuration>
<installDirectory>target</installDirectory>
<workingDirectory>target</workingDirectory>
</configuration>
-->
<executions>
<!-- Install Node and Yarn -->
<execution>
Expand Down Expand Up @@ -151,15 +104,69 @@
<arguments>build</arguments>
</configuration>
</execution>
</executions>
</plugin>
<!-- Call npm install to resolve the dependencies of the Angular UI in package.json. -->
<plugin>
<artifactId>exec-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<version>${version.exec-maven-plugin}</version>
<executions>
<execution>
<id>javascript tests</id>
<id>karmaTest</id>
<goals>
<goal>karma</goal>
<goal>exec</goal>
</goals>
<phase>test</phase>
</execution>
<configuration>
<executable>ng</executable>
<arguments>
<argument>test</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugin>
</plugins>
</build>
</build>

<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
3 changes: 2 additions & 1 deletion ui/src/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
"node"
]
},
"files": [
"files": [
"test.ts"
],
"include": [
"**/*.spec.ts",
"./polyfills.ts",
"**/*.d.ts"
]
}

0 comments on commit 0a48fea

Please sign in to comment.