build-automation

Why does Maven have such a bad rep? [closed]

*爱你&永不变心* 提交于 2019-11-26 08:38:57
问题 There is a lot of talk on the internet about how Maven is bad. I have been using some features of Maven for a few years now and the most important benefit in my view is the dependency management. Maven documentation is less than adequate, but generally when I need to accomplish something I figure it out once and then it works (for example when I implemented signing the jars). I don\'t think that Maven is great, but it does solve some problems that without it would be a genuine pain. So, why

Dump include paths from g++

↘锁芯ラ 提交于 2019-11-26 06:58:51
问题 I\'m trying to write a little build script - and want to determine if the includes are system includes or not. So I want g++ to tell me the include path\'s it\'s using. cpp -v seems the obvious best shot, but it doesn\'t give me the C++ paths. So I tried: g++ -Xpreprocessor -v Which doesn\'t work quite right - g++ captures the -v for it\'s own verbose output. Thanks, Oliver 回答1: From Jonathan Wakely a better option (works on clang too): g++ -E -x c++ - -v < /dev/null clang++ -E -x c++ - -v <

CruiseControl [.Net] vs TeamCity for continuous integration?

為{幸葍}努か 提交于 2019-11-26 05:55:21
问题 I would like to ask you which automated build environment you consider better, based on practical experience. I\'m planning to do some .Net and some Java development, so I would like to have a tool that supports both these platforms. I\'ve been reading around and found out about CruiseControl.NET, used on stackoverflow development, and TeamCity with its support for build agents on different OS-platforms and based on different programming languages. So, if you have some practical experience on

What is Gradle in Android Studio?

半世苍凉 提交于 2019-11-26 05:49:15
问题 Gradle is a bit confusing to me, and also for any new android developer. Can anyone explain what Gradle in Android Studio is and what its purpose is? Why is it included in Android Studio? 回答1: Short Answer Gradle is a build system. Long Answer Before Android Studio you were using Eclipse for your development purposes, and, chances are, you didn't know how to build your Android APK without Eclipse. You can do this on the command line, but you have to learn what each tool (dx, aapt) does in the

Ant: How to execute a command for each file in directory?

假如想象 提交于 2019-11-26 03:51:40
问题 I want to execute a command from an Ant buildfile, for each file in a directory. I am looking for a platform-independent solution. How do I do this? Sure, I could write a script in some scripting language, but this would add further dependencies to the project. 回答1: Short Answer Use <foreach> with a nested <FileSet> Foreach requires ant-contrib. Updated Example for recent ant-contrib: <target name="foo"> <foreach target="bar" param="theFile"> <fileset dir="${server.src}" casesensitive="yes">

Building multiple executables with similar rules

空扰寡人 提交于 2019-11-26 03:44:28
问题 I am writing something like an interactive tutorial for C++. The tutorial will consist of two parts: one is compiled into a library (I\'m using Scons to build that), and the other (the lessons) is shipped with the tutorial to be compiled by the end user. I\'m currently looking for a good, easy way for people to build these lessons. Basically, the second part is a directory with all the lessons in it, each in its own directory. Each lesson will have at least a lesson.cpp and a main.cpp file,

Ant task to run an Ant target only if a file exists?

人盡茶涼 提交于 2019-11-26 03:07:50
问题 Is there an ANT Task that would execute a block only if a given file exists? I have the problem that I have a generic ant script that should do some special processing but only if a specific configuration file is present. 回答1: Available and Condition <target name="check-abc"> <available file="abc.txt" property="abc.present"/> </target> <target name="do-if-abc" depends="check-abc" if="abc.present"> ... </target> 回答2: This might make a little more sense from a coding perspective (available with

Controlling maven final name of jar artifact

徘徊边缘 提交于 2019-11-26 01:07:24
问题 I\'m trying to define a property in our super pom which will be used by all child projects as the destination of the generated artifact. For this I was thinking about using project/build/finalName yet this does not seem work, even for simple poms: Command mvn archetype:create \\ -DarchetypeGroupId=org.apache.maven.archetypes \\ -DgroupId=com.mycompany.app \\ -DartifactId=my-app POM <project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi

How can I create an executable JAR with dependencies using Maven?

空扰寡人 提交于 2019-11-25 21:33:34
问题 I want to package my project in a single executable JAR for distribution. How can I make a Maven project package all dependency JARs into my output JAR? 回答1: <build> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <archive> <manifest> <mainClass>fully.qualified.MainClass</mainClass> </manifest> </archive> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> </configuration> </plugin> </plugins> </build> and you run it with