build-process

Reasons for using Ant Properties files over “Properties Tasks”

拥有回忆 提交于 2019-12-03 19:07:19
I'm currently working with some developers who like to set up Ant tasks that define environment specific variables rather than using properties files. It seems they prefer to do this because it's easier to type: ant <environment task> dist Than it is to type: ant -propertyfile <environment property file> dist So for example: <project name="whatever" default="dist"> <target name="local"> <property name="webXml" value="WebContent/WEB-INF/web-local.xml"/> </target> <target name="remote"> <property name="webXml" value="WebContent/WEB-INF/web-remote.xml"/> </target> <target name="build"> <!-- build

comparing products of builds in release

ⅰ亾dé卋堺 提交于 2019-12-03 18:05:34
问题 I need to compare build outputs of VS2005 in order to be sure I can reproduce the exact same product. when I do two builds one after the other in release and compare the produced files I get different files, doing text comparison it seems that more than just the datetime is different how can I build in order to reproduce exact same product each time ? 回答1: Whenever you build, the compiler embeds: The date and time A GUID (used for debugging etc, I believe) Potentially the assembly version

VS2008 - Outputting a different file name for Debug/Release configurations

老子叫甜甜 提交于 2019-12-03 18:00:10
问题 When building a C# application with Visual Studio 2008, is it possible to set a different output filename per configuration? e.g. MyApp_Debug.exe MyApp_Release.exe I tried a post-build step to rename the file by appending the current configuration, but that seems a scrappy approach. Plus it meant that Visual Studio could no longer find the file when pressing F5 to start debugging. 回答1: You can achieve this by editing your project file by hand. Locate the <AssemblyName> node and add a

How can I best share Ant targets between projects?

╄→гoц情女王★ 提交于 2019-12-03 17:42:36
问题 Is there a well-established way to share Ant targets between projects? I have a solution currently, but it's a bit inelegant. Here's what I'm doing so far. I've got a file called ivy-tasks.xml hosted on a server on our network. This file contains, among other targets, boilerplate tasks for managing project dependencies with Ivy. For example: <project name="ant-ivy-tasks" default="init-ivy" xmlns:ivy="antlib:org.apache.ivy.ant"> ... <target name="ivy-download" unless="skip.ivy.download">

Best practice for code modification during ant build

独自空忆成欢 提交于 2019-12-03 16:08:05
Admitted, this doesn't sound like a best practice altogether, but let me explain. During the build, we need to paste the build number and the system version into a class whose sole purpose is to contain these values and make them accessible. Our first idea was to use system properties, but due to the volatility of the deployment environment (an other way of saying "the sysadmins are doing weird unholy creepy things") we would like to have them hard-coded. Essentially I see 4 possibilities to achieve it in ant : use <replace> on a token in the class The problem with this approach is that the

Use CMake to run a C++ program post-build

筅森魡賤 提交于 2019-12-03 15:47:19
I have an application that is written in C++ that I use CMake to build and release binaries. I'd like to have the CMakeLists.txt script compile and run a CPP file that is used to timestamp and encrypt a license file after it has built the binaries for the application. I've seen examples of running the execute_process command such as this: execute_process(COMMAND "gcc -o foo foo.cpp" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) execute_process(COMMAND "./foo" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} RESULT_VARIABLE MY_FOO_VAR) I am using Visual Studio 2010 to do the build on Windows. The

Nant failing with bad permissions on build server

我是研究僧i 提交于 2019-12-03 15:30:08
问题 Total newbie question. I am trying to run a Nant script on a build server (very basic script, not doing anything), and it's failing with the error System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. What should I do to get it running? 回答1: @TK has the answer here, I believe, though it may not be as simple as whether or not nant is running from a

Is there a way to run an outside executable after a solution is built in Visual Studio 2008?

血红的双手。 提交于 2019-12-03 15:20:46
问题 I'm not talking about a post build event for a project. Rather, I want to run an executable automatically after the entire solution is built. Is there a way to do a post build event for the solution? 回答1: Visual Studio 2010 and before You can do this in the Macro Editor by handling OnBuildDone. The event gives you a couple of handy properties you can check: scope (project/solution/batch) and action (build/rebuild/clean/deploy). To do what you want would be something like this (not tested,

How to deliver properties files in addition to artifacts?

折月煮酒 提交于 2019-12-03 13:45:44
I am using Maven2 to build a WAR project. Some properties files are dependent on the environment targeted for a release. I want to deliver, in addition of the WAR, a file called datasource.xml . This file already exists in my project directory, but contains properties that will be filtered during the build (i.e. some ${foo.bar} ). In others words, after running the command mvn clean install , I want to see in my target/ directory two files, my-webapp.war and datasource.xml . Note that datasource.xml must not be included in the my-webapp.war artifact! How can I do this? You can attach

Is the maven-native-plugin widely used to build C++ projects using maven?

荒凉一梦 提交于 2019-12-03 13:04:15
It's been a little while since I did C++ development professionally and I'd like to get caught up on what the current state of C++ development is in a number of areas. Most of my recent work has been Java, making heavy use of Maven. When I last did C++ development for work, some variant of make was widely accepted as the way to go for building C++ projects (we were also using make to do builds the Java code in our mixed Java and C++ projects, although I believe ant was starting to become mainstream). I like using Maven for builds. My question is not to debate the relative merits of using Maven