I have a Google App Engine application which I'm trying to test locally. Whenever I run the following command:
mvn gcloud:run
The application never fully starts up. I have the following output written to my console:
mvn gcloud:run
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Wildstar Service Desk 88
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> gcloud-maven-plugin:2.0.9.95.v20160203:run (default-cli) > package # servicedesk >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # servicedesk ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) # servicedesk ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # servicedesk ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/derekberube/Documents/Programming/Java/Wildstar ServiceDesk/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) # servicedesk ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # servicedesk ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-war-plugin:2.6:war (default-war) # servicedesk ---
[INFO] Packaging webapp
[INFO] Assembling webapp [servicedesk] in [/Users/derekberube/Documents/Programming/Java/Wildstar ServiceDesk/target/servicedesk-88]
[INFO] Processing war project
[INFO] Copying webapp resources [/Users/derekberube/Documents/Programming/Java/Wildstar ServiceDesk/src/main/webapp]
[INFO] Webapp assembled in [26 msecs]
[INFO] Building war: /Users/derekberube/Documents/Programming/Java/Wildstar ServiceDesk/target/servicedesk-88.war
[INFO]
[INFO] <<< gcloud-maven-plugin:2.0.9.95.v20160203:run (default-cli) < package # servicedesk <<<
[INFO]
[INFO] --- gcloud-maven-plugin:2.0.9.95.v20160203:run (default-cli) # servicedesk ---
The following is the content of the log file generated by the gcloud process.
derekberube$ cat 22.54.23.587718.log
2016-03-07 22:54:23,593 DEBUG root Loaded Command Group: ['gcloud', 'info']
2016-03-07 22:54:23,594 DEBUG root Running gcloud.info with Namespace(__calliope_internal_deepest_parser=ArgumentParser(prog='gcloud.info', usage=None, description='This command displays information about the current gcloud environment.', version=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=False), account=None, authority_selector=None, authorization_token_file=None, cmd_func=<bound method Command.Run of <googlecloudsdk.calliope.backend.Command object at 0x10cd2a590>>, command_path=['gcloud', 'info'], configuration=None, credential_file_override=None, document=None, format=None, h=None, help=None, http_timeout=None, log_http=None, project=None, quiet=None, show_log=False, trace_email=None, trace_log=False, trace_token=None, user_output_enabled=None, verbosity=None, version=None).
2016-03-07 22:54:23,687 INFO root Explict Display.
2016-03-07 22:54:23,687 INFO ___FILE_ONLY___ Google Cloud SDK [99.0.0]
Platform: [Mac OS X, x86_64]
Python Version: [2.7.10 (default, Oct 23 2015, 19:19:21) [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)]]
Python Location: [/usr/bin/python]
Site Packages: [Disabled]
Installation Root: [/Users/derekberube/google-cloud-sdk]
Installed Components:
core: [2016.02.26]
app-engine-python: [1.9.33]
core-nix: [2016.02.05]
pubsub-emulator: [2016.02.22]
kubectl: []
app-engine-java: [1.9.32]
gcloud: []
gsutil-nix: [4.15]
app-engine-python-extras: [1.9.21]
beta: [2016.01.12]
gsutil: [4.17]
bq: [2.0.18]
alpha: [2016.01.12]
gcd-emulator: [v1beta3-1.0.0]
bq-nix: [2.0.18]
kubectl-darwin-x86_64: [1.1.7]
System PATH: [/Library/Java/JavaVirtualMachines/jdk1.7.0.jdk/Contents/Home/bin:/Applications/appengine-java-sdk-1.9.32/bin:/Applications/Java Libraries/Metro/2.3.1//bin:/Users/derekberube/google-cloud-sdk/bin:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/bin:/usr/local/apache-maven/apache-maven-3.3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin]
Cloud SDK on PATH: [True]
Installation Properties: [/Users/derekberube/google-cloud-sdk/properties]
User Config Directory: [/Users/derekberube/.config/gcloud]
User Properties: [/Users/derekberube/.config/gcloud/properties]
Account: [wildstarservicedesk-hrd#appspot.gserviceaccount.com]
Project: [wildstarservicedesk-hrd]
Current Properties:
[core]
project: [wildstarservicedesk-hrd]
account: [wildstarservicedesk-hrd#appspot.gserviceaccount.com]
disable_usage_reporting: [False]
[app]
suppress_change_warning: [true]
Logs Directory: [/Users/derekberube/.config/gcloud/logs]
Last Log File: [/Users/derekberube/.config/gcloud/logs/2016.03.07/21.02.55.937592.log]
2016-03-07 22:54:23,695 DEBUG root Metrics reporting process started.
The following is a copy of 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>88</version>
<groupId>com.wildstartech</groupId>
<artifactId>servicedesk</artifactId>
<name>Wildstar Service Desk</name>
<url>http://servicedesk.wildstartech.com/</url>
<properties>
<appengine.app.version>${project.version}</appengine.app.version>
<appengine.target.version>1.9.32</appengine.target.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<prerequisites>
<maven>3.1.0</maven>
</prerequisites>
<build>
<!-- for hot reload of the web application -->
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
<plugins>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.3.7.v20160115</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<version>3.3</version>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<groupId>com.google.appengine</groupId>
<artifactId>gcloud-maven-plugin</artifactId>
<version>2.0.9.95.v20160203</version>
<configuration>
<log_level>debug</log_level>
<quiet>false</quiet>
</configuration>
</plugin>
</plugins>
</build>
</project>
The following is a tree structure of my project.
|____pom.xml
|____src
| |____main
| | |____java
| | |____resources
| | |____webapp
| | | |____index.html
| | | |____WEB-INF
| | | | |____appengine-web.xml
| | | | |____web.xml
The following is my appengine-web.xml configuration file.
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>wildstarservicedesk-hrd</application>
<beta-settings>
<setting name="java_quickstart" value="true"/>
</beta-settings>
<inbound-services>
<service>mail</service>
</inbound-services>
<sessions-enabled>true</sessions-enabled>
<!-- Configure java.util.logging -->
<system-properties>
<property name="java.util.logging.config.file"
value="WEB-INF/logging.properties" />
</system-properties>
<threadsafe>true</threadsafe>
<version>88</version>
<vm>true</vm>
</appengine-web-app>
The following is my web.xml file.
<?xml version="1.0" encoding="utf-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1">
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.xhtml</welcome-file>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
And last, but not least, the following is the content of the index.html
<DOCTYPE html>
<html>
<head>
<title>Test JSP</title>
</head>
<body>
<p>This is a test.</p>
</body>
</html>
The following is the stack output.
jstack 5155
2016-03-07 23:58:29
Full thread dump Java HotSpot(TM) 64-Bit Server VM (24.80-b11 mixed mode):
"Attach Listener" daemon prio=5 tid=0x00007ff4a500b000 nid=0x3d0b waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Service Thread" daemon prio=5 tid=0x00007ff4a281d800 nid=0x4e03 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C2 CompilerThread1" daemon prio=5 tid=0x00007ff4a1819000 nid=0x4c03 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C2 CompilerThread0" daemon prio=5 tid=0x00007ff4a406a000 nid=0x4a03 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Signal Dispatcher" daemon prio=5 tid=0x00007ff4a4064800 nid=0x3e0f runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Finalizer" daemon prio=5 tid=0x00007ff4a4041800 nid=0x3803 in Object.wait() [0x0000700000d3a000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000007aeb20070> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
- locked <0x00000007aeb20070> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)
"Reference Handler" daemon prio=5 tid=0x00007ff4a1813800 nid=0x3603 in Object.wait() [0x0000700000c37000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000007aeb10278> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:503)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:133)
- locked <0x00000007aeb10278> (a java.lang.ref.Reference$Lock)
"main" prio=5 tid=0x00007ff4a4001000 nid=0x1703 runnable [0x0000700000218000]
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:152)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
- locked <0x00000007abefec10> (a java.io.BufferedInputStream)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:690)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:633)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1324)
- locked <0x00000007abee63d0> (a sun.net.www.protocol.http.HttpURLConnection)
at com.google.appengine.gcloudapp.GCloudAppRun.stopDevAppServer(GCloudAppRun.java:486)
at com.google.appengine.gcloudapp.GCloudAppRun.execute(GCloudAppRun.java:287)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
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:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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)
"VM Thread" prio=5 tid=0x00007ff4a4039800 nid=0x3403 runnable
"GC task thread#0 (ParallelGC)" prio=5 tid=0x00007ff4a400d000 nid=0x2403 runnable
"GC task thread#1 (ParallelGC)" prio=5 tid=0x00007ff4a400d800 nid=0x2603 runnable
"GC task thread#2 (ParallelGC)" prio=5 tid=0x00007ff4a180a800 nid=0x2803 runnable
"GC task thread#3 (ParallelGC)" prio=5 tid=0x00007ff4a400e800 nid=0x2a03 runnable
"GC task thread#4 (ParallelGC)" prio=5 tid=0x00007ff4a180f800 nid=0x2c03 runnable
"GC task thread#5 (ParallelGC)" prio=5 tid=0x00007ff4a1810800 nid=0x2e03 runnable
"GC task thread#6 (ParallelGC)" prio=5 tid=0x00007ff4a1811000 nid=0x3003 runnable
"GC task thread#7 (ParallelGC)" prio=5 tid=0x00007ff4a400f000 nid=0x3203 runnable
"VM Periodic Task Thread" prio=5 tid=0x00007ff4a281e800 nid=0x5003 waiting on condition
JNI global references: 236
From a terminal window, I ran the command ps -eaf |grep java and one of the processes listed in the output contained the word (java). This happens whenever the ps command is NOT able to read a value from the CMD column.
I used the kill -eaf command to terminate the thread running the (java) process.
After doing that, the mvn gcloud:run process continued execution.
Related
I have a angularjs website. So, i thought of using protractor with jasmine framework for its automation rather than using selenium.
My protractor project which works completely fine on my local machine when i use:
mvn install
My pom.xml
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.company</groupId>
<artifactId>web-testproject</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>com.github.greengerong</groupId>
<artifactId>maven-ng-protractor</artifactId>
<version>0.0.2</version>
<configuration>
<protractor>protractor</protractor>
<configFile>conf.js</configFile>
</configuration>
<executions>
<execution>
<id>ng-protractor</id>
<phase>test</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
My conf.js
var Jasmine2HtmlReporter = require('protractor-jasmine2-html-reporter');
exports.config = {
framework: 'jasmine2',
specs: ['./specs/bus_cases.js','./specs/recharge_cases.js'],
baseUrl: 'https://www.mywebsite.com',
capabilities: {
browserName: 'chrome',
shardTestFiles: true,
maxInstances: 2},
},
onPrepare: function() {
jasmine.getEnv().addReporter(
new Jasmine2HtmlReporter({
savePath: 'target/report',
consolidate: true,
consolidateAll: false
})
);
}
};
But when i have deployed the project on github and accessing it thru jenkins, i am getting error:
[INFO] protractor:protractor
[INFO] configFile:/var/lib/jenkins/workspace/Web_automation/conf.js
[INFO] Executing protractor test Suite ...
[INFO] Command:/var/lib/jenkins/workspace/Web_automation/conf.js
[ERROR] Run protractor test error:
java.io.IOException: Cannot run program "protractor": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at com.github.greengerong.ProtractorService.exec(ProtractorService.java:34)
at com.github.greengerong.NgProtractor.execute(NgProtractor.java:89)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
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:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.jvnet.hudson.maven3.launcher.Maven31Launcher.main(Maven31Launcher.java:132)
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:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at jenkins.maven3.agent.Maven31Main.launch(Maven31Main.java:181)
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:497)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:136)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:71)
at hudson.remoting.UserRequest.perform(UserRequest.java:120)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 35 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.055 s
[INFO] Finished at: 2017-08-25T22:33:00+05:30
[INFO] Final Memory: 14M/310M
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal com.github.greengerong:maven-ng-protractor:0.0.2:run (ng-protractor) on project web-testproject: There were exceptions when run protractor test. java.io.IOException: Cannot run program "protractor": error=2, No such file or directory ->
Note: Locally, i run on windows. But jenkins use Linux. Is this because of environments. What changes should i do?
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.
I follow up "https://cloud.google.com/tools/cloud-repositories/docs/push-to-deploy" to build my first test project, but when I do "mvn gcloud:deploy", and I get below errors from jenkins console:
[workspace] $ /opt/bitnami/apps/jenkins/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/jenkins-maven/bin/mvn clean install gcloud:deploy
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building jenkins-test-java 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # jenkins-test-java ---
[INFO] Deleting /opt/bitnami/apps/jenkins/jenkins_home/jobs/dev-jenkins-test/workspace/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # jenkins-test-java ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /opt/bitnami/apps/jenkins/jenkins_home/jobs/dev-jenkins-test/workspace/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) # jenkins-test-java ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # jenkins-test-java ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /opt/bitnami/apps/jenkins/jenkins_home/jobs/dev-jenkins-test/workspace/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) # jenkins-test-java ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # jenkins-test-java ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # jenkins-test-java ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: /opt/bitnami/apps/jenkins/jenkins_home/jobs/dev-jenkins-test/workspace/target/jenkins-test-java-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) # jenkins-test-java ---
[INFO] Installing /opt/bitnami/apps/jenkins/jenkins_home/jobs/dev-jenkins-test/workspace/target/jenkins-test-java-1.0-SNAPSHOT.jar to /home/tomcat/.m2/repository/com/google/appengine/demos/jenkins-test-java/1.0-SNAPSHOT/jenkins-test-java-1.0-SNAPSHOT.jar
[INFO] Installing /opt/bitnami/apps/jenkins/jenkins_home/jobs/dev-jenkins-test/workspace/pom.xml to /home/tomcat/.m2/repository/com/google/appengine/demos/jenkins-test-java/1.0-SNAPSHOT/jenkins-test-java-1.0-SNAPSHOT.pom
[INFO]
[INFO] >>> gcloud-maven-plugin:2.0.9.90.v20151210:deploy (default-cli) > package # jenkins-test-java >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # jenkins-test-java ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /opt/bitnami/apps/jenkins/jenkins_home/jobs/dev-jenkins-test/workspace/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) # jenkins-test-java ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # jenkins-test-java ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /opt/bitnami/apps/jenkins/jenkins_home/jobs/dev-jenkins-test/workspace/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) # jenkins-test-java ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # jenkins-test-java ---
[INFO] No tests to run.
[INFO] Skipping execution of surefire because it has already been run for this configuration
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # jenkins-test-java ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO]
[INFO] <<< gcloud-maven-plugin:2.0.9.90.v20151210:deploy (default-cli) < package # jenkins-test-java <<<
[INFO]
[INFO] --- gcloud-maven-plugin:2.0.9.90.v20151210:deploy (default-cli) # jenkins-test-java ---
[INFO] Running gcloud app deploy...
[INFO] Running python -S /usr/local/share/google/google-cloud-sdk/lib/googlecloudsdk/gcloud/gcloud.py --quiet --project=jenkins-test-java preview app deploy /opt/bitnami/apps/jenkins/jenkins_home/jobs/dev-jenkins-test/workspace/target/appengine-staging/app.yaml
[INFO] You do not currently have this command group installed. Using it
[INFO] requires the installation of components: [preview]
[INFO] ERROR: (gcloud) You cannot perform this action because you do not have permission to modify the Google Cloud SDK installation directory [/usr/local/share/google/google-cloud-sdk].
[INFO]
[INFO] Re-run the command with sudo: sudo gcloud ...
[ERROR] Error: gcloud app command with exit code : 1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.628 s
[INFO] Finished at: 2015-12-21T06:29:47+00:00
[INFO] Final Memory: 11M/56M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.appengine:gcloud-maven- plugin:2.0.9.90.v20151210:deploy (default-cli) on project jenkins-test-java: Error: gcloud app command exit code is: 1 -> [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
Build step 'Invoke top-level Maven targets' marked build as failure
Finished: FAILURE
and 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>com.google.appengine.demos</groupId>
<artifactId>jenkins-test-java</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<properties>
<appengine.target.version>1.9.28</appengine.target.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- Compile/runtime dependencies -->
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>${appengine.target.version}</version>
</dependency>
</dependencies>
<build>
<!-- needed for enabling compile/reload on save in mordern IDEs...-->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<version>2.5.1</version>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>com.google.appengine</groupId>
<artifactId>gcloud-maven-plugin</artifactId>
<version>2.0.9.90.v20151210</version>
<configuration>
<gcloud_project>jenkins-test-java</gcloud_project>
</configuration>
</plugin>
</plugins>
</build>
</project>
thank you guys :)
The error says it all:
ERROR: (gcloud) You cannot perform this action because you do not have
permission to modify the Google Cloud SDK installation directory
[/usr/local/share/google/google-cloud-sdk].
I see three options:
run the command with sudo or as root.
make your google-cloud-sdk directory (/usr/local/share/google/google-cloud-sdk) writeable for your user
install the google-cloud-sdk somewhere where your user has write permission and execute the command like (see docs):
mvn gcloud:run -Dgcloud.gcloud_directory="absolute-path-to-the-gcloud-directory"
install the google-cloud-sdk somewhere where your user has write permission and set the gcloud directory in your pom.xml (see docs):
<plugin>
<groupId>com.google.appengine</groupId>
<artifactId>gcloud-maven-plugin</artifactId>
<version>>2.0.9.72.v20150804</version>
<configuration>
<gcloud_directory>/usr/foo/private/google-cloud-sdk</gcloud_directory>
...
I am trying to get QueryDSL to work on a Spring Roo project.
Here is my plugin config:
<plugin>
<groupId>com.mysema.maven</groupId>
<artifactId>maven-apt-plugin</artifactId>
<version>1.0.2</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>process</goal>
</goals>
<configuration>
<outputDirectory>target/generated-sources</outputDirectory>
<processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
</configuration>
</execution>
</executions>
</plugin>
When I run the following command: mvn apt:process, I get the following error:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building suivitrc 0.1.0.BUILD-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-apt-plugin:1.0.2:process (default-cli) # suivitrc ---
[ERROR] Either processor or processors need to be given
[ERROR] execute error
java.lang.IllegalArgumentException: Either processor or processors need to be given
at com.mysema.maven.apt.AbstractProcessorMojo.buildProcessor(AbstractProcessorMojo.java:140)
at com.mysema.maven.apt.AbstractProcessorMojo.execute(AbstractProcessorMojo.java:157)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.375s
[INFO] Finished at: Wed Sep 05 12:22:16 CEST 2012
[INFO] Final Memory: 7M/18M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.mysema.maven:maven-apt-plugin:1.0.2:process (default-cli) on project suivitrc: Either processor
to be given -> [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
Of course I have already tried mvn install which doesn't generate any source.
Any advice welcome.
EDIT:
The only output from maven-apt-plugin is this:
[INFO] --- maven-apt-plugin:1.0.2:process (default) # suivitrc ---
You are calling the goal directly. The execution configuration is not used in this case. Do you get the same exception when running clean install?
I am trying to do a mvn release:perform on my project and get the error pasted below.
I do not have any dependency mentioned anywhere in the project for org.codehaus.mojo:cobertura-maven-plugin neither it is in the maven settings.xml file but still it creeps up from somewhere. Just to mention I can successfully build the project with mvn clean compile install and the mvn release:prepare command run successfully.
Can someone please help and let me know how I can get rid of this error.
ERROR
=====
[INFO] [ERROR] BUILD ERROR
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] The plugin 'org.codehaus.mojo:cobertura-maven-plugin' does not exist or no valid version could be found
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] For more information, run Maven with the -e switch
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 13 seconds
[INFO] [INFO] Finished at: Wed Aug 15 17:03:36 BST 2012
[INFO] [INFO] Final Memory: 28M/51M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Maven execution failed, exit code: '1'
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Maven execution failed, exit code: '1' at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Maven execution failed, exit code: '1' at org.apache.maven.plugins.release.PerformReleaseMojo.execute(PerformReleaseMojo.java:133)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) ... 17 more
Caused by: org.apache.maven.shared.release.ReleaseExecutionException: Maven execution failed, exit code: '1' at org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(AbstractRunGoalsPhase.java:89) at org.apache.maven.shared.release.phase.RunPerformGoalsPhase.execute(RunPerformGoalsPhase.java:67) at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:334) at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:282) at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:262) at org.apache.maven.plugins.release.PerformReleaseMojo.execute(PerformReleaseMojo.java:129)
... 19 more
Caused by: org.apache.maven.shared.release.exec.MavenExecutorException: Maven execution failed, exit code: '1' at org.apache.maven.shared.release.exec.InvokerMavenExecutor.executeGoals(InvokerMavenExecutor.java:375) at org.apache.maven.shared.release.exec.InvokerMavenExecutor.executeGoals(InvokerMavenExecutor.java:393) at org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(AbstractRunGoalsPhase.java:81) ... 24 more
What does your pom.xml say? it should have the following in it:
<project>
...
<build>
...
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<tagBase>https://svn.apache.org/repos/asf/maven/components/releases</tagBase>
</configuration>
</plugin>
</plugins>
...
</build>
...
</project>