build-process

Do not run Spring @Scheduled task on certain machine

ぐ巨炮叔叔 提交于 2019-12-07 10:06:05
问题 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?

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

眉间皱痕 提交于 2019-12-07 08:53:51
问题 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"/> ? 回答1: 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

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

怎甘沉沦 提交于 2019-12-07 08:36:59
问题 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 回答1: 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

run a java application and a web application in a single maven build within a reactor project

谁说胖子不能爱 提交于 2019-12-07 08:29:30
I have a reactor project with the following structure server - pom.xml (parent) -- appserver (has a server socket) -- webserver (connects to the socket in appserver and gets data) The appserver pom.xml has a maven-exec-plugin that runs the main method in my java class AppServer . When I run goal verify in my topmost (server) project my build gets stuck at appserver - exec goal and never proceeds to building / running my webserver. Ideally I would like to run my appserver first and then my webserver in a single install or verify run on my top most project. Here is the exec maven plugin

CSS Sprite generation in gradle build process?

試著忘記壹切 提交于 2019-12-07 06:11:03
问题 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

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

别说谁变了你拦得住时间么 提交于 2019-12-07 06:07:21
问题 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 回答1: I got this working well by adding

Automate test of web service communication

与世无争的帅哥 提交于 2019-12-07 04:38:03
问题 I have an application that sends messages to an external web service. I build and deploy this application using MSBuild and Cruisecontrol.NET. As CCNET build and deploys the app it also runs a set of test using NUnit. I'd now like to test the web service communication as well. My idea is that as part of the build process a web service should be generated (based on the external web services WSDL) and deployed to the build servers local web server. All the web service should do is to receive

How to avoid copying 40M of java lib's within a WAR when the WAR's size is 41M?

馋奶兔 提交于 2019-12-07 03:19:53
问题 At the moment my build process consists of repackaging the war file with all required java libraries under WEB-INF/lib and then copying the war file to development/demo/production server to be redeployed by tomcat. The packaged war file's size is about 41M and it has at the moment something like 40M of external java libraries. There has to be a better way. How have you solved this issue? My development machine is a windows box with Eclipse as my IDE and Ant as my build tool. The servers are

Determine list of source files (*.[ch]) for a complex build with scons

青春壹個敷衍的年華 提交于 2019-12-07 02:00:59
问题 Suppose you have a complex source tree for a C project, lots of directories with lots of files. The scons build supports multiple targets (i386, sparc, powerpc) and multiple variants (debug, release). There's an sconstruct at the root (referencing various sconscripts ) that does the right thing for all of these, when called with arguments specifying target and variant, e.g. scons target=i386 variant=release . Is there an easy way to determine which source files (*.c and *.h) each of these

Gradle Multiproject Build: How to include JAR of a WAR project into another WAR without creating pseudo projects

喜欢而已 提交于 2019-12-06 21:30:25
I have two web apps A and B . B uses parts of code from A . If I declare A as a dependency for B the A.war is included WEB-INF/lib of B.war This kind of include is meaningless to the container. The only solution I see is to change A to a Java project (JAR) and create a dummy web project (WAR) called A_WEB . Then declare A as dependency for A_WEB and B However this will require me to meddle with the project structure. A big reason for choosing gradle was that it promised not to make the project adapat to the tool like maven does. So I hope there is a non messy way out of this. How have you