Avoid duplication in POM for different profiles

2009-12-21 Thread Tomas Pollak
Hi all,

I have a inquiry regarding a best practice to avoid duplication.

I have defined two profiles for my project. Let's call them integration-test 
and deployment-test.
For both of them I have to copy a file to a certain location for the tests to 
run. This is done using the resources plugin.
They also both define the surefire settings each to run its test suite.

However the XML snippet for copying the file with the resources plugin is 
exactly the same. Is there a way to factor this common configuration? What's 
the current best practice?

Cheers,
Tomas



  

Re: JAR subtraction from webapp WEB-INF/lib / forcing 'provided' on a list of artifacts

2009-11-04 Thread Tomas Pollak
We do something like this in a profile:

!-- Generate JBoss artifact --
!--
We generate another war with 'jboss' classifier,
excluding some jars from WEB-INF/lib
--
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-war-plugin/artifactId
executions
execution
idjboss-war/id
phasepackage/phase
goals
goalwar/goal
/goals
configuration
classifierjboss/classifier

packagingExcludesWEB-INF/lib/xml-apis-*.jar,WEB-INF/lib/jsf-api-*.jar,WEB-INF/lib/jsf-impl-*.jar/packagingExcludes
/configuration
/execution
/executions
/plugin

It's not pretty, but it works.
HTH,
Tomás





From: Benson Margulies bimargul...@gmail.com
To: Maven Users List users@maven.apache.org
Sent: Wed, November 4, 2009 3:25:39 PM
Subject: Re: JAR subtraction from webapp WEB-INF/lib / forcing 'provided' on a  
list of artifacts

Ah, I can't use your suggestion. CXF itself has all these dependencies
that have to be trimmed for some containers. I'll just have to make
all the exclusions.

On Wed, Nov 4, 2009 at 8:49 AM, Jesse Farinacci jie...@gmail.com wrote:
 Hi Benson,

 On Wed, Nov 4, 2009 at 8:39 AM, Benson Margulies bimargul...@gmail.com 
 wrote:
 I see, if you mean a set of profiles, each with a dependencyManagement
 that makes some things 'provided', then I'm following, and that is
 what I need.


 No, that isn't what I mean. I would have a profile for each container
 I was interested in supporting. That profile would add a dependency
 (not dependencyManagement) on the corresponding module
 ${container}-dependencies. This module would specifically depend on
 whatever it needed. I suspect this could be handled within the profile
 itself, but I am a module-happy kind of guy.. :-)

 As far as exclusions go, there is no way to ban a dependency at the
 top level. You must list exclusions manually, for each dependency. I
 believe that Maven 3 may be attempting to remedy this.

 -Jesse

 --
 There are 10 types of people in this world, those
 that can read binary and those that can not.

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org


  

[MECLIPSE-552] Discover projects in the workspace

2009-10-27 Thread Tomas Pollak
Hi Maven developers,

I have attached two patches to the bug MECLIPSE-552. This is a request for the 
maven eclipse plugin not to discover projects in the workspace and create 
project references automatically.

The first patch contains only unit tests showing the current behavior, since 
that part of the code didn't have any unit tests.
In the second patch I added a configuration parameter to the mojo, that is one 
way to implement this, also with its test.

The first patch can be applied regardless if you accept the second. Please tell 
me if there's anything more to do to get the patches applied.

Thanks,
Tomas