Return-Path: X-Original-To: apmail-maven-users-archive@www.apache.org Delivered-To: apmail-maven-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8433F9207 for ; Fri, 2 Mar 2012 14:01:59 +0000 (UTC) Received: (qmail 3939 invoked by uid 500); 2 Mar 2012 14:01:57 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 3852 invoked by uid 500); 2 Mar 2012 14:01:57 -0000 Mailing-List: contact users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Users List" Reply-To: "Maven Users List" Delivered-To: mailing list users@maven.apache.org Received: (qmail 3843 invoked by uid 99); 2 Mar 2012 14:01:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Mar 2012 14:01:57 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [207.183.49.139] (HELO production.artifact-software.com) (207.183.49.139) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Mar 2012 14:01:49 +0000 Received: from [192.168.3.170] (g25-153.citenet.net [205.151.201.153]) by production.artifact-software.com (Postfix) with ESMTP id 611746A7A59 for ; Fri, 2 Mar 2012 09:01:28 -0500 (EST) Message-ID: <4F50C7DC.8080702@artifact-software.com> Date: Fri, 02 Mar 2012 08:15:08 -0500 From: Ron Wheeler Reply-To: rwheeler@artifact-software.com Organization: Artifact Software User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: Maven Users List Subject: Re: using build profiles for WAR plugin [maven-eclipse-plugin] References: <1330551151690-5526140.post@n5.nabble.com> <1330556657341-5526330.post@n5.nabble.com> <4F4EF6C6.1040803@artifact-software.com> <1330626648021-5528742.post@n5.nabble.com> <1330629394151-5528917.post@n5.nabble.com> <4F4FCE9C.6090704@artifact-software.com> <1330630997645-5528994.post@n5.nabble.com> <4F4FE258.1000804@artifact-software.com> <4F506970.8000902@pp6.inet.fi> In-Reply-To: <4F506970.8000902@pp6.inet.fi> Content-Type: multipart/mixed; boundary="------------040905080107080102080203" X-Virus-Checked: Checked by ClamAV on apache.org --------------040905080107080102080203 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 02/03/2012 1:32 AM, Markku Saarela wrote: > Hi, > > Developing with Eclipse IDE and JavaEE server using > maven-eclipse-plugin you have to use profiles, because Eclipse does > not isolate test code and test resources. Eclipse does /src/main/.... code /src/test ... test code and resources You need to set your maven properly but it works fine unless I don't understand your issue. > > Only way to do it what i have figured out is to have two profiles one > for running application in app server and another for unit testing > same code. Those profiles has only resources and testResources > definitions. > > Separating test code for separate code is not an option, because then > Sonar reports 0 % coverage. > > rgds, > > Markku > > On 1.3.2012 22:55, Ron Wheeler wrote: >> On 01/03/2012 2:43 PM, offbyone wrote: >>> Ok so I should create a base pom with a war configuration and then a >>> separate >>> pom for each site that depends on this with overlays to add the extra >>> configuration file. >>> I will try. >>> >>> If I am interpreting your comments correctly, profiles allow for a >>> user to >>> flaten a maven build deployment, but this is a bad practice and it >>> is better >>> to make your maven structure deep. >>> >>> So are profiles going to be deprecated? I would think I am not >>> alone in >>> getting turned down the wrong path because most of the >>> documentation/howtos >>> I have found point to using profiles. >> There are some uses for profiles that seem harmless so it is a >> documentation issue. >> >> It is fairly common in Apache documentation for the programmers to >> make a big deal about all the wonderful things that the package can do. >> They are not particularly concerned about "Best Practices". >> >> The most common usage is often left out of the documentation since it >> is "dull" or not very impressive. >> This sometimes means that obscure usage of features or seldom used >> features are heavily documented while the main use case is not >> described. >> >> New Maven users often fall into the trap that you were headed into. >> >> A really simple "Best Practice" that most people use, is hard to find >> in the documentation while an obscure "Worst Practice" is described >> because it shows how clever the software developers are and how >> powerful the product is. >> >> There should be a "Best Practice" section on the Maven site >> describing the best way to implement the common software development >> patterns. >> >> There are not really a lot of cases to consider but every new Maven >> user has to sort out their own case. >> >> Ron >> >> >>> -- >>> View this message in context: >>> http://maven.40175.n5.nabble.com/using-build-profiles-for-WAR-plugin-tp5525954p5528994.html >>> Sent from the Maven - Users mailing list archive at Nabble.com. >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org >>> For additional commands, e-mail: users-help@maven.apache.org >>> >>> >> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org >> For additional commands, e-mail: users-help@maven.apache.org > > -- Ron Wheeler President Artifact Software Inc email: rwheeler@artifact-software.com skype: ronaldmwheeler phone: 866-970-2435, ext 102 --------------040905080107080102080203 Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org For additional commands, e-mail: users-help@maven.apache.org --------------040905080107080102080203--