How to generate code using jooq code generator with maven - sql-server

Hi I am trying to generate jooq code files without success. I am using intellij and maven to generate code. When I try an d generate the code nothing happens. I get this message: [INFO] Generating catalogs : Total: 0. I am using Sql server express with Jooq trial. Here is my pom:
<?xml version="1.0" encoding="UTF-8"?>
<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">
<modelVersion>4.0.0</modelVersion>
<groupId>com.test</groupId>
<artifactId>service</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>service</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.4.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>com.groupid</groupId>
<artifactId>entities</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web-services</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>6.1.0.jre8</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jooq.trial</groupId>
<artifactId>jooq</artifactId>
<version>3.9.3</version>
</dependency>
<dependency>
<groupId>org.jooq.trial</groupId>
<artifactId>jooq-meta</artifactId>
<version>3.9.3</version>
</dependency>
<dependency>
<groupId>org.jooq.trial</groupId>
<artifactId>jooq-codegen</artifactId>
<version>3.9.3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jooq.trial</groupId>
<artifactId>jooq-codegen-maven</artifactId>
<version>3.9.3</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<!-- Manage the plugin's dependency. In this example, we'll use a PostgreSQL database -->
<dependencies>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>6.1.0.jre8</version>
</dependency>
</dependencies>
<!-- Specify the plugin configuration.
The configuration format is the same as for the standalone code generator -->
<configuration>
<!--<logging>WARN</logging>-->
<!-- JDBC connection parameters -->
<jdbc>
<driver>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver>
<url>jdbc:sqlserver://localhost;databaseName=test</url>
<user>sa</user>
<password>test</password>
</jdbc>
<!-- Generator parameters -->
<generator>
<database>
<includes>.*</includes>
<excludes></excludes>
<!--<inputCatalog>public</inputCatalog>-->
<inputSchema>dbo</inputSchema>
</database>
<target>
<packageName>mypackage</packageName>
<directory>mypath</directory>
</target>
</generator>
</configuration>
</plugin>
</plugins>
</build>
</project>
Here is the output I get when trying to generate the files.
"C:\Program Files\Java\jdk1.8.0_131\bin\java" -Dmaven.multiModuleProjectDirectory=C:\projects\service "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.2\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.2\plugins\maven\lib\maven3\bin\m2.conf" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.2\lib\idea_rt.jar=59337:C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.2\plugins\maven\lib\maven3\boot\plexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version=2017.1.4 jooq-codegen:generate
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building service 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- jooq-codegen-maven:3.9.3:generate (default-cli) # service ---
[INFO] Database : Inferring database org.jooq.util.sqlserver.SQLServerDatabase from URL jdbc:sqlserver://localhost:1433;authentication=NotSpecified;authenticationScheme=nativeAuthentication;xopenStates=false;sendTimeAsDatetime=true;trustServerCertificate=false;TransparentNetworkIPResolution=true;serverNameAsACE=false;sendStringParametersAsUnicode=true;selectMethod=direct;responseBuffering=adaptive;packetSize=8000;multiSubnetFailover=false;loginTimeout=15;lockTimeout=-1;lastUpdateCount=true;encrypt=false;disableStatementPooling=true;databaseName=test;columnEncryptionSetting=Disabled;applicationName=Microsoft JDBC Driver for SQL Server;applicationIntent=readwrite;
[INFO] No <inputCatalog/> was provided. Generating ALL available catalogs instead.
[INFO] License parameters
[INFO] ----------------------------------------------------------
[INFO] Thank you for using jOOQ and jOOQ's code generator
[INFO]
[INFO] Database parameters
[INFO] ----------------------------------------------------------
[INFO] dialect : SQLSERVER
[INFO] URL : jdbc:sqlserver://localhost:1433;authentication=NotSpecified;authenticationScheme=nativeAuthentication;xopenStates=false;sendTimeAsDatetime=true;trustServerCertificate=false;TransparentNetworkIPResolution=true;serverNameAsACE=false;sendStringParametersAsUnicode=true;selectMethod=direct;responseBuffering=adaptive;packetSize=8000;multiSubnetFailover=false;loginTimeout=15;lockTimeout=-1;lastUpdateCount=true;encrypt=false;disableStatementPooling=true;databaseName=test;columnEncryptionSetting=Disabled;applicationName=Microsoft JDBC Driver for SQL Server;applicationIntent=readwrite;
[INFO] target dir : [target dir]
[INFO] target package : com.test
[INFO] includes : [.*]
[INFO] excludes : []
[INFO] includeExcludeColumns : false
[INFO] ----------------------------------------------------------
[INFO]
[INFO] JavaGenerator parameters
[INFO] ----------------------------------------------------------
[INFO] strategy : class org.jooq.util.DefaultGeneratorStrategy
[INFO] deprecated : true
[INFO] generated annotation : true
[INFO] JPA annotations : false
[INFO] validation annotations : false
[INFO] instance fields : true
[INFO] sequences : true
[INFO] udts : true
[INFO] routines : true
[INFO] tables : true
[INFO] records : true
[INFO] pojos : false
[INFO] immutable pojos : false
[INFO] interfaces : false
[INFO] immutable interfaces : false
[INFO] daos : false
[INFO] relations : true
[INFO] table-valued functions : true
[INFO] global references : true
[INFO] ----------------------------------------------------------
[INFO]
[INFO] Generation remarks
[INFO] ----------------------------------------------------------
[INFO]
[INFO] ----------------------------------------------------------
[INFO]
######################################
######################################
################ ## ##########
#################### ##########
################ ## ## ##########
########## #### ## ## ##########
########## ## ##########
######################################
######################################
########## ## ##########
########## ## ## #### ##########
########## ## ## #### ##########
########## ## # # ##########
########## ## ##########
####################### #############
######################################
###################################### Thank you for using the 30 day free jOOQ 3.9.3 trial edition
[INFO] Generating catalogs : Total: 0
[INFO] Removing excess files
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.214 s
[INFO] Finished at: 2017-07-04T18:10:46-05:00
[INFO] Final Memory: 23M/217M
[INFO] ------------------------------------------------------------------------
Process finished with exit code 0
Here is how I am running the generator tool;

This is a known issue in jOOQ 3.9.3: https://github.com/jOOQ/jOOQ/issues/6064
You have to specify an <inputCatalog/> if you want to specify an <inputSchema/> as well. The catalog is the name of your database.

Related

Heroku Springboot Err: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile

I am trying to get my Springboot Backend application to compile on Heroku.
I get the message: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile
I am totally lost and in the weeds on this.
Any help would be appreciated.
I do not even know how or where to add the -e or -X switch (referenced below).
Here is the applicable portion of the log and my POM file.
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/com/thoughtworks/qdox/qdox/2.0-M9/qdox-2.0-M9.jar (317 kB at 10 MB/s)
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) # budget-backend ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] skip non existing resourceDirectory /tmp/build_edc50946/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) # budget-backend ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /tmp/build_edc50946/target/test-classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.635 s
[INFO] Finished at: 2022-03-07T15:09:33Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile (default-testCompile) on project budget-backend: Fatal error compiling: invalid target release: 11 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
! ERROR: Failed to build app with Maven
<?xml version="1.0" encoding="UTF-8"?>
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>net.javaguides</groupId>
<artifactId>budget-backend</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>budget-backend</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>11</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
I added a system.properties file with 'java.runtime.version=11' and the error message from Heroku now says:
Execution repackage of goal org.springframework.boot:spring-boot-maven-plugin:2.5.0:repackage failed: Unable to find main class
Did I make things worse or am I getting closer?
Problem solved. I do not understand why, but it compiles on Heroku now.
I added a system.properties file with the following entry
java.runtime.version=11.
I also changed the POM to read
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
<executions>
<execution>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>

Allure Report using Jenkins displays wrong data

I am using Java, Maven and TestNG.
I would like to add Allure for reporting in Jenkins.
I have added following configuration in pom.xml:
Dependency:
<!-- https://mvnrepository.com/artifact/io.qameta.allure/allure-testng -->
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-testng</artifactId>
<version>2.12.1</version>
</dependency>
Profile:
<profile>
<id>UI</id>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>ui.xml</suiteXmlFile>
</suiteXmlFiles>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
</argLine>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin>
<plugin>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-maven</artifactId>
<version>LATEST_VERSION</version>
<configuration>
<reportVersion>2.4.1</reportVersion>
<reportDirectory>target/allure-results</reportDirectory>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
When I run tests locally using command:
clean test -PUI -f pom.xml
Most of the tests are passed.
[INFO] Results:
[INFO]
[INFO]
[ERROR] Tests run: 25, Failures: 6, Errors: 0, Skipped: 9
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13:39 min
[INFO] Finished at: 2019-06-21T11:30:09+03:00
[INFO] Final Memory: 23M/259M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M3:test (default-test) on project company: There are test failures.
However, "allure-results" is created in the root of project, but I have a config for "target/allure-results". While running tests locally using not Maven, but TestNG directly all tests are passed.
I installed Allure plugin in Jenkins, added configuration to Jenkins job:
However, after Jenkins job is finished I see that in Console Output some tests are passed, but it's shown that number of tests that were passed/running/failed is 0. And in Allure almost all tests are failed in a strange way - BeforeTest was failed, but Test was passed.
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[ERROR] There are test failures.
[JENKINS] Recording test results
[WARNING] Attempt to (de-)serialize anonymous class org.jfrog.hudson.maven2.MavenDependenciesRecorder$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 09:57 min
[INFO] Finished at: 2019-06-21T07:43:30+00:00
[INFO] Final Memory: 30M/313M
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[JENKINS] Archiving /var/lib/jenkins/workspace/tests.env.test/ui-test/pom.xml to com.company/company/1.0-SNAPSHOT/company-1.0-SNAPSHOT.pom
channel stopped
[ui-test] $ /var/lib/jenkins/tools/ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/allure/bin/allure generate -c -o /var/lib/jenkins/workspace/tests.env.test/ui-test/allure-report
Report successfully generated to /var/lib/jenkins/workspace/tests.env.test/ui-test/allure-report
Allure report was successfully generated.
Creating artifact for the build.
Artifact was added to the build.
Build step 'Allure Report' changed build result to UNSTABLE
Finished: UNSTABLE
By default Allure results files are stored in project root. In order to change location create an allure.properties file in your test resources directory (src/test/resources) with the following content:
allure.results.directory=target/allure-results
For more details please see the docs https://docs.qameta.io/allure/#_configuration

Maven JAR plugin skipping generated-resources folder

I am facing a strange issue while trying to run a simple AngularJS Spring Boot project (after sorting out the issues mentioned in this thread). Following is my Maven POM. The issue I am facing is that while the Wro4j plugin is able to generate the JS/CSS files under generated-resources, and despite that under build/resources I have provided the paths to be packaged, the files under generated-resources are not getting packaged within the JAR under "static" folder (only my custom JS file and the index.html file appear there). How could this be corrected?
<modelVersion>4.0.0</modelVersion>
<artifactId>spring-angularjs</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<parent>
<groupId>org.test</groupId>
<artifactId>my-microservice-parent</artifactId>
<version>0.1.0-SNAPSHOT</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<wro4j.version>1.8.0</wro4j.version>
<java.version>1.8</java.version>
<bootstrap.version>3.3.7-1</bootstrap.version>
<angularjs.version>1.5.9</angularjs.version>
<jquery.version>3.1.1-1</jquery.version>
</properties>
<dependencies>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>angularjs</artifactId>
<version>${angularjs.version}</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>jasmine</artifactId>
<version>2.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka-server</artifactId>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>${project.build.directory}/generated-resources</directory>
</resource>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<!-- Serves *only* to filter the wro.xml so it can get an absolute
path for the project -->
<id>copy-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/wro</outputDirectory>
<resources>
<resource>
<directory>src/main/wro</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>ro.isdc.wro4j</groupId>
<artifactId>wro4j-maven-plugin</artifactId>
<version>${wro4j.version}</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<configuration>
<wroManagerFactory>ro.isdc.wro.maven.plugin.manager.factory.ConfigurableWroManagerFactory</wroManagerFactory>
<cssDestinationFolder>${project.build.directory}/generated-resources/static/css</cssDestinationFolder>
<jsDestinationFolder>${project.build.directory}/generated-resources/static/js</jsDestinationFolder>
<wroFile>${project.build.directory}/wro/wro.xml</wroFile>
<!--
<extraConfigFile>${basedir}/src/main/wro/wro.properties</extraConfigFile>
<contextFolder>${basedir}/src/main/wro</contextFolder>
-->
<extraConfigFile>${project.build.directory}/wro/wro.properties</extraConfigFile>
<contextFolder>${project.build.directory}/wro</contextFolder>
</configuration>
<dependencies>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery</artifactId>
<version>${jquery.version}</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>angularjs</artifactId>
<version>${angularjs.version}</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
<version>${bootstrap.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>com.github.searls</groupId>
<artifactId>jasmine-maven-plugin</artifactId>
<version>2.0</version>
<executions>
<execution>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>angularjs</artifactId>
<version>${angularjs.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
Following is the Maven build log (for mvn clean package):
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building spring-angularjs 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # spring-angularjs ---
[INFO] Deleting C:\projects\spring-angularjs\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:copy-resources (copy-resources) # spring-angularjs ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # spring-angularjs ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\projects\spring-angularjs\target\generated-resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # spring-angularjs ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 3 source files to C:\projects\spring-angularjs\target\classes
[INFO]
[INFO] --- wro4j-maven-plugin:1.8.0:run (default) # spring-angularjs ---
[INFO] C:\projects\spring-angularjs\target/wro
[INFO] Executing the mojo:
[INFO] Wro4j Model path: C:\projects\spring-angularjs\target\wro\wro.xml
[INFO] targetGroups: null
[INFO] minimize: true
[INFO] ignoreMissingResources: null
[INFO] parallelProcessing: false
[INFO] buildDirectory: C:\projects\spring-angularjs\target
[INFO] destinationFolder: C:\projects\spring-angularjs\target
[INFO] jsDestinationFolder: C:\projects\spring-angularjs\target\generated-resources\static\js
[INFO] cssDestinationFolder: C:\projects\spring-angularjs\target\generated-resources\static\css
[INFO] The following groups will be processed: [angular-bootstrap]
[INFO] folder: C:\projects\spring-angularjs\target\generated-resources\static\css
[INFO] processing group: angular-bootstrap.css
[WARNING] Less warnings are:
[WARNING] 10:1 Cannot link source map. Css result location is not know and could not be deduced from input less source..
[INFO] file size: angular-bootstrap.css -> 145074 bytes
[INFO] C:\projects\spring-angularjs\target\generated-resources\static\css\angular-bootstrap.css (145074 bytes)
[INFO] folder: C:\projects\spring-angularjs\target\generated-resources\static\js
[INFO] processing group: angular-bootstrap.js
[INFO] file size: angular-bootstrap.js -> 254638 bytes
[INFO] C:\projects\spring-angularjs\target\generated-resources\static\js\angular-bootstrap.js (254638 bytes)
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # spring-angularjs ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\projects\spring-angularjs\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # spring-angularjs ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) # spring-angularjs ---
[INFO] No tests to run.
[INFO]
[INFO] --- jasmine-maven-plugin:2.0:test (default) # spring-angularjs ---
[INFO] jetty-8.1.14.v20131031
[INFO] Started SelectChannelConnector#0.0.0.0:60402
[INFO] Executing Jasmine Specs
[INFO] Resolved artifact C:\Users\XXXXX\.m2\repository\com\github\klieber\phantomjs\2.0.0\phantomjs-2.0.0-windows.zip from remote-repos-vr (https://vrartifactory.eficode.com/remote-repos-vr, default, releases+snapshots)
[INFO] Extracting C:\Users\XXXXX\.m2\repository\com\github\klieber\phantomjs\2.0.0\phantomjs-2.0.0-windows.zip\phantomjs-2.0.0-windows\bin\phantomjs.exe to C:\projects\spring-angularjs\target\phantomjs\phantomjs-2.0.0-windows\bin\phantomjs.exe
[INFO]
-------------------------------------------------------
J A S M I N E S P E C S
-------------------------------------------------------
[INFO]
Results: 0 specs, 0 failures, 0 pending
[INFO] stopped o.e.j.s.h.ContextHandler{/webjars,file:/C:/projects/spring-angularjs/}
[INFO] stopped o.e.j.s.h.ContextHandler{/classpath,file:/C:/projects/spring-angularjs/}
[INFO] stopped o.e.j.s.h.ContextHandler{/,file:/C:/projects/spring-angularjs/}
[INFO] stopped o.e.j.s.h.ContextHandler{/spec,file:/C:/projects/spring-angularjs/}
[INFO] stopped o.e.j.s.h.ContextHandler{/src,file:/C:/projects/spring-angularjs/}
[INFO]
[INFO] --- maven-jar-plugin:2.5:jar (default-jar) # spring-angularjs ---
[INFO] Building jar: C:\projects\spring-angularjs\target\spring-angularjs-0.0.1-SNAPSHOT.jar
[INFO]
[INFO] --- spring-boot-maven-plugin:1.3.8.RELEASE:repackage (default) # spring-angularjs ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 32.848 s
[INFO] Finished at: 2017-11-09T16:04:39+05:30
[INFO] Final Memory: 98M/503M
[INFO] ------------------------------------------------------------------------
wro4j-maven-plugin:run is running at compile phase, after the process-resources phases where all resources are copied to ${project.build.outputDirectory} (by default target/classes). Only files from this folder are included into your JAR, but your CSS/JS files are generated after Maven tried to copy them to the outputDirectory, thus never being added.
You simply have to configure Wro4j plugin to run during generate-resources phase:
<plugin>
<groupId>ro.isdc.wro4j</groupId>
<artifactId>wro4j-maven-plugin</artifactId>
<version>${wro4j.version}</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
...
</plugin>
If for some reasons your files cannot be generated before compile (maybe it requires your code to be compiled), you'll have instead to manually add your resources into your project build output directory with the Maven Resources Plugin after they are generated as you did in your comment - though I would recommend doing it during the prepare-package phase using ${project.build.outputDirectory} such as:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
<execution>
<id>copy-resources-post-compile</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.outputDirectory}</outputDir‌​ector‌​y>
<resources>
<resource>
<directory>${project.build.directory}/generated-res‌​ources</directory>
</resource>
</resources>
</configuration>
</execution>
</plugin>
EDIT: To learn more about the Maven lifecycle, phases and goals, see Intro to Build Lifecycle and this tutorial explains things well. Also take a look at the default bindings to see which plugins are run by default depending on your packaging.

Error when generating allure report with jasmine allure reporter

I am using jasmine allure reporter. When I ran My test suite got pom.xml generated. But when I wanted to run "mvn site -Dallure.results_pattern=allure-results" command in target directery, getting the following error. Any help highly appreciated.
[INFO] Rendering site with org.apache.maven.skins:maven-default-skin:jar:1.0 ski
n.
[INFO] Generating "Allure" report --- allure-maven-plugin:2.2
[INFO] Report Version: 1.4.15
[INFO] Results Pattern: allure-results
[INFO] Found [0] results directories by pattern [allure-results]
[INFO] Found [0] plugins
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:44 min
[INFO] Finished at: 2016-09-02T17:54:15+05:30
[INFO] Final Memory: 19M/161M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:si
te (default-site) on project protractor-allure-plugin-generate-html: Error during page generation: Error rendering Maven report: Can't find any results directories by pattern [allure-results] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, pleaseread the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
my pom.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<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">
<modelVersion>4.0.0</modelVersion>
<groupId>ru.yandex.allure</groupId>
<artifactId>protractor-allure-plugin-generate-html</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<allure.version>1.4.15</allure.version>
<allure.maven.version>2.2</allure.maven.version>
<!-- Relative to the dir you're running from -->
<allure.results_pattern>allure-results</allure.results_pattern>
</properties>
<dependencies>
<dependency>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-report-face</artifactId>
<version>${allure.version}</version>
<type>war</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.2.10.v20150310</version>
<configuration>
<webAppSourceDirectory>target/site/allure-maven-plugin</webAppSourceDirectory>
<stopKey>stop</stopKey>
<stopPort>2299</stopPort>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<excludeDefaults>true</excludeDefaults>
<plugins>
<plugin>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-maven-plugin</artifactId>
<version>${allure.maven.version}</version>
<configuration>
<resultsPattern>${allure.results_pattern}</resultsPattern>
<!--<reportVersion>1.4.15</reportVersion>-->
</configuration>
</plugin>
</plugins>
</reporting>
</project>

org.apache.maven.plugins:maven-compiler-plugin is missing

Hi I am new in automation testing
I am using:
Eclipse: Eclipse IDE for Java Developers
Version: Indigo Service Release 2
Build id: 20120216-1857
And apache maven version: apache-maven-3.0.4
I am facing problem to run automation script through maven and the error is:
D:\TestAutomation\MyTestProject_24>mvn install
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for MyTestProject_24:MyTestProject_24:jar:0.0.1-SNAPSHOT
[WARNING] 'dependencies.dependency.systemPath' for org.sikuli:sikuli-java:jar should use a variable
instead of a hard-coded path C:\SikuliX\sikuli-java.jar # line 109, column 18
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missi
ng. # line 125, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your
build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building MyTestProject24 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) # MyTestProject_24 ---
[debug] execute contextualize
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 6 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # MyTestProject_24 ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) #MyTestProject_24 ---
[debug] execute contextualize
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 5 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) # MyTestProject_24 ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.17:test (default-test) # MyTestProject_24 ---
[INFO] Surefire report directory: D:\TestAutomation\MyTestProject_24\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running TestSuite
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.531s
[INFO] Finished at: Mon Nov 17 11:41:00 IST 2014
[INFO] Final Memory: 7M/19M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test (default-test) on project MyTestProject_24: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test failed: There was an error in the forked process
[ERROR] org.testng.TestNGException:
[ERROR] Cannot instantiate class WebConsoleTest.WebConsoleLoginTest
[ERROR] at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
[ERROR] at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:387)
[ERROR] at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:299)
[ERROR] at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:110)
[ERROR] at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:186)
[ERROR] at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120)
[ERROR] at org.testng.TestRunner.initMethods(TestRunner.java:409)
[ERROR] at org.testng.TestRunner.init(TestRunner.java:235)
[ERROR] at org.testng.TestRunner.init(TestRunner.java:205)
[ERROR] at org.testng.TestRunner.<init>(TestRunner.java:153)
[ERROR] at org.testng.SuiteRunner$DefaultTestRunnerFactory.newTestRunner(SuiteRunner.java:522)
[ERROR] at org.testng.SuiteRunner.init(SuiteRunner.java:157)
[ERROR] at org.testng.SuiteRunner.<init>(SuiteRunner.java:111)
[ERROR] at org.testng.TestNG.createSuiteRunner(TestNG.java:1273)
[ERROR] at org.testng.TestNG.createSuiteRunners(TestNG.java:1260)
[ERROR] at org.testng.TestNG.runSuitesLocally(TestNG.java:1114)
[ERROR] at org.testng.TestNG.run(TestNG.java:1031)
[ERROR] at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:293)
[ERROR] at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:84)
[ERROR] at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:91)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBoote
r.java:200)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
[ERROR] Caused by: java.lang.reflect.InvocationTargetException
[ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:
57)
[ERROR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorIm
pl.java:45)
[ERROR] at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
[ERROR] at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
[ERROR] ... 22 more
[ERROR] Caused by: java.lang.NoClassDefFoundError: testlink/api/java/client/TestLinkAPIException
[ERROR] at WebConsoleTest.WebConsoleLoginTest.<init>(WebConsoleLoginTest.java:35)
[ERROR] ... 27 more
[ERROR] Caused by: java.lang.ClassNotFoundException: testlink.api.java.client.TestLinkAPIException
[ERROR] at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
[ERROR] at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
[ERROR] at java.security.AccessController.doPrivileged(Native Method)
[ERROR] at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
[ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
[ERROR] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
[ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
[ERROR] ... 28 more
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following arti
cles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
D:\TestAutomation\MyTestProject_24>
And POM.xml is:
<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">
<modelVersion>4.0.0</modelVersion>
<groupId>MyTestProject_24</groupId>
<artifactId>MyTestProject_24</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>MyTestProject24</name>
<dependencies>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.10</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium.grid</groupId>
<artifactId>selenium-grid-hub</artifactId>
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.28.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-testng</artifactId>
<version>2.17</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.28.0</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.5</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.8</version>
</dependency>
<dependency>
<groupId>net.sourceforge.jexcelapi</groupId>
<artifactId>jxl</artifactId>
<version>2.6.12</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk16</artifactId>
<version>1.46</version>
</dependency>
<dependency>
<groupId>net.schmizz</groupId>
<artifactId>sshj</artifactId>
<version>0.7.0</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>0.9.27</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>0.9.27</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.2</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>com.opera</groupId>
<artifactId>operadriver</artifactId>
<version>1.5</version>
</dependency>
<dependency>
<groupId>org.sikuli</groupId>
<artifactId>sikuli-java</artifactId>
<version>1.0.1</version>
<scope>system</scope>
<systemPath>C:\SikuliX\sikuli-java.jar</systemPath>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.sikuli</groupId>
<artifactId>sikuli-core</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
<plugin>
<groupId>eviware</groupId>
<artifactId>maven-soapui-plugin</artifactId>
<version>4.5.1</version>
<dependencies>
<dependency>
<groupId>br.eti.kinoshita</groupId>
<artifactId>testlink-java-api</artifactId>
<version>1.9.6-1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
To fix this issue, add the <version> tag as shown below:
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
.
.
.
</pluginManagement>
</build>
Note - This version number I have extracted from the Maven log that you have provided.

Resources