build-process

Different dependencies for different build profiles

久未见 提交于 2019-11-26 01:07:22
问题 Is it possible to have a different set of dependencies in a maven pom.xml file for different profiles? e.g. mvn -P debug mvn -P release I\'d like to pick up a different dependency jar file in one profile that has the same class names and different implementations of the same interfaces. 回答1: To quote the Maven documentation on this: A profile element contains both an optional activation (a profile trigger) and the set of changes to be made to the POM if that profile has been activated. For

How do I print a list of “Build Settings” in Xcode project?

若如初见. 提交于 2019-11-26 00:45:16
问题 Alternate Titles List of Xcode build variables Print a list of Xcode Build Settings Clang Environment Variables Canonical list of Xcode Environment Variables Is there a Canonical list of Xcode Environment Variables that can be used in Build Rules etc? 回答1: UPDATE: This list is getting a little out dated (it was generated with Xcode 4.1). You should run the command suggested by dunedin15. dunedin15's answer can give inaccurate results for some edge-cases, such as when debugging build settings

How to build jars from IntelliJ properly?

不问归期 提交于 2019-11-25 22:07:49
问题 I have a project that contains a single module, and some dependencies. I\'d like to create a jar, in a separate directory, that contains the compiled module. In addition, I\'d like to have the dependencies present beside my module. No matter how I twist IntelliJ\'s \"build jar\" process, the output of my module appears empty (besides a META-INF file). 回答1: Here's how to build a jar with IntelliJ 10 http://blogs.jetbrains.com/idea/2010/08/quickly-create-jar-artifact/ File -> Project Structure

Maven: add a dependency to a jar by relative path

穿精又带淫゛_ 提交于 2019-11-25 21:55:21
问题 I have a proprietary jar that I want to add to my pom as a dependency. But I don\'t want to add it to a repository. The reason is that I want my usual maven commands such as mvn compile , etc, to work out of the box. (Without demanding from the developers a to add it to some repository by themselves). I want the jar to be in a 3rdparty lib in source control, and link to it by relative path from the pom.xml file. Can this be done? How? 回答1: I want the jar to be in a 3rdparty lib in source

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

How do I get the Git commit count?

时间秒杀一切 提交于 2019-11-25 20:02:39
I'd like to get the number of commits of my Git repository, a bit like SVN revision numbers. The goal is to use it as a unique, incrementing build number. I currently do like that, on Unix/Cygwin/msysGit: git log --pretty=format:'' | wc -l But I feel it's a bit of a hack. Is there a better way to do that? It would be cool if I actually didn't need wc or even Git, so it could work on a bare Windows. Just read a file or a directory structure... Benjamin Atkin To get a commit count for a revision ( HEAD , master , a commit hash): git rev-list --count <revision> To get the commit count across all