Re: Combining modules' jars into one war ?

2010-03-13 Thread Wayne Fay
 I need the three modules combined into one war , how to accomplish it ?
 Thanks in advanced...

Make a fourth project with war packaging, and depend on the other 3
projects, then run mvn package from the top/parent directory and
eventually it will result in a war in the target folder of that 4th
project.

Wayne

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



Re: Setting custom varaibles

2010-03-13 Thread swaroopgr

Ah! No I can't. That's our default build env! I can't decide! :)

Any other ideas to get this working?



Maven User-2 wrote:
 
 Pull the trigger - modularize and move completely to maven 2.
 
 On Mar 12, 2010, at 8:05 PM, swaroopgr swaro...@netapp.com wrote:
 

 Here's why:

 I'm setting up sonar - a tool for code quality analysis. The way  
 sonar is
 run is:

 mvn sonar:sonar

 I'm using ANT to build my project. However, sonar requires a dummy  
 pom.xml
 file to trick it into saying it's a maven project. Then, Sonar will  
 go and
 descend into all the directories and complete static code analysis.

 In my case, I need only specific directories to be analysed by  
 Sonar. Hence,
 I simply list these directories and feed it into the pom.xml file's
 sourceDirectory property. This will allow sonar to analyse only  
 those
 modules.

 Hence, I somehow need to figure out how I can feed these files one  
 by one
 into pom.xml and call mvn each time.





 Baptiste MATHUS wrote:

 Hi,

 First question: why do you need to do this?

 Maven defines strong conventions principles over config. So doing  
 what you
 say seems quite uncommon. So you've got three solutions:
 * if the project can be cleanly refactored to be built, with clear  
 deps
 and
 so on = the way to go
 * if those source directories comes from a special process (say
 generation),
 then maybe the way to go is more writing a maven plugin that will  
 do what
 you need cleanly (writing a maven plugin is very simple). To help  
 answer
 this question, I guess you'll have to explain your need a bit more.
 * combine ant-run plugin/buildhelper should help do the trick, but  
 this
 would be like using ant to compile when developing under eclipse

 Cheers

 2010/3/12 swaroopgr swaro...@netapp.com


 I'm need to use custom variables in maven. Here's what I do:

 Run the ls command in the current directory. For each directory  
 listed,
 I
 want to add the name in pom.xml's sourceDirectory $DirectoryName
 /sourceDirectoryproperty and run mvn. If there's a way to set  
 name /
 value
 pairs during mvn invocation, that would be best. If not, what's  
 the best
 way
 to do this?
 --
 View this message in context:
 http://old.nabble.com/Setting-custom-varaibles-tp27881131p27881131.html
 Sent from the Maven - Users mailing list archive at Nabble.com.


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




 -- 
 Baptiste Batmat MATHUS - http://batmat.net
 Sauvez un arbre,
 Mangez un castor !



 -- 
 View this message in context:
 http://old.nabble.com/Setting-custom-varaibles-tp27881131p27884743.html
 Sent from the Maven - Users mailing list archive at Nabble.com.


 -
 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
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Setting-custom-varaibles-tp27881131p27887572.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: Setting custom varaibles

2010-03-13 Thread Freddy Mallet
Here is a simple way to do that :

1 - You can set any property directly into the Maven command line :
mvn sonar:sonar -DsrcDirectory=/vol/myProject/src -DbinDirectory=...

2- You can retrieve those values into your pom.xml file :
sourceDirectory${srcDirectory}/sourceDirectory
outputDirectory${binDirectory}/outputDirectory

regards,


Freddy Mallet
www.SonarSource.com
Sonar.codehaus.org
http://twitter.com/FreddyMallet



On Sat, Mar 13, 2010 at 3:14 PM, swaroopgr swaro...@netapp.com wrote:


 Ah! No I can't. That's our default build env! I can't decide! :)

 Any other ideas to get this working?



 Maven User-2 wrote:
 
  Pull the trigger - modularize and move completely to maven 2.
 
  On Mar 12, 2010, at 8:05 PM, swaroopgr swaro...@netapp.com wrote:
 
 
  Here's why:
 
  I'm setting up sonar - a tool for code quality analysis. The way
  sonar is
  run is:
 
  mvn sonar:sonar
 
  I'm using ANT to build my project. However, sonar requires a dummy
  pom.xml
  file to trick it into saying it's a maven project. Then, Sonar will
  go and
  descend into all the directories and complete static code analysis.
 
  In my case, I need only specific directories to be analysed by
  Sonar. Hence,
  I simply list these directories and feed it into the pom.xml file's
  sourceDirectory property. This will allow sonar to analyse only
  those
  modules.
 
  Hence, I somehow need to figure out how I can feed these files one
  by one
  into pom.xml and call mvn each time.
 
 
 
 
 
  Baptiste MATHUS wrote:
 
  Hi,
 
  First question: why do you need to do this?
 
  Maven defines strong conventions principles over config. So doing
  what you
  say seems quite uncommon. So you've got three solutions:
  * if the project can be cleanly refactored to be built, with clear
  deps
  and
  so on = the way to go
  * if those source directories comes from a special process (say
  generation),
  then maybe the way to go is more writing a maven plugin that will
  do what
  you need cleanly (writing a maven plugin is very simple). To help
  answer
  this question, I guess you'll have to explain your need a bit more.
  * combine ant-run plugin/buildhelper should help do the trick, but
  this
  would be like using ant to compile when developing under eclipse
 
  Cheers
 
  2010/3/12 swaroopgr swaro...@netapp.com
 
 
  I'm need to use custom variables in maven. Here's what I do:
 
  Run the ls command in the current directory. For each directory
  listed,
  I
  want to add the name in pom.xml's sourceDirectory $DirectoryName
  /sourceDirectoryproperty and run mvn. If there's a way to set
  name /
  value
  pairs during mvn invocation, that would be best. If not, what's
  the best
  way
  to do this?
  --
  View this message in context:
 
 http://old.nabble.com/Setting-custom-varaibles-tp27881131p27881131.html
  Sent from the Maven - Users mailing list archive at Nabble.com.
 
 
  ---
  --
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 
 
 
 
  --
  Baptiste Batmat MATHUS - http://batmat.net
  Sauvez un arbre,
  Mangez un castor !
 
 
 
  --
  View this message in context:
  http://old.nabble.com/Setting-custom-varaibles-tp27881131p27884743.html
  Sent from the Maven - Users mailing list archive at Nabble.com.
 
 
  -
  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
 
 
 

 --
 View this message in context:
 http://old.nabble.com/Setting-custom-varaibles-tp27881131p27887572.html
 Sent from the Maven - Users mailing list archive at Nabble.com.


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




Re: Maven spitting out crap when it can't find locally added dependancies. How to stop it from checking?

2010-03-13 Thread Ron Wheeler

Stephen Connolly wrote:

On 10 March 2010 21:48, Ron Wheeler rwhee...@artifact-software.com wrote:

  

Post things to JIRA (especially with patches) to get things changed. I



assure you, patches with good/useful changes in content will be
well-received and the site/documentation will be updated in due
course.



  

I am not going to get into patching. I leave that to the author. I will
suggest rewording or request that clarifying text be added but I will not
create patches.




Then I think you are misunderstanding what we mean by patches...

If it is documentation,

* obviously a .patch file for the .apt file would be great (it'll get
reviewed and applied very fast)

* failing that something like:

--- On this page: http://maven.apache.org/../blah.html current content
is ---

Blah blah blah blah

--- Suggested replacement content is ---

Waffle Waffle Blah Blah

--- On this paget: etc

  would be IMHO perfectly fine as a patch and it would be reviewed and
applied quite fast
  

That is much better.
That only leaves my reluctance to open a JIRA without some discussion  
first as to whether my improvements actually are correct and clearer 
than the original author's text.
In other projects, I usually have a chance to present my suggestions to 
the author and get his feedback or to ask him/her for additional 
clarification or examples before determining that my suggestions are 
actually the right way to go.
I have a sense - perhaps misguided - that opening a JIRA issue is a 
definite statement that something is wrong and needs fixing.


Ron

-Stephen

  




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



Re: Site not working properly

2010-03-13 Thread Dennis Lundberg
On 2010-03-12 16:33, tmcgi...@aessuccess.org wrote:
 I have been using Maven and the Site plugin for over a year now and it has 
 been working fine.  Today I went to use it and my index.html file is 
 displaying information that is in the description tag of the pom and not 
 the index.apt file I have been using.

This suggest to me that the site generation has not finished. If you
don't supply an index file (apt or xdoc) the Site Plugin will use
information from the POM to create an index.html file for you.

  I am also getting the error
 
 DEPRECATED: Binding aggregator mojos to lifecycle phases in the POM is 
 considered dangerous.
 This feature has been deprecated. Please adjust your POM files 
 accordingly.
 
 for the org.apache.maven.plugins:maven-javadoc-plugin:2.6:aggregate, and 
 org.apache.maven.plugins:maven-project-info-reports-plugin:2.1.2:dependency-convergence

Try to disable these two reporting plugins, to see if the site
generation will complete successfully.

 
 I am running this inside M2Eclipse.
 
 
 Tim McGinnis
 717 720-1962
 Web Development
 AES/PHEAA
 ==
 This message contains privileged and confidential information intended for 
 the above addressees only.  If you
 receive this message in error please delete or destroy this message and/or 
 attachments.  
 
 The sender of this message will fully cooperate in the civil and criminal 
 prosecution of any individual engaging
 in the unauthorized use of this message.
 ==
 


-- 
Dennis Lundberg

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



Re: How to find out which parameters can be specified as command-line properties?

2010-03-13 Thread Mirko Friedenhagen
Am 13.03.2010 um 03:06 schrieb sebb:
 Some plugin parameters are settable as command-line properties.
 For example, the Surefire plugin accepts the parameter argLine in
 the POM and the property -DargLine on the command-line.
 
 Surefire also accepts skipTests and -DskipTests=true.
 
 However, Surefire accepts the skip parameter, but ignores -Dskip=true.
 
 How can one find out which parameters are settable as command-line
 properties for a given plugin other than by trial and error? Is there
 a rule for this? Or a help command?
 

Hello Sebb,

mvn help:describe -Dplugin=org.apache.maven.plugins:maven-surefire-plugin 
-Ddetail=true

will show you the goals and their options.

For the command line parameter version of the options refer to e.g.:
http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#skip

There you see, that skip translates to maven.test.skip on the command line.

Regards
Mirko




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



Re: How to find out which parameters can be specified as command-line properties?

2010-03-13 Thread Paul Benedict
Yup, and you can use an abbreviated version too:
mvn help:describe -Dplugin=surefire -Ddetail=true

On Sat, Mar 13, 2010 at 2:30 PM, Mirko Friedenhagen
mirko-li...@friedenhagen.de wrote:
 Am 13.03.2010 um 03:06 schrieb sebb:
 Some plugin parameters are settable as command-line properties.
 For example, the Surefire plugin accepts the parameter argLine in
 the POM and the property -DargLine on the command-line.

 Surefire also accepts skipTests and -DskipTests=true.

 However, Surefire accepts the skip parameter, but ignores -Dskip=true.

 How can one find out which parameters are settable as command-line
 properties for a given plugin other than by trial and error? Is there
 a rule for this? Or a help command?


 Hello Sebb,

 mvn help:describe -Dplugin=org.apache.maven.plugins:maven-surefire-plugin 
 -Ddetail=true

 will show you the goals and their options.

 For the command line parameter version of the options refer to e.g.:
 http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#skip

 There you see, that skip translates to maven.test.skip on the command line.

 Regards
 Mirko




 -
 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



Re: Combining modules' jars into one war ?

2010-03-13 Thread smallufo
Wow , it works !
But I have another question :
What if these modules share the same config files , such as log4j.properties
, or ehcache.xml  , or spring's context.xml ?
Should I split one config file into different parts and put into
corresponding module ? (and if true , how to combine the parts into one ?)
Or what's the better way to manage these config files , so that each module
can locate it , and test separately it with problems ?
Thanks in advanced.


2010/3/13 Wayne Fay wayne...@gmail.com

  I need the three modules combined into one war , how to accomplish it ?
  Thanks in advanced...

 Make a fourth project with war packaging, and depend on the other 3
 projects, then run mvn package from the top/parent directory and
 eventually it will result in a war in the target folder of that 4th
 project.

 Wayne

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




Re: Combining modules' jars into one war ?

2010-03-13 Thread Ron Wheeler

smallufo wrote:

Wow , it works !
But I have another question :
What if these modules share the same config files , such as log4j.properties
, or ehcache.xml  , or spring's context.xml ?
Should I split one config file into different parts and put into
corresponding module ? (and if true , how to combine the parts into one ?)
Or what's the better way to manage these config files , so that each module
can locate it , and test separately it with problems ?
Thanks in advanced.
  

There always has to be an element of common sense
In my view, if the config file describes your application, it probably 
belongs at the top level (application)
If you put them in the lower levels, it may be harder for someone doing 
maintenance to figure out where something is being set.


Ron


2010/3/13 Wayne Fay wayne...@gmail.com

  

I need the three modules combined into one war , how to accomplish it ?
Thanks in advanced...
  

Make a fourth project with war packaging, and depend on the other 3
projects, then run mvn package from the top/parent directory and
eventually it will result in a war in the target folder of that 4th
project.

Wayne

-
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



Re: Combining modules' jars into one war ?

2010-03-13 Thread Justin Edelson
I don't think there is a general-purpose solution to the config
combination problem. In some cases (log4j.properties, possibly
ehcache.xml), the config file is, for the purpose of the jar modules, a
test concern and thus can go in src/test/resources. BoxSpring
(www.boxspring.org) is one way of solving this problem for Spring
configuration files, i.e. tweaking Spring to support combining
configuration.

Justin

On 3/13/10 8:29 PM, smallufo wrote:
 Wow , it works !
 But I have another question :
 What if these modules share the same config files , such as log4j.properties
 , or ehcache.xml  , or spring's context.xml ?
 Should I split one config file into different parts and put into
 corresponding module ? (and if true , how to combine the parts into one ?)
 Or what's the better way to manage these config files , so that each module
 can locate it , and test separately it with problems ?
 Thanks in advanced.
 
 
 2010/3/13 Wayne Fay wayne...@gmail.com
 
 I need the three modules combined into one war , how to accomplish it ?
 Thanks in advanced...

 Make a fourth project with war packaging, and depend on the other 3
 projects, then run mvn package from the top/parent directory and
 eventually it will result in a war in the target folder of that 4th
 project.

 Wayne

 -
 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