Cannot Build build.xml file in wso2 esb home/bin directory - ant

In WSO2 Documentation, they have said Open a command prompt (or a shell in Linux) and go to the <ESB_HOME>\bin directory. Then run the ant command as shown below to build the build.xml file.
In My Case If I run ant Command it shows command not found even though I run cmd in bin of wso2.
So Can anyone help me with this?

you need to install 'ant' first when you are using Windows.
https://ant.apache.org/manual/install.html

Related

How does NANT run from Command Prompt on a developer machine Know Where TFS is?

I open a command prompt and issue the following commands
CD /D C:\CorpInc\ location of xml files for builds
C:\devtools\NANt\bin\NAnt.exe -D:Rebuild="true" -buildfile:"name of xml file" -logfile:"name of xml file.log" -D:DeployCheckEnv=CO -D:vss.user=%USERNAME%
it works - but how does it know where to find TFS? there is nothing in the XML file which says where the code is located

launch a .bat in TFS2015 build

I have a problem trying to launch a server via a .bat file during a TFS build.
I usually launch the server via a cmd window and it works fine.
When I set it in the TFS build, I end up with the following message :
"'..\server_common.bat' is not recognized as an internal command or external, an executable or a command file".
I also have the following line:
"java -Dsun.lang.ClassLoader.allowArraySyntax=true -Xbootclasspath/a:..\..\..\lib\framework\serverjvm15.jar; -cp ..\..\..\lib\framework\fwtime.jar;" indicating a java syntax error (? I'm not skilled in java)
This batch calls other .bat files and sets java VM-related environment variables
From my research, it is probably a problem of rights as I don't have admin rights when I use TFS. However, all the other steps in the build work fine (installing and launching an appli through command lines, or launching a python script via command lines).
However I also tried to launch a basic script with the same kind of step and it works.
First, suggest you to follow the tutorial in Batch script. Make sure you have meet the requirements of Arguments and used correctly. Such as
Path
Specify the path to the .bat or .cmd script you want to run. The path
must be a fully qualified path or a valid path relative to
the default working directory. In Team Foundation Build, this
directory is $(Build.SourcesDirectory).
Also RDP to your build agent and use your build service account manually run the server_common.bat to narrow down if the account have enough permission.

How to run appium testcase from command prompt in windows machine?

I'm ready with Appium setup and AddContact testcase(script in java). I'm able to run successfully through eclipse and it's working fine. But, I would like to run same script on command line.
Open the command prompt on your system.
Go to the Test Java project folder where the new testng.xml is created.
Type the following line. java -cp "/opt/testng-6.8.jar:bin" org.testng.TestNG testng.xml.
This is the general way to run TestNG suites from command line
Hope this helps.
Better install maven in ur machine and add maven dependancy to your project. Then you can directly use the following command to execute the test command line easily.
mvn clean test

Install gradle on Centos

I'm trying to install gradle for building android app with the help of Jenkins. But I'm not able to find the link to download gradle for Centos. I tried to use binaries from https://gradle.org/downloads/, but when I unzipped I got gradle.bat file inside bin directory which tells me that this is for Windows.
Is there a place where I can download gradle for using in Jenkins?
... but when I unzipped I got gradle.bat file inside bin directory which tells me that this is for Windows.
It also contains a file called gradle, which is a shell script.
Your download is also suitable for running on any Linux or UNIX platform .... including CentOS.
Please add the GRADLE_HOME path to the PATH variable by using following steps:
echo $PATH
Copy the echoed paths and add the GRADLE_HOME path e.g.: /opt/gradle/bin to the PATH variable using a colon (:) using command: export PATH = echoed paths:GRADLE_HOME path
Now, you can use the command gradle from any path and it should work.

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.

Resources