build-process

Copy all files and folders using msbuild

↘锁芯ラ 提交于 2019-11-26 12:05:13
问题 Just wondering if someone could help me with some msbuild scripts that I am trying to write. What I would like to do is copy all the files and sub folders from a folder to another folder using msbuild. {ProjectName} |----->Source |----->Tools |----->Viewer |-----{about 5 sub dirs} What I need to be able to do is copy all the files and sub folders from the tools folder into the debug folder for the application. This is the code that I have so far. <ItemGroup> <Viewer Include=\"..\\$

How to get Visual Studio &#39;Publish&#39; functionality to include files from post build event?

前提是你 提交于 2019-11-26 11:52:10
问题 I am currently attempting to use Visual Studio 2010 \'Publish\' and MSDeploy functionality to handle my web deployment needs but have run into a roadblock with regards to customizing the package depending on my build configuration. I develop in a 32bit environment but need to create a release package for a 64bit environment, so in the \'Release\' configuration I have a post build event that copies the 64bit version of a third-party dll into the bin directory overwriting the 32bit version.

Maven: how to do parallel builds?

馋奶兔 提交于 2019-11-26 11:49:08
问题 When you build with maven on a multicore / multi-CPU machine it would often be possible to build different subprojects in parallel. Is there a way to do this with maven? Is there a plugin for this / whatever? 回答1: Maven 3 (as of beta 1) now supports parallel builds as an experimental feature. For example, mvn -T 4 clean install # Builds with 4 threads mvn -T 1C clean install # 1 thread per cpu core mvn -T 1.5C clean install # 1.5 thread per cpu core Full documentation can be found on the

Is it possible to create an “uber” jar containing the project classes and the project dependencies as jars with a custom manifest file?

吃可爱长大的小学妹 提交于 2019-11-26 11:44:40
I'm trying to create a executable jar(using maven) that contains the project classes and it's dependencies with a manifest file that has the entry for the main class and the class path entry that points to the dependencies packed in the root of the jar;something like this : Manifest File: ..... Main-Class : com.acme.MainClass Class-Path : dependecy1.jar dependecy2.jar ..... Jar: jar-root |-- .... |-- com/acme/../*.class |-- dependecy1.jar `-- dependecy2.jar I'm using the maven-jar-plugin to create the manifest file and the maven-shade-plugin to create the "uber" jar but the dependencies are

Why use Gradle instead of Ant or Maven? [closed]

前提是你 提交于 2019-11-26 11:42:53
问题 What does another build tool targeted at Java really get me? If you use Gradle over another tool, why? 回答1: I don't use Gradle in anger myself (just a toy project so far) [author means they have used Gradle on only a toy project so far, not that Gradle is a toy project - see comments] , but I'd say that the reasons one would consider using it would be because of the frustrations of Ant and Maven. In my experience Ant is often write-only (yes I know it is possible to write beautifully modular,

Building executable jar with maven?

笑着哭i 提交于 2019-11-26 11:29:16
I am trying to generate an executable jar for a small home project called "logmanager" using maven, just like this: How can I create an executable JAR with dependencies using Maven? I added the snippet shown there to the pom.xml, and ran mvn assembly:assembly. It generates two jar files in logmanager/target: logmanager-0.1.0.jar, and logmanager-0.1.0-jar-with-dependencies.jar. I get an error when I double-click on the first jar: Could not find the main class: com.gorkwobble.logmanager.LogManager. Program will exit. A slightly different error when I double-click the jar-with-dependencies.jar:

Maven parent pom vs modules pom

帅比萌擦擦* 提交于 2019-11-26 11:25:58
There seem to be several ways to structure parent poms in a multiproject build and I wondering if anyone had any thoughts on what the advantages / drawbacks are in each way. The simplest method of having a parent pom would be putting it in the root of a project i.e. myproject/ myproject-core/ myproject-api/ myproject-app/ pom.xml where the pom.xml is both the parent project as well as describes the -core -api and -app modules The next method is to separate out the parent into its own subdirectory as in myproject/ mypoject-parent/ pom.xml myproject-core/ myproject-api/ myproject-app/ Where the

Visual Studio 2010: How to enforce build order of projects in a solution?

给你一囗甜甜゛ 提交于 2019-11-26 10:56:51
问题 I had no problem with this in Visual Studio 2008 but it seems that VS 2010 is having an issue, and I\'m betting it\'s probably me. I have a solution with an ASP.NET Web Site Project and a few C# projects (BLL, DAL, Tests in NUnit). I have configured the build process for the test project to automatically run NUnit to run the tests. I would like to ensure that the BLL and DAL projects build before the test project so that the tests will run against the latest compiled version (yes, I know I

Make ant quiet without the -q flag?

只谈情不闲聊 提交于 2019-11-26 09:48:06
问题 I have an ant buildfile that is often run from vastly different environments. By default, I\'m looking for the same behavior as using: ant -q However, since some team member\'s configurations vary, specifying the -q option in each person\'s environment is not easily accomplished in a uniform way (some people run ant from eclipse, some from the command line, some from debugging/profiling tools, etc. Each with a different method for specifying ant arguments like -q ) So I\'m seeking a way for

Maven: How to include jars, which are not available in reps into a J2EE project?

一个人想着一个人 提交于 2019-11-26 09:14:57
问题 in my J2EE project I\'ve a couple of dependencies, which are not available in any Maven repository, because they\'re proprietary libraries. These libraries need to be available at runtime, so that have to be copied to target/.../WEB-INF/lib ... Right now, I\'m listing them as system dependency in my POM, but with this method the problem is, that aren\'t being copied to the target build during compilation. Also this method is not very elegant. So which is the best way to integrate them in