[M1] war plugin and web.xml file replacement "issue"

2005-04-17 Thread Laurent PETIT
Hello,
Although the maven.war.webxml may be cool if you build the web.xml file 
"on the fly", there are some situations where the fact that the web.xml 
file is *always* copied and overwritten to the target/webapp/WEB-INF 
directory does hurt.

For example, in my day to day development, I tell my own Tomcat to point 
to the /target/webapp/ directory.

But everytime I change a jsp in /src/main/webapp and I want Tomcat to 
know about it, I run the war:webapp goal, and they are two files copied 
: my jsp and web.xml (even if it lives in /src/main/webapp/WEB-INF it is 
overwritten in the target).

As a result, tomcat sees that the web.xml is newer, and then reloads the 
whole webapp context. Since it may take several seconds (quite 
frequently 10 to 20 seconds), it is very annoying in such a development 
cycle.

I digged into the war plugin and saw the "culprit lines" 
(maven-war-plugin-1.6.1, /plugin.jelly, lines 120 to124) :

   
 
   
I guess I can avoid the problem by (solution 1-) setting a "non existing 
file's filename" into the maven.war.webxml. But it is not very 
clean/intuitive.
Other solutions may be to :

2- not have this overwrite="true" attribute, but there may be some use 
cases needing it (?)
3- declare a new plugin property, called something like 
maven.war.webxml.filter or maven.war.webxml.replace which by default 
could be set to true (to be backward compatible), but it set to false 
would make the plugin skip the replacement.

I don't think the second approach is the best, because there are some 
project teams which may be willing to keep the web.xml file separate 
from the src/main/webapp/WEB-INF directory, maybe keeping different 
web.xml versions for different target platforms in src/main/resources/ 
directory, and still want web.xml to be copied from the good location 
(based upon some currentTargetPlatform variable).

So maybe the fourth solution may be the good one (the more supple, but 
still backward compatible) :
4- declare an new plugin property, called 
maven.war.webxml.alwaysoverwrite, set to true by default.

So my preference would be the solution number 4.
Do you agree with my problem, and do you think there is a chance that it 
would be addressed in a further release of the war plugin ?

Thanks in advance,
--
Laurent PETIT

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[M1] Embedding maven genapp in my own plugin

2005-04-14 Thread Laurent PETIT
Hello,
I'm unsuccessfully trying to "cleanly" call maven genapp from my own plugin.
My aim is to create a plugin that will hide my templates location from 
the user, so all the user needs to do is do a plugin:download when new 
versions of my plugin are available (my plugin will at the end contain 
much more goals than a genapp wrapper).

For the moment, I managed to do that with the following tricks :
My goal in plugin.jelly looks like this :
  
   
 
   
   

And I've set this property in my plugins.properties file :
maven.genapp.template.repository=${maven.home.local}/template
This works, but what I want to do is address directly the 
${plugin.resources}/template subdirectory of my 
${maven.home.local}/cache/ directory.

But I was unable to make it recognized !
I tried setting maven.genapp.template.repository to 
${plugin.resources}/template in my plugin.properties file but it seems 
that the setting of the property is done "too late" for the plugin. Very 
weird, since the same property set with ${maven.home.local} works !

Any idea please ?
Thanks in advance,
--
Laurent Petit
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Instability calculation

2005-04-08 Thread Laurent PETIT
Siegfried Goeschl wrote:
I agree with you that it is odd but the instability is calulated using 
(Ce / (Ce + Ca). Since it is not used in your project Ca => 0 and 
therefore you get 1 showing up as 100% instability

Having said that I would not put too much weight on the metrics of 
JDepend since it is simply bean counting ... :-)
Hello,
Being "instable" or "stable" (in the definitions made by the Ce / (Ce + 
Ca) formula) is not a matter of "stable" is good, and "instable" is not 
good.

What's more important is that the direction of dependencies should 
follow the direction of the increase of stability. (A package should 
only depend upon more stable packages).

And instable packages may be good, as long as they are not too abstract 
=> this is the concept of "distance" which is to me a more interesting 
metric to take into account.

But I agree with Siegfried when he writes "I would not put too much 
weight on the metrics of JDepend since it is simply bean counting ..."

Metrics are a guidance.
They can help improve the design during a refactoring.
My 0.02 EUR,
--
Laurent Petit
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Continuous Integration + multiproject:site generation

2005-04-06 Thread Laurent PETIT
Patrick Roumanoff wrote:
From what I understand, you only need to have one project in cruisecontrol
to trigger your multiproject goals.
just make sure the modificationset for the multiproject goal is an aggregation
of the modificationset for the subprojects.
my cruisecontrol maven line looks like that:

projectfile="/path/to/multiproject/project.xml"
mavenscript="/path/to/maven/bin/maven">

you need to specify maven.test.reportsDirectory so the test reports for all the subproject will fall
under and get analyzed/displayed by cruisecontrol.
 

Hello Patrick,
Thanks for the answer. It is indeed a good solution.
Just one think : in your goal above, you don't call the 
 goal, so I don't see how your dependent projects can 
refer to the last good versions of each other ?

Regards,
--
Laurent PETIT
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Continuous Integration + multiproject:site generation

2005-04-04 Thread Laurent PETIT
Hello,
I have multiple subprojects which are continuously integrated with 
CruiseControl.
I generate for each subproject the artifact, and install it.

I also use CruiseControl to generate the whole site, with 
multiproject:site goal

But as expected, all the artifacts are generated twice, one time per 
subproject CC monitoring, and one time when processing the 
multiproject:site via my master project CC monitoring.

Maybe I've skipped something, please could you tell me how you solve 
this waste of time/computer resource ?

Thanks in advance,
--
Laurent PETIT
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Multiproject and properties inheritence issue ?

2005-04-01 Thread Laurent Petit
Hello Jörg,
Well, fortunately this *is* a feature of Maven. All properties form the
master project are inherited in the subproject. This allows uniform
settings for all subprojects controlled in one file.
But - as you've detected - this creates some hassle for some plugins working
on the main project. You will have to set those properties dynamically
using Jelly, if you're running the main project. But be aware, that
anything from maven.xml is also inherited!
Well, I admit that this behaviour allows to share properties and goals, 
and that it could be a good think.

But isn't that the purpose of the  element in the project.xml of 
each subproject ?

Here is my projects structure :
prototype-dao
prototype-test
... other modules
prototype-webapp
prototype-common  ( used with  element by project.xml files of 
other modules to share common informations on developers list, default 
projects properties, current development version number, ...)
prototype-multiproject ( used only for piloting other projects's builds, 
and for aggregating the website of all subprojects, NOT to do some sort 
of properties inheritence ...)

And what about this use case :
In a subproject, I want to use default values for the properties 
recognized by a plugin goal. So I don't define those properties, just 
let them get their defaults from the plugin.

But since the multi-project is bicephal (it is a project on its own, and 
it serves the purpose of controlling other projects), it may have sete 
the property to its own use, and the result is that in the subproject, 
we don't have the default value from the plugin anymore.

I thought the mechanisms of inheritence via  was to avoid 
duplication in the maven files, but I didn't thought that inheritence 
was done from the multi-project project too.

--
Laurent 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Multiproject and properties inheritence issue ?

2005-04-01 Thread Laurent Petit
Hello,
I have a multiproject project which I want to use to run the goal 
cruisecontrol:configure over all my aggregated projects.

Since my multiproject project is also monitored by cruisecontrol, I have 
some properties of cruisecontrol set in its project.properties file.

And I discovered that those properties are taken into account when the 
cruisecontrol:configure goal is run on the subprojects.

For instance, I have set the maven.cruisecontrol.template in the 
multiproject, which points to a local cruisecontrol.jsl file in the 
multiproject project.
But this file does not exist in the subprojects directories.

The multiproject:goal fails, because the maven.cruisecontrol.template is 
inherited in subprojects from the multiproject project.

I don't think this would be the most desired behaviour, would it ?
Please tell me if you too think this is more an issue than a feature, 
or, if it is a feature, if I'm missing something important about the 
"philosophy" and "best practice" with the multiproject goal ?

Thanks in advance,
--
Laurent PETIT
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: howto start HSQLDB before test ?

2005-03-31 Thread Laurent Petit
Nicolas De Loof wrote:
I'd like to test my DAO using dbUnit. I've setup an in memory HSQLDB 
in the test setUp() and it works fine, but the DB is started and 
created before every test is run (I'm using fork=true, maybee it can 
explain ?).

I'd like to setup my build process to startup the HSQLDB as Server in 
a parallel process and apply the schema as a test pregoal, and stop it 
as a postGoal. Having this, setUp() should only connect to running DB.

Does anyone use such a build scenario and can share maven.xml ?
Nico.
Hello,
For now on our project, we start a separate maven shell with the 
following goal :
   
   Starting HSQLDB Server
   
   classpathref="maven.dependency.classpath"
   fork="true">
   
   
   
   
   
   HSQLDB Server Started
   

If does work, but has the same workaround you're trying to avoid : a 
manual "start" operation.

if you find something, please tell.
--
Laurent
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: junit tests factorisation

2005-03-16 Thread Laurent PETIT
Eric Pugh wrote:
I've had this challenge as well.  It seems wrong to have unit tests away
from the unit.  However, really you could think of those tests are
"functional" or "Technology Compatiblity Kit" type of tests.  
 

I do agree with you that testing with dbUnit crosses the line between 
real unit tests and integration tests.
But I think the issue of sharing base abstract test code has its virtues 
even in cases that do real unit tests, maybe in the pure domain areas ...

The DAO tests are focused (I'm guessing) mainly on verifing that the
DAO's for multiple implementations work the same with all providers.
And then, for whatever provider specific code you have, those are in
unit tests bundled in the provider project.  So, if you have a
prototype-tck project, then it doesn't look so bad!  
 

ok
Check out Fulcrum Security where I have multiple providers and I verify
they work regardless of provider:
http://jakarta.apache.org/turbine/fulcrum/fulcrum-security-api/xref/org/
apache/fulcrum/security/model/test/package-summary.html
I just tossed the tests into the security-api project which in
retrospect was icky, and I would have liked to have kept it totally
separate.  Individual projects just extend the abstract test classes to
provide the startup and shutdown.  Although, I think I like your
approach better, but I wanted an all java solution...
I indeed think that I will keep my first thought of haven a separate 
project for the tests, which could then be depended upon by the concrete 
implementations of my DAOs.

Thanks for the answer,
cu,
--
Laurent
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Using checkstyle, simian, clover ... with unit tests too

2005-03-16 Thread Laurent PETIT
Hello,
Since Unit Tests must be equally considered production code as 
application code, I would be happy if I could use some verification, 
metrics, javadoc plugins with the src/test java code too.

And the results should be separated from the src/java results.
Indeed, it would be great to have some metrics on the current health of 
the unit tests, where for example refactoring may be appropriate, code 
conventions apply, ...

Do you know :
- if this is a feature that is in the roadmap ?
- what the workarounds are to do it the "ugly way" for now on ? ;-)
Thanks in advance,
--
Laurent Petit
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


junit tests factorisation

2005-03-14 Thread Laurent PETIT
Hello there,
I'm trying to split a monobloc demo application I'm writing into 
smaller, more usable building blocs.

The current application - assume its name is Prototype - consists of :
- a Service layer
- definitions of DAO interfaces
- 3 different implementations of the DAO interfaces impl.jdbc, 
impl.ibatis, impl.speedo
- a set of unit tests (in src/test) for the service layer
- a set of unit tests (in src/test, really speaking dbUnit tests) for 
the DAO layer
- for the moment, a conf file in src/conf allows the DAO tests to be 
passed on one of the 3 concrete implementations : jdbc, ibatis or speedo.

What I want to do is have separate maven projects for service, DAO specs 
(interfaces), DAO impls :

prototype
prototype-dao
prototype-dao-jdbc
prototype-dao-ibatis
prototype-dao-speedo
At the same time, I don't want to duplicate the unit tests for the DAO 
layer.

I would have been happy if I could have kept the DAO unit tests with the 
DAO specs (interfaces) maven project.
But as I don't want the tests to be jarred with the DAO, and as I think 
if I put the tests in the src/test directory, I can't make other project 
benefit from it,
the only way I have to mutualize the tests is to create a dao-tests 
maven project :

prototype-dao-tests
What I don't like here is that I have to expose the tests at a high 
level, just to solve some factorisation problem

Is this the "best practice" to do it, or do I miss the point somewhere ?
Do you know a better way to solve this *common* (I guess) problem with 
project management ?

Thanks in advance for your suggestions,
Regards,
--
Laurent Petit
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: maven-cruisecontrol-plugin maven.scm.svn.module question

2005-03-02 Thread Laurent Petit
Hello,
as for the trunk, we have decided to have a global directory structure 
like this (because it is a very oriented repository) :
/repos/trunk/proj1
/repos/trunk/proj2
...
/repos/tags/proj1-Vxx
/repos/tags/proj1-Vyy
/repos/tags/proj2-Vzz
...
/repos/branches

As of the URL format you gave me : 
scm:svn:http://server/svn/repos:trunk/projectname

it works like a charm, so thank you very much ! :-)
Regards,
--
Laurent

Brett Porter wrote:
Are you sure you have the trunk in the right place? Usually it would
be /projectname/trunk.
Anyway, using this URL will probably work for now:
scm:svn:http://server/svn/repos:trunk/projectname
On Wed, 02 Mar 2005 12:01:39 +0100, Laurent Petit <[EMAIL PROTECTED]> wrote:
OK, that's what I was afraid of.
Is there a known work-around which could :
- still let the scm plugin work (the 1.5-beta-3)
- make the CC plugin work
together ?
I've tried some combinations of commenting out some portions of
project.xml concerning the repository + adding the "deprecated" values
in project.properties for maven.scm.method, maven.scm.svn.root and
maven.scm.svn.module but I'm not sure about what I've done and if it's
stable enough.
Thanks in advance,
--
Laurent
Brett Porter wrote:
Yes, this is an outstanding bug, already known. Thanks!
On Wed, 02 Mar 2005 11:34:38 +0100, Laurent Petit <[EMAIL PROTECTED]> wrote:

Hello,
In my attempts to understand how to work with the cruisecontrol plugin
for maven, I'm faced with a weird problem. (I'm using maven 1.0.2 + cc
plugin snapshot + maven scm 1.5-beta-3)
If I don't define a property called maven.scm.svn.module then the
cruisecontrol:configure goal crashes.
But if I set this property to, for example, the value of my project's
name, what happens is that the generated configure.xml file contains the
following line :
http://server/svn/repos/trunk/projectname/projectname";
since I have the following repository declaration in my project.xml :
 
scm:svn:http://server/svn/repos/trunk/projectname
 
projectname is repeated 2 times in the CC config file.
I don't see the reason of this maven.scm.svn.module.
Maybe it's a remaining bug in the snapshot, so I wanted to report it to you.
Or maybe I'm doing something wrong, so please let me know.
Regards,
--
Laurent Petit
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: maven-cruisecontrol-plugin maven.scm.svn.module question

2005-03-02 Thread Laurent Petit
OK, that's what I was afraid of.
Is there a known work-around which could :
- still let the scm plugin work (the 1.5-beta-3)
- make the CC plugin work
together ?
I've tried some combinations of commenting out some portions of 
project.xml concerning the repository + adding the "deprecated" values 
in project.properties for maven.scm.method, maven.scm.svn.root and
maven.scm.svn.module but I'm not sure about what I've done and if it's 
stable enough.

Thanks in advance,
--
Laurent
Brett Porter wrote:
Yes, this is an outstanding bug, already known. Thanks!
On Wed, 02 Mar 2005 11:34:38 +0100, Laurent Petit <[EMAIL PROTECTED]> wrote:
Hello,
In my attempts to understand how to work with the cruisecontrol plugin
for maven, I'm faced with a weird problem. (I'm using maven 1.0.2 + cc
plugin snapshot + maven scm 1.5-beta-3)
If I don't define a property called maven.scm.svn.module then the
cruisecontrol:configure goal crashes.
But if I set this property to, for example, the value of my project's
name, what happens is that the generated configure.xml file contains the
 following line :
http://server/svn/repos/trunk/projectname/projectname";
since I have the following repository declaration in my project.xml :
  
scm:svn:http://server/svn/repos/trunk/projectname
  
projectname is repeated 2 times in the CC config file.
I don't see the reason of this maven.scm.svn.module.
Maybe it's a remaining bug in the snapshot, so I wanted to report it to you.
Or maybe I'm doing something wrong, so please let me know.
Regards,
--
Laurent Petit
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


maven-cruisecontrol-plugin maven.scm.svn.module question

2005-03-02 Thread Laurent Petit
Hello,
In my attempts to understand how to work with the cruisecontrol plugin 
for maven, I'm faced with a weird problem. (I'm using maven 1.0.2 + cc 
plugin snapshot + maven scm 1.5-beta-3)

If I don't define a property called maven.scm.svn.module then the 
cruisecontrol:configure goal crashes.

But if I set this property to, for example, the value of my project's 
name, what happens is that the generated configure.xml file contains the 
 following line :
http://server/svn/repos/trunk/projectname/projectname";

since I have the following repository declaration in my project.xml :
  
scm:svn:http://server/svn/repos/trunk/projectname
  
projectname is repeated 2 times in the CC config file.
I don't see the reason of this maven.scm.svn.module.
Maybe it's a remaining bug in the snapshot, so I wanted to report it to you.
Or maybe I'm doing something wrong, so please let me know.

Regards,
--
Laurent Petit
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: multiple vesions of a plugin

2005-01-31 Thread Laurent Petit
Hi,
Chris Berry wrote:
> Greetings,
> Is it possible for multiple versions of the same
> plugin to exist simultaneously in a cache?? If so, how
> does one specify explicitly which plugin to use??
>
> Imagine the following: You are working on several
> projects simultaneously, all on their own lifecycles.
> Project A is "code frozen" and is using verion 1.1 of
> your plugin. Project B is more fresh and needs 1.3.
> And you need to be able to switch back and forth
> seamlessly.
>
> Another scenario; You have a project and you must
> simultaneously support the release in Production
> (using 1.1 of your plugin) and also the ongoing
> develeopment which is using version 1.3...
This question has already been addressed (by me :-) 10 days ago.
You can find it in the archives if you search for the subject :
"Configuration Management with maven"
Here is the answer of Eric Pugh to my message :
"
You are actually hitting on a relatively common issue.  Maven 1.x
doesn't support multiple versions of plugins for example.  Future
versions will.  So, once you start requiring specific versions, versus
the latest and greatest always for all projects, then you can really
have a lot of problems.
However!  Maven can easily be bundled up and run by pointing MAVEN_HOME
to the correct version for your project.  So, if you have Maven A for
Project A, and Maven B for Project B, then just make sure your
MAVEN_HOME is pointing correctly, and just check Maven A and B into CVS
with your project!
Alternatively, and possibly better, is to use Continous Integration and
nightly builds to verify that everything still builds, even when you
haven't touched it in a while!  That way as your Maven environment
evolves, you know it still works with both old dormant code and new
active code.
Eric Pugh
"
Regards,
--
Laurent Petit
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Configuration Management with maven

2005-01-20 Thread Laurent Petit
Hello,
I'm searching the currently best available solution for this kind of 
problem, concerning Configuration Management and maven.

In my company, we aim to manage correctly the whole configuration of our 
projects, including the tools we are using.

Is is especially important with tools which are still changing quickly.
Imagine I start a project now.
I want to reference the exact version of my development environment : 
jdk version, tomcat version, maven & maven plugins version.

So I write a document referencing all those versions.
The goal of this document is to be able, if we have to re work on the 
project in a few months, to reinstall the development environment as 
quickly and accurately as possible (since I don't want to begin my 
re-work on the project to make my old maven scripts work with the maven 
1.x.y last stable release, with potentially deprecated goals names, ...).

I then am looking for a solution to automate the environment 
re-installation by some way.

I thought of writing some custom goal in maven.xml, which could call the 
maven goal as many times as needed to upload the good versions of the 
plugins.

But I think it would propagate such modifications out of my projects 
"area", since I think the plugin versions are installed for a given 
maven instance.

So to my question : do you think there is a way to still have one maven 
instance and different plugin versions for different projects, or will I 
 have to deal with as much maven instances as different projects 
configurations ?

Not sure my question is very clear, but if you had the courage to read 
it, please feel free to answer :-)

Thanks in advance,
--
Laurent Petit
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: hsql DB startup

2005-01-06 Thread Laurent Petit
Jake Ewerdt wrote:
On Thursday 06 January 2005 02:28 am, Janos Mucsi wrote:
 

This is not a strictly Maven question.
Hi Jake
This sounds very interesting. I have two questions:
1. Is testing against an in-process database a better
idea than using mock-objects to fake Connection,
ResultSet, etc? (I need to test some hand-coded JDBC
DAOs which I will redevelop later with Hibernate, but
I can not throw them away just yet.)
   

For unit testing, I think it is best to use mock objects to mock the layer 
below the code you're testing.  Mocking JDBC objects like Connection and 
ResultSet can be a lot of work, but it is well worth it because you can force 
exceptional behavior that is very difficult or impossible to reliably create in 
a testing environment with a real database.
For functional tests that are testing functionality with the database, then I 
use a real database.
 

Hello,
Since this seems indeed theoratically correct to me, I think that if you 
plan to test a lot of DAOs producing SQL, you will endlessly need to 
adapt your tests to the correct SQL produced by the DAO, since you have 
no way to enforce hibernate, for example, to produce SQL selects 
following your coding conventions ...

Using dbUnit and testing against some HSQL database instance for unit 
testing the DAOs makes more sense to me.

But it definitely does not imply that you don't have to mock 
connections, especially if you want to test the treatment of some basic 
SQLExceptions by your DAO.

My 0.02 euros,
--
Laurent
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Maven vs Eclipse build

2004-12-23 Thread Laurent PETIT
With maven, it seems to me easier to manage platform dependent code, such as
replacing "on the fly" tokens for your platform in some files, or entire
resources directories.

Example : My maven directory layout includes src/conf/all, src/conf/dev,
src/conf/preprod, src/conf/prod, src/conf/test as resources directories.

In my project.xml, I declare as resource directories :
${basedir}/src/conf/all, and ${basedir}/src/conf/${currentResourcesChoice}
pointing to the good directory.

In my build.xml, I set the current target platform for compilation :
currentResourcesChoice=dev  (for example).


Another interesting thing is for unit testing : you generally need to
include different resources for the unit tests (ie from the src/conf/test
directory).
But in Eclipse you can not easily exclude the src/conf/dev resource
directory, replacing it with src/conf/test.
You have to go to the project properties and change the java source
directories  not very pratical !

With maven, you just open a "maven console" in a dos shell, type in
test:test once for the entire day, and "alt+tab" + "Enter" the other times,
not so bad for a more supple project management process.

My 0.02 euros,

-- 
Laurent

-Message d'origine-
De : Milos Kleint [mailto:[EMAIL PROTECTED]
Envoyé : jeudi 23 décembre 2004 10:12
À : Maven Users List; dan tran
Objet : Re: Maven vs Eclipse build


advantages, in no particular order
1. generating the web site with all the reports and docs  
2. automated builds - nightly, after every commit (not sure if that
can be achieved with eclipse build but assume not)
3. no eclipse lock-in, can use other IDEs as well (netbeans,
jbuilder)..maybe not relevant to you
4. variety of maven plugins for different technologies, no need to
install the relevant plugin to eclipse in order to build. (not sure
about this one - I always base my builds on ant or maven)

Regards

Milos Kleint

On Wed, 22 Dec 2004 19:33:30 -0800, dan tran <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> I am trying to convince our team to use maven for  a new application
> using eclipse.
> 
> Can someone give me some advices what advantages and disadvantages
> maven together with maven-eclipse-plugin and mevenide and
> maven-eclipse-plugin-plugin has over the eclipse build.
> 
> advices are greatly appreciated.
> 
> -Dan
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: maven as a tool to launch hsqldb server ?

2004-12-21 Thread Laurent PETIT
Hello,

Here is a working version of the problem (note the addition of the
fork="true" attribute, which was necessary for me to make it work).


  

Starting HSQLDB Server



 


HSQLDB Server Started

  

Starting HSQLDB Database Manager

HSQLDB Server Started

  


It could be interesting to have a hsqldb plugin, since hsqldb is a full java
rdbms ?
What about it ?

Do you know if there is an effort already made in this direction, even if
not yet in a "publishable" state ?



-Message d'origine-
De : Laurent PETIT [mailto:[EMAIL PROTECTED]
Envoyé : lundi 20 décembre 2004 17:37
À : 'Maven Users List'
Objet : RE: maven as a tool to launch hsqldb server ?


Thanks a lot Pascal, 

This solution looks good for me (of course I'll clean up and put some
variables from build.properties file, but the main idea of using an ant task
deserves interest).

cu,

-- 
Laurent

-Message d'origine-
De : Pascal Thivent [mailto:[EMAIL PROTECTED]
Envoyé : lundi 20 décembre 2004 17:01
À : Maven Users List
Objet : Re: maven as a tool to launch hsqldb server ?


Hi,

On Mon, 20 Dec 2004 13:16:14 -0200, Felipe Leme <[EMAIL PROTECTED]> wrote:
> On Mon, 2004-12-20 at 12:46, Laurent PETIT wrote:
> 
> > is there a way to start some main() method of a class via a maven xxx
call ?

It should be easy to call the org.hsqldb.Server from maven using the
ant  task. Something like that in your maven.xml :


Starting HSQLDB




HSQLDB Started


This is a starting point and is absolutly not finished. Nothing is
dynamic, location of database file need to be customized...

> 
> Take a look on the test cases for the hibernate plugin, they use hsqldb
> (and hence start the server).

I may be wrong but I think they are executing HSQLDB in "In-Process
(Standalone) Mode".

> 
> I was thinking about writing an hsqdlb plugin some time ago, but haven't
> had the time to play with it though...
> 
> -- Felipe
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
Pascal

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: maven as a tool to launch hsqldb server ?

2004-12-20 Thread Laurent PETIT
Thanks a lot Pascal, 

This solution looks good for me (of course I'll clean up and put some
variables from build.properties file, but the main idea of using an ant task
deserves interest).

cu,

-- 
Laurent

-Message d'origine-
De : Pascal Thivent [mailto:[EMAIL PROTECTED]
Envoyé : lundi 20 décembre 2004 17:01
À : Maven Users List
Objet : Re: maven as a tool to launch hsqldb server ?


Hi,

On Mon, 20 Dec 2004 13:16:14 -0200, Felipe Leme <[EMAIL PROTECTED]> wrote:
> On Mon, 2004-12-20 at 12:46, Laurent PETIT wrote:
> 
> > is there a way to start some main() method of a class via a maven xxx
call ?

It should be easy to call the org.hsqldb.Server from maven using the
ant  task. Something like that in your maven.xml :


Starting HSQLDB




HSQLDB Started


This is a starting point and is absolutly not finished. Nothing is
dynamic, location of database file need to be customized...

> 
> Take a look on the test cases for the hibernate plugin, they use hsqldb
> (and hence start the server).

I may be wrong but I think they are executing HSQLDB in "In-Process
(Standalone) Mode".

> 
> I was thinking about writing an hsqdlb plugin some time ago, but haven't
> had the time to play with it though...
> 
> -- Felipe
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
Pascal

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: maven as a tool to launch hsqldb server ?

2004-12-20 Thread Laurent PETIT
Hello,

and thanks for the first answers I received, but I think I must precise my
need.

My question is more about "is it possible, with maven out of the box, to
launch some java program which is part of the dependencies of my project".

I have searched through the site, documentations, ... for a goal named as
"run" for example, which could be used like that : 

maven run -Dmaven.run.MainClass=org.hsqldb.Server 

and some way to pass in the command line args for the launch ...


Is there something built in in maven to do that ?
Some plugin I don't know for the moment, which allows to do that ?

Is there some way to alternatively do that, maybe using a custom goal in
maven.xml ?



-Message d'origine-
De : Felipe Leme [mailto:[EMAIL PROTECTED]
Envoyé : lundi 20 décembre 2004 16:16
À : Maven Users List
Objet : Re: maven as a tool to launch hsqldb server ?


On Mon, 2004-12-20 at 12:46, Laurent PETIT wrote:

> is there a way to start some main() method of a class via a maven xxx call
?

Take a look on the test cases for the hibernate plugin, they use hsqldb
(and hence start the server).

I was thinking about writing an hsqdlb plugin some time ago, but haven't
had the time to play with it though...

-- Felipe



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



maven as a tool to launch hsqldb server ?

2004-12-20 Thread Laurent PETIT
Hello,

I want to provide a simple & easy way for developers to launch hsqldb server
as a standalone server (or any other command line tool such as MiddleGen
).

We use maven, and for the project, maven has all the dependencies needed
(right jars on the dependencies ...)

My question is : 

is there a way to start some main() method of a class via a maven xxx call ?

Thanks in advance,

-- 
Laurent PETIT

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Subversion Questions

2004-09-16 Thread Laurent PETIT
Hi Adam,

OK for the connection url syntax, but, as Tim did previously, I'm also
interested in the subversion support, concerning especially the SCM plugin.

For now, there seems to be no subversion specific set of properties.

Do you know if there is a task in progress concerning the subversion support
for this plugin ?

Or if this plugin already works for subversion, are there any tips to know ?

Thanks in advance,

--
Laurent

- Original Message -
From: "Adam Fisk" <[EMAIL PROTECTED]>
To: "Maven Users List" <[EMAIL PROTECTED]>
Sent: Thursday, September 16, 2004 3:31 AM
Subject: Re: Subversion Questions


> I'm using Subversion no problem with the following syntax in my
project.xml:
>
> 
>
scm|svn|https|//my-site.org/my-project-path
> 
>
> -Adam
>
>
> Tim Reilly wrote:
>
> >I'm wondering the current status (maven 1.0) of subversion support;
> >both for scm and changelog plugins?
> >
> >Looking at the archives the last posts I found were in 2003 - stating
> >no support for scm, but that changelog was working with some caveats.
> >Anything new here?
> >
> >Thanks,
> >-TR
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: GMail Accounts

2004-06-24 Thread Laurent PETIT
sorry for the previous list pollution with a private conversation.

anyway, I'm interested in the GMail account :

Laurent PETIT
current mail : [EMAIL PROTECTED]

thx in advance, 

-- 
laurent

-Message d'origine-
De : Laurent PETIT [mailto:[EMAIL PROTECTED]
Envoyé : jeudi 24 juin 2004 11:08
À : 'Maven Users List'
Objet : RE: GMail Accounts


yo man,

c'est quoi cette histoire de GMail ??


-Message d'origine-
De : Pascal Thivent [mailto:[EMAIL PROTECTED]
Envoyé : jeudi 24 juin 2004 10:16
À : Maven Users List
Objet : Re: GMail Accounts


Hi,

Pascal Thivent

Thx in advance.

-- 
Pascal

Quoting Dion Gillard <[EMAIL PROTECTED]>:

> If anyone is after one, pop me an email with your first and last names...
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: GMail Accounts

2004-06-24 Thread Laurent PETIT
yo man,

c'est quoi cette histoire de GMail ??


-Message d'origine-
De : Pascal Thivent [mailto:[EMAIL PROTECTED]
Envoyé : jeudi 24 juin 2004 10:16
À : Maven Users List
Objet : Re: GMail Accounts


Hi,

Pascal Thivent

Thx in advance.

-- 
Pascal

Quoting Dion Gillard <[EMAIL PROTECTED]>:

> If anyone is after one, pop me an email with your first and last names...
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Deploy a webap to multiple environments (test, pre-prod, prod)

2004-06-10 Thread Laurent PETIT
Very good pointers, thanks a lot !

- Original Message - 
From: "Tim Shadel" <[EMAIL PROTECTED]>
To: "Maven Users List" <[EMAIL PROTECTED]>
Sent: Thursday, June 10, 2004 8:21 PM
Subject: Re: Deploy a webap to multiple environments (test, pre-prod, prod)


> Have you looked through Vincent Massol's slides here?
>
> http://www.pivolis.com/pdf/Enterprise_Builds_V1.0.pdf
>
> http://www.pivolis.com/pdf/J2EE_projects_Maven_V1.1.pdf
>
> http://www.pivolis.com/pdf/Distributed_Agile_V1.0.pdf
>
> --Tim
>
> Laurent PETIT wrote:
>
> >Hello,
> >
> >I recently read a thread about this subject, but was not entirely
convinced
> >by the answer.
> >
> >I think this is a very common problem : you develop a webapp, and you
have
> >to deploy it on multiple configurations : generally one for each
> >test-process environment : internal ( integration server ), in
> >pre-production on the client network, and eventually in production on the
> >client network.
> >
> >It is common that you then have to setup different levels for logs,
> >different database schema names, different pathnames, ... generally in
some
> >well identified properties files.
> >
> >I saw an answer to this problem, which was to setup multiple anemic maven
> >projects which will hold the properties differences.
> >
> >
> >I'm not sure this is a "recommended best practice" for the problem ?
> >
> >What do you folks think about it ?
> >
> >What do you do in your own projects ? (even if it is not as "a beautiful
> >solution" as it should be, what does *work* for you ?)
> >
> >Thanks in advance,
> >
> >
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: SCM Plugin and subversion

2004-06-10 Thread Laurent PETIT
OK, I'll check the CVS for the modifications since the last release.

My personal goal is to automate the release build too, following by default
the standard repository directory layout for the subversion projects :
  project
  trunk
  tags
  branches

 I'm not sure I'll have sufficient time to do it, but now I know who to
contact if I'm able to contribute.

Regards,

-- 
Laurent

-Message d'origine-
De : Eric Pugh [mailto:[EMAIL PROTECTED]
Envoyé : jeudi 10 juin 2004 09:24
À : Maven Users List; Laurent PETIT
Objet : RE: SCM Plugin and subversion


At any rate, I started tweaking the plugin to handle SVN.  My needs at this
point are pretty limited, I just wanted to get the CruiseControl plugin to
work with the scm plugin and SVN.   So, download the latest from CVS and
take a looksee!  Any patches would be much appreciated, it should be a
relatively straightforward process.   I'm hoping to eventually get the
release goal to work with SVN.

Eric

> -----Original Message-
> From: Laurent PETIT [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 10, 2004 7:57 AM
> To: Maven Users List
> Subject: Re: SCM Plugin and subversion
>
>
> From: "Brett Porter" <[EMAIL PROTECTED]>
> > There's been a lot of discussion about this recently. You might want to
> choose a
> > different archive search tool :)
>
> I'm open to your proposals :-)
> Indeed, I only used the one referenced on the maven site, with an entire
> search on the archives, with the words "svn" or "subversion" on
> the body of
> messages ! ...
>
> But maybe those archives didn't include the most recent posts on the lists
>  ?
>
> > Someone is looking to improve the current scm plugin for Maven 1.x,
> meanwhile a
> > whole new version will turn up in the next couple of months
> that has much
> better
> > support for several SCM providers.
>
> I'm starting a new project and must deliver, within hours, a configuration
> document, so I wonder what attitude I should adopt.
>
> I think that for the moment, I will just describe a manual approach which
> consists of firts manually checking out the good tagged version, and then
> run war goal on that.
>
> See u,
>
> --
> Laurent
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: multiple distributions with filtered properties

2004-06-10 Thread Laurent PETIT
-Message d'origine-
De : Eric Pugh [mailto:[EMAIL PROTECTED]

>Depending on how complex your "multiple distributions" are, you may
discover
>yourself starting to do more Maven scripting to solve these issues..
>Because maven can embed ant tasks, you can use the various filter/replace
>tasks to change the context parameters at build time.   So you can run a
>filter to edit the hibernate config files.


Yes, I certainly will end up doing so.


>You may also instead just decide to document all the things that need to
>change, and do it by hand everytime you move to a new environment..  While
>icky, it may be the simplest solution...

This solution is what we are generally doing today.
It doesn't appear very appealing to me do to it that way, except if thinks
can't obviously be scripted.

Scripts are very time and error savings on the long time !

Thanks for your answer,

cu,

-- 
Laurent

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: multiple distributions with filtered properties

2004-06-09 Thread Laurent PETIT
- Original Message - 
From: "Brett Porter" <[EMAIL PROTECTED]>
>[...]

> Did I mention that I strongly recommend sourcing the configuration from
outside
> of the distribution? :)

Re-hello, Brett !


Could you please explain what "sourcing the configuration from outside of
the distribution" means for you ?

What kind of concrete solution do you apply ?

- Different maven projects holding the server configuration scripts ?

- a projects configuration document intended for the admins of the servers,
and assuming that they are responsible to finish the parameterization of the
web application ?

- ... ?

Thanks in advance,

-- 
Laurent


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Deploy a webap to multiple environments (test, pre-prod, prod)

2004-06-09 Thread Laurent PETIT
Brett, thanks for the answer.
Tough, I think I should expain myself better ... see below

- Original Message - 
From: "Brett Porter" <[EMAIL PROTECTED]>
> I ensure all differences are externalised from the WAR file. For the
appservers
> we use (resin, tomcat), anything in web.xml can be put outside the webapp
and
> added to it ( definition in server.xml,  configuration goes into JNDI environment entries, context-params,
resources, etc.

Alas, my own personal little experience tells me that there will be, at some
point some practical reason (as there always seems to be in projects, since
nobody's perfect, or some reason forces us to do so) which forces us to have
to build several different WAR files for the different platforms.

> For situations where you need to have whole different versions of config
files,
> the webapp bundles a stage and live version (for dev we copy in whatever
suits
> as part of the build - as long as the deployed version = live). An example
is
> log4j-quiet.xml and log4j-verbose.xml. A context-param is then set to say
which
> one to select.

May I insist to say that I doubt (but maybe shouldn't I?) that this scenario
is always possible ?
For example, if you use Hibernate, you can end up having 40 mapping files,
with, in each file, an attribute of the  element set to
schema="DEV_SCHEMA".
( for information, this is necessary with Hibernate since if you're using
sequence based id generators, the global schema value is not inherited. I
know this is a bug, but I will not stop using hibernate for that reason).

It seems very awkward to maintain 40 x Number of configurations files, and
let a context param parameterize the whole think by the means of a custom
hibernate mappings loadings class (and if you're using an intermediary
framework to load the hibernate mappings for you, it then becomes quite
impossible to achieve).

This is just ony one of those scenarios where I see that the solution you
provided above does not fill well.

So, I don't think the problem can not be solved by "arrange yourself not to
be in such a situation", alas.

So I repeat my question : if you have to build several different wars for
the same maven project (for some reason of another), what are the techniques
you use that work for you ?

Or maybe I am the very only person which has ever faced this situation ?

> (If you are actually using log4j, I recommend the log4j sandbox stuff for
web
> applications).

I know this is OT, but what in the log4j sandbox is so great that you
recommend me to use a non released of the product ?

Please don't feel aggressed by my tone, if so, this is not my intention.
I'm just willing to clearly understand the problem.

-- 
Laurent


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: SCM Plugin and subversion

2004-06-09 Thread Laurent PETIT
From: "Brett Porter" <[EMAIL PROTECTED]>
> There's been a lot of discussion about this recently. You might want to
choose a
> different archive search tool :)

I'm open to your proposals :-)
Indeed, I only used the one referenced on the maven site, with an entire
search on the archives, with the words "svn" or "subversion" on the body of
messages ! ...

But maybe those archives didn't include the most recent posts on the lists
 ?

> Someone is looking to improve the current scm plugin for Maven 1.x,
meanwhile a
> whole new version will turn up in the next couple of months that has much
better
> support for several SCM providers.

I'm starting a new project and must deliver, within hours, a configuration
document, so I wonder what attitude I should adopt.

I think that for the moment, I will just describe a manual approach which
consists of firts manually checking out the good tagged version, and then
run war goal on that.

See u,

-- 
Laurent




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Deploy a webap to multiple environments (test, pre-prod, prod)

2004-06-09 Thread Laurent PETIT
Hello,

I recently read a thread about this subject, but was not entirely convinced
by the answer.

I think this is a very common problem : you develop a webapp, and you have
to deploy it on multiple configurations : generally one for each
test-process environment : internal ( integration server ), in
pre-production on the client network, and eventually in production on the
client network.

It is common that you then have to setup different levels for logs,
different database schema names, different pathnames, ... generally in some
well identified properties files.

I saw an answer to this problem, which was to setup multiple anemic maven
projects which will hold the properties differences.


I'm not sure this is a "recommended best practice" for the problem ?

What do you folks think about it ?

What do you do in your own projects ? (even if it is not as "a beautiful
solution" as it should be, what does *work* for you ?)

Thanks in advance,

-- 
Laurent PETIT


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



SCM Plugin and subversion

2004-06-09 Thread Laurent PETIT
Hello,

I've searched the archives (users and dev) for some activity on subversion,
but there is quite nothing to find : maybe 4 to 5 messages during the past
year !

Now that svn has reach the 1.0 milestone, I think there may be some more
interest in extending the SCM plugin to work with svn.

And I think that I am certainly not the only person to think so.

Has anybody worked on the subject ?

Do you know about some patch, even in a draft state, to extend the SCM
plugin ?

Thanks for any answer or beginning of answer to this post,

Regards,

-- 
Laurent


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]