ANT Running error - ant

I am running Ant using Testng and While compiling and running ant via command prompt or eclipse getting the following error... Pls help me how to rectify the problem.
Thanks

While runing Ant using testng I was getting java.lang.nullpointerexception error. after checking all my code multiiple times there was not a problem in the code or java and ant configuration. The error was in the XML where the suite was written like this Suite.../Suite and it should be like suite.../suite, only S was capital for suite in xml which has given that particular error.

Related

dotCover Upload to Sonar from Jenkins Plugin

So I am having trouble uploading our dotCover results from Jenkins to our Sonar instance. We are using the SonarScanner for MSBuild plugin. All of the documentation I have found like here: https://docs.sonarqube.org/pages/viewpage.action?pageId=6389770#CodeCoverageResultsImport(C#,VB.NET)-dotCover
Shows how to do it from the command line. We are using the plugin. There is an area for additional arguments that I have added what I assume is an added argument like on the command line. Here is how I have it set up:
So that is the argument that everything shows to add to the end of the command line portion, but for some reason it doesn't add coverage to Sonar. Does anyone see anything obvious I am missing here? I have been stuck on this for a while. Thanks!!
So as it turns out I had:
/d:sonar.cs.dotcover.reportsPath=
It should have been with an s at the end:
/d:sonar.cs.dotcover.reportsPaths=

xjc with annox running from command prompt

I have tried to run a example from the website http://confluence.highsource.org/display/J2B/Annotate+Plugin#AnnotatePlugin-Activation. The very first schema provided in the webpage and I saved it as schema.xsd under c:\jaxb folder. Then, I ran the command 'xjc -extension schema.xsd' from command prompt and I get the similar error. Apparently xjc doesn't seem to understand this url http://annox.dev.java.net. How do I solve this?
You have to add the annotate plugin with all the dependencies to the classpath. See this Ant build file for what dependencies are
You have to activate the plugin using -Xannotate switch
Here's a sample Ant project. I'll assemble a command-line example for the next version.

How to show the ant task javac compilation errors on console using Eclipse AntRunner

I'm using Elcipse's AntRunner to excute the Ant task. When performing the javac task,if any compilation error occurs, I'm getting the following error messge in the console
C:\build.xml:41: Compile failed; see the compiler error output for details.
What I need to do for displaying the actual compilation errors on the console? How to I can log the same in a file? . Thanks
I haven't used Ant eclipse plugin, but I think this could be caused by lack of feature within the plugin, not the Ant itself.
If you can run Ant from the terminal (or command prompt on windows), try run ant -verbose for Ant to output more information.
When Eclipse AntRunner has used, in order to show the Compilation errors on the console The
addBuildListener API can be used.
Create a class which extends the org.apache.tools.ant.DefaultLogger. For example
Class MyLogger extends DefaultLogger {
// All overridden method implementation goes here
}
// To use with AntRunner:
AntRunner antRunner = new AntRunner();
antRunner.addBuildListener(MyLogger.class.getName());

Cannot resolve symbol 'scp' in IntelliJ IDEA 11 Ant build script

I'm running IntelliJ IDEA 11 on Ubuntu Linux. I have an existing project that I've imported into IDEA with a build script that performs a bunch of <scp> tasks. IntelliJ is underlining all of my <scp> tasks and giving me the message of cannot resolve symbol even though I have jsch-0.1.42.jar both on my Global Classpath in IntelliJ as well as on the Additional Classpath for this specific Ant file.
What do I need to do so that IntelliJ will recognize <scp> as a valid task?
I was having this same problem with IntelliJ version 12.1.4. I solved it by putting jsch-0.1.50.jar into the default ant directory of IntelliJ (IntelliJ IDEA 12.1.4\lib\ant\lib).
We can't reproduce the problem, scp is correctly recognized in the editor and works with just jsch-0.1.45.jar added to the Additional Classpath:
Please submit a bug with an isolated test case and the steps to reproduce if you still have this problem.
You can solve your problem for all additional jar by installing them in a user scope.
If you have an ant installation, run
ant -f fetch.xml -Ddest=user
A step by step can be found here

Grails ant tasks don't work - Unable to start Grails: java.lang.reflect.InvocationTargetException

I'm having issues getting something which seems very basic running with Grails. I want to call grails commands from an Ant script - Grails provides a Grails task to achieve this. I have defined the Grails taskdef and classpaths as per the docs however, no matter what command I call I get the same error...
grails-compile:
[grails] Resolving dependencies...
[grails] Dependencies resolved in 1192ms.
BUILD FAILED
/java/grailstest/build.xml:22: Unable to start Grails: java.lang.reflect.InvocationTargetException
Even when I create a new Grails app using 'grails create-app' and then run the integrate ant command 'grails integrate-with --ant' to generate a default build.xml, I get the same error when running any of the tasks in the generated build.xml.
I've tested this with Grails 1.3.1, 1.3.4 and 1.3.5 and am getting the same error.
Has anyone else encountered this problem? There must be something stupid I'm doing wrong or this would never have made it out the door of the Grails factory... ;)
I forgot to mention that I am using Ant version 1.8.1. I have just discovered that switching back to Ant 1.7.1 'solves' this problem but this is not really ideal as I need 1.8.1 for other build tasks. I'll submit a bug on the Grails issue tracker as it seems a lot of people are having the same problem.
I've just found the same issue. It seems that Ant 1.8 is not supported yet (but Ant 1.7 is), see GRAILS-6897. Some users have complained that the documentation does not state it strictly.

Resources