Tomcat, Ant and Maven (Was POM Best Practice? Tomcat, svn wc, and dists)

2009-02-13 Thread Lee Goddard
 I think it is the case that most people who use Maven will be 
 using a Java IDE of some sort.  These take care of ensuring 
 that the right files are seen by the web server at the right time.

I feared as much.


 Generally, though it's fairly normal (when outside of an IDE) 
 to package the software before letting tomcat (or any other servlet
 container) at it.

But not during development, surely? When actually writing the files?
 
 If you really want tomcat to serve your files directly, you 
 can configure it (in conf/Catalina/localhost/myproj.xml) to 
 point directly at .../myproj/src/main/webapp.  I'd say that 
 this isn't a particularly normal usage scenario though.

So I'll probably try to avoid it.

Thanks for your help.

I got the impression that Maven is intended to be used from the start of
coding on a project, but it doesn't seem to sit very well with
non-IDE-based development. 

Is there no parallel case in Maven for the Ant model of copying files
from a source tree to a build location, as outlined in the Tomcat
Developer's Guide on the Apache Tomat homepage?

http://tomcat.apache.org/tomcat-6.0-doc/appdev/processes.html

Thanks again,
Lee

http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal 
views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on 
it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.


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



How to filter META-INF/context.xml

2009-02-13 Thread Alessandro Novarini

Hello list,

After some weeks of lurking, trying to catch all the hidden secrets of  
maven, I need your help.
I looked for some hints on the net also, but probably I'm a bad web  
surfer and I couldn't find anything useful.


So, here's the problem:

I have a maven web project imported into eclipse, and this is a piece  
of its directory structure:


src/
src/main/
src/main/webapps/
src/main/webapps/META-INF/
src/main/webapps/META-INF/context.xml

filters/
filters/integration.properties


File contents


context.xml

Context
Resource name=${jdbc.name} auth=Container
type=${datasource.type} username=${database.username}  
password=${database.password}

driverClassName=${database.driver} url=${database.url}
maxActive=8 maxIdle=4/
/Context

integration.properties

jdbc.name=jdbc/ds
datasource.type=javax.sql.DataSource
database.username=user
database.password=pass
database.driver=com.mysql.jdbc.Driver
database.url=jdbc:mysql://192.168.250.30:3306/aDatabase? 
autoreconnect=true



And this is the pom.xml (just the interesting sections)

build
...
plugins
   ...
   plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-war-plugin/artifactId
configuration

dependentWarExcludesMETA-INF/context.xml/dependentWarExcludes
/configuration
/plugin
...
/plugins
...
resources
resource
targetPathMETA-INF/targetPath
directorysrc/main/webapp/META-INF/directory
includes
include**/context.xml/include
/includes
filteringtrue/filtering
/resource
/resources

/build


With this configuration, the META-INF directory is copied into target/ 
classes, and the context.xml is filtered, so it seems just a problem  
with the targetPath, but...

Let's add this tag in the build section:

finalNametestApp/finalName

So that at the end of mvn package I'll have a war file named testApp.war

We changed the configuration above in this way:
targetPath../testApp/META-INF/targetPath

But the context.xml in the testApp/META-INF in unfiltered :(

Where's the mistake? Is there anything I don't get? Of course there  
is, but what?


Sorry for the long mail, I hope I've explained my problem properly.

Thank you in advance
Ale


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



Re: mvn eclipse:eclipse not adding source directories

2009-02-13 Thread Dirk Olmes
Josh Suereth wrote:
 Hey guys,
 
 I'm trying to better integrate the maven-eclipse-plugin with the
 maven-scala-plugin.   Is there anyway I can notify the eclipse:eclipse goal
 to add extra source directories when creating the eclipse project files?

Use the build-helper plugin from Codehaus [0] to add additional source
directories and the eclipse plugin will pick them up.

[0] http://mojo.codehaus.org/build-helper-maven-plugin/

HTH,

-dirk

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



Re: Tomcat, Ant and Maven (Was POM Best Practice? Tomcat, svn wc, and dists)

2009-02-13 Thread Stephen Connolly
have a look at the jetty:run and tomcat:run mojos... these will
package up the war files into a directory, start a jetty or tomcat
container respectively and serve the webapp in place,  The jetty one
supports scanning of the source files and automatic reloading of the
webapp... I think the tomcat one might support the same, but I'm not
sure.

These mojos make CLI development trivial IMHO

2009/2/13 Lee Goddard lee.godd...@bbc.co.uk:
 I think it is the case that most people who use Maven will be
 using a Java IDE of some sort.  These take care of ensuring
 that the right files are seen by the web server at the right time.

 I feared as much.


 Generally, though it's fairly normal (when outside of an IDE)
 to package the software before letting tomcat (or any other servlet
 container) at it.

 But not during development, surely? When actually writing the files?

 If you really want tomcat to serve your files directly, you
 can configure it (in conf/Catalina/localhost/myproj.xml) to
 point directly at .../myproj/src/main/webapp.  I'd say that
 this isn't a particularly normal usage scenario though.

 So I'll probably try to avoid it.

 Thanks for your help.

 I got the impression that Maven is intended to be used from the start of
 coding on a project, but it doesn't seem to sit very well with
 non-IDE-based development.

 Is there no parallel case in Maven for the Ant model of copying files
 from a source tree to a build location, as outlined in the Tomcat
 Developer's Guide on the Apache Tomat homepage?

 http://tomcat.apache.org/tomcat-6.0-doc/appdev/processes.html

 Thanks again,
 Lee

 http://www.bbc.co.uk/
 This e-mail (and any attachments) is confidential and may contain personal 
 views which are not the views of the BBC unless specifically stated.
 If you have received it in error, please delete it from your system.
 Do not use, copy or disclose the information in any way nor act in reliance 
 on it and notify the sender immediately.
 Please note that the BBC monitors e-mails sent or received.
 Further communication will signify your consent to this.


 -
 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



how to Maven configure with oracle ESB and BEPL

2009-02-13 Thread SRINIVASA RAO
Hi All,
 
I am facing on problem with Maven.
I need to configure the Maven with oracle ESB and BEPL projects.
If any body have experience/ any articles  with them ,please give me .
 It will be very good help to me
 
regards,
Srinivas


  

Diffrend behavior mvn clean site between M 2.0.9 and M 2.1-SNAPSHOT

2009-02-13 Thread kukudas

hi,

when i run mvn clean site with M 2.0.9 everything goes well as expected.
However when i do the same with M 2.1-SNAPSHOT it cant find a dependency on
the maven repository. I looked it up my self and the dependency is there.
Somebody expierinced anything alike?

thx

kukudas
-- 
View this message in context: 
http://www.nabble.com/Diffrend-behavior-mvn-clean-site-between-M-2.0.9-and-M-2.1-SNAPSHOT-tp21994023p21994023.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: Uneditable parameter: filters upgrading to 2.1-SNAPSHOT

2009-02-13 Thread Milos Kleint
use netbeans 6.5 and use the command line execution within netbeans.
The embedded builds are broken on many levels and since 6.5 they are
only used as backup if no maven binaries are found on your PATH.

Milos

On Thu, Feb 12, 2009 at 10:50 AM, Madeye m...@madeye.com wrote:

 I have a Maven project (pom.xml below) that builds fine from the command line
 using Maven 2.0.9.  However, when I try to build it with Maven 2.1-SNAPSHOT
 from Netbeans 6.1 using I get an error.  The problem seems to centre around
 the way I have configured filtering, which is
 http://maven.apache.org/plugins/maven-assembly-plugin/examples/single/filtering-some-distribution-files.html
 as per the docs .  Googling the error didn't return much useful information.
 Any tips or pointers gratefully accepted.

 Error:

 [ERROR]The following mojo parameter cannot be configured:
 [ERROR]Uneditable parameter:
 [ERROR]Name: filters
 [ERROR]Alias: null
 [ERROR]in mojo:
 [ERROR]Group-Id: org.apache.maven.plugins
 [ERROR]Artifact-Id: maven-assembly-plugin
 [ERROR]Version: 2.2-beta-1
 [ERROR]Mojo: single
 [ERROR]brought in via: POM
 [ERROR]While building project:
 [ERROR]Group-Id: com.somecompany.product.final.generic
 [ERROR]Artifact-Id: generic
 [ERROR]Version: 3.1.0.3-SNAPSHOT
 [ERROR]From file:
 /home/matt/development/someproduct/maven/someproduct-unified/someproduct-final/generic/pom.xml
 [ERROR]Instead of configuring this parameter directly, try configuring your
 POM or settings.xml file.
 [ERROR]Using the default-value and expression annotations built into the
 mojo itself, these values were found in your build:
 [ERROR]Value: null
 [ERROR]Using the expression:null
 [ERROR]Value: null
 [ERROR]Using the expression:null
 [ERROR]If one of the above expressions rendered a valid value, it may give
 some indication of which part of the POM or settings.xml you can modify in
 order to change this parameter's value.


 pom.xml:

 lt;project xmlns=http://maven.apache.org/POM/4.0.0;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
 http://maven.apache.org/maven-v4_0_0.xsdgt;
  lt;modelVersiongt;4.0.0lt;/modelVersiongt;
  lt;groupIdgt;com.somecompany.product.final.genericlt;/groupIdgt;
  lt;artifactIdgt;genericlt;/artifactIdgt;
  lt;packaginggt;pomlt;/packaginggt;
  lt;namegt;Generic Final Buildlt;/namegt;
  lt;urlgt;http://www.somecompany.comlt;/urlgt;
  lt;parentgt;
lt;groupIdgt;com.somecompany.product.finallt;/groupIdgt;
lt;artifactIdgt;someproduct-finallt;/artifactIdgt;
lt;versiongt;3.1.0.3-SNAPSHOTlt;/versiongt;
  lt;/parentgt;
  lt;dependenciesgt;
lt;dependencygt;
  lt;artifactIdgt;someproduct-weblt;/artifactIdgt;
  lt;groupIdgt;com.somecompany.productlt;/groupIdgt;
  lt;typegt;warlt;/typegt;
  lt;versiongt;3.1.0.3-SNAPSHOTlt;/versiongt;
lt;/dependencygt;
lt;dependencygt;
  lt;artifactIdgt;blacklt;/artifactIdgt;
  lt;groupIdgt;com.somecompany.product.guilt;/groupIdgt;
  lt;versiongt;3.1.0.3-SNAPSHOTlt;/versiongt;
  lt;typegt;ziplt;/typegt;
  lt;classifiergt;guilt;/classifiergt;
lt;/dependencygt;
lt;dependencygt;
  lt;artifactIdgt;genericlt;/artifactIdgt;
  lt;groupIdgt;com.somecompany.product.customerlt;/groupIdgt;
  lt;versiongt;3.1.0.3-SNAPSHOTlt;/versiongt;
  lt;typegt;ziplt;/typegt;
  lt;classifiergt;customerlt;/classifiergt;
lt;/dependencygt;
   lt;/dependenciesgt;
  lt;buildgt;
lt;pluginsgt;
  lt;plugingt;
lt;artifactIdgt;maven-assembly-pluginlt;/artifactIdgt;
lt;configurationgt;
  lt;filtersgt;

 lt;filtergt;${basedir}/config.propertieslt;/filtergt;
  lt;/filtersgt;
  lt;descriptorRefsgt;
lt;descriptorRefgt;finallt;/descriptorRefgt;
  lt;/descriptorRefsgt;
lt;/configurationgt;
lt;dependenciesgt;
  lt;dependencygt;
lt;groupIdgt;com.somecompany.mavenlt;/groupIdgt;
lt;artifactIdgt;someproduct-assemblieslt;/artifactIdgt;
lt;versiongt;3.1.0.2-SNAPSHOTlt;/versiongt;
  lt;/dependencygt;
lt;/dependenciesgt;
lt;executionsgt;
  lt;executiongt;
lt;idgt;assemblelt;/idgt;
lt;phasegt;packagelt;/phasegt;
lt;goalsgt;
  lt;goalgt;singlelt;/goalgt;
lt;/goalsgt;
  lt;/executiongt;
lt;/executionsgt;
  lt;/plugingt;
lt;/pluginsgt;
  lt;/buildgt;
 lt;/projectgt;

 --
 View this message in context: 
 http://www.nabble.com/Uneditable-parameter%3A-filters-upgrading-to-2.1-SNAPSHOT-tp21972856p21972856.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



Maven-plugin-plugin reports...

2009-02-13 Thread Marvin Froeder
Hi Folks,

I'm playing a bit with maven-plugin-plugin report
(org.apache.maven.plugin.plugin.PluginReport).

I was able to adapt it to produce goals overview page into confluence
format.  Now, I wanna do the same with the page containing the goal
configuration.  But, I was not able to figure out what mojo generate goal
configuration pages.

Does anybody knows that?


VELO


Re: mvn eclipse:eclipse not adding source directories

2009-02-13 Thread Josh Suereth
Thanks for the answer!  I'll notify the users.

Anyway to integrate the eclipse + scala plugins directly?

On Fri, Feb 13, 2009 at 4:44 AM, Dirk Olmes d...@xanthippe.ping.de wrote:

 Josh Suereth wrote:
  Hey guys,
 
  I'm trying to better integrate the maven-eclipse-plugin with the
  maven-scala-plugin.   Is there anyway I can notify the eclipse:eclipse
 goal
  to add extra source directories when creating the eclipse project files?

 Use the build-helper plugin from Codehaus [0] to add additional source
 directories and the eclipse plugin will pick them up.

 [0] http://mojo.codehaus.org/build-helper-maven-plugin/

 HTH,

 -dirk

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




RE: Tomcat, Ant and Maven (Was POM Best Practice? Tomcat, svn wc, and dists)

2009-02-13 Thread Lee Goddard
 
 have a look at the jetty:run and tomcat:run mojos... these 
 will package up the war files into a directory, start a jetty 
 or tomcat container respectively and serve the webapp in 
 place,  The jetty one supports scanning of the source files 
 and automatic reloading of the webapp... I think the tomcat 
 one might support the same, but I'm not sure.
 
 These mojos make CLI development trivial IMHO

Great stuff, thank you! I'll check them out.

Lee
  

http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal 
views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on 
it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.


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



mvn jetty home?

2009-02-13 Thread Lee Goddard
Could someone please point me to the Maven Jetty home and/or help me
istall it?

http://mojo.codehaus.org/jetty-maven-plugin/index.html says little, but
when I follow those few instructions, I get the below error.

Also,it refers to the deprecated m2 command - is Jetty alive and well
or should I be using something else?

Thanks in anticipation
Lee


[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'jetty'.
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] The plugin 'org.codehaus.mojo:jetty-maven-plugin' does not exist
or no valid version could be found
[INFO]

[INFO] For more information, run Maven with the -e switch
[INFO]

[INFO] Total time:  1 second
[INFO] Finished at: Fri Feb 13 13:49:27 GMT 2009
[INFO] Final Memory: 4M/254M
[INFO]


http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal 
views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on 
it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.


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



Re: Prototype file name in archtype

2009-02-13 Thread jmaxwell

Just did this on a project yesterday
You can find details in this issue:
http://jira.codehaus.org/browse/ARCHETYPE-191?focusedCommentId=152337page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_152337


rina_ wrote:
 
 Hello,
 
 I'm trying to create a template for my projects and using archtypes for
 this. The problem is that prototype file names must contain the artifactId
 + .java. This means that prototype file names must somehow be defined as
 variables. Is this possible?
 
 Any suggestions on how I can do this? Thanks!!!
 
 Regard, Rina
 

-- 
View this message in context: 
http://www.nabble.com/Prototype-file-name-in-archtype-tp21986019p21997145.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



Velocity chokes on ${not empty user}

2009-02-13 Thread Blake Martin
I'm attempting to create an archetype.

One of my JSP's contains the following el expression: ${not empty user}

I tried escaping the $, but Velocity chokes anyways.

Any ideas?


Re: Velocity chokes on ${not empty user}

2009-02-13 Thread Wendy Smoak
On Fri, Feb 13, 2009 at 7:42 AM, Blake Martin blakecmar...@gmail.com wrote:
 I'm attempting to create an archetype.
 One of my JSP's contains the following el expression: ${not empty user}
 I tried escaping the $, but Velocity chokes anyways.
 Any ideas?

There's a HOWTO about escaping variables in archetype templates on:
http://docs.codehaus.org/display/MAVENUSER/Assembly+Plugin .

-- 
Wendy

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



Who can explain me this warning ?

2009-02-13 Thread kukudas

hi,

when i execute mvn clean site (with 2.1-SNAPSHOT) i get this warning (i
don't get it with 2.0.9):

DEPRECATED: Binding aggregator mojos to lifecycle phases in the POM is
considered dangerous.
This feature has been deprecated. Please adjust your POM files accordingly.

Offending mojo:

org.apache.maven.plugins:maven-project-info-reports-plugin:2.1:dependency-convergence

i hope somebody can explain what this means thanks.

kuku
-- 
View this message in context: 
http://www.nabble.com/Who-can-explain-me-this-warning---tp21997978p21997978.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: Velocity chokes on ${not empty user}

2009-02-13 Thread Blake Martin
OK, my el expression in my JSP now looks like: $dollar{not empty user}

And for the first line of pom.xml in archetype-resources, I have:
#set($dollar = '$')

The process blows up with the same exact error message.

On Fri, Feb 13, 2009 at 9:57 AM, Wendy Smoak wsm...@gmail.com wrote:

 On Fri, Feb 13, 2009 at 7:42 AM, Blake Martin blakecmar...@gmail.com
 wrote:
  I'm attempting to create an archetype.
  One of my JSP's contains the following el expression: ${not empty user}
  I tried escaping the $, but Velocity chokes anyways.
  Any ideas?

 There's a HOWTO about escaping variables in archetype templates on:
 http://docs.codehaus.org/display/MAVENUSER/Assembly+Plugin .

 --
 Wendy

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




Re: Velocity chokes on ${not empty user}

2009-02-13 Thread Blake Martin
Ah, I used $dollar instead of ${dollar}.

It works now. Thank you, Wendy!

On Fri, Feb 13, 2009 at 9:57 AM, Wendy Smoak wsm...@gmail.com wrote:

 On Fri, Feb 13, 2009 at 7:42 AM, Blake Martin blakecmar...@gmail.com
 wrote:
  I'm attempting to create an archetype.
  One of my JSP's contains the following el expression: ${not empty user}
  I tried escaping the $, but Velocity chokes anyways.
  Any ideas?

 There's a HOWTO about escaping variables in archetype templates on:
 http://docs.codehaus.org/display/MAVENUSER/Assembly+Plugin .

 --
 Wendy

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




Build RCP application with Maven

2009-02-13 Thread Julien HENRY
Hi all,

I would like to know if someone already build an Eclipse RCP application with 
Maven.

Thanks for your feedbacks.

Julien



  
__
Ne pleurez pas si votre Webmail ferme ! Récupérez votre historique sur Yahoo! 
Mail ! http://fr.docs.yahoo.com/mail/transfert_mails.html


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



src/main/resources and hardcoded paths

2009-02-13 Thread Costin Caraivan

Hello,

This will be a newbie question, regarding resource relocation at build time.
It goes like this: I code something, that maybe loads some .properties and
some images. I need the paths to those files, so I hardcode them. Maybe I
even use another .properties file to load these paths at runtime - but I
still need to hardcode the path to this file (or give it as an command line
option, let's say).

Anyway, Maven wants a certain structure, it wants the resources in
src/main/resources (I know it can be configured). But when it builds the
project jar, the resources are moved from that folder.

So:
compile time (in an IDE for example, like Eclipse):
src/main/java/classes
src/main/resources/resources

jar time:
classes
resources

How do you cope with this relocation? If I move everything in
src/main/resources, I'll break the code when compiling with something like
Eclipse (while debugging for example). If I don't, I break Maven (the build
is more complex, I can't really change the resource folder using resources
for various reasons).

How do you handle your resources when building with Maven? You just put the
resources in src/main/resources... and what happens when you run your jar?

Thank you for your answers,
Costin.
-- 
View this message in context: 
http://www.nabble.com/src-main-resources-and-hardcoded-paths-tp22001032p22001032.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: src/main/resources and hardcoded paths

2009-02-13 Thread Mick Knutson
You mean like:

classpath:someresource.properties


---
Thank You…

Mick Knutson, President

BASE Logic, Inc.
Enterprise Architecture, Design, Mentoring  Agile Consulting
p. (866) BLiNC-411: (254-6241-1)
f. (415) 685-4233

Website: http://baselogic.com
Linked IN: http://linkedin.com/in/mickknutson
Twitter: http://twitter.com/mickknutson
Vacation Rental: http://tahoe.baselogic.com
---



On Fri, Feb 13, 2009 at 12:30 PM, Costin Caraivan ccarai...@axway.comwrote:


 Hello,

 This will be a newbie question, regarding resource relocation at build
 time.
 It goes like this: I code something, that maybe loads some .properties and
 some images. I need the paths to those files, so I hardcode them. Maybe I
 even use another .properties file to load these paths at runtime - but I
 still need to hardcode the path to this file (or give it as an command line
 option, let's say).

 Anyway, Maven wants a certain structure, it wants the resources in
 src/main/resources (I know it can be configured). But when it builds the
 project jar, the resources are moved from that folder.

 So:
 compile time (in an IDE for example, like Eclipse):
 src/main/java/classes
 src/main/resources/resources

 jar time:
 classes
 resources

 How do you cope with this relocation? If I move everything in
 src/main/resources, I'll break the code when compiling with something like
 Eclipse (while debugging for example). If I don't, I break Maven (the build
 is more complex, I can't really change the resource folder using
 resources
 for various reasons).

 How do you handle your resources when building with Maven? You just put the
 resources in src/main/resources... and what happens when you run your jar?

 Thank you for your answers,
 Costin.
 --
 View this message in context:
 http://www.nabble.com/src-main-resources-and-hardcoded-paths-tp22001032p22001032.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: src/main/resources and hardcoded paths

2009-02-13 Thread Costin Caraivan


Mick Knutson-4 wrote:
 
 You mean like:
 
 classpath:someresource.properties
 ---
 Thank You…
 
 Mick Knutson, President
 
 On Fri, Feb 13, 2009 at 12:30 PM, Costin Caraivan
 ccarai...@axway.comwrote:
 Hello,

 This will be a newbie question, regarding resource relocation at build
 time.
 It goes like this: I code something, that maybe loads some .properties
 and
 some images. I need the paths to those files, so I hardcode them. Maybe I
 even use another .properties file to load these paths at runtime - but I
 still need to hardcode the path to this file (or give it as an command
 line
 option, let's say).

 Anyway, Maven wants a certain structure, it wants the resources in
 src/main/resources (I know it can be configured). But when it builds the
 project jar, the resources are moved from that folder.

 So:
 compile time (in an IDE for example, like Eclipse):
 src/main/java/classes
 src/main/resources/resources

 jar time:
 classes
 resources

 How do you cope with this relocation? If I move everything in
 src/main/resources, I'll break the code when compiling with something
 like
 Eclipse (while debugging for example). If I don't, I break Maven (the
 build
 is more complex, I can't really change the resource folder using
 resources
 for various reasons).

 How do you handle your resources when building with Maven? You just put
 the
 resources in src/main/resources... and what happens when you run your
 jar?

 Thank you for your answers,
 Costin.
 
So, basically, Maven adds src/main/resources to the classpath and I should
add it too while running Eclipse (or maven-eclipse-plugin does it for me, I
haven't checked - I don't have access to a Maven project right now). The bad
news is that I'm not sure how the resources are loaded, they may be loaded
the wrong way (aka not like this:
http://jaredtech.blogspot.com/2005/05/loading-properties-with-classpath.html)
:(

Thank you,
Costin.
-- 
View this message in context: 
http://www.nabble.com/src-main-resources-and-hardcoded-paths-tp22001032p22001724.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: src/main/resources and hardcoded paths

2009-02-13 Thread Stephen Connolly

load the resources through the classloader

Sent from my [rhymes with myPod] ;-)

On 13 Feb 2009, at 17:30, Costin Caraivan ccarai...@axway.com wrote:



Hello,

This will be a newbie question, regarding resource relocation at  
build time.
It goes like this: I code something, that maybe loads  
some .properties and
some images. I need the paths to those files, so I hardcode them.  
Maybe I
even use another .properties file to load these paths at runtime -  
but I
still need to hardcode the path to this file (or give it as an  
command line

option, let's say).

Anyway, Maven wants a certain structure, it wants the resources in
src/main/resources (I know it can be configured). But when it builds  
the

project jar, the resources are moved from that folder.

So:
compile time (in an IDE for example, like Eclipse):
src/main/java/classes
src/main/resources/resources

jar time:
classes
resources

How do you cope with this relocation? If I move everything in
src/main/resources, I'll break the code when compiling with  
something like
Eclipse (while debugging for example). If I don't, I break Maven  
(the build
is more complex, I can't really change the resource folder using  
resources

for various reasons).

How do you handle your resources when building with Maven? You just  
put the
resources in src/main/resources... and what happens when you run  
your jar?


Thank you for your answers,
Costin.
--
View this message in context: 
http://www.nabble.com/src-main-resources-and-hardcoded-paths-tp22001032p22001032.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



RE: Axis2 wsdl2code Plugin Help!

2009-02-13 Thread Kevin Witten
From the maven documentation 
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Lifecycle_Reference
My understanding of the maven clean lifecycle is that the following phases
will be run in order when you perform a mvn clean

pre-clean
clean
post-clean

And with the ant plugin you can run code in any of these phases.

The issue is that the post-clean does not seem to work. Am I missing something?

Here is a simple pom which does an ant echo task in each phase.

When I run mvn clean, the post-clean is never echoed.

?xml version=1.0 encoding=UTF-8?
project xmlns=http://maven.apache.org/POM/4.0.0; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;

   modelVersion4.0.0/modelVersion
   groupIdcom.nomadix/groupId
   artifactIdTest/artifactId
   nameTest/name
   version1.0.0/version

build
  plugins
 plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-antrun-plugin/artifactId
executions
   execution
  idExtended-Pre-Clean/id
  phasepre-clean/phase
  goals
 goalrun/goal
  /goals
  configuration
 tasks

echo@@@/echo
echo@ 
@/echo
echo@   PRE-CLEAN 
@/echo
echo@ 
@/echo

echo@@@/echo
 /tasks
  /configuration
   /execution
   execution
  idExtended-Clean/id
  phaseclean/phase
  goals
 goalrun/goal
  /goals
  configuration
 tasks

echo@@@/echo
echo@ 
@/echo
echo@   CLEAN 
@/echo
echo@ 
@/echo

echo@@@/echo
 /tasks
  /configuration
   /execution
   execution
  idExtended-Post-Clean/id
  phasepost-clean/phase
  goals
 goalrun/goal
  /goals
  configuration
 tasks

echo@@@/echo
echo@ 
@/echo
echo@   POST-CLEAN
@/echo
echo@ 
@/echo

echo@@@/echo
 /tasks
  /configuration
   /execution
/executions
 /plugin
  /plugins
   /build
/project



Thanks for the help,
Kevin

Notice● The information and attachment(s) contained in this communication are 
intended for the addressee only, and may be confidential and/or legally 
privileged.  If you have received this communication in error, please contact 
the sender immediately, and delete this communication from any computer or 
network system.  Any interception, review, printing, copying, re-transmission, 
dissemination, or other use of, or taking of any action upon this information 
by persons or entities other than the intended recipient is strictly prohibited 
by law and may subject them to criminal or civil liability.  None of the 
interTouch Group of Companies shall be liable for the improper and/or 
incomplete transmission of the information contained in this communication or 
for any delay in its receipt.


Re: Who can explain me this warning ?

2009-02-13 Thread Wayne Fay
 when i execute mvn clean site (with 2.1-SNAPSHOT) i get this warning (i
 don't get it with 2.0.9):

You're running a bleeding edge version of Maven. Expect to see some errors...

This warning means that the MPIR plugin needs some adjusting before
Maven 2.1 is released as final.

Wayne

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



Re: Axis2 wsdl2code Plugin Help!

2009-02-13 Thread Stephen Connolly
when you invoke a phase, maven invokes all the phases, in the  
lifecycle to which the phase belongs, up to and including the phase  
you specified


you are invoking the clean phase, which is part of the clean  
lifecycle, so maven will invoke all the mojos attached to the pre- 
clean phase, and then all those attached to the clean phase, and then  
it will stop


the same confusion happens with integration tests... where people  
think they should dunn them with mvn integration-test but this is  
not the way they should work. the integration-test phase should run  
all the tests and *never fail the build*. then a plugin attached to  
the verify phase should check the results of the integration tests and  
fail the build if necessary. with that case you invoke the integration  
tests with mvn verify. this allows a IT test container to be started  
and stopped in the pre-it and post-it phases


Sent from my [rhymes with myPod] ;-)

On 13 Feb 2009, at 18:12, Kevin Witten kevin.wit...@nomadix.com wrote:


From the maven documentation 
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Lifecycle_Reference
My understanding of the maven clean lifecycle is that the following  
phases

will be run in order when you perform a mvn clean

   pre-clean
   clean
   post-clean

And with the ant plugin you can run code in any of these phases.

The issue is that the post-clean does not seem to work. Am I missing  
something?


Here is a simple pom which does an ant echo task in each phase.

When I run mvn clean, the post-clean is never echoed.

?xml version=1.0 encoding=UTF-8?
project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance 

xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd 



  modelVersion4.0.0/modelVersion
  groupIdcom.nomadix/groupId
  artifactIdTest/artifactId
  nameTest/name
  version1.0.0/version

   build
 plugins
plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-antrun-plugin/artifactId
   executions
  execution
 idExtended-Pre-Clean/id
 phasepre-clean/phase
 goals
goalrun/goal
 /goals
 configuration
tasks

echo 
@@@/echo

echo@  
@/echo
   echo@   PRE- 
CLEAN @/echo

echo@  
@/echo

echo 
@@@/echo

/tasks
 /configuration
  /execution
  execution
 idExtended-Clean/id
 phaseclean/phase
 goals
goalrun/goal
 /goals
 configuration
tasks

echo 
@@@/echo

echo@  
@/echo
   echo@
CLEAN @/echo

echo@  
@/echo

echo 
@@@/echo

/tasks
 /configuration
  /execution
  execution
 idExtended-Post-Clean/id
 phasepost-clean/phase
 goals
goalrun/goal
 /goals
 configuration
tasks

echo 
@@@/echo

echo@  
@/echo
   echo@   POST- 
CLEAN@/echo

echo@  
@/echo

echo 
@@@/echo

/tasks
 /configuration
  /execution
   /executions
/plugin
 /plugins
  /build
/project



Thanks for the help,
Kevin

Notice● The information and attachment(s) contained in this communic 
ation are intended for the addressee only, and may be confidential a 
nd/or legally privileged.  If you have received this communication i 
n error, please contact the sender immediately, and delete this comm 
unication from any 

Multi module site deploy using file

2009-02-13 Thread Randall Fidler
Hello,

 

I have a multi-module project that seemed to deploy fine
with SCP but not with FILE.  Inside settings.xml I've got a var which
points to the local directory where the site files should be deployed to
and things work fine for the parent but not the child.

 

Parent (1.0_SNAPSHOT)   (has site in dist mgmt set to
file://${site.dir}/${project.artifactId}/${project.version}

 |

 |

 - Child (1.0_SNAPSHOT) 

 

What happens is I end up with both sites in the same directory instead
of the child being nested under the parent, which means that the link in
the modules section of the parent site has the wrong link for the child
site.  It thinks the child is at {parent site directory}/Child  but as I
said, the parent and child are at the same level.

 

Suggestions?  As I said, the sites are structured properly deployed
using SCP but with file it doesn't com out correctly.

 

Regards,

 

Randall



Re: executing maven-exec-plugin twice doesn't seem to work

2009-02-13 Thread Trevor Harmon

On Feb 12, 2009, at 3:42 PM, klimane wrote:

I am trying to get a maven-exec-plugin to run two different main  
programs in

a particular order within the same build.


Have you looked at this?

http://article.gmane.org/gmane.comp.java.maven-plugins.mojo.user/1307

Trevor


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



Re: slightly [ot] Help setting up a MAC for Maven

2009-02-13 Thread Trevor Harmon

On Feb 12, 2009, at 5:50 PM, David C. Hicks wrote:


As far as I know, there is no Java6 for Mac, yet.


There is, but the Apple-provided one is only for 64-bit Intel machines  
running Leopard. An alternative is SoyLatte:


http://landonf.bikemonkey.org/static/soylatte/

Trevor


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



Re: slightly [ot] Help setting up a MAC for Maven

2009-02-13 Thread Trevor Harmon

On Feb 12, 2009, at 5:31 PM, Mick Knutson wrote:

I am used to configuring Windows and Linux as a developer machine.  
But want
to setup a mac now. And I am finding it tough to add maven 2.0.9  
along with
MAVEN_HOME, as well as a newer JDK 6 and JAVA_HOME so I can run  
command line

builds on a Mac. Can anyone point me to a tutorial or something?


I prefer using a package manager such as Fink or MacPorts to install  
Maven. They can download, install, and set up environment variables in  
one step, and they make removing or upgrading packages just as easy.


http://www.finkproject.org/
http://www.macports.org/

Trevor


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



Re: Diffrend behavior mvn clean site between M 2.0.9 and M 2.1-SNAPSHOT

2009-02-13 Thread Wayne Fay
 when i run mvn clean site with M 2.0.9 everything goes well as expected.
 However when i do the same with M 2.1-SNAPSHOT it cant find a dependency on
 the maven repository. I looked it up my self and the dependency is there.

As I said in my other response to you, 2.1-SNAPSHOT is pretty much the
bleeding edge of development and will certainly have some errors not
present in stable builds such as 2.0.9 etc. If you cannot tolerate
such problems, then you must use a stable released build such as
2.0.9.

Is this related to the other email you sent to this list? What
dependency cannot be found? What's the specific error message? Did you
try with mvn -X to get more information that may help resolving the
issue?

Wayne

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



3rd Party Library reporting

2009-02-13 Thread Peter Kahn
Can maven produce a licensing report for the site with license and version
info for all dependencies (direct and indirect) of a complex project?

Every year I need to capture the dependency information and license types
for all jars included with our product.  Right now, it means looking into
all our poms, determine versions of dependent jars on down the line until I
have a list of all that is involved.

There must be a maven plugin that would report the dependencies, versions
and project status pages for each so I could jump start this process.


Does anyone know of one?  If not, then I may give it a try.   I just don't
want to re-invent the wheel.

Thanks for the help.


-- 
Peter Kahn
citizenk...@gmail.com
pkahnp...@aim
http://citizenkahn.myplaxo.com
Awareness - Intention - Action


Re: 3rd Party Library reporting

2009-02-13 Thread Kalle Korhonen
Yes, the dependency report of the latest project-info-reports plugin does
this.. see example of the plugin's own dependency report:
http://maven.apache.org/plugins/maven-project-info-reports-plugin/dependencies.html(the
sample they have up is old)

Kalle

On Fri, Feb 13, 2009 at 1:57 PM, Peter Kahn citizenk...@gmail.com wrote:

 Can maven produce a licensing report for the site with license and version
 info for all dependencies (direct and indirect) of a complex project?

 Every year I need to capture the dependency information and license types
 for all jars included with our product.  Right now, it means looking into
 all our poms, determine versions of dependent jars on down the line until I
 have a list of all that is involved.

 There must be a maven plugin that would report the dependencies, versions
 and project status pages for each so I could jump start this process.


 Does anyone know of one?  If not, then I may give it a try.   I just don't
 want to re-invent the wheel.

 Thanks for the help.


 --
 Peter Kahn
 citizenk...@gmail.com
 pkahnp...@aim
 http://citizenkahn.myplaxo.com
 Awareness - Intention - Action



Re: executing maven-exec-plugin twice doesn't seem to work

2009-02-13 Thread klimane

Yes, I had read that before.  I guess I was hoping that something had changed
since then.  For now it looks like we can bind the first one to an earlier
phase to guarantee the order.

Also, my other question has been resolved.  The plugin was running properly
- there was some funny stuff happening that made me think that it was the
plugin causing the problem.  However, it was my own mistake (an incorrect
variable specified in the pom) that was causing the problem.

Thanks for the info.
-- 
View this message in context: 
http://www.nabble.com/executing-maven-exec-plugin-twice-doesn%27t-seem-to-work-tp21984581p22006284.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: Build RCP application with Maven

2009-02-13 Thread Konstantin Domoratskyy
Hi,

it works with Tycho. But Tycho configuration isn't trivial. E.g. all
dependencies should be declared in MANIFEST-file not in pom. See
more in
http://docs.codehaus.org/display/M2ECLIPSE/Tycho+project+overview

Best regards,
Konstantin
---
 Hi all,
 
 I would like to know if someone already build an Eclipse RCP
application with Maven.
 
 Thanks for your feedbacks.
 
 Julien
 
 
 
  
__

 Ne pleurez pas si votre Webmail ferme ! Récupérez votre historique
sur Yahoo! Mail ! http://fr.docs.yahoo.com/mail/transfert_mails.html
 
 

-
 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