Error using flashplayer in jenkins when running maven-release-plugin. Works when using mvn test - apache-flex

I have a maven 2 job configured in Jenkins, and under the Build I use
clean test release:prepare ...
in the goals options. Jenkins runs these goals sequenctiallay, and when test runs, it prints (and works nice):
[WARNING] [LAUNCHER] Using regular flashplayer tests
But when it tries to run prepare I get,
[INFO] [WARNING] [LAUNCHER] Using xvfb-run to launch headless tests
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [ERROR] BUILD ERROR
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Failed to launch Flash Player. Probably java was not able to find flashplayer.
[INFO] Make sure flashplayer is available on PATH
[INFO] or use -DflashPlayer.command=${flashplayer executable}
[INFO] Read more at: https://docs.sonatype.org/display/FLEXMOJOS/Running+unit+tests
So the same jobs, same jenkins, same job configuration, how can I make it work so that prepare also works like the clean goal?
I have also tried what the error suggest, that is, putting:
-Dflex.flashPlayer.command=/opt/player_10/flashplayer", "-DflashPlayer.command=/opt/player_10/flashplayer

Related

Error - Expected ';' while running Gatling using sbt

I am running a Gatling test script using Jenkins on a Unix machine. The test and the Simulation passes successfully after which I am seeing the below error marked in bold below also causing the Jenkins build to fail.
Log from the Jenkins build
Reports generated in 0s.
Please open the following file: >/var/lib/jenkins/workspace/gatling_test_job/target/gatling/demoscript-20200930173820423/index.html
[info] Simulation DemoScript successful.
[info] Simulation(s) execution ended.
[success] Total time: 326 s (05:26), completed Sep 30, 2020 5:43:32 PM
>[error] Expected ';'
[error] com.test.performance.DemoScript
[error] ^
Build step 'Build using sbt' changed build result to FAILURE
Build step 'Build using sbt' marked build as failure
I am using build using sbt block in my Jenkins job to trigger the test using the below command
gatling:testOnly com.test.performance.DemoScript
Scala Version is - 2.12.10
Gatling and related libraries - 3.3.1
Build using sbt config in Jenkins
sbt installation in global tool configuration

Getting error in integrating jmeter with spring mvc

I am trying to integrate jmeter with spring mvc. I have captured all the request using blazemeter and converted in .jmx file. I have placed this jmx file in test/jmeter folder. When I try to install, I am getting following error.
Executing test: Dagwidouthtml.jmx INFO 2016-07-06 14:10:59.229 [jmeter.e] (): Listeners will be started after enabling running version INFO 2016-07-06 14:10:59.230 [jmeter.e] (): To revert to the earlier behaviour, define jmeterengine.startlistenerslater=false [info] Completed Test: Dagwidouthtml.jmx [info] [info] Building JMeter Report(s)... [info] [info] Raw results: /home/trina/git/framework_loadTest/target/jmeter/report/Dagwidouthtml-160706.jtl [info] Test report: /home/trina/git/framework_loadTest/target/jmeter/report/Dagwidouthtml-160706.jtl-report.html [INFO] [INFO] Test Results: [INFO] [INFO] Tests Run: 1, Failures: 6, Errors: 0 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 46.269 s [INFO] Finished at: 2016-07-06T14:11:10-04:00 [INFO] Final Memory: 44M/481M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.lazerycode.jmeter:jmeter-maven-plugin:1.4.1:jmeter (jmeter-tests) on project framework: There were test failures. See the jmeter logs for details. -> [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/MojoFailureException
So why you're posting Maven output here while it states the following:
There were test failures. See the jmeter logs for details
The log file is usually located at target/jmeter/logs/${yourscript}.log
Inspect the log file and if you won't be able to figure out the problem yourself.
The possible reason (apart from misconfiguration) I can think of is that jmeter-maven-plugin still depends on JMeter 2.13 so if you're trying to use features, introduced in JMeter 3.0 in your script - the failures are absolutely expected.
Also see documentation on JMeter Maven Plugin on Github - it is the most comprehensive source.

print not accepted in task definition in SBT 0.13?

I'm using SBT 0.13.1.
project/build.properties is as follows:
sbt.version=0.13.1
Executing sbt about prints out the following:
$ sbt
[info] Loading global plugins from /Users/jacek/.sbt/0.13/plugins
[info] Loading project definition from /Users/jacek/sandbox/so/sbt-0.13.1/project
[info] Set current project to sbt-0-13-1 (in build file:/Users/jacek/sandbox/so/sbt-0.13.1/)
[sbt-0-13-1]> about
[info] This is sbt 0.13.1
[info] The current project is {file:/Users/jacek/sandbox/so/sbt-0.13.1/}sbt-0-13-1 0.1-SNAPSHOT
[info] The current project is built against Scala 2.10.4-RC1
[info] Available Plugins: com.typesafe.sbt.SbtGit, com.typesafe.sbt.SbtProguard, growl.GrowlingTests, np.Plugin, net.virtualvoid.sbt.graph.Plugin, com.timushev.sbt.updates.UpdatesPlugin
[info] sbt, sbt plugins, and build definitions are using Scala 2.10.3
With the following task - hello - in build.sbt:
scalaVersion := "2.10.4-RC1"
lazy val hello = taskKey[Unit]("An example task")
hello := {
print("Sleeping for a sec...")
println("done.")
}
...and reload, sbt reports [error] Type error in expression:
[sbt-0-13-1]> reload
[info] Loading global plugins from /Users/jacek/.sbt/0.13/plugins
[info] Loading project definition from /Users/jacek/sandbox/so/sbt-0.13.1/project
/Users/jacek/sandbox/so/sbt-0.13.1/build.sbt:6: error: type mismatch;
found : String("Sleeping for a sec...")
required: sbt.TaskKey[String]
print("Sleeping for a sec...")
^
[error] Type error in expression
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
When I change print to println the task is defined correctly.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? r
[info] Loading global plugins from /Users/jacek/.sbt/0.13/plugins
[info] Loading project definition from /Users/jacek/sandbox/so/sbt-0.13.1/project
[info] Set current project to sbt-0-13-1 (in build file:/Users/jacek/sandbox/so/sbt-0.13.1/)
[sbt-0-13-1]> hello
Sleeping for a sec...
done.
[success] Total time: 0 s, completed Jan 4, 2014 10:31:43 AM
Is print not accepted in task definition?
With the help of schleichardt I could finally find out what has caused the issue of not accepting print in the hello task.
It turned out that with the sbt-dependency-graph plugin in the global configuration directory, i.e. ~/.sbt/0.13/ (or a directory specified by sbt.global.base), sbt couldn't initialize the task and hence the error.
$ cat plugins/sbt-dependency-graph.sbt
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.7.4")
$ cat sbt-dependency-graph.sbt
net.virtualvoid.sbt.graph.Plugin.graphSettings
To reproduce, see the following sbt session starting with print (not println) in build.sbt and empty global configuration directory:
jacek:~/sandbox/so/sbt-0.13.1
$ tree
.
├── build.sbt
└── project
└── build.properties
1 directory, 2 files
jacek:~/sandbox/so/sbt-0.13.1
$ cat build.sbt
scalaVersion := "2.10.4-RC1"
lazy val hello = taskKey[Unit]("An example task")
hello := {
print("Sleeping for a sec...")
println("done.")
}
jacek:~/sandbox/so/sbt-0.13.1
$ sbt -Dsbt.global.base=/tmp/so
Getting org.scala-sbt sbt 0.13.1 ...
:: retrieving :: org.scala-sbt#boot-app
confs: [default]
43 artifacts copied, 0 already retrieved (12646kB/154ms)
Getting Scala 2.10.3 (for sbt)...
:: retrieving :: org.scala-sbt#boot-scala
confs: [default]
5 artifacts copied, 0 already retrieved (24447kB/204ms)
[info] Loading project definition from /Users/jacek/sandbox/so/sbt-0.13.1/project
[info] Updating {file:/Users/jacek/sandbox/so/sbt-0.13.1/project/}sbt-0-13-1-build...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Set current project to sbt-0-13-1 (in build file:/Users/jacek/sandbox/so/sbt-0.13.1/)
> hello
Sleeping for a sec...done.
[success] Total time: 0 s, completed Jan 4, 2014 1:35:22 PM
It works so far.
Create the files for the sbt-dependency-graph plugin in the global configuration directory.
jacek:/tmp/so
$ cat plugins/sbt-dependency-graph.sbt
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.7.4")
jacek:/tmp/so
$ cat sbt-dependency-graph.sbt
net.virtualvoid.sbt.graph.Plugin.graphSettings
...and reload.
> reload
[info] Loading global plugins from /private/tmp/so/plugins
[info] Updating {file:/tmp/so/plugins/}global-plugins...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Loading project definition from /Users/jacek/sandbox/so/sbt-0.13.1/project
[info] Updating {file:/Users/jacek/sandbox/so/sbt-0.13.1/project/}sbt-0-13-1-build...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
/Users/jacek/sandbox/so/sbt-0.13.1/build.sbt:6: error: type mismatch;
found : String("Sleeping for a sec...")
required: sbt.TaskKey[String]
print("Sleeping for a sec...")
^
[error] Type error in expression
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
When print changes to println and (r)etry, it works fine again.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? r
[info] Loading global plugins from /private/tmp/so/plugins
[info] Loading project definition from /Users/jacek/sandbox/so/sbt-0.13.1/project
[info] Set current project to sbt-0-13-1 (in build file:/Users/jacek/sandbox/so/sbt-0.13.1/)
> hello
Sleeping for a sec...
done.
[success] Total time: 0 s, completed Jan 4, 2014 1:43:59 PM

issue when building NPanday Building a web application

[UPDATE]
the clean goal runs smoothely all over the projects of the solution, the problem now while running the compile goal, below the error message:
[INFO] Total time: 19.427s
[INFO] Finished at: Fri Jun 29 11:46:28 WEST 2012
[INFO] Final Memory: 15M/306M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.npanday.plugins:maven-aspx-plugin:1.4.0-incubating:compile (default-compile) on project B3GMcsInterface: NPANDAY-900-006: Unable to Compile: Language = ASP, Vendor = null, ArtifactType = asp, Source Directory = C:\Users\CASA-WS001\Desktop\Gateway\ProjectName: NPANDAY-040-001: Could not execute: Command = cmd.exe /X /C "aspnet_compiler -v " /MyArtifactId" -p C:\Users\CASA-W~1\AppData\Local\Temp\maven-aspx-plugin-3088047295012139775\src -u -f C:\Users\CASA-W~1\AppData\Local\Temp\maven-aspx-plugin-3088047295012139775\dest -nologo -fixednames", Result = 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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :B3GMcsInterface
NPanday Execution Failed!, with exit code: 1
[END OF UPDATE]
i'm trying to make the build of simple web application using NPanday, i am using the incubating 1.4.0 plugin for VS2010, i have successfully built C# Console or Libraries Projects using maven, but when i tried to clean a web application i encounter this kind of error
Below is the error output.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.628s
[INFO] Finished at: Tue Jun 26 17:53:56 WET 2012
[INFO] Final Memory: 6M/16M
[INFO] ------------------------------------------------------------------------
[ERROR] Error resolving version for plugin 'npanday.plugin:maven-aspx-plugin' from the repositories [local (C:\Users\user1.m2\repository), central (http://repo.maven.apache.org/maven2)]: Plugin not found in any plugin repository -> [Help1]
[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/PluginVersionResolutionException
any help is appreciated.
Thank You.
The problem is the "npanday.plugin" in "npanday.plugin:maven-aspx-plugin"... It must be wrongly stated in one of the life cycles.
Things have moved to "org.apache.npanday.plugins": http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22maven-aspx-plugin%22
Try using 1.5.0-SNAPSHOT from the following repository. It contains a mass of improvements! I'm using it in production.
<pluginRepositories>
<pluginRepository>
<releases>
<enabled>false</enabled>
</releases>
<id>npanday.snapshots</id>
<name>NPanday Snapshot Repository</name>
<url>http://vmbuild.apache.org/archiva/repository/npanday-snapshots</url>
</pluginRepository>
</pluginRepositories>
I think you have to use a repository manager and define a supplemental repository which contains the given dependencies / plugins.
Error is related plugins order in pom.xml:
If maven-compile-plugin is before maven-aspx-plugin, you get the error.
But if the order is maven-aspx-plugin and then maven-compile-plugin, mvn compile works
Snip of the correct pom.xml:
....
<plugins>
<plugin>
<groupId>org.apache.npanday.plugins</groupId>
<artifactId>maven-aspx-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<frameworkVersion>4.0</frameworkVersion>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.npanday.plugins</groupId>
<artifactId>maven-compile-plugin</artifactId>
<version>1.4.0-incubating</version>
<extensions>true</extensions>
....

An error occurred because there is no graphics environment available

I am getting below error when I try to use hudson and maven, Any idea how to resolve?
Xlib: connection to ":1.0" refused by server
Xlib: No protocol specified
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An error occurred because there is no graphics environment available. Please set the headless-server setting in the Flex configuration file to true.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.InternalError: An error occurred because there is no graphics environment available.
Thanks
sharp
Under <compiler> tag in flex-config.xml add
<headless-server>true</headless-server>

Resources