build-automation

How can I merge resource files in a Maven assembly?

℡╲_俬逩灬. 提交于 2019-11-28 00:48:38
I'm using Maven and its assembly plugin to build a distribution package of my project like this: one project assembles a basic runtime (based on Felix), with the appropriate directories and bundles, in a ZIP file. third-party libraries are collected in one project each and either converted to OSGi bundles or, if they are already OSGi compatible, they are just copied my own project consists of several modules that are built into OSGi bundles, too. Now, I'm adding another project that unpacks the ZIP, drops all the other JARs into the proper directories, and repackages it for distribution. Now,

Conditional Task on exec failure in Ant

半腔热情 提交于 2019-11-28 00:33:13
I have some unit tests running through Ant, and I'd like to be able to run some cleanup code if the unit tests fail. I was looking for some sort of "finally" block, but I had no luck finding one. I've tried using errorproperty and if statements on tasks, but ant only accepts "true", "on" and "yes" as true properties. A successfully executed task (on unix at least) returns 0, so I've had to construct a ridiculously elaborate apparatus: <project name="TestBuild" default="build" basedir="."> <target name="build" depends="truth,checkresult,cleanup" /> <target name="truth"> <echo message="Running

MSBuild doesn't pick up references of the referenced project

谁说胖子不能爱 提交于 2019-11-27 21:22:29
I bumped into a strange situation with MSBuild just now. There's a solution which has three projects: LibX, LibY and Exe. Exe references LibX. LibX in its turn references LibY, has some content files, and also references to a third-party library (several pre-built assemblies installed in both GAC and local lib folder). The third-party library is marked as "Copy Local" ("private") and appears in the output of the LibX project, as the LibY's output and LibX's content files do. Now, Exe project's output has LibX project output, content files of the LibX project, LibY project output (coming from

Have CMake recursively scan folders?

耗尽温柔 提交于 2019-11-27 20:16:05
问题 How do I set up CMake to recursively scan a given directory and determine the list of source files? My project is a shared library. I have a folder structure similar to this: / src/ # Source files in an arbitrary tree include/ # Headers, tree mirrors that of the src/ folder examples/ # Executable code examples that link against the library CMakeLists.txt I want CMake to recursively scan src and include and determine the list of source and header files in my project, regardless of the

Best free resource for learning advanced batch-file usage?

我的梦境 提交于 2019-11-27 19:55:41
What are the best free resources for learning advanced batch-file usage? It's not free, but it's probably the best. "Windows NT Shell Scripting" by Tim Hill . That said, whenever I try to do something 'advanced' in cmd batch files, I always end up regretting it. Always. edit: some explanation of the shortcomings of batch files: math capabilities are pathetic quoting support is an afterthought - if you need to pass a quoted string as an argument to a command that needs to be quoted itself, reserve a spot at the asylum (actually, I'm not sure it's possible) string manipulation is a patchwork of

Can we execute a .bat file in post build event command line in visual studio?

冷暖自知 提交于 2019-11-27 19:34:49
Can we execute a .bat file in post build event command line in visual studio? Piotr Owsiak Sure, here's an example: call "$(SolutionDir)scripts\copyifnewer.bat" "$(SolutionDir)libs\RLPL.Services.CertificateValidator.Basic.dll" "$(TargetDir)RLPL.Services.CertificateValidator.Basic.dll" call "$(SolutionDir)scripts\copyifnewer.bat" "$(SolutionDir)libs\RLPL.Services.CertificateValidator.Common.dll" "$(TargetDir)RLPL.Services.CertificateValidator.Common.dll" Just be aware of two possible issues you might have: the enclosing double quotes (see how each part is surrounded by " sign) if you want to

How to filter the xcodebuild command line output?

自闭症网瘾萝莉.ら 提交于 2019-11-27 18:58:31
Running xcodebuild from the console will bring you very verbose output and I wasn't able to locate any options for limit its output in order to display only warnings and errors. I'm looking for a way to capture the xcodebuild output and filter it. It would prefer a Python solution that will work with pipes but I'm open to other approaches as long they are command line based solutions. Are any tools that are already able to do this? To only see the error output messages, redirect the standard output to /dev/null (a special file that works as a black hole) like this: xcodebuild > /dev/null If

Android - use ant to create build configurations that change configuration values

不打扰是莪最后的温柔 提交于 2019-11-27 18:52:05
What I want is a way to have settings that are dependent on build configuration. To give a specific example, my android application connects to a web service. In development, I want the service url to be pulled in from a configurable value. In Test, I want a different value pulled in. In production, yet another value. So, in code I have something like this: public class HttpRequestHelper { private static String GetServiceUrl(ServiceAction action) { return serviceUrl + action.toString(); } } By default (when debugging/running through eclipse), I want that url to be http://localhost:1234 In Test

Tutorial or Guide for Scripting XCode Build Phases

妖精的绣舞 提交于 2019-11-27 18:13:24
I would like to add some files to the Compile Sources build phase using a script in XCode, which pulls from some folder references. I haven't been able to find much documentation so far. Where is the general documentation (or a good tutorial) for scripting XCode build phases? How can I add files to the Compile Sources phase? How can I discover information about the project and the folder references within it? Are there any special considerations if I want to script in Ruby or Python vs. bash scripting? Prairiedogg To add files to the Compile Sources build phase using a script, you will need to

How do I force cmake to include “-pthread” option during compilation? [duplicate]

别等时光非礼了梦想. 提交于 2019-11-27 18:08:55
This question already has an answer here: How to get CMake to recognize pthread on Ubuntu? 1 answer I know there is something like find_package(Threads) but it doesn't seem to make a difference (at least by itself). For now I'm using SET(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} "-pthread") , but it doesn't look like a correct solution to me. find_package( Threads ) calls a CMake module that first, searches the file system for the appropriate threads package for this platform, and then sets the CMAKE_THREAD_LIBS_INIT variable (and some other variables as well). It does not tell CMake to link any