Unable to run the demo setup - ant

I have downloaded the Activity 5.10 zip file and then i have downloaded and configured the Apache ANT and i test it and it worked successfully.
But i am unable to run the demo file as specified in this link http://activiti.org/userguide/#demo.setup
if i type the following using the cmd command line:-
C:\activiti-5.10\activiti-5.10\setup>ant demo.start
I will get the following error:-
'ant' is not recognized as an internal or external command, operable program or batch file.
Can anyone help me in identifying what is the problem?
BR
:::UPDATE:::
thanks for the reply, i have copied the ANT bin files inside the setup directory for the activity,, then i run the CMD command again ,, but i got the following error that i build failed,,
AS MENTIONED BELOW:-
C:\Users\Desktop\activiti-5.10\activiti-5.10\setup>ant demo.start
Buildfile: C:\Users\Desktop\activiti-5.10\activiti-5.10\setup\build.xml
demo.install:
internal.cfg.create:
[copy] Copying 1 file to C:\Users\Desktop\activiti-5.10\activiti-5.
10\setup\build\activiti-cfg
[zip] Building zip: C:\Users\Desktop\activiti-5.10\activiti-5.10\s
etup\build\activiti-cfg.jar
[echo] copying configuration to ../workspace/activiti-engine-examples/src/m
ain/config
[unzip] Expanding: C:\Users\Desktop\activiti-5.10\activiti-5.10\setu
p\build\activiti-cfg.jar into C:\Users\Desktop\activiti-5.10\activiti-5.
10\workspace\activiti-engine-examples\src\main\config
internal.classpath.libs:
internal.taskdef.launch:
h2.start:
[echo] starting H2 database...
[launch] launching cmd 'C:\Users\Desktop\activiti-5.10\activiti-5.10\
apps\h2\h2.start.bat ' in dir 'C:\Users\Desktop\activiti-5.10\activiti-5
.10\apps\h2'
[launch] waiting for launch completion msg 'TCP server running'...
[launch] 'java' is not recognized as an internal or external command,
[launch] operable program or batch file.
[launch] launched process completed
[echo] H2 database started
tomcat.start:
BUILD FAILED
C:\Users\Desktop\activiti-5.10\activiti-5.10\setup\build.xml:330: couldn
't find executable for script C:\Users\Desktop\activiti-5.10\activiti-5.
10\apps\apache-tomcat-6.0.32\bin\startup
Total time: 0 seconds

Looks like you didn't set the ant directory in you path variable. Either specifiy the entire path to ant or add it to the path variable

I typed tomcat.install and it solved the problem since I need to download the tomcat inside the apps directory.

Related

Custom Ant Task Not Working On Build Server

I've got a custom Ant task that I'm using successfully from gradle on my local machine:
task fetchRelMod {
doLast {
println 'Fetching the RelMod'
ant.taskdef(name:'relmod',
classpath:'retrievePBSInfo.jar:hsjt400-4-9.jar',
classname:"com.myco.ant.tasks.RetrievePBSRelModString")
ant.relmod(user:project.ext.props.getProperty('fetchrelmod.username'),
password:project.ext.props.getProperty('fetchrelmod.password'),
prodCode:project.ext.props.getProperty('profile.pbs.product.code'),
branch:project.ext.props.getProperty('profile.pbs.branch'),
state:project.ext.props.getProperty('profile.pbs.relmod.selector'))
project.ext.set('iseries_relmod',ant.relmodStub)
project.ext.set('iseries_relmodAndDate', ant.relmod)
}
}
I've got the jar files sitting next to build.gradle for now, out of simplicity... they exist in the same location on the build server. Works great locally. When I run my build from my build server (either through Jenkins or going on the box and running Gradle directly), I get the following:
sudo /var/lib/jenkins/tools/hudson.plugins.gradle.GradleInstallation/gradle214/bin/gradle all -DisQUABuild=true
Building My App
Loading Properties files...
QUA Build. Using build-qua.props
:fetchRelMod
Fetching the RelMod
:fetchRelMod FAILED
FAILURE: Build failed with an exception.
* Where:
Build file '/var/lib/jenkins/workspace/MyApp/build.gradle' line: 141
* What went wrong:
Execution failed for task ':fetchRelMod'.
> taskdef class com.myco.ant.tasks.RetrievePBSRelModString cannot be found
using the classloader AntClassLoader[/var/lib/jenkins/workspace/myApp/hsjt400-4-9.jar]
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 3.104 secs
What concerns me is that there are two jar files in the classpath and it only mentions one in the error. Does anyone have any ideas as to what might be going on?

Could not find a file on the SonarQube server. Url: http://server:9081/static/csharp/SonarQube.MSBuild.Runner.Implementation.zip

SonarQube - 5.3
C# Plugin - 5.0
SonarQube Scanner 2.1
TFS 2015 Update 2.1
When I execute build on build server, it says
Could not find a file on the SonarQube server. Url: http://server:9081/static/csharp/SonarQube.MSBuild.Runner.Implementation.zip
I can login to Sonar server, I have also added path of Sonar MSBuild.SonarQube.Runner.exe in path variable under environment variables.
Am I missing anything here?
Can anybody please help me to solve this?
2016-07-18T12:20:40.6290351Z Checking if artifacts directory exists: D:\BuildAgent\_work\8\a
2016-07-18T12:20:40.6290351Z Deleting artifacts directory.
2016-07-18T12:20:40.6330353Z Creating artifacts directory.
2016-07-18T12:20:40.6330353Z Checking if test results directory exists: D:\BuildAgent\_work\8\TestResults
2016-07-18T12:20:40.6330353Z Deleting test results directory.
2016-07-18T12:20:40.6340353Z Creating test results directory.
2016-07-18T12:20:40.6880384Z Starting: Get sources
2016-07-18T12:20:40.6930387Z Entering TfsGitSourceProvider.PrepareRepositoryAsync
2016-07-18T12:20:40.6930387Z localPath=D:\BuildAgent\_work\8\s
2016-07-18T12:20:40.6930387Z clean=False
2016-07-18T12:20:40.6930387Z sourceBranch=refs/heads/master
2016-07-18T12:20:40.6930387Z sourceVersion=8a38426975d589b8ba02ae545fa989588221143c
2016-07-18T12:20:40.6940388Z Syncing repository: PSA (Git)
2016-07-18T12:20:40.6940388Z repository url=http://server:8080/tfs/AjayTestCollection/_git/PSA
2016-07-18T12:20:40.6950388Z checkoutSubmodules=False
2016-07-18T12:20:40.7570424Z Starting fetch...
2016-07-18T12:20:40.9230519Z Checking out 8a38426975d589b8ba02ae545fa989588221143c to D:\BuildAgent\_work\8\s
2016-07-18T12:20:40.9570538Z Checked out branch refs/heads/master for repository PSA at commit 8a38426975d589b8ba02ae545fa989588221143c
2016-07-18T12:20:40.9570538Z commit=8a38426975d589b8ba02ae545fa989588221143c
2016-07-18T12:20:40.9570538Z Leaving TfsGitSourceProvider.PrepareRepositoryAsync
2016-07-18T12:20:41.0360583Z Running tasks
2016-07-18T12:20:41.0510592Z Starting task: NuGet restore **\*.sln
2016-07-18T12:20:41.0770607Z Set workingFolder to default: D:\BuildAgent\tasks\NuGetInstaller\0.1.17
2016-07-18T12:20:41.1000620Z Executing the powershell script: D:\BuildAgent\tasks\NuGetInstaller\0.1.17\NuGetInstaller.ps1
2016-07-18T12:20:41.3220747Z D:\BuildAgent\agent\worker\tools\NuGet.exe restore "D:\BuildAgent\_work\8\s\CIBuildPSA\CIBuildPSA.sln" -NonInteractive
2016-07-18T12:20:41.6210918Z MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'.
2016-07-18T12:20:41.6870956Z Finishing task: NuGetInstaller
2016-07-18T12:20:41.6950960Z Starting task: Fetch the Quality Profile from SonarQube
2016-07-18T12:20:41.6970961Z Executing the powershell script: D:\BuildAgent\tasks\SonarQubePreBuild\1.0.34\SonarQubePreBuild.aps1
2016-07-18T12:20:41.8101026Z ##[debug]
2016-07-18T12:20:42.0451161Z SonarQube Scanner for MSBuild 1.1
2016-07-18T12:20:42.0461161Z Default properties file was not found at D:\BuildAgent\tasks\SonarQubePreBuild\1.0.34\MSBuild.SonarQube.Runner-1.1\SonarQube.Analysis.xml
2016-07-18T12:20:42.0471162Z Pre-processing started.
2016-07-18T12:20:42.0481162Z Preparing working directories...
2016-07-18T12:20:42.0491163Z Checking for updates...
2016-07-18T12:20:42.0511164Z ##[error]Could not find a file on the SonarQube server. Url: http://server:9081/static/csharp/SonarQube.MSBuild.Runner.Implementation.zip
2016-07-18T12:20:42.0521165Z ##[error]Failed to update the SonarQube Scanner for MSBuild binaries. Check the server url, verify that the C# plugin is correctly installed on the SonarQube server and that the SonarQube server has been restarted.
2016-07-18T12:20:42.0531165Z ##[error]Pre-processing failed. Exit code: 1
2016-07-18T12:20:42.0821182Z ##[error]Unexpected exit code received from batch file: 1
2016-07-18T12:20:42.0961190Z Finishing task: SonarQubePreBuild
2016-07-18T12:20:42.1451218Z Starting task: Copy Files to: $(build.artifactstagingdirectory)
2016-07-18T12:20:42.1541223Z Set workingFolder to default: D:\BuildAgent\tasks\CopyFiles\1.0.13
2016-07-18T12:20:42.3601341Z ##[debug]check path : D:\BuildAgent\tasks\CopyFiles\1.0.13\task.json
2016-07-18T12:20:42.3601341Z ##[debug]set resource file to: D:\BuildAgent\tasks\CopyFiles\1.0.13\task.json
2016-07-18T12:20:42.3611341Z ##[debug]system.culture=en-US
2016-07-18T12:20:42.3611341Z ##[debug]load strings from: D:\BuildAgent\tasks\CopyFiles\1.0.13\task.json
2016-07-18T12:20:42.3611341Z ##[debug]load loc strings from: D:\BuildAgent\tasks\CopyFiles\1.0.13\Strings\resources.resjson\en-US\resources.resjson
2016-07-18T12:20:42.3621342Z ##[debug]Contents=**\bin\release\**
2016-07-18T12:20:42.3621342Z ##[debug]SourceFolder=D:\BuildAgent\_work\8\s
2016-07-18T12:20:42.3621342Z ##[debug]check path : D:\BuildAgent\_work\8\s
2016-07-18T12:20:42.3631342Z ##[debug]TargetFolder=D:\BuildAgent\_work\8\a
2016-07-18T12:20:42.3631342Z ##[debug]CleanTargetFolder=false
2016-07-18T12:20:42.3631342Z ##[debug]OverWrite=false
2016-07-18T12:20:42.3631342Z ##[debug]include content pattern: **\bin\release\**
2016-07-18T12:20:42.3881357Z ##[debug]find D:\BuildAgent\_work\8\s
2016-07-18T12:20:42.3891357Z ##[debug]179 matches.
2016-07-18T12:20:42.3951361Z ##[debug]allFiles contains 128 files
2016-07-18T12:20:42.3951361Z ##[debug]Include matching D:\BuildAgent\_work\8\s\**\bin\release\**
2016-07-18T12:20:42.3991363Z ##[debug]Include matched 0 files
2016-07-18T12:20:42.4001364Z ##[debug]load strings from: D:\BuildAgent\tasks\CopyFiles\1.0.13\node_modules\vsts-task-lib\lib.json
2016-07-18T12:20:42.4011364Z ##[debug]load loc strings from: D:\BuildAgent\tasks\CopyFiles\1.0.13\node_modules\vsts-task-lib\Strings\resources.resjson\en-US\resources.resjson
2016-07-18T12:20:42.4021365Z found 0 files
2016-07-18T12:20:42.4081368Z Finishing task: CopyFiles
2016-07-18T12:20:42.4121370Z Starting task: Publish Artifact: drop
2016-07-18T12:20:42.4131371Z Set workingFolder to default: D:\BuildAgent\tasks\PublishBuildArtifacts\1.0.28
2016-07-18T12:20:42.5991477Z ##[debug]check path : D:\BuildAgent\tasks\PublishBuildArtifacts\1.0.28\task.json
2016-07-18T12:20:42.6001478Z ##[debug]set resource file to: D:\BuildAgent\tasks\PublishBuildArtifacts\1.0.28\task.json
2016-07-18T12:20:42.6001478Z ##[debug]system.culture=en-US
2016-07-18T12:20:42.6011479Z ##[debug]load strings from: D:\BuildAgent\tasks\PublishBuildArtifacts\1.0.28\task.json
2016-07-18T12:20:42.6011479Z ##[debug]load loc strings from: D:\BuildAgent\tasks\PublishBuildArtifacts\1.0.28\Strings\resources.resjson\en-US\resources.resjson
2016-07-18T12:20:42.6021479Z ##[debug]system.hosttype=build
2016-07-18T12:20:42.6021479Z ##[debug]PathtoPublish=D:\BuildAgent\_work\8\a
2016-07-18T12:20:42.6021479Z ##[debug]check path : D:\BuildAgent\_work\8\a
2016-07-18T12:20:42.6031480Z ##[debug]ArtifactName=drop
2016-07-18T12:20:42.6031480Z ##[debug]ArtifactType=Container
2016-07-18T12:20:42.6041480Z ##[debug]TargetPath=\\my\share\Main_Sonar\20160718.7
2016-07-18T12:20:42.9871699Z Max Concurrent Uploads 4, Max Creators 1
2016-07-18T12:20:43.0141715Z Found 0 files to upload.
2016-07-18T12:20:43.0171717Z Created 0 files without uploading content. Total files processed 0
2016-07-18T12:20:43.0181717Z Uploaded artifact 'D:\BuildAgent\_work\8\a' to container folder 'drop' of build 102.
2016-07-18T12:20:43.2781866Z Associated artifact 83 with build 102
2016-07-18T12:20:43.2871871Z Finishing task: PublishBuildArtifacts
2016-07-18T12:20:43.2891872Z ##[error]Task SonarQubePreBuild failed. This caused the job to fail. Look at the logs for the task for more details.
After installing SonarQube server, you need to sign in the sever as an administrator, go to the Update Center (Settings | System | Update Center), and install the SonarQube C# Plug-in.
Also, SonarQube must be restarted after installing the plugin.
You may check whether you have completed the steps above. In the following link, there is detailed guide of how to install and configure SonarQube, you can chek it:
https://github.com/SonarSource-VisualStudio/sonar-.net-documentation/blob/master/doc/installation-and-configuration.md#setup-sonarqube-server

Not a valid Windows application error in PHPStorm file watcher

Here's what I get in my CMD:
C:\Documents and Settings\Administrator>lessc
lessc: no input files
... (long program output)
C:\Documents and Settings\Administrator>"C:\Documents and Settings\Administrator
\Dane aplikacji\npm\lessc"
lessc: no input files
usage: lessc [option option=parameter ...] <source> [destination]
... (long program output)
C:\Documents and Settings\Administrator>
But when I add a file watcher in my PHPStorm for LESS and specify the program to:
C:\Documents and Settings\Administrator\Dane aplikacji\npm\lessc, I get the following error:
16:52:38 An exception occurred while executing watcher 'LESS'. Watcher has been disabled. Fix it.: Cannot run program "C:\Documents and Settings\Administrator\Dane aplikacji\npm\lessc" (in directory "C:\Documents and Settings\Administrator\Pulpit\bootstrap\css"): CreateProcess error=193, %1 nie jest prawid³ow¹ aplikacj¹ systemu Wi
Why is this happening and how can I fix this?
You seems to forgot how Windows/DOS works ;)
When you trying to execute lessc in Command Shell, Windows will search for such file. If nothing found -- it will search for lessc.exe, lessc.com, lessc.bat, lessc.cmd and so on -- depends on value of PATHEXT environment variable. Just type SET in command prompt and see for yourself.
In PhpStorm (or any other software) where NO command shell is used but command executed DIRECTLY, you have to specify FULL program name, which is lessc.cmd

Ant error: <buildfile> is not an absolute path

I'm trying to use Ant 1.7 but running into a problem. In my current directory, I have a build file called warupdate.xml. From within this directory, I execute:
/opt/apache-ant-1.7.0/bin/ant -f warupdate.xml
I then get the following error:
Buildfile: warupdate.xml
BUILD FAILED
./warupdate.xml is not an absolute path
Any ideas? Thanks!
Matt
Why name it anything other than build.xml? It's the standard, ant will expect it and then you can simply just run ant from that directory without specifying a build file.
Here's my warupdate.xml:
<project>
<echo>Tada!</echo>
</project>
Here's my Ant command:
$ /opt/ant/bin/ant -f warupdate.xml
Buildfile: /Users/david/warupdate.xml
[echo] Tada!
BUILD SUCCESSFUL
Total time: 0 seconds
Basically, it works.
Something else is going on, and you're not giving the full story. What does warupdate.xml look like? What if you use ant -d to get a verbose debugging output. Maybe that will show you what's going on. Why are you giving the full path to ant?
You have to give us more information.

ftp task hangs with ant

I'm trying to pull out the file through ftp within ant, it get hung with after printing "getting files", so I enabled debug in ant and my output is
[root#LODIVM11SE001 net]# ant -d -f ftp_t.xml
Apache Ant version 1.6.5 compiled on June 2 2005
Buildfile: ftp_t.xml
Adding reference: ant.PropertyHelper
Detected Java version: 1.5 in: /root/jdk1.6.0_10/jre
Detected OS: Linux
Adding reference: ant.ComponentHelper
Setting ro project property: ant.version -> Apache Ant version 1.6.5 compiled on June 2 2005
Setting ro project property: ant.file -> /Test_Framework/tasks/net/ftp_t.xml
Adding reference: ant.projectHelper
Adding reference: ant.parsing.context
Adding reference: ant.targets
parsing buildfile /Test_Framework/tasks/net/ftp_t.xml with URI = file:///Test_Framework/tasks/net/ftp_t.xml
Setting ro project property: ant.project.name -> FTP simple interface - ftp.xml
Adding reference: FTP simple interface - ftp.xml
Setting ro project property: ant.file.FTP simple interface - ftp.xml -> /Test_Framework/tasks/net/ftp_t.xml
Project base dir set to: /Test_Framework/tasks/net
+Target:
+Target: ftpget
Setting project property: ftpServerName -> xxxxx
Setting project property: ftpUser -> xxxxx
Setting project property: ftpPassword -> xxxx
Setting project property: ftpRemoteDir -> /test
Setting project property: ftpRemoteFile -> ReadMe.txt
Setting project property: ftpLocalDir -> /local/test
Attempting to create object of type org.apache.tools.ant.helper.DefaultExecutor
Adding reference: ant.executor
Build sequence for target(s) `ftpget' is [ftpget]
Complete build sequence is [ftpget, ]
ftpget:
[echo] FTP getting 'ReadMe.txt' from '/test' to '/local/test'
[ftp] Opening FTP connection to xxxxx
[ftp] connected
[ftp] logging in to FTP server
[ftp] login succeeded
[ftp] changing the remote directory
[ftp] getting files
Could not load a dependent class (com/sun/media/jai/codec/FileSeekableStream) for type image
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type sshexec
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type scp
Could not load a dependent class (jdepend/xmlui/JDepend) for type jdepend
Could not load a dependent class (junit/framework/Test) for type junit
fileset: Setup scanner in dir /local/test with patternSet{ includes: [ReadMe.txt] excludes: [] }
My code
<target name="ftpget" description="Get file over FTP">
<fail message="Build Abrted! Failed to find property:ftpRemoteFile" unless="ftpRemoteFile"/>
<fail message="Build Abrted! Failed to find property:ftpLocalDir" unless="ftpLocalDir"/>
<echo message="FTP getting '${ftpRemoteFile}' from '${ftpRemoteDir}' to '${ftpLocalDir}'"/>
<ftp action="get"
server="${ftpServerName}"
userid="${ftpUser}"
password="${ftpPassword}"
verbose="true"
remotedir="${ftpRemoteDir}"
skipFailedTransfers="true">
<fileset dir="${ftpLocalDir}">
<include name="${ftpRemoteFile}"/>
</fileset>
</ftp>
Note: Normal ftp is working fine. I'm using Linux 64bit, ant 1.6.5 and java 1.6.10
Looks like everything works fine until you actually try and retrieve the data. FTP uses two channels; one for control and one for data. This works out fine until a firewall denies the data connection. Passive mode attempts to work around this. Does your FTP library work have a 'passive mode', or 'PASV' option?
Ant FTP task has require dependencies, Libraries that must be on classpath for it to function properly. See link below,
http://ant.apache.org/manual/install.html#commons-net
To use the FTP task, you need jakarta-oro 2.0.8 or later, and commons-net

Resources