Projects to build: [MavenProject: com.cisco.hmp:HMP:1.0 # C:\Program Files (x86)\Jenkins\jobs\HMP-R2\workspace\CCI\Applications\eCustomer\HMP\pom.xml]
[JENKINS] Archiving C:\Program Files (x86)\Jenkins\jobs\HMP-R2\workspace\CCI\Applications\eCustomer\HMP\pom.xml to C:\Program Files (x86)\Jenkins\jobs\HMP-R2\modules\com.cisco.hmp$HMP\builds\2012-06-20_14-40- 11\archive\com.cisco.hmp\HMP\1.0\HMP-1.0.pom
Waiting for Jenkins to finish collecting data
mavenExecutionResult exceptions not empty
message : Failed to execute goal org.apache.maven.plugins:maven-compiler- plugin:2.3.2:compile (default-compile) on project HMP: Compilation failure
Failure executing javac, but could not parse the error:
javac: invalid flag: -s
Usage: javac <options> <source files>
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are used
-classpath <path> Specify where to find user class files
-cp <path> Specify where to find user class files
-sourcepath <path> Specify where to find input source files
-bootclasspath <path> Override location of bootstrap class files
-extdirs <dirs> Override location of installed extensions
-endorseddirs <dirs> Override location of endorsed standards path
-d <directory> Specify where to place generated class files
-encoding <encoding> Specify character encoding used by source files
-source <release> Provide source compatibility with specified release
-target <release> Generate class files for specific VM version
-version Version information
-help Print a synopsis of standard options
-X Print a synopsis of nonstandard options
-J<flag> Pass <flag> directly to the runtime system
Do I have to change something in POM file?
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
I made sure that the JDK is in the path variable in the environment variables, and I am building this in Jenkins, and I have made the project a parameterized build and parameter I provide is the location of the JDK.
Answered in comments:
I got it working by re installing jdk. – Ronak Shah Jun 27 '12 at
18:40
Related
We would like to integrate hugo for documentation generation in our automake project.
The problem i'm facing is, that I would like to support
out-of-tree builds
builds from read-only source trees (which is related to out-of-tree builds)
out-of-tree builds kind of work with:
hugo --source $(srcdir) --destination $(abs_builddir)
However, when my source-tree is read-only (e.g. as tested by make distcheck), this fails with:
$ make
hugo --source ../../../hugo --destination "<<SRCDIR>>/project-0.1/_build/sub/hugo"
Error: add site dependencies: create deps: failed to create file caches from configuration: mkdir <<SRCDIR>>/project-0.1/hugo/resources: permission denied
Total in 1 ms
make: *** [Makefile:555: all] Error 255
Obviously, hugo tries to create it's "file caches" as a resources/ directory in the (read-only) <<SRCDIR>>.
How can I tell hugo to creat this "file caches" directory in an alternative (writeable) place?
I tried setting --cacheDir (to $(abs_builddir), but this didn't change anything.
apparently there's a resourceDir config-file option, but afaict that is not available via the cmdline (and I don't know whether it would actually help).
I was trying to run a TestNG.xml file from CMD but there are no errors shown and it seems that ChromeDriver is not starting.
Note: if i go to Eclipse -> right click on testng.xml -> run as TestNG suite it will work perfectly.
Below is the message i get when executing through cmd.
The bat file contains:
java -cp "D:\Java Applications\WebDriverProject\lib*;D:\Java Applications\WebDriverProject\bin" org.testng.TestNG testng.xml
pause
The testng.xml contains:
The project structure from eclipse is:
I figured this out. First of all, how you set up the classpath environment is crucial. The very first path must be a path to your project bin folder (where the .class files are found). I will just paste what my classpath environment looks like:
set classpath=C:\eclipse-2018\ACR_Tests\bin;C:\Selenium_dependencies\*;C:\TestNG\plugins\*
Set TestNG classpath:
java -classpath %classpath% org.testng.TestNG testng.xml
Note:
I have a "Selenium dependencies" folder also added to the classpath, this is a folder containing more selenium libraries, including chromedriver.jar
Download the zipped package:
selenium-chrome-driver JAR 3.12.0
It contains the dependencies that you need.
https://jar-download.com/artifacts/org.seleniumhq.selenium/selenium-chrome-driver/3.12.0/source-code
Extract all to a folder. In my case I called it "Selenium_dependencies".
Also, for TestNG libraries I'm using 7.0.0 release which you can download here:
http://dl.bintray.com/testng-team/testng-eclipse-release/zipped/
My testng.xml is like so:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd">
<suite name="Suite">
<test thread-count="5" name="Test">
<classes>
<class name="P1.ACR_Server"/> <!-- package.class -->
</classes>
</test> <!-- Test -->
</suite> <!-- Suite -->
Also - ensure that you have client-combined.jar included on the build path.
The build path should contain these libraries:
Running your tests using Maven (Recommended way)
From your screenshot I am inferring that yours is a maven project. Maven is a build tool that helps with building java code, running tests etc., in an easy fashion. But it looks like you haven't imported your project into eclipse as a Maven project.
So if you would like to run your tests via Maven, you would need to do the following :
Remove your project from the workspace (delete it from the workspace but not from the file system). Refer here to learn how to do it.
Now remove the following files from your project folder manually :
.settings (I think this should be a folder)
.classpath
.project
If you have already setup Maven properly in your machine (Refer here to learn how to do that), you can easily clean up the eclipse related files by opening up a command prompt, using cd command to navigate into your project directory such that dir pom.xml lists the pom.xml and then running the command mvn eclipse:clean
Now refer to this StackOverFlow post to learn how to import a maven project into eclipse and import the project into eclipse.
You now have your project configured properly so that eclipse recognizes your project as a maven project. Now to run the tests from the command prompt, (refer to surefire documentation to learn how to add surefire plugin to your pom file) run mvn clean test
Running your tests from command prompt
For running your project without using any build tool, you just need to append target\test-classes and target\classes directories to your java -cp command run it. So your modified batch file can look like below
java -cp "D:\Java Applications\WebDriverProject\lib*;D:\Java Applications\WebDriverProject\bin;D:\Java Applications\WebDriverProject\target\classes;D:\Java Applications\WebDriverProject\target\test-classes" org.testng.TestNG testng.xml
pause
On a side note, please add verbose="2" or higher to the <suite> tag in your suite xml file, so that it shows you what error occurred.
Also please ensure that your testng.xml resides under src\test\resources folder (you can very well create this folder if it doesn't exist).
well try to put TestNG.jar file https://mvnrepository.com/artifact/org.testng/testng/6.7 and jcommander jar https://mvnrepository.com/artifact/com.beust/jcommander/1.7 in lib folder.
I'm using gatling 2.2.3 and I'm following the Quickstart guide. I've got it all working up until the point where I can run the scenario.
Instead of allowing me to select the simulation I want to run I'm getting this output:
U:\>%GATLING_HOME%\bin\gatling.bat
GATLING_HOME is set to "C:\Users\name\Downloads\gatling-charts-highcharts-bundle-2.2.3\"
JAVA = "java"
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-server to select the "server" VM
The default VM is server.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose:[class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
Warning: this feature is deprecated and will be removed
in a future release.
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -no-jre-restrict-search
Warning: this feature is deprecated and will be removed
in a future release.
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
It seems like it's trying to execute some Java command which isn't done properly. Does anyone know how I can fix this?
What this folder is:
U:>%GATLING_HOME%
Be sure don't have blank spaces in it
I did my reading before posting
I know there are quite a few questions on this issue.
I have read all those that I could find but non of the issues and suggestions there helped.
My environment
windows 7 64bit
GAE SDK 1.8.8
version 1.7.0_45 of the JDK
eclipse kepler 4.3.1 + google plugin.
Stuff I tried already
Here are the things I have already tried:
1) changed system variable JAVA_HOME to point to C:\Program Files\Java\jdk1.7.0_45
2) ensured the system variable PATH contains C:\Program Files\Java\jdk1.7.0_45\bin
3) when opening a command window and running both java -version and javac -version I get:
C:\Users\epeleg>java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
C:\Users\epeleg>javac -version
javac 1.7.0_45
4) checked that all my JSP pages (there are only 2) are working properly when used in development server
5) modified C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin\appcfg.cmd so that the command inside it starts with #%JAVA_HOME%\bin\java ... instead of java...
6) I opened the Markers Pane (eclipse: window - show view - other... General--Markers) and fixed all the Java issues that where mentioned there no matter how trivial they seemed.
What the logs show
The Deploy process reports:
Preparing to deploy:
Created staging directory at: 'C:\Users\epeleg\AppData\Local\Temp\appcfg1552018719531070310.tmp'
Scanning for jsp files.
Compiling jsp files.
com.google.appengine.tools.admin.JspCompilationException: Failed to compile the generated JSP java files.
ינו 13, 2014 3:20:30 PM org.apache.jasper.JspC processFile
INFO: Built File: \myFirstJSP.jsp
ינו 13, 2014 3:20:30 PM org.apache.jasper.JspC processFile
INFO: Built File: \mySecondJSP.jsp
Debugging information may be found in C:\Users\epeleg\AppData\Local\Temp\appengine-deploy4888568219008828635.log
The "Staging directory" seems o.k. (but maybe there are missing libraries there ?!)
and the log file contains the following text:
Unable to update:
com.google.appengine.tools.admin.JspCompilationException: Failed to compile the generated JSP java files.
at com.google.appengine.tools.admin.Application.compileJavaFiles(Application.java:840)
at com.google.appengine.tools.admin.Application.compileJsps(Application.java:801)
at com.google.appengine.tools.admin.Application.createStagingDirectory(Application.java:615)
at com.google.appengine.tools.admin.AppAdminImpl.doUpdate(AppAdminImpl.java:418)
at com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:55)
at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:433)
at com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java:158)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
My Questions
1) looking for ideas regarding what else I can try
2) Is there a way to simulate the compile from a command window directly on the staging folder so that I might hopefully see an actual helpful error message?
3) The error says Failed to compile the generated JSP java files - where are those generated files supposed to be?
4) Is there a way to run appcfg.cmd directly from the command line (and with what parameters) so that I can see its output (assuming that the plugin is hiding some stuff from me...).
Problem solved
Here is what I did to resolve this, hopefully it will help others that have similar issues.
I decided to try and run the upload from the command line instead of using the plugin for it.
And here is what I got:
[note that I added rem to the #echo off command and also removed the # from the begining of the java command in appcfg.cmd so that all the commands would echo to the console]
C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin>appcfg.cmd update "X:\path\to\my\project\war"
C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin>rem #echo off
C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin>rem Copyright 2009 Google Inc. All Rights Reserved.
C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin>rem Launches the AppCfg utility, which allows Google App Engine
C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin>rem developers to deploy their application to the cloud.
C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin>C:\Program Files\Java\jdk1.7.0_45\bin\java -Djava.home="C:\Program Files\Java\jdk1.7.0_45\jre" -Xmx1100m -cp "C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin\\..\lib\appengine-tools-api.jar" com.google.appengine.tools.admin.AppCfg update "X:\path\to\my\project\war"
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
OK, so I edited appcfg.cmd again and changed its last line to look like this:
"%JAVA_HOME%\bin\java" -Djava.home="%JAVA_HOME%\jre" -Xmx1100m -cp "%~dp0\..\lib\appengine-tools-api.jar" com.google.appengine.tools.admin.AppCfg %*
Try again:
C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin>appcfg.cmd update "X:\path\to\my\project\war"
C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin>rem #echo off
C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin>rem Copyright 2009 Google Inc. All Rights Reserved.
C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin>rem Launches the AppCfg utility, which allows Google App Engine
C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin>rem developers to deploy their application to the cloud.
C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin>"C:\Program Files\Java\jdk1.7.0_45\bin\java" -Djava.home="C:\Program Files\Java\jdk1.7.0_45\jre" -Xmx1100m -cp "C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin\\..\lib\appengine-tools-api.jar" com.google.appengine.tools.admin.AppCfg update "X:\path\to\my\project\war"
Θ≡σ 13, 2014 5:17:12 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Reading application configuration data...
Θ≡σ 13, 2014 5:17:13 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed X:/path/to/my/project/war\WEB-INF/appengine-web.xml
Θ≡σ 13, 2014 5:17:13 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed X:/path/to/my/project/war\WEB-INF/web.xml
Θ≡σ 13, 2014 5:17:13 PM com.google.apphosting.utils.config.IndexesXmlReader readConfigXml
INFO: Successfully processed X:/path/to/my/project/war\WEB-INF\appengine-generated\datastore-indexes-auto.xml
Beginning interaction for module default...
Email: myemail#mydomain.com
Password for myemail#mydomain.com:
0% Created staging directory at: 'C:\Users\epeleg\AppData\Local\Temp\appcfg8197335956386755707.tmp'
5% Scanning for jsp files.
8% Compiling jsp files.
C:\Users\epeleg\AppData\Local\Temp\1389626267515-0\org\apache\jsp\myFirstJSP_jsp.java:6: error: package com.mycompany does not exist
import com.mycompany.*;
^
C:\Users\epeleg\AppData\Local\Temp\1389626267515-0\org\apache\jsp\mySecondJSP_jsp.java:6: error: package com.mycompany does not exist
import com.mycompany.*;
^
C:\Users\epeleg\AppData\Local\Temp\1389626267515-0\org\apache\jsp\myFirstJSP_jsp.java:6: error: package com.mycompany does not exist
import com.mycompany.*;
^
C:\Users\epeleg\AppData\Local\Temp\1389626267515-0\org\apache\jsp\mySecondJSP_jsp.java:6: error: package com.mycompany does not exist
import com.mycompany.*;
^
2 errors
Error Details:
Θ≡σ 13, 2014 5:17:48 PM org.apache.jasper.JspC processFile
INFO: Built File: \myFirstJSP.jsp
Θ≡σ 13, 2014 5:17:48 PM org.apache.jasper.JspC processFile
INFO: Built File: \mySecondJSP.jsp
com.google.appengine.tools.admin.JspCompilationException: Failed to compile the generated JSP java files.
Unable to update app: Failed to compile the generated JSP java files.
Please see the logs [C:\Users\epeleg\AppData\Local\Temp\appcfg6545644664045561868.log] for further information.
So I went to my JSP's, removed the offending import attribute from the page tag, tryed again and this time it worked.
Now, I don't know why the plugin fails to display the most important lines in appcfg.cmd's output, but to me it feels like some sort of a bug.
Two lines Summary
run <path-to-appengine-java-sdk>\bin\appcfg.cmd update <war-location> in a command window,
it will provide you with a more detailed output then the plugin does and will most likely enable you to resolve the problem in a matter of minutes.
If that fails you are welcome to follow all the steps I mentioned in the questions body, hey seem to have helped other people in the past.
I am using WAMP on my local machine and I'm trying to use docblox to generate documentation for a project.
When i try to run the docblox command in my command prompt for a file that has the necessary comments, I get the error message.
C:\wamp\www\wm-ppclps>docblox run -f wm-ppclps.php -t documentation
DocBlox version 0.18.1
Starting transformation of files (this could take a while depending upon the size of your project)
ERROR: The XSL writer was unable to find your XSLTProcessor; please check if you
have installed the PHP XSL extension
I have no idea why this is error message is appearing. The command creates the documentation folder, parses the source code and it produces the structure.xml file. It just won't transform the structure into an HTML file or any other readable file.
I added the PHP install directory to my system path, I installed PEAR system wide, added PEAR install directory to my system path, installed DocBlox using the docblox pear channel, I have the necessary environment variables setup. I uncommented the php.ini line to enable the php_xsl.dll extension for WAMP and restarted WAMP. When I view the phpinfo, i see that the XSL extension is enabled (XSL version 1.1.23, compiled against libxml version 2.6.32, EXSLT enabled).
Does anyone have any idea why this is happening, has come across this problem or can point me in the right direction for an answer?
The error that you are receiving means that php does not recognize the xsl extension.
Php has got a separate ini file for CLI and web; and I presume that you have enabled the xsl extension for apache only.
You can verify this by executing php -i in your command prompt and check if the xsl extension is enabled there. If not then add your dll to the right config for your WAMP.