build-process

How can I make Windows software run as a different user within a script?

北战南征 提交于 2019-12-05 15:52:05
I'm using a build script that calls Wise to create some install files. The problem is that the Wise license only allows it to be run under one particular user account, which is not the same account that my build script will run under. I know Windows has the runas command but this won't work for an automated script as there is no way to enter the password via the command line. This might help: Why doesn't the RunAs program accept a password on the command line? I recommend taking a look at CPAU . Command line tool for starting process in alternate security context. Basically this is a runas

How do you specify a string of goals as the defaultGoal in maven 2?

此生再无相见时 提交于 2019-12-05 15:12:26
I'm just curious, is there a way to specify that you want a string of goals run as the default goal in a maven project? Is there an equivalent to Ant's <project name="MyProject" basedir="." default="main"><target name="main" depends="clean,run"/> ? There is something roughly equivalent, you CAN define a default goal or phase that will be executed if none is given in the build element: <build> <defaultGoal>install</defaultGoal> ... </build> But this has to be a single phase, or goal, you can't pass multiple phases/goals (not really a problem since a phase triggers all preceding phases). Here is

maven - fail build when unit test takes too long

雨燕双飞 提交于 2019-12-05 14:16:46
问题 I have in my project a lot of unit tests, written in JUnit and TestNG. The building process is based on maven with surefire plugin. Is there any way/plugin for maven to fail the build when at least one unit test takes too many seconds? I know that there are some plugins to fail build in TeamCity, Jenkins but this is "too far". In my project I want to have only fast tests to have unit testing process effective. I can improve my old tests but I need to protect for the future commitments 回答1: If

put build date in about box

瘦欲@ 提交于 2019-12-05 13:54:05
I have a C# WinForms app with an About box. I am putting the version number in the about box using: FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location) .FileVersion This ends up giving me the Subversion revision number from which the executable was built. I would also like to get the date of the build into the About box. I tried: File.GetLastWriteTime(Assembly.GetEntryAssembly().Location) But that gives me the write date of the executable, which only corresponds to the date when the app was installed (we are using ClickOnce) not built . How can I get the build date ? If

Jenkins configuration of git plugin

若如初见. 提交于 2019-12-05 13:49:15
问题 I get this error when configuring git repo in a new jenkins project: Failed to connect to repository : Error performing command: ls-remote -h file:///c:\Dev\git\rx HEAD I have a local git repo on my windows machine and cloning the same path from command prompt works on the same machine. I don't know what could be the problem (git.exe is on system path) 回答1: Windows installs Jenkins as a service. But it runs the Jenkins service under different user permissions that don't have access to GIT.

How to force code style formatting as part of the build?

醉酒当歌 提交于 2019-12-05 12:44:00
Is there a way (using ANT), it is possible to automatically reformat code to follow certain conventions? I have several developers working on a program and would like to guarantee that code formatting becomes consistent across all classes at build time, prior to commit The best way to do it pre-commit is to use a pre-commit hook on your source control server. This way you can enforce that no code makes it into the branch without conforming to code standards. http://checkstyle.sourceforge.net/ can be used as an ANT task or pre-commit hook. So you can run this on the source control server or as

Do not run Spring @Scheduled task on certain machine

独自空忆成欢 提交于 2019-12-05 12:13:12
Our web app has few scheduled tasks and we like this feature of Spring so much, many have started relying on it. We have a 'pilot' machine which shares the same configuration/db as prod machines. Since this machine points to the same db as prod machines, when it runs a scheduled task - it may affect prod data. Is there a way to not run Spring Scheduled task on this machine? We thought of relying on the machine name, but dont want to introduce a check each time a task starts. Any suggestions? With Spring 3.1 Profiles it will be really easy, but here is a way you can do it in Spring 3.0. In your

CSS Sprite generation in gradle build process?

谁说我不能喝 提交于 2019-12-05 11:45:29
I recently read an article about Javascript, where Build Tools like Grunt and Ender were mentioned. It was briefly stated, that such tools are capable of generating sprite images from individually provided files and that these build tools can be integrated into the build process. Unfortunately my google searches didn't unveil more information on this. Does anybody here have experience on this topic and integration into gradle? Some web resources for further reading are highly welcome! Many thanks in advance! Sascha. @Windwalker you might be interested in using the SmartSprites Maven Repositry

Eclipse-CDT: Whats the best way to add a custom build step?

爷,独闯天下 提交于 2019-12-05 09:14:20
I have a file in my project which I need to compile using an external tool, and the output of that is a pair of .c and .h files. Whats the best way to integrate this into my Eclipse-CDT build? Ideally I can reference the external tool using a relative path Ideally Eclipse will know if I change this file that it needs to re-run the external tool I've tried out adding something to the 'Builders' section under Project Properties with mixed results. thx Alex Alex Black I got this working well by adding a 'Builder' of type 'Program'. Right click on the project, Click Properties, Click New ..., Add

How to use Ant?

最后都变了- 提交于 2019-12-05 08:59:48
I've been trying to understand what Ant is used for but i still don't get it. Can someone give me one use case for which Ant is used for, something I can try to see why Ant is useful and what kind of things I can use it for? I do Java development in Eclipse and I'm just getting started with servlets and Google Web Toolkit. Ant is a build tool. Say for example you have several projects in your Eclipse workspace, all of which are pieces of a larger application. To build it all into a jar file with dependencies included, you could select all the projects and export them as a jar file, but that's