Re: Mirror of Central in France

2010-10-21 Thread Samuel Le Berrigaud
Nice. Thanks!

On Wed, Oct 20, 2010 at 17:29, Samuel Langlois
samuel.langl...@antelink.com wrote:
 Hello,

 At Antelink, we love Maven, and we thank the Maven people every day for
 maintaining the Central repository!
 So we thought we could give back a little to the community.
 We just set up a mirror of the Central, based in France, so that European
 Maven users enjoy a better bandwidth.

 We did more than that : we installed a Sonatype Nexus repository manager, in
 order to perform some searches, browse easily, etc.
 It is plugged directly to the Central, so any requested artifact which is
 not there yet is downloaded on-the-fly, and stored for subsequent uses.

 Sonatype announced today that they set up a mirror of the Central in UK.
 All this is aimed at the same goal: having a better Maven experience, and
 keeping Central healthy.

 You can reach the interface of the repository manager here :
 http://maven.antelink.com/
 To make Maven use it, point your own repository manager to it, or add this
 to your ~/.m2/settings.xml file :

 settings
 mirrors
 mirror
 idantelink.com/id
 nameAntelink Mirror/name
 urlhttp://maven.antelink.com/content/groups/public//url
 mirrorOfcentral/mirrorOf
 /mirror
 /mirrors
 /settings


 Enjoy !
 --
 Samuel Langlois - Antelink
 http://www.antelink.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: Creating and deploying two classified WAR files at once

2010-08-30 Thread Samuel Le Berrigaud
Hey Mike,

I would create a module for each war (and probably one for the war
with no context.xml) and then make use of the overlays as described
here: http://maven.apache.org/plugins/maven-war-plugin/overlays.html

With this a war can depend on another war and you can overwrite / add
/ remove things at will. Adding the context.xml should be really easy.

HTH,
SaM

On Mon, Aug 30, 2010 at 09:34,  sg...@gmx.net wrote:
 Hi folks,

 I am facing a config problem with deploying two classified WAR files at once. 
 My setup is this, I have a WAR project which is developed and tested locally 
 with Tomcat and Eclipse. Deploying this WAR file to host1 and host2 requires 
 a different context.xml. So I tried to solve this with a profile with copies 
 a different context.xml with filtering for the hostname. Invoke would be like 
 this:
 mvn package -Pdeployment -Dhostname=host1

 Package is created. I rerun the same process a second time for host2. Now the 
 real problem arises when I do a release:perform to Nexus. I cannot produce 
 two files at the same time during this process. Of course only one file is 
 deployed. A second deployment does not work because Nexus blocks. I have to 
 manually upload the second war file.

 Is there any remedy to this? I want to avoid tampering with the assembly 
 plugin since this would be just tedious work which the WAR plugin already 
 does perfectly.

 Thanks,

 Mike
 --
 Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
 Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail

 -
 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



Maven dependency tracker…

2010-01-26 Thread Samuel Le Berrigaud
I wrote this little plugin at work. Some of you might be interested so
here you go: http://sam.leberrigaud.org/2010/01/maven-dependency-heaven.html

I could summarise what the plugin does by Know your dependencies at all time

SaM

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



Re: Invoking a plugin from within another plugin

2009-10-07 Thread Samuel Le Berrigaud
Hey Allan,

you might want to check out the Mojo Executor:
http://code.google.com/p/mojo-executor/

SaM

On Wed, Oct 7, 2009 at 8:01 AM, Allan Ditzel allan.dit...@gmail.com wrote:
 Hi all,

 What is the best accepted way for one plugin to invoke another? I can
 obviously do it out of process from the first plugin and do an exec, but I
 was wondering if there was a way to invoke another plugin in process.

 Thanks,

 Allan


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



Re: Will MSOURCES-25 be implemented?

2009-06-11 Thread Samuel Le Berrigaud
Hi Rice,

I don't know whether this is going to be implemented or not. But if
you need to add sources directory to your maven builds in the mean
time you might want to check the Build Helper Maven Plugin:
http://mojo.codehaus.org/build-helper-maven-plugin

SaM

On Thu, Jun 11, 2009 at 7:38 PM, Rice Yehrice...@gmail.com wrote:
 Hi,
  I have the same feature need as
 *MSOURCES-25http://jira.codehaus.org/browse/MSOURCES-25.
 Will it be implemented?

 Rice
 *


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



Re: itblast plugin is starting JBoss again but this is already running

2009-04-12 Thread Samuel Le Berrigaud
Hi Nafter,

the itblast plugin uses cargo behind the scene to start your war and
then uses the surefire plugin to run your tests. You don't need to
declare a separate instance of cargo in your pom.

It looks like however that you are using an already running instance
of cargo to deploy/undeploy your war to. The it blast doesn't support
this kind of configuration. It will actually download each container
you specify, install and start them locally deploying your webapp.

Hope this make sense.

SaM

On Sun, Apr 12, 2009 at 8:13 PM, Nafter hdo...@allshare.nl wrote:

 I use cargo to undeploy and to deploy my WAR to JBoss 4.2.3. This is working
 ok.
 Now I want to use the itblast plugin to start my integration tests on the
 same JBoss instance.
 This JBoss instance is already running with the lastest WAR because of the
 cargo deploy execution which has been executed during the
 pre-integration-test phase.

 However when itblast executes it tries to start JBoss again  instead of
 pointing to the already running instance of JBoss. I did instruct the
 itblast plugin about the correct httpport and rmiport to use.

 Can somebody please help me out?

 Here is a snippet of my pom:
 profile
        iddeploy_war2/id
      activation
        property
          namedeploy2/name
        /property
      /activation
        build
                plugins
                plugin
                        groupIdorg.codehaus.cargo/groupId
                        artifactIdcargo-maven2-plugin/artifactId
                        version1.0-beta-2/version
                        configuration

                          !-- Container configuration --
                          container
                                containerIdjboss42x/containerId
                                
 homec:/_composer/_composer5/jboss-4.2.3.GA_Composer/home
                          /container

                          !-- Configuration to use with the container --
                          configuration
                                typestandalone/type

 homec:/_composer/_composer5/jboss-4.2.3.GA_Composer/server/default/home
                                properties
                                        cargo.rmi.port18080/cargo.rmi.port
                                /properties
                          /configuration

                                !-- Deployer configuration --
                                deployer
                                        deployables
                                          deployable
                                                
 groupId${pview.group}/groupId
                                                artifactIdPV_Web/artifactId
                                                typewar/type

 pingURLhttp://localhost:18080/PV_Web-${pview.version}/composer/login.jsp/pingURL
                                                
 pingTimeout10/pingTimeout
                                          /deployable
                                        /deployables
                                /deployer
                        /configuration
                        executions
              execution
                iddeploy_to_jboss/id
                phasepre-integration-test/phase
                goals
                                        goalundeploy/goal
                                        goaldeploy/goal
                /goals
              /execution
                          /executions
                        /plugin
                        plugin
                groupIdorg.twdata.maven/groupId
                artifactIdmaven-itblast-plugin/artifactId
                version0.5/version
                executions
                    execution
                        phaseintegration-test/phase
                        goals
                            goalexecute/goal
                        /goals
                        configuration
                            containersjboss42x/containers
                                                        
 httpPort18080/httpPort
                                                        
 rmiPort11098/rmiPort

 functionalTestPattern**/TestDateUtility.java/functionalTestPattern
                                                        includes
                                                                
 include**/TestDateUtility.java/include
                                                        /includes
                        /configuration
                    /execution
                /executions
            /plugin
                /plugins
        /build
  /profile



 Here is a snippet of my output:
 [INFO] [cargo:undeploy {execution: deploy_to_jboss}]
 [INFO] [talledLocalContainer] Parsed JBoss version = [4.2.3]
 [INFO] [stalledLocalDeployer] Undeploying
 [c:/_composer/_composer5/jboss-4.2.3.GA_Composer/server/default/deploy/PV_Web-5.0.0.war]...
 [INFO] [cargo:deploy {execution: deploy_to_jboss}]
 [INFO] [stalledLocalDeployer] Deploying
 

Re: how to ship all license.txt files

2009-03-25 Thread Samuel Le Berrigaud
This could help maybe:
http://docs.atlassian.com/maven-licenses-plugin/0.2/project-summary.html

SaM

On Wed, Mar 25, 2009 at 7:23 PM,  torsten.reinh...@gi-de.com wrote:
 Hi,

 when we ship our product, we have to ship also all used 3rdParty licenses.
 Is there a way to detect the license.txt files automatically?
 Extract those files from all dependencies, for example?

 Or do I have to enumerate all licenses in my pom.xml

  licenses
    license
      name/name
      url./url
    /license
  /licenses

 These plugins are NOT what I´m looking for:

 1) http://code.google.com/p/maven-license-plugin/

 2) http://mojo.codehaus.org/rat-maven-plugin/

 thanx for any advice,

 Torsten



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



Re: maven / osgi / repositories

2009-01-27 Thread Samuel Le Berrigaud
Hi Henri,

it seems to me that OSGi jars are not meant to be anything else that
traditional jars with extra information in their MANIFEST. I would
definitely recomment deploying them as standard jar as you would do
for any normal maven project.

One thing that could/would differentiate your OSGi jars is that if you
use the maven bundle plugin
[http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html]
then the pom deployed along side your jar will have the packaging set
to bundle. To me it seems like enough information.

Another point of reference you might consider is how the springsource
guys make OSGi-ified version of many java libraries in their bundle
repository [http://www.springsource.com/repository/]. This acts pretty
much as a simple maven repository delivering jars.

Also I know that the Felix guys have an initiative around an OSGi
Bundle Repository (OBR)
[http://felix.apache.org/site/apache-felix-osgi-bundle-repository.html].
This is meant to be a repository that is more OSGi specific. I could
help with dependency resolution -- just as maven does -- by
introspecting jars MANIFESTs.

Archiva or Nexus would most probably satisfy your needs for maven
repositories. They might become OBRs at some point when OSGi becomes
more mainstream.

Hope this helps,
SaM

On Tue, Jan 27, 2009 at 10:24 PM, Henri Gomez henri.go...@gmail.com wrote:
 Hi to all,

 We're using maven to build all our company projects for about 6 months
 and are very happy with it.
 Some of our projects, mainly Eclipse RCP plugins, are also mavenized.

 We know think about OSGIfing more of our projects (server side) and
 track ASF projects Felix of course core but also ServiceMix Kernel.

 BTW, we wonder if there is a consensus or strategy about OSGIfied
 artifacts and their location in external repositories.

 - Should we repackage our current projects to produce both jar and plugins ?

 - How and where to store these artifacts to make sure Felix could get
 it (did a Nexus repository could do the job).

 - How to 'mark' artifacts to indicate the difference between strict
 jar and OSIG jars (bundles). Eclipse prefix then with org.eclipse, SS
 with com.springsource ?


 Advices and experience are more than welcome.

 -
 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: maven / osgi / repositories

2009-01-27 Thread Samuel Le Berrigaud
Hi,

as you point it out there is definitely an issue with the renaming of
groupId /artifactId as it will 'break' maven dependency management.
However I don't think that anyone but the project owner(s) should be
allowed to deploy a jar with their groupId/artifactId (to the public
repo). I believe this is why the springsource guys renamed theirs.

I feel like the issue with non-OSGi jars is very similar to what
happened when first moving all libraries from the maven1 repository to
the maven2 repository. This is even more complicated as this time the
metadata in inside the jar. Until all projects make the effort of
having a correct OSGi compatible MANIFEST in their jars we'll have to
deal with it ourselves.

The only way that I can think of it working is to have your own
repository with OSGi-ified versions of the libraries you need. The
most sensible thing to do is probably changing the version so that it
identifies the jar as being OSGi. This will let you use maven's
dependency management to some extent. You will have to use the
dependencyManagement section of your POMs though to enforce OSGi
versions of the libraries. I don't think those jars can go to the
public repo though.

Practically I would consider creating maven projects on your side of
things using the shade plugin to create an OSGi version of the library
you want, just overriding/merging the MANIFEST and changing the
version. This would simply be a pom.xml and a MANIFEST file.
Another thing is definitely to create issues and provide patches to
those project so that they can start make their jars OSGi compatible.

SaM

On Wed, Jan 28, 2009 at 12:18 AM, Henri Gomez henri.go...@gmail.com wrote:
 Hi Henri,

 it seems to me that OSGi jars are not meant to be anything else that
 traditional jars with extra information in their MANIFEST. I would
 definitely recomment deploying them as standard jar as you would do
 for any normal maven project.

 Simple jar with MANIFEST, but today very few maven artifact are
 OSGIfied, so so should geth OSGIfied jars elsewhere or with a
 different group/artifact id ;(

 One thing that could/would differentiate your OSGi jars is that if you
 use the maven bundle plugin
 [http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html]
 then the pom deployed along side your jar will have the packaging set
 to bundle. To me it seems like enough information.

 For inhouse projects, it's not a problem and we allready do that from
 our RCP projects, but the problem is still here for external projects,
 ie ant, jaxws...

 Another point of reference you might consider is how the springsource
 guys make OSGi-ified version of many java libraries in their bundle
 repository [http://www.springsource.com/repository/]. This acts pretty
 much as a simple maven repository delivering jars.

 I see that but the group/artifact is not the same that the one used in
 developpement, hard after that to get a clean trace from developpment
 to runtime :(

 Also I know that the Felix guys have an initiative around an OSGi
 Bundle Repository (OBR)
 [http://felix.apache.org/site/apache-felix-osgi-bundle-repository.html].
 This is meant to be a repository that is more OSGi specific. I could
 help with dependency resolution -- just as maven does -- by
 introspecting jars MANIFESTs.

 A good idea, it will be nice to get it as maven central.

 And in the long term, get all 'maven' artifact converted to
 osgi-bundle (very long term).

 Or may by specializing maven request, ie I need ant-1.7.2 jar,
 ant-1.7.2 osgi-bundle.
 So we could have simple jar and bundle at the same location in maven repo.

 Archiva or Nexus would most probably satisfy your needs for maven
 repositories. They might become OBRs at some point when OSGi becomes
 more mainstream.

 I think there is plan for this in Nexus.

 Hope this helps,
 SaM

 Thanks for your time Sam, it was helpfull :)

 On Tue, Jan 27, 2009 at 10:24 PM, Henri Gomez henri.go...@gmail.com wrote:
 Hi to all,

 We're using maven to build all our company projects for about 6 months
 and are very happy with it.
 Some of our projects, mainly Eclipse RCP plugins, are also mavenized.

 We know think about OSGIfing more of our projects (server side) and
 track ASF projects Felix of course core but also ServiceMix Kernel.

 BTW, we wonder if there is a consensus or strategy about OSGIfied
 artifacts and their location in external repositories.

 - Should we repackage our current projects to produce both jar and plugins ?

 - How and where to store these artifacts to make sure Felix could get
 it (did a Nexus repository could do the job).

 - How to 'mark' artifacts to indicate the difference between strict
 jar and OSIG jars (bundles). Eclipse prefix then with org.eclipse, SS
 with com.springsource ?


 Advices and experience are more than welcome.

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

Re: Unable to download artifact sources

2008-09-30 Thread Samuel Le Berrigaud
Hi Thor,

the downloadSources flag is only used by some specific plugins. None
of them being bound to the clean or package lifecycles.
Depending whether you're using Eclipse or IntellIiJ IDEA you can run:

mvn eclipse:eclipse -DdownloadSources
or
mvn idea:idea -DdownloadSources

This will create the IDE project file for you with the sources maven
could download correctly set up.
If you don't want to be IDE specific but just download the sources I
would suggest using the dependency plugin
(http://maven.apache.org/plugins/maven-dependency-plugin/):

mvn dependency:sources

This will simply download the sources for all your dependencies (well
at least for those which have sources in the repo).

HTH,
SaM
On Wed, Oct 1, 2008 at 8:19 AM, Thor [EMAIL PROTECTED] wrote:
 Hello everyone. Thanks for reading.
 I know this is really basic, but here goes...

 I'm having trouble downloading  the sources from the central maven repo.
 I just created a project using the struts2-archetype-starter, updated the
 pom to the struts2's latest version (2.0.11.2)
 Then, when I ran  mvn clean package with the -DdowloadSources=true flag,
 maven only got the binaries.

 I even tried deleting the group org.apache.struts from my local repo to see
 if could get new copies of the files, but nothing seems to work.
 I also tried and failed to download the javadoc.

 I use maven 2.0.9 and Archiva 1.0.2 as my internal repository.

 Any ideas?
 Thanks in advice.
 --

 (o_ \*
 / / ) |


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



Re: Tuning multi-module assembly

2008-09-21 Thread Samuel Le Berrigaud
Hi Olivier,

I don't have the answer to all your questions but I believe I can help
with questions 1  2:

1 - Use the provided scope for all your war dependencies, see
http://maven.apache.org/ref/current/maven-model/maven.html#class_dependency
and 
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope
3 - You can use the inherited flag on your assembly execution, see
http://maven.apache.org/ref/current/maven-model/maven.html#class_execution

Hope this helps,
SaM

On Mon, Sep 22, 2008 at 2:23 PM, Olivier Gies [EMAIL PROTECTED] wrote:
 Hi everyone,

 I have a multi-module project as follows:

 my_project
 |
 +- myapp1 (war)
 |
 +- myapp2 (war)
 |
 +- myutils (jar)

 I want to assemble my_project as follows:

 my_project.zip
 |
 +- applications/
 |  |
 |  +- myapp1.war
 |  |
 |  +- myapp2.war
 |
 +- lib/
  |
  +- myutils.jar
  |
  +- *.jar (JAR dependencies of myapp1, myapp2 and myutils)


 So far, I could successfully put the WARs in applications/ and the JAR in
 lib/ using moduleSets, but there are still some side-effects I wish to
 prevent:

 1) How to prevent WAR plugin from putting each war's dependent JARs into the
 myappX.war:WEB-INF/lib ?
 2) How to put those JARs into the parent's (my_project) target assembly lib/
 directory instead ?
 3) How to limit execution of assembly plugin to my_project ? i.e. prevent
 its execution for each individual module

 Thanks for your insights.

 --

 *Olivier Gies*

 *Delivery Manager
 Customs  Tax Software Engineering Center
 Bull, Architect of an Open World ^TM
 Phone: +86 (10) 65978001 - Ext 555 *

 *www.bull.com http://www.bull.com/*

 *This e-mail contains material that is confidential for the sole use of the
 intended recipient. Any review, reliance or distribution by others or
 forwarding without express permission is strictly prohibited. If you are not
 the intended recipient, please contact the sender and delete all copies.*


 -
 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: [SURVEY] Which plugin would you like us to release?

2008-07-31 Thread Samuel Le Berrigaud
Hi Dennis,

It would be nice to vote for multiple plugins. Picking only one plugin
from this list is quite difficult…

SaM

On Fri, Aug 1, 2008 at 5:52 AM, Dennis Lundberg [EMAIL PROTECTED] wrote:
 Hello everyone

 I'm going to try something new here. It's an experiment and we'll see how it
 goes. I have set up a very simple survey over at SurveyMonkey, to get a feel
 for what you, our users, want us to do next when it comes to plugin
 releases. Remember, this is *not* about fixing issues - it's about getting
 releases out.

 So please help us help you, by answering this one question survey:

 http://www.surveymonkey.com/s.aspx?sm=M6IB7I_2fVmpKddfv1oCM_2few_3d_3d

 --
 Dennis Lundberg

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




Re: How to integrate FTP Wagon into Maven 2.0.7

2008-07-16 Thread Samuel Le Berrigaud
Hi Enrique,

you have to define the wagon provider as an extension in your pom.xml.
See this page for reference:
http://maven.apache.org/guides/mini/guide-using-extensions.html

Hope this helps,
SaM

On Thu, Jul 17, 2008 at 9:02 AM, Enrique Gaona [EMAIL PROTECTED] wrote:

 Hi,
 I'm getting a  Unsupported Protocol: 'ftp': Cannot find wagon which
 supports the requested protocol: ftp error message from maven.  How can I
 integrate ftp wagon to Maven 2.0.7?

 Enrique


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



Re: dependency:sources, dependency:javadoc???

2008-03-31 Thread Samuel Le Berrigaud
I believe you can run:

mvn dependency:resolve -Dclassifier=javadoc

That should downlod all the javadocs of your dependencies.

SaM

On Mon, Mar 31, 2008 at 5:00 PM, nodje [EMAIL PROTECTED] wrote:


 Is there a way to get a project dependencies' javadoc jars?

 I expected something quite simple in the line of the dependency-plugin
 goal
 'dependency:sources' but it lokks like there's nothing to get the javadocs
 along the sources.

 What would be the best way to get it automatically?

 cheers,
 -nodje
 --
 View this message in context:
 http://www.nabble.com/dependency%3Asources%2C-dependency%3Ajavadoctp16392437s177p16392437.html
 Sent from the Maven - Users mailing list archive at Nabble.com.


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




-- 
Samuel Le Berrigaud


Re: Running two builds of the same branch simultaneously

2008-03-19 Thread Samuel Le Berrigaud
Hi Dan,

I see two solutions to this:

1. only run mvn verify, this way nothing gets installed into the local
repository,
2. or run the maven command specifying the local repository on the command
line. Use separate repositories for each build. I don't remember the
property to use on the command line to specify the repository but I believe
this is possible. Anyone?

Hope this helps,
SaM

On Thu, Mar 20, 2008 at 2:01 PM, Dan Fabulich [EMAIL PROTECTED] wrote:


 I'm working on a multi-module reactor project that has a long build.  I'd
 like to be able to sync down two copies of trunk (X and Y), do a little
 bit of work in X, and start building X.  While X builds, I'd like to go
 over to Y, do a little bit of work in Y, and kick off a build of Y.

 The problem with this is the local repository: my X changes may
 incorrectly commingle with my Y changes.

 Can anyone suggest a way to make this work?  If possible, I'd prefer not
 to have to login to my box as two separate users to make this work.  (FYI,
 I'm on Windows XP.)

 -Dan

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




-- 
Samuel Le Berrigaud


Re: Is there a programmatic way to get a list of currently active profiles from within a plugin in Maven 2.0.6?

2008-03-13 Thread Samuel Le Berrigaud
Well if I had to do it I would actually have a look in the code of the
maven-help-plugin. Seems like it wouldn't be difficult from there to
implement the plugin you want…

SaM

On Fri, Mar 14, 2008 at 6:40 AM, Chris Patti [EMAIL PROTECTED] wrote:

 Folks;

 What I want to do is fairly simple.  We have a number of destructive unit
 tests in our environment that should NEVER be run against production, and
 I
 want to enforce that by attaching a plugin to the validate or initialize
 phase that will fail the build if PROD is in the current list of active
 profiles AND if maven.test.skip is either false or undefined.

plugin
groupIdorg.codehaus.mojo.groovy/groupId
artifactIdgroovy-maven-plugin/artifactId
executions
execution
idprevent-tests-against-prod/id
phaseinitialize/phase
goals
goalexecute/goal
/goals
configuration
source
if ((${project.activeprofile} == PROD)
 (${maven.test.skip} != true))
{
   fail(Running unit tests against
 production is NEVER OK!);
}
/source
/configuration
/execution
 ... (additional executions follow

 So, is there a way to make this happen? I realize I can use mvn
 help:active-profiles but having to parse the output of that command is
 messy
 and I'm guessing there's a better way.

 Thanks,
 -Chris

 --
 Chris Patti --- Y!: feoh -- AIM: chrisfeohpatti --- E-Mail:
 [EMAIL PROTECTED]
 Technological progress is like an ax in the hands of a pathological
 criminal. -Albert Einstein




-- 
Samuel Le Berrigaud


Re: upgrade from maven 1 to maven 2

2008-03-04 Thread Samuel Le Berrigaud
Hi David,

You don't to implement your whole maven.xml into one maven2 plugin. Instead
you should decompose what you do in your maven.xml and find out the existing
maven 2 plugins that would enable those different tasks.

For example, if I take your two examples below:
- copying resources of another project:
I would make that project a dependency of your web application and that
would be sufficient to add those on your classpath.
If you need them outside the classpath, I would probably use the maven
dependency plugin: http://maven.apache.org/plugins/maven-dependency-plugin/
using the unpack goal, it will unpack the jar wherever you need to. I would
attach that to the process-resources phase of you war module.

- xslt transformation
that should be fairly easy using the XSLT plugin:
http://mojo.codehaus.org/xslt-maven-plugin/
attaching it to the same process-resources phase.

Hope this all make sense. I strongly advise researching existing plugins
before writing your own. All the configuration will go in your pom.xml so as
with the maven.xml you can update those rules easily.

SaM

On Tue, Mar 4, 2008 at 8:39 PM, David Delbecq [EMAIL PROTECTED] wrote:

 Hello,

 we have a few project here using maven 1. They become difficult to
 maintain when it come to using new plugins that are not available for
 maven 1. So we thought it might be time to switch to maven 2. Question
 is, considering about all projects are using preGoal/postGoal and
 personalized rules in maven.xml, what should i do with them? I read
 there is no equivalent of maven.xml, i need to use a plugin. Can I sort
 of embbed that plugin with the project that use it, or do i need to
 create a separate plugin project for each of our maven.xml, compile and
 deploy those plugin change everytime before compiling the main project
 (with maven 1, changes to maven.xml were immediate)? Also if someone can
 point me to documentation about converting that maven.xml to a plugin,
 it'll be great. Documentation here
 http://maven.apache.org/guides/mini/guide-m1-m2.html , section what to
 do with maven.xml point to error page (the pages seems to have been
 removed from maven site :( )

 example of such task of maven.xml here is, we have a project X that is a
 webapp. In a subdirectory of that webapp we need to copy all ressources
 of another project Y, and we need to merge the struts and web.xml
 configs (we use a xslt processor for that). Am not sure how easy that
 can be transfered to a plugin...

 --
 David Delbecq
 Institut Royal Météorologique
 Ext:557


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




-- 
Samuel Le Berrigaud


Re: upgrade from maven 1 to maven 2

2008-03-04 Thread Samuel Le Berrigaud
Hi again,

I personally don't know any plugin that would take your maven.xml and insert
it into the maven 2 lifecycle. There is no notion of lifecycle in maven1,
just goals. I guess implementing such plugin could be possible but
definitely not trivial.

Indeed the xslt plugin doesn't give much details about its support. You
would probably need to get some work done on the existing one or write your
own. I don't see that being a huge amount of work. But it would still be
some work…

Regarding the project on which you depend, your best bet is still to have it
as a dependency for your project. Even if it is not maven2, you could
probably get this other project team to deploy it to an internal maven2
repository or do it your self manually when they release it. Some other
plugins will allow you to filter the files as you extract them. And as Simon
said you still have the maven-antrun-plugin:
http://maven.apache.org/plugins/maven-antrun-plugin/

I am sorry I cannot be more helpful here,
maybe someone else has another experience with migrating maven.xml scripts?

SaM

PS: I don't know what happened to the page you reference in your first mail
(http://maven.apache.org/guides/mini/guide-m1-m2.html). Maybe a maven
developer could help here?

On Tue, Mar 4, 2008 at 9:11 PM, David Delbecq [EMAIL PROTECTED] wrote:

 Hello,

 i was hopping there was some way to take my pack of maven.xml preGoal
 rule and just relocate them somewhere where maven2 would use them. You
 suggestion will not work. For our XSLT transform, we need to pass
 parameters to the xslt transform engine (for that we use saxon
 transformer with some specific transformation parameters), i don't see
 such equivalent in what you pointed me to nor is there information about
 version of xslt supported (1,2? we need 2).

 For the dependency plugin we have to investigate, but if that mean we
 need to upgrade included project to maven 2 also, that's a no go. That
 project i have no write access to and we don't plan maven 2 for it, we
 just currently, in our build process, download it along our main
 project, and retrieve some files from it (files we patch on the fly
 using ant:replace / rules btw). We don't even build it, we only need
 it's webapp (jsp/pictures/html/config) files integrated in our app.


 So, if we could keep our current build process rules (maven.xml), and
 just somehow move them in a plugin that would be lot's easier. Some of
 the jelly rules took time to implement, we don't have the time to
 recreate all them. Isn't it possible to take the maven.xml and put it in
 a project.jelly or it's maven2 equivalent?

 I need some direction on how to easily convert from maven1 to maven2,
 related to maven.xml, but all link related to that in maven site seem
 dead (see my first mail)


 En l'instant précis du 04/03/08 10:57, Samuel Le Berrigaud s'exprimait
 en ces termes:
  Hi David,
 
  You don't to implement your whole maven.xml into one maven2 plugin.
 Instead
  you should decompose what you do in your maven.xml and find out the
 existing
  maven 2 plugins that would enable those different tasks.
 
  For example, if I take your two examples below:
  - copying resources of another project:
  I would make that project a dependency of your web application and that
  would be sufficient to add those on your classpath.
  If you need them outside the classpath, I would probably use the maven
  dependency plugin:
 http://maven.apache.org/plugins/maven-dependency-plugin/
  using the unpack goal, it will unpack the jar wherever you need to. I
 would
  attach that to the process-resources phase of you war module.
 
  - xslt transformation
  that should be fairly easy using the XSLT plugin:
  http://mojo.codehaus.org/xslt-maven-plugin/
  attaching it to the same process-resources phase.
 
  Hope this all make sense. I strongly advise researching existing plugins
  before writing your own. All the configuration will go in your pom.xmlso as
  with the maven.xml you can update those rules easily.
 
  SaM
 
  On Tue, Mar 4, 2008 at 8:39 PM, David Delbecq [EMAIL PROTECTED] wrote:
 
 
  Hello,
 
  we have a few project here using maven 1. They become difficult to
  maintain when it come to using new plugins that are not available for
  maven 1. So we thought it might be time to switch to maven 2. Question
  is, considering about all projects are using preGoal/postGoal and
  personalized rules in maven.xml, what should i do with them? I read
  there is no equivalent of maven.xml, i need to use a plugin. Can I sort
  of embbed that plugin with the project that use it, or do i need to
  create a separate plugin project for each of our maven.xml, compile and
  deploy those plugin change everytime before compiling the main project
  (with maven 1, changes to maven.xml were immediate)? Also if someone
 can
  point me to documentation about converting that maven.xml to a plugin,
  it'll be great. Documentation here
  http://maven.apache.org/guides/mini/guide-m1-m2.html

Re: upgrade from maven 1 to maven 2

2008-03-04 Thread Samuel Le Berrigaud
Hey David,

as you found out you have to define groupId, artifactId of your parent in
the pom. I don't believe it is a lot of maintenance though as on many
projects I've worked on groupdId and artifactId don't change much.

You also have to specify the version. This can seems like a lot of pain to
maintain especially when releasing. But the maven-release-plugin makes it as
easy as it gets: http://maven.apache.org/plugins/maven-release-plugin/

You don't need to define the path to the parent pom. Maven will look up in
.. by default. Or will get it from the repository if it can't find it there.

SaM

On Tue, Mar 4, 2008 at 10:04 PM, David Delbecq [EMAIL PROTECTED] wrote:

 I'll try to find out solution, i began with one of our simplest project,
 it's made of several subprojects (using multproject maven 1 goal), but
 they have no custom maven.xml (should be the easiest to convert). But i
 don't get how to get the equivalent of

 extend../project.xml/extend

 I tried
 parentrelativePath../pom.xml/relativePath/parent

 But with i try a mvn jar, it complains the groupId of the parent tag is
 not defined. That a problem because i need the groupId and the version
 to be inherited from the parent. How should i do it?
 The online doc is of no help. It says

  Alternatively, if we want the groupId and / or the version of your
  modules to be the same as their parents, you can remove the groupId
  and / or the version identity of your module in its POM.
 
  project
parent
  groupIdcom.mycompany.app/groupId
  artifactIdmy-app/artifactId
  version1/version
/parent
modelVersion4.0.0/modelVersion
artifactIdmy-module/artifactId
  /project
 
 As you see in xml fragment given, they did *not* remove the groupId and
 versionId? Is it possible to inherit groupId and versionId or will i
 have to manually maintain all those ids in each release?

 Sorry to bother you with basic question :)


 En l'instant précis du 04/03/08 11:32, Samuel Le Berrigaud s'exprimait
 en ces termes:
  Hi again,
 
  I personally don't know any plugin that would take your maven.xml and
 insert
  it into the maven 2 lifecycle. There is no notion of lifecycle in
 maven1,
  just goals. I guess implementing such plugin could be possible but
  definitely not trivial.
 
  Indeed the xslt plugin doesn't give much details about its support. You
  would probably need to get some work done on the existing one or write
 your
  own. I don't see that being a huge amount of work. But it would still be
  some work…
 
  Regarding the project on which you depend, your best bet is still to
 have it
  as a dependency for your project. Even if it is not maven2, you could
  probably get this other project team to deploy it to an internal maven2
  repository or do it your self manually when they release it. Some other
  plugins will allow you to filter the files as you extract them. And as
 Simon
  said you still have the maven-antrun-plugin:
  http://maven.apache.org/plugins/maven-antrun-plugin/
 
  I am sorry I cannot be more helpful here,
  maybe someone else has another experience with migrating maven.xmlscripts?
 
  SaM
 
  PS: I don't know what happened to the page you reference in your first
 mail
  (http://maven.apache.org/guides/mini/guide-m1-m2.html). Maybe a maven
  developer could help here?
 
  On Tue, Mar 4, 2008 at 9:11 PM, David Delbecq [EMAIL PROTECTED] wrote:
 
 
  Hello,
 
  i was hopping there was some way to take my pack of maven.xml preGoal
  rule and just relocate them somewhere where maven2 would use them. You
  suggestion will not work. For our XSLT transform, we need to pass
  parameters to the xslt transform engine (for that we use saxon
  transformer with some specific transformation parameters), i don't see
  such equivalent in what you pointed me to nor is there information
 about
  version of xslt supported (1,2? we need 2).
 
  For the dependency plugin we have to investigate, but if that mean we
  need to upgrade included project to maven 2 also, that's a no go. That
  project i have no write access to and we don't plan maven 2 for it, we
  just currently, in our build process, download it along our main
  project, and retrieve some files from it (files we patch on the fly
  using ant:replace / rules btw). We don't even build it, we only need
  it's webapp (jsp/pictures/html/config) files integrated in our app.
 
 
  So, if we could keep our current build process rules (maven.xml), and
  just somehow move them in a plugin that would be lot's easier. Some of
  the jelly rules took time to implement, we don't have the time to
  recreate all them. Isn't it possible to take the maven.xml and put it
 in
  a project.jelly or it's maven2 equivalent?
 
  I need some direction on how to easily convert from maven1 to maven2,
  related to maven.xml, but all link related to that in maven site seem
  dead (see my first mail)
 
 
  En l'instant précis du 04/03/08 10:57, Samuel Le Berrigaud s'exprimait
  en ces termes:
 
  Hi

Re: How to specify local dependency in maven2

2008-03-03 Thread Samuel Le Berrigaud
Hi,

you would have to use the system scope. See the system dependencies section
at
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
.

However I would recommend you create a private repository internally to your
company so that you can more easily share those dependencies with your team.
This way those dependencies will work the same way as any other maven
dependency. Consistency is good.

SaM

On Tue, Mar 4, 2008 at 6:00 PM, Dipankar Ghosal 
[EMAIL PROTECTED] wrote:


 I have a WebSphere Portlet project which uses many IBM jars(Available at
 installation directory in local system).

 I need to use these jars while performing maven build.

 How do i specify the location of the jars so that maven uses the jars from
 local location rather than download from remote repository.

 Is there any option like specifying the local jars in
 project.properties(available in maven 1.1)
 
 #
 # Register local jar files to maven. This prevents maven from
 # trying to download these dependencies
 #
 
 maven.jar.wps = ${wps.home}/wps.jar
 maven.jar.jsr168-api = ${wps.home}/shared/app/jsr168-api.jar

 Any help will be appreciated
 --
 View this message in context:
 http://www.nabble.com/How-to-specify-local-dependency-in-maven2-tp15821419s177p15821419.html
 Sent from the Maven - Users mailing list archive at Nabble.com.


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




-- 
Samuel Le Berrigaud


Re: How to specify local dependency in maven2

2008-03-03 Thread Samuel Le Berrigaud
Not that I know of. And I believe there is not.

The maven way of managing dependencies is to declare those in the POM (or to
get them transitively for maven2), using libraries from a directory would go
against that.

Hope it helps.
SaM

On Tue, Mar 4, 2008 at 6:36 PM, Dipankar Ghosal 
[EMAIL PROTECTED] wrote:



 Thanks Samuel..

 However is there any way to include all libraries that are present in a
 particular folder.
 Say i have 20 odd jars in C:\lib folder?



 Samuel Le Berrigaud wrote:
 
  Hi,
 
  you would have to use the system scope. See the system dependencies
  section
  at
 
 http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
  .
 
  However I would recommend you create a private repository internally to
  your
  company so that you can more easily share those dependencies with your
  team.
  This way those dependencies will work the same way as any other maven
  dependency. Consistency is good.
 
  SaM
 
  On Tue, Mar 4, 2008 at 6:00 PM, Dipankar Ghosal 
  [EMAIL PROTECTED] wrote:
 
 
  I have a WebSphere Portlet project which uses many IBM jars(Available
 at
  installation directory in local system).
 
  I need to use these jars while performing maven build.
 
  How do i specify the location of the jars so that maven uses the jars
  from
  local location rather than download from remote repository.
 
  Is there any option like specifying the local jars in
  project.properties(available in maven 1.1)
  
  #
  # Register local jar files to maven. This prevents maven from
  # trying to download these dependencies
  #
  
  maven.jar.wps = ${wps.home}/wps.jar
  maven.jar.jsr168-api = ${wps.home}/shared/app/jsr168-api.jar
 
  Any help will be appreciated
  --
  View this message in context:
 
 http://www.nabble.com/How-to-specify-local-dependency-in-maven2-tp15821419s177p15821419.html
  Sent from the Maven - Users mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  --
  Samuel Le Berrigaud
 
 

 --
 View this message in context:
 http://www.nabble.com/How-to-specify-local-dependency-in-maven2-tp15821419s177p15821761.html
 Sent from the Maven - Users mailing list archive at Nabble.com.


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




-- 
Samuel Le Berrigaud


Re: m2: Profile activation based on project (not System) property

2007-06-11 Thread Samuel Le Berrigaud

Hi Dave,

did you get any reply to that? We are trying achieve a similar
configuration and would appreciate any info.

Anyone else maybe?

Thanks,
SaM

On 5/25/07, Dave Syer [EMAIL PROTECTED] wrote:


Is it possible to activate a profile based on a project property?  It doesn't
seem to work in any obvious way, but can I do it at all?

I want to define a profile in the parent pom, and activate it for some of
thh child modules, but not all, without the user having to change the
command line to specify a System property.  If there is a better way to do
this I'd be happy to consider suggestions.
--
View this message in context: 
http://www.nabble.com/m2%3A-Profile-activation-based-on-project-%28not-System%29-property-tf3815567s177.html#a10801263
Sent from the Maven - Users mailing list archive at Nabble.com.


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





--
Samuel Le Berrigaud

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



Re: Deploying to multiple repositories

2007-03-23 Thread Samuel Le Berrigaud

Thanks,

I found the thread but nothing came out. In the end it looks like you
have to run maven twice :-(

SaM

On 3/23/07, Rodrigo Ruiz [EMAIL PROTECTED] wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mmmm, I think there was a mention in another thread to how to create
several artifacts for different configurations in only one call to mvn
(I think it was related to create jars with and without debug
information, or something like that).

Maybe the same technique could be applied here, but I haven't been able
to find the thread :-( Does anybody remember the thread I am talking about?


Regards,
Rodrigo

David Jackman wrote:
 Maven won't deploy to more than one repository at all, let alone having
 some artifacts go to one repository and a different set go to another.
 I've created a pom with two profiles indicating a different
 distributionManagement section and activated both, but the artifact was
 only deployed to the first repository.

 A quick look at Jira didn't find an enhancement request for deploys to
 multiple repositories; I should write that up, since I still do want to
 do it.  But even that wouldn't do what you're looking to do.  What you
 want would require earmarking each artifact for specific repositories.
 That would probably require the support of the plugins creating the
 artifacts (since they are the only things that know about these
 artifacts).

 ..David..


 -Original Message-
 From: Samuel Le Berrigaud [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 22, 2007 12:40 AM
 To: Maven Users
 Subject: Deploying to multiple repositories

 Hi all,

 here is what I am trying to achieve:

 - I have two repositories;
-- a public one where only binaries go,
-- and a private one where binaries, sources and javadocs go.

 I would like to be able to deploy to those two repositories by running
 'mvn deploy' (once).

 What I thought could be (almost) possible would be to define two
 executions for the maven-deploy-plugin that would use two different
 profiles with the proper configuration for distirbution repositories,
 binaries, sources and javadocs generations.

 Unfortunately I could not find how to activate profiles just for an
 execution! I have the feeling that profiles are activated for the whole
 lifcycle and that there is no way to change that through configuration
 at the moment...

 Does someone know if what I am trying to do is feasible? How?

 Thanks for your help,
 SaM

 -
 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]


- --
- ---
GRID SYSTEMS, S.A. Rodrigo Ruiz
Parc Bit - Edificio 17 Research Coordinator
07121 Palma de Mallorca[EMAIL PROTECTED]
Baleares - Spain   Tel: +34 971 435 085
http://www.gridsystems.com/Fax: +34 971 435 082
- ---
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.4 (MingW32)

iD8DBQFGAqmIp9m/F5UenDoRAhcYAKCIkoioB45UmZA3eDpRq/aEXyQQTQCcC3V6
tH0lg9YPhtzdntuBZcG5fOs=
=k4v+
-END PGP SIGNATURE-

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





--
Samuel Le Berrigaud

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



Deploying to multiple repositories

2007-03-21 Thread Samuel Le Berrigaud

Hi all,

here is what I am trying to achieve:

- I have two repositories;
  -- a public one where only binaries go,
  -- and a private one where binaries, sources and javadocs go.

I would like to be able to deploy to those two repositories by running
'mvn deploy' (once).

What I thought could be (almost) possible would be to define two
executions for the maven-deploy-plugin that would use two different
profiles with the proper configuration for
distirbution repositories, binaries, sources and javadocs generations.

Unfortunately I could not find how to activate profiles just for an
execution! I have the feeling that profiles are activated for the
whole lifcycle and that there is no way to change that through
configuration at the moment...

Does someone know if what I am trying to do is feasible? How?

Thanks for your help,
SaM

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



[m2] hsql plugin, integration testing

2006-09-14 Thread Samuel Le Berrigaud

Hi all,

I've been looking around and couldn't find anything relevant so here
is my question:

Is there a HSQLDB plugin for maven that would allow to start/stop the
db, and maybe even more...

I was thinking that if such a plugin exists I could manage to make the
DB start before the unit tests and stop at the end of those. I believe
this should be possible using some plugin configuration in m2, right?

It would make life easier for integration testing, as I wouldn't have
to start/stop my HSQLDB on the side... How are you guys dealing with
this kind of issue?

Thanks in advance,

SaM

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



m2 continuum 1.0.2

2006-01-16 Thread Samuel Le Berrigaud
Hi,

I installed continuum 1.0.2, building my projects with maven 2.

First, however I have notification configured for all events Success
Failures Error Warnings as it shows it in my projects config. I don't
receive emails every time. Is there some configuration I am missing ?
I managed to receive emails on first sucessful (first sucessful)
build.

Then, when a maven2 build fails, continuum still shows it as sucessful
!? Is there again someting I am missing ?

My POMs have this info inherited from a parent POM (most of the time):

 ciManagement
  systemContinuum/system
  urlhttp://.../url
  notifiers
   notifier
configuration
 address[EMAIL PROTECTED]/address
/configuration
   /notifier
  /notifiers
 /ciManagement

Thanks for any help,

--
Samuel Le Berrigaud


[m2] Cargo

2005-12-15 Thread Samuel Le Berrigaud
I am using the maven 2 Cargo plugin. It's just great to deploy to my
tomcat5x. However today I had some problem running cargo on a new
machine. Maven cannot find the cargo plugin.

It seems that the cargo snapshot repository is empty (or almost).

Does someone knows what is going on ?

Thanks,

SaM


[m2] pom properties how-to ?

2005-12-06 Thread Samuel Le Berrigaud
Hi,

just wanted to know how to use the properties in the POM (the one
defined under project/properties)


I tried something like:

properties
 property
  namea.name/name
  valuea.value/value
 /property
/properties

but it does not work...

And then can reference the properties in the POM like that ${a.name} ?

Thanks,
--
Samuel Le Berrigaud


Re: [m2] pom properties how-to ?

2005-12-06 Thread Samuel Le Berrigaud
Thanks Odea,

however, just a minor change to what you wrote:

properties
  hello.valueHELLO/hello.value
/properties

There are no property tag within properties.

SaM

On 12/6/05, Odea Ching [EMAIL PROTECTED] wrote:

 Hi Samuel,

 You can use the properties element to set the value of a property in a
 resource file through the pom's properties section.

 #sample.properties
 samle.property=${hello.value}

 pom.xml:
 properties
   property
 hello.valueHELLO/hello.value
   /property
 /properties

 You can also use it to declare properties/variables that you can use on
 your plugin configuration, etc.

 Regards,
 Deng


 Samuel Le Berrigaud wrote:

 Hi,
 
 just wanted to know how to use the properties in the POM (the one
 defined under project/properties)
 
 
 I tried something like:
 
 properties
  property
   namea.name/name
   valuea.value/value
  /property
 /properties
 
 but it does not work...
 
 And then can reference the properties in the POM like that ${a.name} ?
 
 Thanks,
 --
 Samuel Le Berrigaud
 
 
 


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




--
Samuel Le Berrigaud


Re: [m2] Updating *.properties files according to environment

2005-11-04 Thread Samuel Le Berrigaud
Thanks Vincent,

but I already looked at the profiles, It looks great except that it
seems that I would have to create one set of files for each different
profiles...

What I would prefer, if we take the case of database connection is to
have the one file I sent  in my previous mail:

[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@

in the resources folder, and the properties would overriden by pom
setting (in a profile) and user settings (in a profile) for each
developer. It would be like intercepting the the copy of the file to
the target and replacing properties with the one found in the active
profile...

Is there a way of doing that, or should I look about developing a new
specific plugin ?

SaM

On 11/3/05, Vincent Siveton [EMAIL PROTECTED] wrote:
 Hi Samuel,

 The Maven1 environment files (build.properties and project.properties) have
 been replaced with a settings.xml file in Maven2.

 You could also define profiles to have customized builds.
 http://maven.apache.org/guides/introduction/introduction-to-profiles.html

 Cheers,

 Vincent

  -Original Message-
  From: Samuel Le Berrigaud [mailto:[EMAIL PROTECTED]
  Sent: Thursday, November 03, 2005 6:38 AM
  To: Maven Users List
  Subject: [m2] Updating *.properties files according to environment
 
  Hi,
 
  here is what I would like to do. I have some properties files for
  which values depends on the environement (development, test, live...)
  or per developer.
 
  Here is a basic example:
 
  [EMAIL PROTECTED]@
  [EMAIL PROTECTED]@
  [EMAIL PROTECTED]@
  [EMAIL PROTECTED]@
 
 
  What I would like is that, according to the environment, the variables
  of these files could be populated with right value (may be stored in
  pom.xml or settins.xml), and as far as possible keep a constant
  directory structure...
 
  I have seen the profile managment that m2 provides, but it look like
  that for what I do, I would have to have different directories for the
  different environments (profiles)...
 
  Is that possible using m2 ?
 
  Please tell me if I'm not clear enough...
 
  Thank you,
 
  --
  Samuel Le Berrigaud


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




--
Samuel Le Berrigaud


[m2] Updating *.properties files according to environment

2005-11-03 Thread Samuel Le Berrigaud
Hi,

here is what I would like to do. I have some properties files for
which values depends on the environement (development, test, live...)
or per developer.

Here is a basic example:

[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@


What I would like is that, according to the environment, the variables
of these files could be populated with right value (may be stored in
pom.xml or settins.xml), and as far as possible keep a constant
directory structure...

I have seen the profile managment that m2 provides, but it look like
that for what I do, I would have to have different directories for the
different environments (profiles)...

Is that possible using m2 ?

Please tell me if I'm not clear enough...

Thank you,

--
Samuel Le Berrigaud


[m2] surefire - xml reports ?

2005-10-24 Thread Samuel Le Berrigaud
Hi,

I'm trying to get the surefire reports included into my site. The
plugin seems to work ok, however I got no test passed on my report.
The cause seems to be that the surefire plugin does not generate xml
report files, and that the surefire-report plugin relies on those...

Am I missing something ?

--
Samuel Le Berrigaud


Re: [m2] surefire - xml reports ?

2005-10-24 Thread Samuel Le Berrigaud
Hi Peter,

to get the report in the site the config is the following:

reporting
plugins
plugin
groupIdorg.codehaus.mojo/groupId
artifactIdsurefire-report-maven-plugin/artifactId
/plugin
...
/plugins
/reporting

This uses the surefire-report-maven-plugin that you can find here:
http://mojo.codehaus.org/surefire-report-maven-plugin/

However I have some little problems for the moment making it work because
the maven-surefire-plugin that you can find here:
http://maven.apache.org/plugins/maven-surefire-plugin/ doesn't seem to
generate the xml reports files ?

Any one can help me - us - on that ?

SaM


On 10/24/05, Pilgrim, Peter [EMAIL PROTECTED] wrote:

 Yes I would like to know to get also the XML in order to
 XSLT it and get reports.

 In Maven 1 you wrote something like this

 project
 ...
 reports
 reportmaven-junit-report-plugin/report
 reportmaven-jxr-plugin/report
 ...
 /reports
 ...
 /project

 How do also get the equivalent of junit reports generated
 with ``mvn site''?

 tia

  -Original Message-
  From: Samuel Le Berrigaud [mailto:[EMAIL PROTECTED]
 ====
 
  Hi,
 
  I'm trying to get the surefire reports included into my site. The
  plugin seems to work ok, however I got no test passed on my report.
  The cause seems to be that the surefire plugin does not generate xml
  report files, and that the surefire-report plugin relies on those...
 
  Am I missing something ?
 
  --
  Samuel Le Berrigaud
 
 ====

 --
 Peter Pilgrim :: J2EE Software Development
 Operations/IT - Credit Suisse First Boston,
 Floor 15, 5 Canada Square, London E14 4QJ, United Kingdom
 Tel: +44-(0)207-883-4497


 ==
 Please access the attached hyperlink for an important electronic
 communications disclaimer:

 http://www.csfb.com/legal_terms/disclaimer_external_email.shtml


 ==


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




--
Samuel Le Berrigaud


[m2] javadoc plugin

2005-10-21 Thread Samuel Le Berrigaud
Hi,

there is a bug in the current javadoc plugin regarding the site
integration. The link to the javadoc leads to blank page.

The javadoc is correctly generated, however the index page of the
javadoc is overwritten by a blank index page.

I found the bug come from the JavadocReport class of the plugin, this:

public String getOutputName()
{
return apidocs/index;
}

give the plugin its incorrect behavior.

I corrected this to :

public String getOutputName()
{
return javadoc;
}

And I add the following document to my src/site/apt directory:

--
Javadoc

  You can find the javadoc at {{{apidocs/index.html}apidocs/index.html}}
--

This can obviously not be a premanent solution but it works fine for me for now.
I don't know how to integrate this simple APT page into the plugin
directly, if anyone has any hint for me. I would glad to put some
effort on this and the contribute creating a JIRA bug and providing a
first patch maybe...

Thanks,

--
Samuel Le Berrigaud


[m2] Tomcat plugin

2005-10-19 Thread Samuel Le Berrigaud
Can someone point me where the tomcat plugin site is available ?

Thanks,
--
SaM


[m2] Pb with test resources

2005-10-18 Thread Samuel Le Berrigaud
Hi,

I have soime test specific resources for one project. They are
specified this way in my POM:

 build
  testResources
   resource
targetPathconf/targetPath
directorysrc/test/conf/directory
includes
 include*.properties/include
/includes
   /resource
   resource
targetPathxml/targetPath
directorysrc/test/xml/directory
includes
 include*.xml/include
 include*.xsl/include
/includes
   /resource
   resource
targetPathexpected/targetPath
directorysrc/test/expected/directory
includes
 include*.xml/include
 include*.html/include
 include*.pdf/include
/includes
   /resource
  /testResources
  ...
/build

When running the tests (or any goal) I got this error:

$ m2 install -e
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] 

[ERROR] FATAL ERROR
[INFO] 

[INFO] Error building POM (may not be this project's POM).


Project ID: unknown
POM Location: e:\SCM_LOCAL\arcam\ahpxml\pom.xml

Reason: Parse error reading POM


[INFO] 

[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Parse error reading POM
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:359)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:276)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.project.InvalidProjectModelException:
Parse error reading POM
at 
org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1097)
at 
org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1057)
at 
org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFile(DefaultMavenProjectBuilder.java:291)
at 
org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:276)
at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:509)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:441)
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:345)
... 11 more
Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException:
TEXT must be immediately followed by END_TAG and not START_TAG
(positio
n: START_TAG seen ...resource\r\ntargetPath... @91:17)
at 
org.codehaus.plexus.util.xml.pull.MXParser.nextText(MXParser.java:1060)
at 
org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseBuild(MavenXpp3Reader.java:646)
at 
org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseModel(MavenXpp3Reader.java:2131)
at 
org.apache.maven.model.io.xpp3.MavenXpp3Reader.read(MavenXpp3Reader.java:4255)
at 
org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1093)
... 17 more

The odd thing is that if I change the tag testResources with
resources, it works and my tests pass sucessfully ! Am I doing
something wrong ?

Thanks,

SaM


Re: [m2] Pb with test resources

2005-10-18 Thread Samuel Le Berrigaud
It worked,

Thank you !

On 10/18/05, Yann Le Du [EMAIL PROTECTED] wrote:

 Hi Samuel,

 There is a bug in doco. In testResources you must use testResource .

 (In foos you must generally use foo )

 Regards,
 Yann



 --- Samuel Le Berrigaud [EMAIL PROTECTED] a écrit :

  Hi,
 
  I have soime test specific resources for one project. They are
  specified this way in my POM:
 
  build
  testResources
  resource
  targetPathconf/targetPath
  directorysrc/test/conf/directory
  includes
  include*.properties/include
  /includes
  /resource
  resource
  targetPathxml/targetPath
  directorysrc/test/xml/directory
  includes
  include*.xml/include
  include*.xsl/include
  /includes
  /resource
  resource
  targetPathexpected/targetPath
  directorysrc/test/expected/directory
  includes
  include*.xml/include
  include*.html/include
  include*.pdf/include
  /includes
  /resource
  /testResources
  ...
  /build
 
  When running the tests (or any goal) I got this error:
 
  $ m2 install -e
  + Error stacktraces are turned on.
  [INFO] Scanning for projects...
  [INFO]
 
 
  [ERROR] FATAL ERROR
  [INFO]
 
 
  [INFO] Error building POM (may not be this project's POM).
 
 
  Project ID: unknown
  POM Location: e:\SCM_LOCAL\arcam\ahpxml\pom.xml
 
  Reason: Parse error reading POM
 
 
  [INFO]
 
 
  [INFO] Trace
  org.apache.maven.reactor.MavenExecutionException: Parse error reading
 POM
  at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:359)
  at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:276)
  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
  at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at
  sun.reflect.NativeMethodAccessorImpl.invoke(
 NativeMethodAccessorImpl.java:39)
  at
 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(
 DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:324)
  at
  org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
  at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
  at
  org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
  at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
  Caused by: org.apache.maven.project.InvalidProjectModelException:
  Parse error reading POM
  at
 
 org.apache.maven.project.DefaultMavenProjectBuilder.readModel(
 DefaultMavenProjectBuilder.java:1097)
  at
 
 org.apache.maven.project.DefaultMavenProjectBuilder.readModel(
 DefaultMavenProjectBuilder.java:1057)
  at
 
 org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFile(
 DefaultMavenProjectBuilder.java:291)
  at
 
 org.apache.maven.project.DefaultMavenProjectBuilder.build(
 DefaultMavenProjectBuilder.java:276)
  at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:509)
  at
  org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:441)
  at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:345)
  ... 11 more
  Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException:
  TEXT must be immediately followed by END_TAG and not START_TAG
  (positio
  n: START_TAG seen ...resource\r\n targetPath... @91:17)
  at
  org.codehaus.plexus.util.xml.pull.MXParser.nextText(MXParser.java:1060)
  at
 
 org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseBuild(
 MavenXpp3Reader.java:646)
  at
 
 org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseModel(
 MavenXpp3Reader.java:2131)
  at
 
 org.apache.maven.model.io.xpp3.MavenXpp3Reader.read(MavenXpp3Reader.java
 :4255)
  at
 
 org.apache.maven.project.DefaultMavenProjectBuilder.readModel(
 DefaultMavenProjectBuilder.java:1093)
  ... 17 more
 
  The odd thing is that if I change the tag testResources with
  resources, it works and my tests pass sucessfully ! Am I doing
  something wrong ?
 
  Thanks,
 
  SaM
 








 ___
 Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
 Téléchargez cette version sur http://fr.messenger.yahoo.com

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




--
Samuel Le Berrigaud


Re: package org.apache.log4j does not exist

2005-05-03 Thread Samuel Le Berrigaud
Hi,
you should take a look at this page that explains on the maven 
repositrories:
http://maven.apache.org/using/repositories.html

Any way if you want to add log4j as a dependency of your project simply 
add those lines to your pom (project.xml):

dependencies
 dependency
   groupIdlog4j/groupId
   artifactIdlog4j/artifactId
   version1.2.8/version
   typejar/type
 /dependency
 !--
   others dependencies go here
 --
/dependencies
If you still need a local dependency take a look at this page :
http://maven.apache.org/using/managing-dependencies.html
Hope it helps,
SaM
Muser007 wrote:
Hi,
A total newbie to Maven here. I am attempting to create a build 
environment for my project.  I have tried customizing the project.xml 
as best as I can.

I am getting several compile errors that say:
package org.apache.log4j does not exist
import org.apache.log4j.LogManager and
package javax.mail does not exist
import javax.mail.Message;
All the jar files are located in ${basedir}/lib. How do I get it to 
find the required jars?

This is how the dependency part of project.xml looks like:
dependencies
   dependency
   jar
   includes
   includelib/**/*.jar/include
   /includes
   /jar/dependency
   /dependencies
Please help
Thanks!
-
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 Junit test ClassNotFoundException

2005-05-03 Thread Samuel Le Berrigaud
Hi,

there is something strange between your source files and your class files.

Is the pakcage of Tryit.java the default package or the code package ?

First I would say have the same directory structure inside your
src/main and src/test, and the same package for the class being tested
and the test class.

Second, if your Tryit.java uses the default package it should then be:

- target/classes/Tryit.class
- target/test-classes/TryitTest.class

if it uses the code pakcage it should be:

- target/classes/code/Tryit.class
- target/test-classes/code/TryitTest.class

I think the exception comes from those points... 
I would need a extract of your pom (project.xml) to be more precise.

SaM

On 5/3/05, Wim Vandewalle [EMAIL PROTECTED] wrote:
 Hi
 
 I started recently setting up a test with Maven.
 I followed the steps described in Getting started - Creating a project.
 I added 2 simple classes:
 
 - src/main/java/code/Tryit.java
 - src/test/java/TryitTest.java  (unit test)
 
 The java classes compile ok:
 
 - target/classes/main/java/code/TryIt.class
 - target/test-classes/test/java/TryitTest.class
 
 However when running the unit tests it looks like the test class is not in 
 JUnit's classpath:
 
 C:\repositories\eclipse\maventestmaven test:test
 __  __
 |  \/  |__ _Apache__ ___
 | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
 |_|  |_\__,_|\_/\___|_||_|  v. 1.0.2
 
 build:start:
 
 java:prepare-filesystem:
 
 java:compile:
[echo] Compiling to C:\repositories\eclipse\maventest/target/classes
[echo]
 ==
 
  NOTE: Targetting JVM 1.4, classes
  will not run on earlier JVMs
 
 ==
 
[javac] Compiling 1 source file to 
 C:\repositories\eclipse\maventest\target\classes
 
 java:jar-resources:
 
 test:prepare-filesystem:
 
 test:test-resources:
 
 test:compile:
[javac] Compiling 1 source file to 
 C:\repositories\eclipse\maventest\target\test-classes
 
 test:test:
[junit] Running
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
[junit] Testsuite: TryItTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
[junit]
[junit] Null Test:  Caused an ERROR
[junit] TryItTest
[junit] java.lang.ClassNotFoundException: TryItTest
[junit] at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
[junit] at java.security.AccessController.doPrivileged(Native Method)
[junit] at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
[junit] at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
[junit] at 
 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
[junit] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
[junit] at 
 java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
[junit] at java.lang.Class.forName0(Native Method)
[junit] at java.lang.Class.forName(Class.java:141)
[junit]
[junit]
[junit] [ERROR] TEST TryItTest FAILED
 
 BUILD FAILED
 File.. C:\Documents and 
 Settings\wvdw\.maven\cache\maven-test-plugin-1.6.2\plugin.jelly
 Element... fail
 Line.. 181
 Column 54
 There were test failures.
 Total time: 3 seconds
 Finished at: Tue May 03 11:44:52 CEST 2005
 
 Any ideas?
 
 Wim
 -
 Mail.be, WebMail and Virtual Office
 http://www.mail.be
 
 -
 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 + Eclipse

2005-05-02 Thread Samuel Le Berrigaud
Hi,
you may want to try this plugin : Mevenide at http://mevenide.codehaus.org/
SaM
[EMAIL PROTECTED] wrote:
Hi All,

Anyboy have document for
how to configure maven into eclipse

idea's appreciated !

Rgds

Vijay

Confidentiality Notice
The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately
and destroy all copies of this message and any attachments.
 


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