Kony - Build error- 'C:\Program' is not recognized as an internal or external command, - temenos-quantum

I am very new to Kony and am stuck with a build error.
While building my project for the first time with selected platform as Android , it is giving me the following error.
buildwar:
all:
[02-12-2014 10:30:51]Time taken for Preprocessing code for selected platforms : 2432
[02-12-2014 10:30:51]Success : Preprocessing code for selected platforms
[02-12-2014 10:30:51]Starting Build Generation Process for Job: Android
[02-12-2014 10:30:51]Performing Android build
[02-12-2014 10:30:51][02-12-2014 10:30:51]Executing build file: D:\KonyWorkspace/temp/KonyEx\build\luaandroid/build.xml
init:
copyjar:
[mkdir] Created dir: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist
[mkdir] Created dir: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx
[unjar] Expanding: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\codegen.jar into D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx
copybuildfile:
[copy] Copying 1 file to D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx
copyextlibs:
[echo] Copying extlibs ... dev.language = js
[copy] Copying 1 file to D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\libs\armeabi
gen:
[echo] Building android source code
[echo] The value of packagename is com.orgname.KonyEx
[echo] Creating package path: D:\KonyWorkspace\temp\KonyEx\build\luaandroid/dist/KonyEx/src/com//orgname//KonyEx
[mkdir] Created dir: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\src\com\orgname\KonyEx
[move] Moving 1 file to D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\src\com\orgname\KonyEx
cleanmapv2:
[echo] usegoogleplaylocationservices: false
[echo] mapv2keyadded in application tags = false
[echo] The value of googlemapv2key is empty
[echo] MapV2 Metadata-Key:
[echo] MapV2 Permissions:
[delete] Deleting: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\src\PROVIDER.java
[delete] Deleting: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\res\xml\searchable.xml
[echo] The value of andmanifesttags is
[echo] The value of andapplicationtags is
[echo] Min SDK version: android:minSdkVersion ="9"
[echo] Max SDK version:
[echo] Target SDK version: android:targetSdkVersion="9"
[echo] Push Notification Permissions:
[echo] Push Notification Intent Filters:
[echo] Push Notification Intent Receiver:
[echo] Any Density: android:anyDensity ="true"
[echo] Small Screen: android:smallScreens ="true"
[echo] Normal Screen: android:normalScreens ="true"
[echo] Large Screen: android:largeScreens ="true"
[echo] xLarge Screen: android:xlargeScreens ="true"
[echo] Resizable:
[echo] Install location value defined:auto
[echo] Permissions set:
[echo] <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
[echo] <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
[echo] <uses-permission android:name="android.permission.INTERNET"/>
copyassets:
[echo] Copying the resources to android assets
[copy] Copying 1 file to D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\assets
copy-appsrc:
copy-appsrc-to-assets-zip:
[mkdir] Created dir: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\assets\js
[zip] Building zip: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\assets\js\startup.js
copy-PaaS-resources:
[mkdir] Created dir: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\src\com\konylabs\js\appsrc
[copy] Copying 1 file to D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\src\com\konylabs\js\appsrc
[mkdir] Created dir: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\assets\fonts
[echo] Copying theme files
[copy] Copying 1 file to D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\assets
copynativeresources:
[echo] Copying the native resources to android assets
copyninepatchimages:
[echo] Copying the nine patch images and delete the actual png image in android drawable folder
check-for-actual-png-file:
check-for-actual-png-file:
[echo] No 3rd party libraries found
[echo] No custom widget libraries found
compile:
[echo] Packaging the android KonyEx application
[exec-shell] Buildfile: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\build.xml
[exec-shell]
[exec-shell] -set-mode-check:
[exec-shell]
[exec-shell] -set-debug-files:
[exec-shell]
[exec-shell] -check-env:
[exec-shell] [checkenv] Android SDK Tools Revision 20
[exec-shell] [checkenv] Installed at D:\Kony\android-sdk
[exec-shell]
[exec-shell] -setup:
[exec-shell] [echo] Project Name: KonyEx
[exec-shell] [gettype] Project Type: Application
[exec-shell] [echo] Switching between debug and non debug build: Deleting previous compilation output...
[exec-shell]
[exec-shell] -set-debug-mode:
[exec-shell]
[exec-shell] -debug-obfuscation-check:
[exec-shell]
[exec-shell] -build-setup:
[exec-shell] [echo] Resolving Build Target for KonyEx...
[exec-shell] [gettarget] Project Target: Android 2.3.1
[exec-shell] [gettarget] API level: 9
[exec-shell] [echo] ----------
[exec-shell] [echo] Creating output directories if needed...
[exec-shell] [mkdir] Created dir: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\bin
[exec-shell] [mkdir] Created dir: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\bin\res
[exec-shell] [mkdir] Created dir: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\gen
[exec-shell] [mkdir] Created dir: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\bin\classes
[exec-shell] [echo] ----------
[exec-shell] [echo] Resolving Dependencies for KonyEx...
[exec-shell] [dependency] Library dependencies:
[exec-shell] [dependency] No Libraries
[exec-shell] [dependency]
[exec-shell] [dependency] ------------------
[exec-shell] [dependency] API<=15: Adding annotations.jar to the classpath.
[exec-shell] [echo] ----------
[exec-shell] [echo] Building Libraries with 'debug'...
[exec-shell] [subant] No sub-builds to iterate on
[exec-shell]
[exec-shell] -pre-build:
[exec-shell]
[exec-shell] -code-gen:
[exec-shell] [mergemanifest] Merging AndroidManifest files into one.
[exec-shell] [mergemanifest] Manifest merger disabled. Using project manifest only.
[exec-shell] [echo] Handling aidl files...
[exec-shell] [aidl] No AIDL files to compile.
[exec-shell] [echo] ----------
[exec-shell] [echo] Handling RenderScript files...
[exec-shell] [renderscript] No RenderScript files to compile.
[exec-shell] [echo] ----------
[exec-shell] [echo] Handling Resources...
[exec-shell] [aapt] Generating resource IDs...
[exec-shell] [echo] ----------
[exec-shell] [echo] Handling BuildConfig class...
[exec-shell] [buildconfig] Generating BuildConfig class.
[exec-shell]
[exec-shell] -pre-compile:
[exec-shell]
[exec-shell] -compile:
[exec-shell] [javac] Compiling 4 source files to D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\bin\classes
[exec-shell]
[exec-shell] -post-compile:
[exec-shell]
[exec-shell] -obfuscate:
[exec-shell]
[exec-shell] -dex:
[exec-shell] [dex] Converting compiled files and external libraries into D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\bin\classes.dex...
[exec-shell] [dx] 'C:\Program' is not recognized as an internal or external command,
[exec-shell] [dx] operable program or batch file.
[exec-shell]
[exec-shell] BUILD FAILED
[exec-shell] D:\Kony\android-sdk\tools\ant\build.xml:851: The following error occurred while executing this line:
[exec-shell] D:\Kony\android-sdk\tools\ant\build.xml:853: The following error occurred while executing this line:
[exec-shell] D:\Kony\android-sdk\tools\ant\build.xml:865: The following error occurred while executing this line:
[exec-shell] D:\Kony\android-sdk\tools\ant\build.xml:266: null returned: 1
[exec-shell]
[exec-shell] Total time: 5 seconds
[02-12-2014 10:30:59]Ant build error=exec-shell returned: 1
[02-12-2014 10:30:59]Build Generation failed for platform Android.
[02-12-2014 10:30:59]Total time taken: 23110 ms
[02-12-2014 10:30:59]Build Generation has failed for the following platforms:-->Android
[02-12-2014 10:30:59]<-----------Build Generation job is completed--------------->
These are my env variables.
JAVA_HOME = C:\Program Files\Java\jdk1.6.0_32
ANT_HOME = C:\Kony\Ant
Path = C:\Kony\ImageMagick;C:\Kony\Ant\bin;D:\Kony\android-sdk\platform-tools;D:\Kony\android-sdk\tools;C:\Program Files\Java\jdk1.6.0_32\bin;
I have set the Android path correctly. Could you please help me what’s wrong?
Also let me know if you need any other information.

So a couple of things:
Looks like your path is missing a semicolon between the end of the JAVA_HOME variable and the start of the ANT_HOME variable, which could be causing you an issue. You might want to try the app Rapid Environment Editor here to help with configuring your PATH. http://www.rapidee.com/en/about
Assuming that was a typo, you may want to try uninstalling and re-installing Java into your root, so C:\JAVA.
I agree that having quotes around your path may help ( again, a tool like the environment editor handles things like this automatically and makes your life much easier )
Try these and let us know!

Related

Analyse TypeScript SonarQube in Maven project

I'll try to use the SonarQube SonarTS plugin to analyse TypeScript files in a project of mine.
It contains a submodule that contains some images, some xmls, and a couple of .ts-files. I have installed SonarTS ( https://docs.sonarqube.org/display/PLUG/SonarTS ) in SonarQube. The project uses typescript 2.4.2 as a devDependency and is build with Node 6.13.1.
When I call mvn sonar:sonar -Dsonar.branch=<BRANCHNAME> (I know sonar.branch is deprecated, I'll fix soon :)), eventually the sum-module is scanned and this is the log:
[INFO] ------------- Scan MyProject
[INFO] Base dir: /home/jenkins/workspace/my-project/my-project-config-model
[INFO] Working dir: /home/jenkins/workspace/my-project/my-project-config-model/target/sonar
[INFO] Source paths: pom.xml
[INFO] Source encoding: UTF-8, default locale: en_US
[INFO] Index files
[INFO] 1 file indexed
[INFO] Quality profile for xml: Sonar way
[INFO] Sensor Embedded CSS Analyzer Sensor [css]
[INFO] 0 source files to be analyzed
[INFO] Sensor Embedded CSS Analyzer Sensor [css] (done) | time=1ms
[INFO] Sensor SonarJavaXmlFileSensor [java]
[INFO] 0/0 source files have been analyzed
[INFO] 1 source files to be analyzed
[INFO] Sensor SonarJavaXmlFileSensor [java] (done) | time=31ms
[INFO] 1/1 source files have been analyzed
[INFO] Sensor XML Sensor [xml]
[INFO] Sensor XML Sensor [xml] (done) | time=8ms
[INFO] SCM provider for this project is: git
[INFO] 1 files to be analyzed
[INFO] 0/1 files analyzed
And the only file that is scanned is the pom.xml
Could it have something to do with the structure of the sub-module? The xmls and ts files are not at src/main/{ts|resources}, but src/models and src/scripts.
Thanks in advance!
I guess you need to change the sonar.sources parameter to include your source folders (something like sonar.sources=src/main/java,src/models,src/scripts should work).
You can find more about analysis parameters here, and more about the way to configure the maven scanner here.

gcloud:deploy failed due to:Unable to copy certificates

Using windows 10, I am trying to use gcloud maven plugin to deploy my VMs managed appeengine project.So after running mvn clean install successfully I run mvn gcloud:deploy ,It fails with the following output on the console.
[INFO] Copying certificates for secure access. You may be prompted to create an SSH keypair.
[INFO] DEBUG: Loaded Command Group: ['gcloud', 'compute', 'copy_files']
[INFO] DEBUG: Error copying certificates. Retry 0 of 20.
[INFO] DEBUG: Error copying certificates. Retry 1 of 20.
[INFO] DEBUG: Error copying certificates. Retry 2 of 20.
[INFO] DEBUG: Error copying certificates. Retry 3 of 20.
[INFO] DEBUG: Error copying certificates. Retry 4 of 20.
[INFO] DEBUG: Error copying certificates. Retry 5 of 20.
[INFO] DEBUG: Error copying certificates. Retry 6 of 20.
[INFO] DEBUG: Error copying certificates. Retry 7 of 20.
[INFO] DEBUG: Error copying certificates. Retry 8 of 20.
[INFO] DEBUG: Error copying certificates. Retry 9 of 20.
[INFO] DEBUG: Error copying certificates. Retry 10 of 20.
[INFO] DEBUG: Error copying certificates. Retry 11 of 20.
[INFO] DEBUG: Error copying certificates. Retry 12 of 20.
[INFO] DEBUG: Error copying certificates. Retry 13 of 20.
[INFO] DEBUG: Error copying certificates. Retry 14 of 20.
[INFO] DEBUG: Error copying certificates. Retry 15 of 20.
[INFO] DEBUG: Error copying certificates. Retry 16 of 20.
[INFO] DEBUG: Error copying certificates. Retry 17 of 20.
[INFO] DEBUG: Error copying certificates. Retry 18 of 20.
[INFO] DEBUG: Error copying certificates. Retry 19 of 20.
[INFO] DEBUG: (gcloud.preview.app.deploy) Unable to copy certificates.
[INFO] Traceback (most recent call last):
[INFO] File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\cli.py", line 609, in Execute
[INFO] result = args.cmd_func(cli=self, args=args)
[INFO] File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\backend.py", line 1228, in Run
[INFO] resources = command_instance.Run(args)
[INFO] File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\surface\preview\app\deploy.py", line 256, in Run
[INFO] remote_build)
[INFO] File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\app\deploy_command_util.py", line 167, in BuildAndPushDockerImages
[INFO] cli, version_id, remote, project) as docker_client:
[INFO] File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\app\images\docker_util.py", line 224, in __enter__
[INFO] self._vm = Provision(self._cli, self._name, self._zone, self._project)
[INFO] File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\app\images\docker_util.py", line 55, in Provision
[INFO] vm.CopyCerts()
[INFO] File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\app\images\docker_util.py", line 167, in CopyCerts
[INFO] raise exceptions.ToolException('Unable to copy certificates.')
[INFO] ToolException: Unable to copy certificates.
[INFO] ERROR: (gcloud.preview.app.deploy) Unable to copy certificates.
[ERROR] Error: gcloud app command with exit code : 1
I am using gcloud maven plugin version 2.0.9.90.v20151210 as following
<plugin>
<groupId>com.google.appengine</groupId>
<artifactId>gcloud-maven-plugin</artifactId>
<version>2.0.9.90.v20151210</version>
<configuration>
<version>test-gcloud-plugin-v1-1x16</version>
<runtime>java7</runtime>
<verbosity>debug</verbosity>
<log_level>info</log_level>
</configuration>
</plugin>
with latest cloud sdk
Any idea why this happens ?
I had the same problem and tracked it down to an problem in App Engine's use of pscp.exe (Putty secure copy). That program is prompting you to say "yes" to a warning message, but when App Engine runs it, it turns off standard output so you can't see the warning. A workaround is to type y and then enter into the console when you see the Error copying certificates error.
I've opened a ticket for Google (see that for more info): https://code.google.com/p/google-cloud-sdk/issues/detail?id=529
Most likely your certificates are in a protected directory. It happened to me on Mac, where I had to use sudo (runas in Windows world) to call gcloud.

Error opening zip file or JAR manifest missing in maven with GAE and Spring Roo

I'm using Spring roo with Google App Engine So, I'm using maven GWT plugin to compile my code like this inside my pom.xml :
<extraJvmArgs>-javaagent:"${gae.home}/lib/agent/appengine-agent.jar"
-Xmx1024m</extraJvmArgs>
where in pom.xml, gae.home is (gae.version is 1.8.3)
<gae.home>${user.home}\.m2\repository\com\google\appengine\appengine-java-sdk\${gae.version}\appengine-java-sdk\appengine-java-sdk-${gae.version}</gae.home>
Yet, I get the error when I run -DskipTests appengine:devserver
[ERROR] Error opening zip file or JAR manifest missing : C:\Users\bsmtaa.m2\repository\com\google\appengine\appengine-java-sdk\1.8.3\appengine-java-sdk\appengine-java-sdk-1.8.3/lib/agent/appengine-agent.jar
[ERROR] -Xmx1024m
[INFO] agent library failed to init: instrument
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.419 s
[INFO] Finished at: 2015-04-26T16:03:22+00:00
[INFO] Final Memory: 23M/225M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.7.0:compile (gwtcompile) on project dp-demo-3: Command [[
[ERROR] C:\Program Files\Java\jdk1.7.0_79\jre\bin\java -javaagent:C:\Users\bsmtaa.m2\repository\com\google\appengine\appengine-java-sdk\1.8.3\appengine-java-sdk\appengine-java-sdk-1.8.3/lib/agent/appengine-agent.jar
[ERROR] -Xmx1024m -classpath C:\Users\bsmtaa\Documents\workspace-sts-3.6.4.RELEASE\dp-demo-3\target\dp-demo-3-0.1.0.BUILD-SNAPSHOT\WEB-INF\classes;C:\Users\bsmtaa\Documents\workspace-sts-3.6.4.RELEASE\dp-demo-3\src\main\java;C:\Users\bsmtaa\Documents\workspace-sts-3.6.4.RELEASE\dp-demo-3\src\main\aspect;C:\Users\bsmtaa.m2\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar;C:\Users\bsmtaa.m2\repository\org\slf4j\slf4j-api\1.7.5\slf4j-api-1.7.5.jar;C:\Users\bsmtaa.m2\repository\org\slf4j\jcl-over-slf4j\1.7.5\jcl-over-slf4j-1.7.5.jar;C:\Users\bsmtaa.m2\repository\org\slf4j\slf4j-log4j12\1.7.5\slf4j-log4j12-1.7.5.jar;C:\Users\bsmtaa.m2\repository\org\aspectj\aspectjrt\1.7.4\aspectjrt-1.7.4.jar;C:\Users\bsmtaa.m2\repository\org\aspectj\aspectjweaver\1.7.4\aspectjweaver-1.7.4.jar;C:\Users\bsmtaa.m2\repository\javax\servlet\servlet-api\2.5\servlet-api-2.5.jar;C:\Users\bsmtaa.m2\repository\net\sf\flexjson\flexjson\2.1\flexjson-2.1.jar;C:\Users\bsmtaa.m2\repository\org\apache\commons\commons-lang3\3.1\commons-lang3-3.1.jar;C:\Users\bsmtaa.m2\repository\org\springframework\roo\org.springframework.roo.annotations\1.2.5.RELEASE\org.springframework.roo.annotations-1.2.5.RELEASE.jar;C:\Users\bsmtaa.m2\repository\commons-io\commons-io\2.4\commons-io-2.4.jar;C:\Users\bsmtaa.m2\repository\org\springframework\spring-core\3.2.6.RELEASE\spring-core-3.2.6.RELEASE.jar;C:\Users\bsmtaa.m2\repository\org\springframework\spring-context\3.2.6.RELEASE\spring-context-3.2.6.RELEASE.jar;C:\Users\bsmtaa.m2\repository\org\springframework\spring-beans\3.2.6.RELEASE\spring-beans-3.2.6.RELEASE.jar;C:\Users\bsmtaa.m2\repository\org\springframework\spring-expression\3.2.6.RELEASE\spring-expression-3.2.6.RELEASE.jar;C:\Users\bsmtaa.m2\repository\org\springframework\spring-aop\3.2.6.RELEASE\spring-aop-3.2.6.RELEASE.jar;C:\Users\bsmtaa.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Users\bsmtaa.m2\repository\org\springframework\spring-aspects\3.2.6.RELEASE\spring-aspects-3.2.6.RELEASE.jar;C:\Users\bsmtaa.m2\repository\org\springframework\spring-context-support\3.2.6.RELEASE\spring-context-support-3.2.6.RELEASE.jar;C:\Users\bsmtaa.m2\repository\com\google\appengine\orm\datanucleus-appengine\2.1.1\datanucleus-appengine-2.1.1.jar;C:\Users\bsmtaa.m2\repository\org\datanucleus\datanucleus-enhancer\3.1.1\datanucleus-enhancer-3.1.1.jar;C:\Users\bsmtaa.m2\repository\org\ow2\asm\asm\4.0\asm-4.0.jar;C:\Users\bsmtaa.m2\repository\com\google\appengine\appengine-api-1.0-sdk\1.8.3\appengine-api-1.0-sdk-1.8.3.jar;C:\Users\bsmtaa.m2\repository\org\apache\geronimo\specs\geronimo-jpa_2.0_spec\1.1\geronimo-jpa_2.0_spec-1.1.jar;C:\Users\bsmtaa.m2\repository\org\datanucleus\datanucleus-core\3.1.3\datanucleus-core-3.1.3.jar;C:\Users\bsmtaa.m2\repository\org\datanucleus\datanucleus-rdbms\3.1.3\datanucleus-rdbms-3.1.3.jar;C:\Users\bsmtaa.m2\repository\org\datanucleus\datanucleus-api-jpa\3.1.3\datanucleus-api-jpa-3.1.3.jar;C:\Users\bsmtaa.m2\repository\org\datanucleus\datanucleus-api-jdo\3.1.3\datanucleus-api-jdo-3.1.3.jar;C:\Users\bsmtaa.m2\repository\javax\jdo\jdo-api\3.0\jdo-api-3.0.jar;C:\Users\bsmtaa.m2\repository\javax\transaction\transaction-api\1.1\transaction-api-1.1.jar;C:\Users\bsmtaa.m2\repository\org\hibernate\hibernate-validator\4.3.1.Final\hibernate-validator-4.3.1.Final.jar;C:\Users\bsmtaa.m2\repository\org\jboss\logging\jboss-logging\3.1.0.CR2\jboss-logging-3.1.0.CR2.jar;C:\Users\bsmtaa.m2\repository\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA.jar;C:\Users\bsmtaa.m2\repository\javax\transaction\jta\1.1\jta-1.1.jar;C:\Users\bsmtaa.m2\repository\org\springframework\spring-jdbc\3.2.6.RELEASE\spring-jdbc-3.2.6.RELEASE.jar;C:\Users\bsmtaa.m2\repository\org\springframework\spring-tx\3.2.6.RELEASE\spring-tx-3.2.6.RELEASE.jar;C:\Users\bsmtaa.m2\repository\org\springframework\spring-orm\3.2.6.RELEASE\spring-orm-3.2.6.RELEASE.jar;C:\Users\bsmtaa.m2\repository\commons-pool\commons-pool\1.5.6\commons-pool-1.5.6.jar;C:\Users\bsmtaa.m2\repository\commons-dbcp\commons-dbcp\1.4\commons-dbcp-1.4.jar;C:\Users\bsmtaa.m2\repository\org\springframework\spring-webmvc\3.2.6.RELEASE\spring-webmvc-3.2.6.RELEASE.jar;C:\Users\bsmtaa.m2\repository\org\springframework\spring-web\3.2.6.RELEASE\spring-web-3.2.6.RELEASE.jar;C:\Users\bsmtaa.m2\repository\org\springframework\webflow\spring-js-resources\2.2.1.RELEASE\spring-js-resources-2.2.1.RELEASE.jar;C:\Users\bsmtaa.m2\repository\commons-digester\commons-digester\2.1\commons-digester-2.1.jar;C:\Users\bsmtaa.m2\repository\commons-beanutils\commons-beanutils\1.8.3\commons-beanutils-1.8.3.jar;C:\Users\bsmtaa.m2\repository\commons-fileupload\commons-fileupload\1.2.2\commons-fileupload-1.2.2.jar;C:\Users\bsmtaa.m2\repository\javax\servlet\jsp\jstl\jstl-api\1.2\jstl-api-1.2.jar;C:\Users\bsmtaa.m2\repository\org\glassfish\web\jstl-impl\1.2\jstl-impl-1.2.jar;C:\Users\bsmtaa.m2\repository\javax\el\el-api\2.2\el-api-2.2.jar;C:\Users\bsmtaa.m2\repository\joda-time\joda-time\1.6\joda-time-1.6.jar;C:\Users\bsmtaa.m2\repository\javax\servlet\jsp\jsp-api\2.1\jsp-api-2.1.jar;C:\Users\bsmtaa.m2\repository\commons-codec\commons-codec\1.5\commons-codec-1.5.jar;C:\Users\bsmtaa.m2\repository\org\apache\tiles\tiles-jsp\2.2.2\tiles-jsp-2.2.2.jar;C:\Users\bsmtaa.m2\repository\org\apache\tiles\tiles-servlet\2.2.2\tiles-servlet-2.2.2.jar;C:\Users\bsmtaa.m2\repository\org\apache\tiles\tiles-core\2.2.2\tiles-core-2.2.2.jar;C:\Users\bsmtaa.m2\repository\org\apache\tiles\tiles-template\2.2.2\tiles-template-2.2.2.jar;C:\Users\bsmtaa.m2\repository\org\apache\tiles\tiles-api\2.2.2\tiles-api-2.2.2.jar;C:\Users\bsmtaa.m2\repository\com\google\gwt\gwt-servlet\2.7.0\gwt-servlet-2.7.0.jar;C:\Users\bsmtaa.m2\repository\com\google\gwt\gwt-user\2.7.0\gwt-user-2.7.0.jar;C:\Users\bsmtaa.m2\repository\org\json\json\20090211\json-20090211.jar;C:\Users\bsmtaa.m2\repository\com\google\gwt\inject\gin\1.5.0\gin-1.5.0.jar;C:\Users\bsmtaa.m2\repository\com\google\inject\guice\3.0-rc2\guice-3.0-rc2.jar;C:\Users\bsmtaa.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar;C:\Users\bsmtaa.m2\repository\com\google\inject\extensions\guice-assistedinject\3.0-rc2\guice-assistedinject-3.0-rc2.jar;C:\Users\bsmtaa.m2\repository\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA-sources.jar;C:\Users\bsmtaa.m2\repository\xalan\xalan\2.7.1\xalan-2.7.1.jar;C:\Users\bsmtaa.m2\repository\xalan\serializer\2.7.1\serializer-2.7.1.jar;C:\Users\bsmtaa.m2\repository\xml-apis\xml-apis\1.3.04\xml-apis-1.3.04.jar;C:\Users\bsmtaa.m2\repository\com\google\gwt\gwt-user\2.7.0\gwt-user-2.7.0.jar;C:\Users\bsmtaa.m2\repository\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA.jar;C:\Users\bsmtaa.m2\repository\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA-sources.jar;C:\Users\bsmtaa.m2\repository\com\google\gwt\gwt-dev\2.7.0\gwt-dev-2.7.0.jar;C:\Users\bsmtaa.m2\repository\org\ow2\asm\asm\5.0.3\asm-5.0.3.jar;C:\Users\bsmtaa.m2\repository\org\ow2\asm\asm-util\5.0.3\asm-util-5.0.3.jar;C:\Users\bsmtaa.m2\repository\org\ow2\asm\asm-tree\5.0.3\asm-tree-5.0.3.jar;C:\Users\bsmtaa.m2\repository\org\ow2\asm\asm-commons\5.0.3\asm-commons-5.0.3.jar com.google.gwt.dev.Compiler -logLevel INFO -style PRETTY -war C:\Users\bsmtaa\Documents\workspace-sts-3.6.4.RELEASE\dp-demo-3\target\dp-demo-3-0.1.0.BUILD-SNAPSHOT -localWorkers 4 -XfragmentCount -1 -sourceLevel auto -gen C:\Users\bsmtaa\Documents\workspace-sts-3.6.4.RELEASE\dp-demo-3\target.generated com.mta.ifekry.dp.backend.ApplicationScaffold
[ERROR] ]] failed with status 1
Any solution to this?
Try deleting all the repositories you have downloaded and right click on the project and configure it to "clean compile". Then the folder will be automatically downloaded.

NullPointerException when running maven-antrun-plugin for an ant build.xml that has javac

I am trying to run a build.xml (ant) in my new pom.xml in the same project. However, I always get a NullPointerException no matter what I tried at compile build.xml:104(javac). The build succeeds with ant itself.
Any insights on running build.xml in maven that has a javac target will help!
=============== Environment ===============
C:\source\GWTRPCTest>mvn -version
Listening for transport dt_socket at address: 5005
Apache Maven 2.2.1 (r801777; 2009-08-06 14:16:01-0500)
Java version: 1.6.0_31
Java home: c:\Program Files (x86)\Java\jdk6_31\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7" version: "6.1" arch: "amd64" Family: "windows"
=============== Log ===============
C:\source\GWTRPCTest>mvn package
Listening for transport dt_socket at address: 5005
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] task-segment: [package]
[INFO] ------------------------------------------------------------------------
[INFO] [version:setversion {execution: version}]
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\source\GWTRPCTest\src\main\resources
[INFO] skip non existing resourceDirectory C:\source\GWTRPCTest\src\main\resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] No sources to compile
[INFO] [antrun:run {execution: generate-sources}]
[INFO] Executing tasks
init:
[mkdir] Created dir: C:\source\GWTRPCTest\build
[mkdir] Created dir: C:\source\GWTRPCTest\build\classes
[mkdir] Created dir: C:\source\GWTRPCTest\deploy
bootstrap.maven.tasks:
[mkdir] Created dir: C:\source\GWTRPCTest\build\lib
[get] Getting: http://artifactory.bpm.ibm.com:8081/artifactory/simple/ext-release-local/org/apache/maven/maven-artifact-ant/2.1.0/maven-artifact-ant-2.1.0.jar
[get] To: C:\source\GWTRPCTest\build\lib\maven-ant-tasks-2.1.0.jar
init.maven.tasks:
prepare:
[echo]
[echo] *** The file c:/source/lon.war should be from a non-development build...
[echo]
[copy] Copying 5 files to C:\source\GWTRPCTest\build\lib
extractLonAssets:
[unjar] Expanding: c:\source\lon.war into C:\source\GWTRPCTest\build\lon.war.dir
[jar] Building jar: C:\source\GWTRPCTest\build\ibm-web.jar
compile:
[javac] C:\source\GWTRPCTest\build.xml:104: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 5 source files to C:\source\GWTRPCTest\build\classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An Ant BuildException has occured: The following error occurred while executing this line:
C:\source\GWTRPCTest\build.xml:104: java.lang.NullPointerException
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 minutes 22 seconds
[INFO] Finished at: Fri Sep 06 10:53:59 CDT 2013
[INFO] Final Memory: 46M/618M
[INFO] ------------------------------------------------------------------------
I'd guess there may be a difference in the version of ant used by maven and the one on your system. Add the following line to the beginning of a target that will be executed in your build.xml file to find out:
<echo message="Ant version is: ${ant.version}"/>
Then run with both ant and your maven. If they don't match, try downloading the specific version of ant that maven is using and see if you get the same error. If so then you know this is the problem.
Update
I was able to work around this problem when I had it. You can tell the maven-antrun-plugin to use a more recent version of ant as its dependency, instead of the one it uses by default. For instance, I was able to get my antrun code to work with version 1.9.3, but it didn't with the default version of 1.8.2, so I used this code:
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>generateSources</id>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<echo message="Ant version for antrun is ${ant.version}"/>
<!-- Other ant stuff here-->
</target>
</configuration>
</execution>
</executions>
<dependencies>
<!--The default version of ant used for antrun (1.8.2) causes above to
hit a NullPointerException. Ant 1.9.3 doesn't have this issue. -->
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.3</version>
</dependency>
</dependencies>
</plugin>
As you can see, I was generating source code with the antrun plugin. You will need to customize the phase, etc. for your own purposes. Hope this helps.

NoClassDefFoundError when hudson runs a maven project

I have a project for running tests. It's a maven project which uses Selenium. It runs correctly when launched locally, but from the Hudson platform, it throws NoClassDefFoundError:
Parsing POMs
[elsevier-selenium] $ "C:\Program Files\Java\jdk1.7.0_25/bin/java" -Xmx1024m -cp E:\hudson\plugins\maven-plugin\WEB-INF\lib\maven-agent-1.353.jar;E:\maven\boot\classworlds-1.1.jar hudson.maven.agent.Main E:\maven E:\hudson\war\WEB-INF\lib\remoting-1.353.jar E:\hudson\plugins\maven-plugin\WEB-INF\lib\maven-interceptor-1.353.jar 1753 E:\hudson\plugins\maven-plugin\WEB-INF\lib\maven2.1-interceptor-1.2.jar
<===[HUDSON REMOTING CAPACITY]===>channel started
Executing Maven: -B -f E:\hudson\jobs\tests-selenium\workspace\elsevier-selenium\pom.xml integration-test
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building selenium-elsevier
[INFO] task-segment: [integration-test]
[INFO] ------------------------------------------------------------------------
[INFO] [compiler:testCompile {execution: default}]
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 5 source files to E:\hudson\jobs\tests-selenium\workspace\elsevier-selenium\target\test-classes
[INFO] [site:attach-descriptor {execution: default-attach-descriptor}]
[INFO] [failsafe:integration-test {execution: default}]
[INFO] Failsafe report directory: E:\hudson\jobs\tests-selenium\workspace\elsevier-selenium\target\failsafe-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running fr.elsevier.tests.disponibilite.SearchTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.203 sec <<< FAILURE!
fr.elsevier.tests.disponibilite.SearchTest Time elapsed: 0.203 sec <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class fr.elsevier.tests.BaseSelenium
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at org.apache.maven.surefire.report.SmartStackTraceParser.getClass(SmartStackTraceParser.java:63)
at org.apache.maven.surefire.report.SmartStackTraceParser.<init>(SmartStackTraceParser.java:53)
at org.apache.maven.surefire.common.junit4.JUnit4StackTraceWriter.smartTrimmedStackTrace(JUnit4StackTraceWriter.java:72)
[...]
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
SearchTest extends BaseSelenium.
Which means it cannot even find a class in my source folder. The project structure is like this:
src/
fr.elsevier.tests/
disponibilite/
SearchTest.java
BaseSelenium.java
pom.xml
Why does the build generates these NoClassDefFoundErrors and how to fix it?
Try using -e or -X command line argument in local and hudson build. Then try to compare the classpath of the java processes launched.
You can then actually figure out which part of maven lifecycle threw the exception with better stacktrace.

Resources