Allure Report using Jenkins displays wrong data - allure

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

Related

Removing integration-test goal from org.apache.maven.archetype execution

I am trying to build JBPM from its source code. I am doing a maven build with skipTests=true. I believe it is failing because the maven archetype plugin is generating files during "integration-test"
[WARNING] Contents of file src\main\resources\rules.drl are not equal
[WARNING] Contents of file src\test\java\it\pkg\RuleTest.java are not equal
[WARNING] Contents of file src\test\resources\log4j.properties are not equal
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for KIE :: API Parent 7.39.0.Final-redhat-00007:
[INFO]
[INFO] KIE :: API Parent .................................. SUCCESS [ 8.784 s]
[INFO] KIE :: Public API .................................. SUCCESS [ 48.164 s]
[INFO] KIE :: Internal .................................... SUCCESS [ 34.910 s]
[INFO] KIE :: Maven Archetypes ............................ SUCCESS [ 0.175 s]
[INFO] KIE :: Drools Maven Archetype ...................... FAILURE [ 3.405 s]
[INFO] KIE :: Model Archetype ............................. SKIPPED
[INFO] KIE :: KJAR Archetype .............................. SKIPPED
[INFO] KIE :: Service Spring Boot Archetype ............... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:38 min
[INFO] Finished at: 2020-11-12T09:10:02-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:integration-test (default-integration-test) on project kie-drools-archetype:
[ERROR] Archetype IT 'integrationtestDefaults' failed: Some content are not equals
[ERROR] Archetype IT 'integrationtestWithCEP' failed: Some content are not equals
[ERROR] Archetype IT 'integrationtestWithEclipse' failed: Some content are not equals
However, I don't care about the archetype generation because I am not using that part of this build of the tool (i.e., the files it would generate are already being built by another tool). How can I remove the goal for or ignore the errors of "integration-test" for this maven plugin? The pom.file does not mention any goals explicitly nor does it execute the tasks explicitly (which seems required according to How do I run a maven plugin's integration tests?). This is the pom.xml (after the header):
<properties>
<dollar>$</dollar>
</properties>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<extensions>
<extension>
<groupId>org.apache.maven.archetype</groupId>
<artifactId>archetype-packaging</artifactId>
<version>2.2</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-archetype-plugin</artifactId>
<version>2.2</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
And the parent pom.xml simple declares this module. Thanks!
Simple solution:
<properties>
<archetype.test.skip>true</archetype.test.skip>
</properties>
Note that this skipping is different than skipping tests or skipping integratio tests (in general). Both of which have their own cofigurations.

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 deploying GAE flexible project with a Servlet calling Dataflow Pipeline

I'm trying to deploy an App Engine Flexible Environment Project in JAVA with just a simple Servlet that create a Pipeline to execute in Google Dataflow each time the service is called, BUT I always got the same error deploying from Eclipse or Console. Anyone who knows why this error is occurring ? Please Help!
Servlet Code:
import java.io.IOException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
#WebServlet("/execute")
public class ServletPipeline extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException, OutOfMemoryError {
BacktestingPipeline.execute();
}
}
Pipeline Code:
import org.apache.beam.runners.dataflow.DataflowRunner;
import org.apache.beam.runners.dataflow.options.DataflowPipelineOptions;
import org.apache.beam.sdk.Pipeline;
import org.apache.beam.sdk.options.PipelineOptionsFactory;
import org.apache.beam.sdk.transforms.Create;
import org.apache.beam.sdk.transforms.DoFn;
import org.apache.beam.sdk.transforms.MapElements;
import org.apache.beam.sdk.transforms.ParDo;
import org.apache.beam.sdk.transforms.SimpleFunction;
public class BacktestingPipeline
{
public static void execute ()
{
//Create Pipeline Options for Google Cloud Dataflow
DataflowPipelineOptions options = PipelineOptionsFactory.as(DataflowPipelineOptions.class);
options.setProject("[PROJECT_ID]");
options.setTempLocation("gs://[MY_BUCKET]/temp");
options.setStagingLocation("gs://[MY_BUCKET]/staging");
options.setRunner(DataflowRunner.class);
Pipeline p = Pipeline.create(options);
p.apply(Create.of("Hello", "World"))
.apply(MapElements.via(new SimpleFunction<String, String>() {
#Override
public String apply(String input) {
return input.toUpperCase();
}
}))
.apply(ParDo.of(new DoFn<String, Void>() {
#ProcessElement
public void processElement(ProcessContext c) {
c.element();
}
}));
p.run();
}
}
Error deploying to GAE:
...
[INFO] GCLOUD: I0713 19:39:08.452653 46 jvmti_globals.cc:352] Build time: Jun 22 2017 16:09:00
[INFO] GCLOUD: I0713 19:39:08.453889 46 jvmti_agent.cc:158] Java debuglet initialization started
[INFO] GCLOUD: I0713 19:39:08.454350 46 jvmti_agent.cc:192] Java debuglet initialization completed
[INFO] GCLOUD: I0713 19:39:08.509760 46 jvmti_agent.cc:203] Java VM started
[INFO] GCLOUD: I0713 19:39:08.515812 46 jvmti_agent.cc:213] JvmtiAgent::JvmtiOnVMInit initialization time: 6068 microseconds
[INFO] GCLOUD: I0713 19:39:08.516059 57 jvmti_agent_thread.cc:99] Agent thread started: CloudDebugger_main_worker_thread
[INFO] GCLOUD: I0713 19:39:08.516363 57 jvm_internals.cc:376] Loading internals from /opt/cdbg/cdbg_java_agent_internals.jar
[INFO] GCLOUD: openjdk version "1.8.0_131"
[INFO] GCLOUD: OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-1~bpo8+1-b11)
[INFO] GCLOUD: OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
[INFO] GCLOUD:
[INFO] GCLOUD: I0713 19:39:08.712635 57 jni_logger.cc:31] Initializing ClassPathLookup, default classpath: true, extra classpath: [/var/lib/jetty/webapps/root/WEB-INF/classes, /var/lib/jetty/webapps/root/WEB-INF/lib], config: null
[INFO] GCLOUD: org.eclipse.jetty.util.log: Logging initialized #277ms to org.eclipse.jetty.util.log.Slf4jLog
[INFO] GCLOUD: org.eclipse.jetty.setuid.SetUIDListener: Setting umask=02
[INFO] GCLOUD: org.eclipse.jetty.setuid.SetUIDListener: Opened ServerConnector#4e04a765{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
[INFO] GCLOUD: org.eclipse.jetty.setuid.SetUIDListener: Setting GID=999
[INFO] GCLOUD: org.eclipse.jetty.setuid.SetUIDListener: Setting UID=999
[INFO] GCLOUD: org.eclipse.jetty.server.Server: jetty-9.4.5.v20170502
[INFO] GCLOUD: org.eclipse.jetty.deploy.providers.ScanningAppProvider: Deployment monitor [file:///var/lib/jetty/webapps/] at interval 0
[INFO] GCLOUD: I0713 19:39:10.374073 57 jni_logger.cc:31] Total size of indexed resources database: 431735 bytes
[INFO] GCLOUD: I0713 19:39:10.665549 57 jvm_internals.cc:132] ClassPathLookup constructor time: 1957471 microseconds
[INFO] GCLOUD: I0713 19:39:10.672448 57 yaml_data_visibility_config_reader.cc:33] debugger-config.yaml was not found. Using default settings.
[INFO] GCLOUD: I0713 19:39:12.667318 57 jni_logger.cc:31] Debuggee gcp:271259282847:4fb4ffcfa9706933 registered: {"debuggee":{"id":"gcp:271259282847:4fb4ffcfa9706933","project":"271259282847","uniquifier":"1523BCAEC984DB9222692DCF325FC70185D7E805","description":"multibacktesting-2017-distributor-20170713t142425-402646356863159386","agentVersion":"google.com/java-gcp/#2","labels":{"module":"distributor","minorversion":"402646356863159386","version":"20170713t142425"}}}, agent version: 2.15
[INFO] GCLOUD: I0713 19:39:12.667506 57 jvmti_agent.cc:415] Attaching Java debuglet
[INFO] GCLOUD: I0713 19:39:12.667809 57 rate_limit.cc:143] CPU count: 1
[INFO] GCLOUD: I0713 19:39:12.667858 57 debugger.cc:100] Initializing Java debuglet
[INFO] GCLOUD: I0713 19:39:12.678215 57 debugger.cc:109] Debugger::Initialize initialization time: 10 ms
[INFO] GCLOUD:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15:20 min
[INFO] Finished at: 2017-07-13T14:39:30-05:00
[INFO] Final Memory: 21M/262M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.cloud.tools:appengine-maven-plugin:1.3.1:deploy (default-cli) on project testing-dataflow-servlet: Execution default-cli of goal com.google.cloud.tools:appengine-maven-plugin:1.3.1:deploy failed: Non zero exit: 1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.google.cloud.tools:appengine-maven-plugin:1.3.1:deploy (default-cli) on project testing-dataflow-servlet: Execution default-cli of goal com.google.cloud.tools:appengine-maven-plugin:1.3.1:deploy failed: Non zero exit: 1
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal com.google.cloud.tools:appengine-maven-plugin:1.3.1:deploy failed: Non zero exit: 1
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 20 more
Caused by: com.google.cloud.tools.appengine.api.AppEngineException: Non zero exit: 1
at com.google.cloud.tools.appengine.cloudsdk.process.NonZeroExceptionExitListener.onExit(NonZeroExceptionExitListener.java:30)
at com.google.cloud.tools.appengine.cloudsdk.internal.process.DefaultProcessRunner.syncRun(DefaultProcessRunner.java:211)
at com.google.cloud.tools.appengine.cloudsdk.internal.process.DefaultProcessRunner.run(DefaultProcessRunner.java:137)
at com.google.cloud.tools.appengine.cloudsdk.CloudSdk.runGcloudCommand(CloudSdk.java:193)
at com.google.cloud.tools.appengine.cloudsdk.CloudSdk.runAppCommandInWorkingDirectory(CloudSdk.java:136)
at com.google.cloud.tools.appengine.cloudsdk.CloudSdkAppEngineDeployment.deploy(CloudSdkAppEngineDeployment.java:90)
at com.google.cloud.tools.maven.DeployMojo.execute(DeployMojo.java:107)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
... 21 more
[ERROR]
[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/PluginExecutionException
PS D:\Andres Ortiz\Eclipse Workspace\testing-dataflow-servlet>
My pom.xml
<?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>
<packaging>war</packaging>
<version>0.1.0-SNAPSHOT</version>
<groupId>com.testing</groupId>
<artifactId>testing-dataflow-servlet</artifactId>
<properties>
<appengine.maven.plugin.version>1.3.1</appengine.maven.plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
<failOnMissingWebXml>false</failOnMissingWebXml>
</properties>
<prerequisites>
<maven>3.5</maven>
</prerequisites>
<dependencies>
<!-- Compile/runtime dependencies -->
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>1.9.54</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.0-b07</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- Test Dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.xerial.snappy</groupId>
<artifactId>snappy-java</artifactId>
<version>1.1.4</version>
</dependency>
<dependency>
<groupId>com.google.cloud.dataflow</groupId>
<artifactId>google-cloud-dataflow-java-sdk-all</artifactId>
<version>2.0.0</version>
</dependency>
</dependencies>
<build>
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.4.1</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>3.0</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>display-dependency-updates</goal>
<goal>display-plugin-updates</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>${appengine.maven.plugin.version}</version>
</plugin>
</plugins>
</build>
</project>
My app.yaml
service: [MY_SERVICE]
runtime: java
env: flex
I have tried this in the app.yaml, but it does not works.
resources:
memory_gb: 2.0
health_check:
enable_health_check: False
It could be related with the exceptions you're throwing in doGet method. Try removing it. If the servlet is still not working it could be related with your Dataflow logic. Maybe it could also be related with the fact that you're not returning anything inside the doGet method.
I'll do a sequential testing from the beggining.
Test the servlet with just a Hello World. If it's not working is probably a configuration issue.
Test the servlet with your Dataflow logic. If it's not working I'll test it with commenting everything except the first line, then the first one with the second one and so on.

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>

Where is appengine:appengine-maven-plugin 1.8.2?

When running mvn appengine:devserver using version 1.8.2 of com.google.appengine:appengine-maven-plugin, I get the following message.
Downloading: http://repo.maven.apache.org/maven2/com/google/appengine/appengine-maven-plugin/1.8.2/appengine-maven-plugin-1.8.2.pom
[WARNING] The POM for com.google.appengine:appengine-maven-plugin:jar:1.8.2 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for com.google.appengine:appengine-maven-plugin:1.8.2: Plugin com.google.appengine:appengine-maven-plugin:1.8.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.google.appengine:appengine-maven-plugin:jar:1.8.2
Downloading: http://repo.maven.apache.org/maven2/org/eclipse/m2e/lifecycle-mapping/1.0.0/lifecycle-mapping-1.0.0.pom
[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (12 KB at 268.9 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (22 KB at 317.6 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.350s
[INFO] Finished at: Fri Jul 19 15:57:02 EDT 2013
[INFO] Final Memory: 6M/16M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'appengine' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\atrupe\.m2\repository), central (http://repo.maven.apache.org/maven2)] -> [Help 1]
I get no errors when using 1.8.1 and 1.8.1.1. Should I have another repository listed in my pom?
I am using 1.9.10 and it is working all well.
<dependencies>...
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>${appengine.target.version}</version>
</dependency>
</dependencies>
<build>
<plugins>...
<plugin>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>${appengine.target.version}</version>
</plugin>
</plugins>
</build>
<properties>...
<appengine.target.version>1.9.10</appengine.target.version>
</properties>

Resources