WSIG Deployment BUILD FAILED - web-services

I would like to use wsig : I followed the guide .
So in step of deployement:
Prepare the WSIG web application content in the webModule directory. This step can be performed by means of the build target of the ANT build file included in the WSIG distribution.
When I launch the command ANT like this :
c:\JADE-all-4.5.0\add-ons\wsig>ant build.xml
it's displays this error :
buildfile: C:\Users\acer\Downloads\JADE-all-4.5.0\add-ons\wsig\build.xml
BUILD FAILED
Target "build.xml" does not exist in the project "wsig".
I checked the folder wsig , build.xml file exists in wsig folder.

Try this instead.
>ant -f build.xml
If you need to specify a target in the build.xml file then put that on the end. For example -
ant -f build.xml mytarget
See here for more information.

Related

How do I copy a directory every time I build the project?

I'm trying to copy the res directory into the build directory but it only happens when I reload the CMake file and build the project. Here's the code I'm using to achieve this:
add_custom_command(
TARGET project PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/res/ $<TARGET_FILE_DIR:project>/res/
)
I've tried using the file command to copy the directory, but that method also has this issue. Is there a way to copy a directory every time I build the project?

CMake : Executable crashes when running ctest

I am configuring CMake build project on Windows for MSVC++ project.It build ok the executable,then installs it into a defined directory.In my cases that's:
${CMAKE_SOURCE_DIR}/x64/${CMAKE_BUILD_TYPE}/
The executable has got a folder in the same directory with files which it loads upon the launch.If I launch the .exe manually it opens up and runs ok.But I want to do it via ctest.
I defined ctest like this:
add_test(ENGINE_TEST1 ${CMAKE_SOURCE_DIR}/x64/${CMAKE_BUILD_TYPE}/MyApp.exe
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/x64/${CMAKE_BUILD_TYPE})
When I call from the cmd:
ctest
The executable is starting up but crashes immediately with the error:
Debug Error!
Program:../..../.../MyApp.exe
R6010 -abort() has
been called.
Indeed,when checking the CMake's Last Test.log file it shows that it runs the test not in "WORKING_DIRECTORY but in the directory where the MyApp.exe has been built by CMake.How do I change that?
As I am not CMake pro I am sure the following answer is not the optimal way to do it,but at least it works for me.
Again,I was trying to run ctest on an executable from within the directory into which cmake had installed it.The exe on the startup was trying to load dependent files which were in the same directory.But it was crashing because it couldn't fin the files.
It appears that the cmake default workspace directory is the directory where the cmake files and projects are generated.That's 'build' directory.So when the executable is launched via ctest it search the paths of the files to load relative to the build directory.
Now,CMAKE has 2 variations of add_test() method.One is simple with arguments:
add_test([test_name] [test exe path])
It doesn't take care of the working directory.
And another one which is explained here does include an argument for explicit setup of the working directory.
Frankly speaking,I wasn't able to get this advanced function working as it was demanding to supply some test .config which I didn't understand how to setup.So what I did,I used the simple add_test function.
And then I set the working directory to the location of my executable using this:
set_tests_properties(mytest PROPERTIES WORKING_DIRECTORY "${TEST_WOKRING_DIR}")
And it fixed the problem.

Why settings.gradle file is not used when -b is specified?

From Gradle User Guide we can read that
You can use the -b option to select another build file. If you use -b option then settings.gradle file is not used.
So lets have:
-Example #Project root
--src
--main
--test
--build.gradle
--second.gradle #Second build script
--settings.gradle
What is the purpose of this? If I want to try something different with my multiproject build I create another script file - second.gradle and put it in the same directory. But want old settings.gradle file to include my subprojects.
If I execute my gradle comands when I am in the root directory of Example project for ex:
gradle -b second.gradle clean build
Why Gradle does not use settings.gradle file? To protect itself when specified build file is not in the same dir, because Gradle will looks for settings.gradle in the direcotry of build.gradle file and after that in the parent directory. But they can empty or can be from another project?
-b allows to pass a different build script for a single-project build. It is not meant to be used for multi-project builds, where settings.gradle alone determines where build scripts are located.

Gradle build: does someone tried alternative build script with alternative setting.gradle?

I am using gradle 1.4, and renamed a build.gradle to buildExpr.gradle and settings.gradle to settingExpr.gradle, both files are in the project root, and I am using following command to run gradle build.
'gradle C:\myProject>gradle -i -b buildExpr.gradle -c settingsExpr.gradle project'
it seems command line option '-c' is not being honored and gradle is not picking settingsExpr.gradle file, hence it is not able to display all modules defined in settings.gradle file while executing project task.
I am getting following log
-------------------------------------LOG----------------------------------------------------
C:\ASM\asm_workspace\asm71\AutoLab>gradle -i -c settingsExpr.gradle -b buildExpr.gradle project
Starting Build
Settings evaluated using empty settings script.
Projects loaded. Root project using build file 'C:\ASM\asm_workspace\asm71\AutoLab\buildExpr.gradle'.
Included projects: [root project 'AutoLab']
Evaluating root project 'AutoLab' using build file 'C:\ASM\asm_workspace\asm71\AutoLab\buildExpr.gradle'.
All projects evaluated.
Selected primary task 'projects'
Tasks to be executed: [task ':projects']
:projects
Root project
Root project 'AutoLab'
No sub-projects
it is very strange behavior by gradle command line shows. but if I change buildExpr.gradle to build.gradle and settingsExpr.gradle to settings.gradle, it executes normally and shows all sub-modules in log
-b and -c can't be used together. When using a settings file, everything else (e.g. the locations of build files) is determined from the settings file.

How to pass build.gradle directory to gradlew?

./gradlew can be run in the same directory as the build.gradle file, but how can I run gradlew (standard Gradle wrapper) from another directory? For Make, one can pass "-C DIRECTORY" to "Change to DIRECTORY before doing anything.". Is there an equivalent parameter in Gradle?
Just found it from Appendix D. Gradle Command Line.
The answer is -p <your project directory>, which defaults to the current directory.