Problem with iso9660-maven-plugin

2014-07-03 Thread Roland Asmann
Hi all,

I am trying to switch one of our 'projects' to Maven and am running into 
some problems.

The project consists of some shell-scripts (which I want to replace with 
Maven) and configurations to build an Ubuntu pre-seed Image. What the 
scripts do in short:
- Mount an Ubuntu image
- Copy its content to a directory to work in
- Add our configurations
- Create a new Image

I have found a plugin to extract the image without mounting it (getting 
rid of the need for 'sudo' in our script) and copying the configurations 
is peanuts any day.
To repackage the image, I looked into the iso9660-maven-plugin, which 
was said to do just that.

Now, when I run my project, it always stops with the following error:

[ERROR] Failed to execute goal 
com.github.stephenc.java-iso-tools:iso9660-maven-plugin:2.0.0:iso 
(default) on project test: Execution default of goal 
com.github.stephenc.java-iso-tools:iso9660-maven-plugin:2.0.0:iso 
failed: String index out of range: 41 - [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to 
execute goal 
com.github.stephenc.java-iso-tools:iso9660-maven-plugin:2.0.0:iso 
(default) on project test: Execution default of goal 
com.github.stephenc.java-iso-tools:iso9660-maven-plugin:2.0.0:iso 
failed: String index out of range: 41
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at 
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at 
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at 
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at 
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at 
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at 
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution 
default of goal 
com.github.stephenc.java-iso-tools:iso9660-maven-plugin:2.0.0:iso 
failed: String index out of range: 41
at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: java.lang.StringIndexOutOfBoundsException: String index out 
of range: 41
at java.lang.String.substring(String.java:1946)
at 
com.github.stephenc.javaisotools.joliet.impl.JolietNamingConventions.apply(JolietNamingConventions.java:89)
at 
com.github.stephenc.javaisotools.iso9660.NamingConventions.processDirectory(NamingConventions.java:233)
at 
com.github.stephenc.javaisotools.iso9660.impl.ISO9660Factory.applyNamingConventions(ISO9660Factory.java:79)
at 
com.github.stephenc.javaisotools.joliet.impl.JolietHandler.init(JolietHandler.java:60)
at 
com.github.stephenc.javaisotools.iso9660.impl.CreateISO.process(CreateISO.java:52)
at 
com.github.stephenc.javaisotools.maven.PackageMojo.execute(PackageMojo.java:317)
at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
... 20 more

Looking through the code, it seems the plugin thinks the filename is too 
long. I added some logging and built a SNAPSHOT version to play with, 
but I am not quite sure about the calculation of the filename-length. 
All names that go in are exactly 64 characters long, but the plugin 
wants to shorten them still.

I was hoping that Mr. Connolly could perhaps take another look at it and 
give me some pointer/update the current version to work correctly.

A simple test-case is to just unpack an Ubuntu image (I was testing with 
10.04.4 amd64) and try to repackage it.

Thanks.

Roland


Re: Problem with iso9660-maven-plugin

2014-07-03 Thread Roland Asmann
It seems this is a known issue: 
https://github.com/stephenc/java-iso-tools/issues/3

After changing this, I was able to generate my ISO, but I was unable to 
use it to boot a machine. I think this might be caused by another known 
issue: https://github.com/stephenc/java-iso-tools/issues/7

I'll see if I can figure something out, otherwise I will probably use 
the exec-plugin and run mkisofs as before...


On 03/07/14 17:52, Stephen Connolly wrote:
 iso9660 limits filenames to 8+3 IIRC.

 I have not had any reason to maintain that plugin in quite some time. If
 you have pull requests let me know and I may find some time to investigate,
 but I'm not making any promises given my current time commitments


 On 3 July 2014 15:35, Roland Asmann roland.asm...@cyannetworks.com wrote:

   Hi all,
  
   I am trying to switch one of our 'projects' to Maven and am running into
   some problems.
  
   The project consists of some shell-scripts (which I want to replace with
   Maven) and configurations to build an Ubuntu pre-seed Image. What the
   scripts do in short:
   - Mount an Ubuntu image
   - Copy its content to a directory to work in
   - Add our configurations
   - Create a new Image
  
   I have found a plugin to extract the image without mounting it (getting
   rid of the need for 'sudo' in our script) and copying the configurations
   is peanuts any day.
   To repackage the image, I looked into the iso9660-maven-plugin, which
   was said to do just that.
  
   Now, when I run my project, it always stops with the following error:
  
   [ERROR] Failed to execute goal
   com.github.stephenc.java-iso-tools:iso9660-maven-plugin:2.0.0:iso
   (default) on project test: Execution default of goal
   com.github.stephenc.java-iso-tools:iso9660-maven-plugin:2.0.0:iso
   failed: String index out of range: 41 - [Help 1]
   org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
   execute goal
   com.github.stephenc.java-iso-tools:iso9660-maven-plugin:2.0.0:iso
   (default) on project test: Execution default of goal
   com.github.stephenc.java-iso-tools:iso9660-maven-plugin:2.0.0:iso
   failed: String index out of range: 41
   at
  
  
 org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
   at
  
  
 org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
   at
  
  
 org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
   at
  
  
 org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
   at
  
  
 org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
   at
  
  
 org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
   at
  
  
 org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
   at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
   at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
   at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
   at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
   at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at
  
  
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at
  
  
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:622)
   at
  
  
 org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
   at
  
 org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
   at
  
  
 org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
   at
   org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
   Caused by: org.apache.maven.plugin.PluginExecutionException: Execution
   default of goal
   com.github.stephenc.java-iso-tools:iso9660-maven-plugin:2.0.0:iso
   failed: String index out of range: 41
   at
  
  
 org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
   at
  
  
 org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
   ... 19 more
   Caused by: java.lang.StringIndexOutOfBoundsException: String index out
   of range: 41
   at java.lang.String.substring(String.java:1946)
   at
  
  
 com.github.stephenc.javaisotools.joliet.impl.JolietNamingConventions.apply(JolietNamingConventions.java:89)
   at
  
  
 com.github.stephenc.javaisotools.iso9660.NamingConventions.processDirectory(NamingConventions.java:233)
   at
  
  
 com.github.stephenc.javaisotools.iso9660.impl.ISO9660Factory.applyNamingConventions

Re: maven release from CVS tag

2010-02-02 Thread Roland Asmann
I'm not 100% sure on this, but if you configure your SCM-portion of the
POM for the tag/branch, it *MIGHT* work. Only problem I see is that in
CVS a tag is read-only, because it is a specific point. This means that
maven might not be able to update the POMs and commit them.

Anyway, try adding the tag-tag in the SCM and just give it a try (I'd
advise using the dryRun-principle for testing!).


On 02/02/2010 01:10 PM, Maruf Aytekin wrote:
 Hi All
 
 How do I make maven release from a CVS tag with maven releas eplugin?
 I am aware that this is not a good practice but we are making releases
 from CVS tags instead of head. The company I work for has been
 following this method for their some unique resons which I am not
 agreed.
 
 I am trying to use maven release plugin to mak ethe releases but the
 code in a tag needs to be released. I am checking docs here:
 http://maven.apache.org/guides/mini/guide-releasing.html. The current
 location of the development is a tag. Can I set the current location
 of the development as the tag and set the tagbase another tag? If so
 can someone point me an example using CVS?
 
 
 
 
 Regards
 Maruf
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 
 

-- 
Roland Asmann
Senior Software Engineer

adesso Austria Service GmbH
Bäckerstrasse 1/2/7 T +43 1 5138877-27
A-1010 Wien F +43 1 5138862
E roland.asm...@adesso.at
  www.adesso.at

-
 business. people. technology. 
-

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



Re: Code Coverage for integration tests

2010-01-27 Thread Roland Asmann
Depends on what you call 'integration test'... If it's a couple of tests 
inside a single module, just use cobertura/clover/something else...


If you want an integration-test of several modules, try something like 
this (working on it myself, not finished, so no guarantees!):

-- (the maven-invoker-plugin springs to mind for this)
- trigger a new life-cycle for the modules you need, using a profile 
that packages the modules WITH the cobertura/clover/other classes, so 
the tests will be run with coverage-classes

- have this life-cycle use a separate repository
- run all your tests using the artifacts from aforementioned repository
- have the cobertura/clover/other report the findings for you

As I said, for me it's still a work-in-progress (although I've build 2 
projects in a similar fashion, but I wasn't quite satisfied by the 
number of manual steps still involved), but it's a start...



On 27-01-10 18:44, Wendy Smoak wrote:

On Wed, Jan 27, 2010 at 10:07 AM, Douglas Ferguson
doug...@douglasferguson.us  wrote:


Is there anyway to get code coverage numbers for integration tests?


I'm sure it's technically possible, but as far as I know, no one has
done it yet with Maven.  It's definitely on my list of things I'd like
to see!  Let us know if you figure it out. :)



--
Roland Asmann
Senior Software Engineer

adesso Austria Service GmbH
Bäckerstrasse 1/2/7 T +43 1 5138877-27
A-1010 Wien F +43 1 5138862
E roland.asm...@adesso.at
  www.adesso.at

-
 business. people. technology. 
-

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



Re: How to create a maven local repository

2009-12-31 Thread Roland Asmann
Hi,

Just run Maven on a project and everything will solve itself!

Or is there a specific reason you only want this initial repository?

Roland




 Hi,



 In preceeding Maven version, there was a way to build and initiate a local
 repository via the CLI :

 %MAVEN_HOME%\bin\install_repo.bat %HOME%\.maven\repository

 And this command created a repository and loaded some core .jar



 By now, when I unzip maven2, under \bin I don't find any more a script to
 build a local repository.



 Looking at the Maven doc, I found I have to use Nexus ?!? Why not, but
 it's
 a so different way to build a local repository !

 And, on Nexus site, I found either to buy Nexus pro !!! or use m2eclipse ;
 why should I use eclipe ??



 Well, I'm lost.



 Isn't it a simple way as before to build and initiate de local repository
 ?



 Thanks for help











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



Re: Plugins and their versions

2009-12-31 Thread Roland Asmann
Indeed it does! Works like a charm!

Only one problem now: it reports on several SNAPSHOT plugins, which I
actually DO want! I know it's not good practice to use snapshots, but let
me explain my case here:

I have a multi-module build, which is ALWAYS released in a single go. One
of my modules is a plug-in that I actually need in the build, and I always
want to use it in the same version as the whole project is in.

Now, during development, this would lead to a snapshot version, which at
time of release would make it a release version (I use the property
'project.version' as a reference for the plug-in.

Now, how can I explain to the enforcer-plugin that this single plug-in
indeed is allowed to be a snapshot? I'm hoping for a solution that doesn't
mean implementing my own enforcer-rule... But if that what it takes, I'll
do that. Just wanted to check if this is already possible, because I think
this is not a very unusual use-case...

Roland


 Understood, but I'm not interested in the updates, I'm trying to track
 down the plugins that have no version configured.


 The enforcer plugin can help you find plugins with missing versions, too.

 Wayne

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






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



Re: Plugins and their versions

2009-12-31 Thread Roland Asmann
Thanks Jesse.

It appears there's some old documentation floating around on the site,
because I hadn't seen that option before!

For the maintainers of the plug-in site:
From the usage-page you can get to old (2007!) descriptions of the plug-in
which should probably be updated/removed.

Roland


 Hi Roland,

 On Thu, Dec 31, 2009 at 7:47 AM, Roland Asmann roland.asm...@adesso.at
 wrote:

 Now, how can I explain to the enforcer-plugin that this single plug-in
 indeed is allowed to be a snapshot?.

 Roland


 Even the most casual examination of the documentation reveals the
 unCheckedPluginsList - A comma separated list of plugins to skip
 version checking. Ie allow no version, or snapshots, etc. The plugins
 should be specified in the form: group:artifactId configuration
 option.

 -Jesse

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

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






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



Re: Plugins and their versions

2009-12-31 Thread Roland Asmann
Also, the parameter 'unCheckedPluginsList' doesn't have a setter, so can't
be used! Using the previous parameter (unCheckedPlugins) gives a
deprecation-warning, but at least it still works.

Roland


 Thanks Jesse.

 It appears there's some old documentation floating around on the site,
 because I hadn't seen that option before!

 For the maintainers of the plug-in site:
From the usage-page you can get to old (2007!) descriptions of the
 plug-in
 which should probably be updated/removed.

 Roland


 Hi Roland,

 On Thu, Dec 31, 2009 at 7:47 AM, Roland Asmann roland.asm...@adesso.at
 wrote:

 Now, how can I explain to the enforcer-plugin that this single plug-in
 indeed is allowed to be a snapshot?.

 Roland


 Even the most casual examination of the documentation reveals the
 unCheckedPluginsList - A comma separated list of plugins to skip
 version checking. Ie allow no version, or snapshots, etc. The plugins
 should be specified in the form: group:artifactId configuration
 option.

 -Jesse

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

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






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






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



Re: Plugins and their versions

2009-12-31 Thread Roland Asmann
 2009/12/31 Roland Asmann roland.asm...@adesso.at:
 Indeed it does! Works like a charm!

 Only one problem now: it reports on several SNAPSHOT plugins, which I
 actually DO want! I know it's not good practice to use snapshots, but
 let
 me explain my case here:

 I have a multi-module build, which is ALWAYS released in a single go.
 One
 of my modules is a plug-in that I actually need in the build, and I
 always
 want to use it in the same version as the whole project is in.


 That is not allowed.

 All the plugins must be resolved before the build starts.

 When you start a release, the plugin will not have been built, so will
 not be available prior to setting up the build plan.

 in m3 IIRC your build will refuse to work full stop.

 You must release plugins separately from builds that consume them

 -Stephen

That sucks... But in m2.0.10 it still works, so I'll keep it in for now.

Roland


 Now, during development, this would lead to a snapshot version, which at
 time of release would make it a release version (I use the property
 'project.version' as a reference for the plug-in.

 Now, how can I explain to the enforcer-plugin that this single plug-in
 indeed is allowed to be a snapshot? I'm hoping for a solution that
 doesn't
 mean implementing my own enforcer-rule... But if that what it takes,
 I'll
 do that. Just wanted to check if this is already possible, because I
 think
 this is not a very unusual use-case...

 Roland


 Understood, but I'm not interested in the updates, I'm trying to track
 down the plugins that have no version configured.


 The enforcer plugin can help you find plugins with missing versions,
 too.

 Wayne

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






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



 -
 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: How to create a maven local repository

2009-12-31 Thread Roland Asmann
 On 12/31/09 10:15 AM, Mezigue wrote:
 Hi Roland,

 Thanks for your advice.

 You are certainly right ; to be true, I should say you are surely
 right !
 :)

 Of course, I have no reason to initiate a local repository, but, why was
 this necessary in the previous version of Maven ?? And I've not found
 any
 advertisement about this in release notes.

 Just a word of advice - don't think of Maven 2 and Maven 1 as being the
 same piece of software - they share some concepts, but ultimately are
 very different. Maven 2 release notes are unlikely to reference changes
 from Maven 1.

 Justin

And exactly THAT was probably the reason you needed to do that before:
because you were using Maven 1. :-)

Roland



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



Plugins and their versions

2009-12-30 Thread Roland Asmann
Hi all!

I was wondering if there is a plugin that can report all configured
plugins in a POM. Important to me would be the configured version of the
plugin, so if no such version is given, it should either not give the
version or give it as 'latest'.

Does anybody know of a plugin that can do this?

Roland Asmann



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



Re: Plugins and their versions

2009-12-30 Thread Roland Asmann
Justin's suggestion is close to what I want. Only thing missing is the
plugins that have no versions. The reason I need that, is to find all our
plugins and set their versions. I've had to many problems with updated
plugins that killed my build.

The versions-plugin is definitely NOT what I want, it doesn't report me on
anything useful (in my case, I'm not saying the plugin itself isn't
useful!).

I'll work with the info-reports for now, but if someone else has a
suggestion, please let me know!

Roland


 also have a look at

 mvn versions:display-plugin-updates

 2009/12/30 Justin Edelson justinedel...@gmail.com:
 On 12/30/09 10:26 AM, Roland Asmann wrote:

 Hi all!

 I was wondering if there is a plugin that can report all configured
 plugins in a POM. Important to me would be the configured version of
 the
 plugin, so if no such version is given, it should either not give the
 version or give it as 'latest'.

 Does anybody know of a plugin that can do this?


 Yes.

 http://maven.apache.org/plugins/maven-project-info-reports-plugin/plugins-mojo.html

 Roland Asmann



 -
 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



 -
 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: Plugins and their versions

2009-12-30 Thread Roland Asmann
Understood, but I'm not interested in the updates, I'm trying to track
down the plugins that have no version configured.


 It should tell you what the current version is and suggest a newer
 version

 2009/12/30 Roland Asmann roland.asm...@adesso.at:
 Justin's suggestion is close to what I want. Only thing missing is the
 plugins that have no versions. The reason I need that, is to find all
 our
 plugins and set their versions. I've had to many problems with updated
 plugins that killed my build.

 The versions-plugin is definitely NOT what I want, it doesn't report me
 on
 anything useful (in my case, I'm not saying the plugin itself isn't
 useful!).

 I'll work with the info-reports for now, but if someone else has a
 suggestion, please let me know!

 Roland


 also have a look at

 mvn versions:display-plugin-updates

 2009/12/30 Justin Edelson justinedel...@gmail.com:
 On 12/30/09 10:26 AM, Roland Asmann wrote:

 Hi all!

 I was wondering if there is a plugin that can report all configured
 plugins in a POM. Important to me would be the configured version of
 the
 plugin, so if no such version is given, it should either not give the
 version or give it as 'latest'.

 Does anybody know of a plugin that can do this?


 Yes.

 http://maven.apache.org/plugins/maven-project-info-reports-plugin/plugins-mojo.html

 Roland Asmann



 -
 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



 -
 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



 -
 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: release plugin: version change not only in POMs ?

2009-12-21 Thread Roland Asmann
Then configure the resource-plugin specially for this file of yours:

- put the file in src/main/config (or something like that)
- have the resource-plugin copyfilter it to target/config (or something,
anything but target/classes I would say)
- configure the pax-plugin to read from the location used in the step above

I presume here that the pax-plugin can read its configuration from a
specific (configurable) location... If not, I guess you're screwed...

Roland


 Sorry for the mess but actually this is not directly the MANIFEST file. It
 is a file used by other plugin to create the MANIFEST file. I am talking
 about the pax plugin and osgi.bnd file which must reside in the root of
 the
 maven project along with the pom.xml. This file is a not resource, it is
 not
 going to the jar at all. It is like a config file for the pax plugin. And
 it
 is a text file.

 I read the info in the link about the resources plugin - it is exactly
 what
 I need but without packing this file to the resulting jar and it must not
 go
 to the target directory during the build process.

 19 ÄÅËÁÂÒÑ 2009 Ç. 0:45 ÐÏÌØÚÏ×ÁÔÅÌØ Dennis Lundberg
 denn...@apache.orgÎÁÐÉÓÁÌ:

 You should try to go about this in another way. Instead of having the
 version explicitly in text files, you should filter these files using
 the Resources Plugin. See

 http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html


 As for the example of the manifest file, you should let the JAR Plugin
 handle the version in there instead of managing it yourself. See


 http://maven.apache.org/plugins/maven-jar-plugin/examples/manifest-customization.html

 and

 http://maven.apache.org/shared/maven-archiver/index.html


 Grigory Ptashko wrote:
  Hello.
 
  Recently I've got acquainted with the release plugin. I started using
 it,
 it
  works great but I am missing one feature. The problem is the
 following:
 the
  version that is specified in a POM is used not only in this POM but
 also
 in
  another place in a plain-text format. Actually it is used in the
 MANIFEST.MF
  in the special header. So when I perform a release the release version
 have
  the new version, the trunk version gets the new y-SNAPSHOT version but
 that
  MANIFEST.MF file has old version x-SNAPSHOT which becomes wrong both
 in
  trunk and in the release.
 
  What I want is two steps to be executed while release:perform (phrases
 in
  quotes are taken from here
 
 http://maven.apache.org/plugins/maven-release-plugin/examples/prepare-release.html
  ):
 
 
 - The first is after the step Change the version in the poms from
 x-SNAPSHOT to a new version (you will be prompted for the versions
 to
 use):
 the same transformation must be done with the text file that I
 specify.
 - The second is after the step Bump the version in the POMs to a
 new
 value y-SNAPSHOT (these values will also be prompted for): the
 same
 transformation must be done with text file that I specify.
 
 
  How can I achieve this?
 
  Thank you.
 


 --
 Dennis Lundberg

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




 --
 ó Õ×ÁÖÅÎÉÅÍ,
 çÒÉÇÏÒÉÊ ðÔÁÛËÏ

 +7 (916) 1489766
 gptas...@cmmt.ru
 http://www.cmmt.ru




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



Re: Sharing files between modules within the same project, for use by sql-maven-plugin

2009-12-18 Thread Roland Asmann
Hi,

I guess you could patch the sql-plugin, but maybe you should use the
maven-dependency-plugin[1] to unpack your new module for the tests. Then
the sql-plugin can just read the unpacked file and you don't need to patch
anything.

[1] http://maven.apache.org/plugins/maven-dependency-plugin/unpack-mojo.html

Roland


 Hi

 I'm facing a problem sharing files between modules. We have a multi
 module build where several of the modules have database tests that use
 the sql-maven-plugin to set up a test database.

 These modules needs to share two files: a DDL file that creates the
 tables and an SQL file that populates the tables. We don't want to have
 multiple copies of these files in different modules, for obvious reasons.

 After browsing the web for examples of sharing resources between
 modules, I tried one where you put the files to be shared in a new
 module. They go into the directory src/main/resources. Then each module
 that needs the files just adds a dependency on the new module.

 The problem with that approach is that the files are then class path
 resources, which the sql-maven-plugin is not able to see. It seems to
 only be able use files within the current module.

 Is there another way we can do this?

 Would it be possible to patch the sql-maven-plugin to be able to read
 class path resources as files? Are there any examples of other plugins
 that do this?

 --
 Dennis Lundberg

 -
 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: release plugin: version change not only in POMs ?

2009-12-18 Thread Roland Asmann
Hi,

Sorry, didn't read the mail good enough and made some errors in my
previous reply!

- Put your files in src/main/config with the variables configured
- Have the resource-plugin copyfilter them to the root of the project
(make sure this is done before the pax-plugin runs)

If you use the clean-plugin, it would be a good idea to put the 2 files in
the root of the project in the list of files to delete as well!

Roland


 Sorry for the mess but actually this is not directly the MANIFEST file. It
 is a file used by other plugin to create the MANIFEST file. I am talking
 about the pax plugin and osgi.bnd file which must reside in the root of
 the
 maven project along with the pom.xml. This file is a not resource, it is
 not
 going to the jar at all. It is like a config file for the pax plugin. And
 it
 is a text file.

 I read the info in the link about the resources plugin - it is exactly
 what
 I need but without packing this file to the resulting jar and it must not
 go
 to the target directory during the build process.

 19 ÄÅËÁÂÒÑ 2009 Ç. 0:45 ÐÏÌØÚÏ×ÁÔÅÌØ Dennis Lundberg
 denn...@apache.orgÎÁÐÉÓÁÌ:

 You should try to go about this in another way. Instead of having the
 version explicitly in text files, you should filter these files using
 the Resources Plugin. See

 http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html


 As for the example of the manifest file, you should let the JAR Plugin
 handle the version in there instead of managing it yourself. See


 http://maven.apache.org/plugins/maven-jar-plugin/examples/manifest-customization.html

 and

 http://maven.apache.org/shared/maven-archiver/index.html


 Grigory Ptashko wrote:
  Hello.
 
  Recently I've got acquainted with the release plugin. I started using
 it,
 it
  works great but I am missing one feature. The problem is the
 following:
 the
  version that is specified in a POM is used not only in this POM but
 also
 in
  another place in a plain-text format. Actually it is used in the
 MANIFEST.MF
  in the special header. So when I perform a release the release version
 have
  the new version, the trunk version gets the new y-SNAPSHOT version but
 that
  MANIFEST.MF file has old version x-SNAPSHOT which becomes wrong both
 in
  trunk and in the release.
 
  What I want is two steps to be executed while release:perform (phrases
 in
  quotes are taken from here
 
 http://maven.apache.org/plugins/maven-release-plugin/examples/prepare-release.html
  ):
 
 
 - The first is after the step Change the version in the poms from
 x-SNAPSHOT to a new version (you will be prompted for the versions
 to
 use):
 the same transformation must be done with the text file that I
 specify.
 - The second is after the step Bump the version in the POMs to a
 new
 value y-SNAPSHOT (these values will also be prompted for): the
 same
 transformation must be done with text file that I specify.
 
 
  How can I achieve this?
 
  Thank you.
 


 --
 Dennis Lundberg

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




 --
 ó Õ×ÁÖÅÎÉÅÍ,
 çÒÉÇÏÒÉÊ ðÔÁÛËÏ

 +7 (916) 1489766
 gptas...@cmmt.ru
 http://www.cmmt.ru




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



Plug-in doesn't see configuration

2009-12-01 Thread Roland Asmann
Hi all,

I have a project that I am trying to build, but one of the plug-ins can't read 
its configuration!

When I build the project as a single project, everything is fine. This leads 
me to believe that the POM is actually correct. However, when I build the 
project as part of the larger group of projects it belongs to, the build 
doesn't work and Maven tells me the configuration can't be found

My POM.xml:
plugin
  groupIdat.statistik.equest.generator/groupId
  artifactIdmaven-eclipse-rcp-mojo/artifactId
  inheritedfalse/inherited
  executions
execution
  idinstall/id
  goals
goalproduct/goal
  /goals
  phaseprocess-sources/phase
  configuration
eclipseRcpVersion3.4.1.0/eclipseRcpVersion
outputDirectory${project.basedir}/../outputDirectory
  /configuration
/execution
  /executions
/plugin

I tried moving the configuration outside of the execution, but that didn't 
help either. And I will need it inside the execution anyway, so it wouldn't 
have helped much anyway...

This is the output Maven gives me when trying to build the complete group of 
projects:
[INFO] 
[ERROR] BUILD ERROR
[INFO] 
[INFO] One or more required plugin parameters are invalid/missing 
for 'eclipse-rcp-mojo:product'

[0] Inside the definition for plugin 'maven-eclipse-rcp-mojo' specify the 
following:

configuration
  ...
  eclipseRcpVersionVALUE/eclipseRcpVersion
/configuration.

Can someone tell me why the project builds as a stand-alone project, but 
doesn't when I run several projects?

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: roland.asm...@cfc.at
Web: www.cfc.at

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



Re: installing src or javadoc into local repository

2009-10-21 Thread Roland Asmann
Personally I use the maven-eclipse-plugin for that...

mvn eclipse:eclipse -DdownloadSources=true -DdownloadJavadocs=true

Not sure if the M2Eclipse -plugin can do the same, maybe someone who knows can 
shed a light (or already did, working through the list of unread messages as 
I write this).

Roland


On Wednesday 21 October 2009 05:16, jpswain wrote:
 I looked at the link but I still have these questions:
 Is there any sane way to simply tell maven, download and install src 
 javadoc for all artifacts in local repository?

 If not is their at least a way to say, install this jar with javadoc 
 src, AND ALSO the javadoc  src of all its transitive dependencies?  I'm
 having a heck of a time with this!

 Thanks,
 Jamie

 Sean Davis-5 wrote:
  On Fri, Oct 2, 2009 at 8:35 PM, Roland Asmann roland.asm...@cfc.at
 
  wrote:
  Check the install-mojo for this:
  http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.h
 tml
 
  Reinstall the jar into your repository and add the 'javadoc' and
  'sources'
  switches or install them separately with the 'classifier' switch.
 
  Thanks, Roland.  That is exactly what I needed.
 
  I apologize for the naive question in advance.  I have installed an
  external jar file into my local repository--very easy.  The jar file
  was built using ant as part of a third-party project.  I would now
  like to add the source and/or the javadocs to my local repository,
  also.  I have the source (in src/java/) and can generate the
  javadoc.  How can I install these files into my local repository (so
  that I have the equivalent of the download sources and javadocs)?
 
  Thanks,
  Sean
 
  -
  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
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: roland.asm...@cfc.at
Web: www.cfc.at

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



RE: maven-eclipse-plugin and src/main/webapp with Eclipse

2009-10-21 Thread Roland Asmann
Also, if you use WTP in Eclipse, it will work this way. I'd guess that if
you would get it to work, Eclipse would probably build incorrect WAR-files
because it would include the contents of that folder as both resources and
as real web-application.

So, just get used to it, it isn't broken and therefor doesn't need fixing!

Roland


 It doesn't really make sense for src/main/webapp to be a source folder -
 it doesn't contain compilable source files.

 Justin

 -Original Message-
 From: Vincent F [mailto:vincent.fu...@sgcib.com]
 Sent: Wednesday, October 21, 2009 1:22 PM
 To: users@maven.apache.org
 Subject: maven-eclipse-plugin and src/main/webapp with Eclipse


 Hi,

 I'm trying to move my current project structure to Maven Standard
 Directory Layout, so that everything I had in /WebContent is now in
 src/main/webapp .
 It works fine for the packaging.

 However, when using maven-eclipse-plugin 2.7 to update my Eclipse
 project and configuration files, I was expecting that src/main/webapp
 would be seen by Eclipse like a source folder, just like src/main/java
 and src/main/resources. Instead, it is seens as a regular folder, so I
 have to drill down from src to main to webapp to access my files.

 I've tried several things in maven-eclipse-plugin configuration, like

 sourceIncludes
 sourceIncludesrc/main/webapp/**/*.*/sourceInclude
 /sourceIncludes

 for example, but it doesn't work.

 Is there a way to fix this ? Or maybe it is not meant to be fixed
 because I shouldn't have src/main/webapp as a source folder ?
 Any piece of advice would be appreciated

 Thanks

 --
 Vincent





 --
 View this message in context:
 http://www.nabble.com/maven-eclipse-plugin-and-src-main-webapp-with-Ecli
 pse-tp25996692p25996692.html
 Sent from the Maven - Users mailing list archive at Nabble.com.


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


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






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



RE: Property resolution

2009-10-16 Thread Roland Asmann
Yes, I am. But reading that again and checking with a MOJO I wrote, I
guess I don't see it because the variable points to a java.io.File and not
a String...

However, I've found that I can get the local repository in Surefire as it
is in the system-properties as 'localRepository'.

Roland


 Are you passing these to surefire as system properties?
 http://maven.apache.org/plugins/maven-surefire-plugin/examples/system-properties.html

 If not, how are you passing them?

 -Original Message-
 From: Roland Asmann [mailto:roland.asm...@cfc.at]
 Sent: Thursday, October 15, 2009 2:13 PM
 To: Maven List
 Subject: Property resolution

 Hi all,

 I am playing around with some properties in my surefire-plugin... I need
 the ${settings.localRepository} in my tests, but it seems this is not
 being resolved. Any other properties I try to pass, seem to work...

 Is this a known bug or am I doing something wrong here?

 --
 Roland Asmann

 CFC Informationssysteme Entwicklungsgesellschaft m.b.H Bäckerstrasse 1/2/7
 A-1010 Wien FN 266155f, Handelsgericht Wien

 Tel.: +43/1/513 88 77 - 27
 Fax.: +43/1/513 88 62
 Email: roland.asm...@cfc.at
 Web: www.cfc.at

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



 ---
 CONFIDENTIALITY NOTICE: This e-mail and any files attached may contain
 confidential and proprietary information of Alcatel-Lucent and/or its
 affiliated entities. Access by the intended recipient only is authorized.
 Any liability arising from any party acting, or refraining from acting, on
 any information contained in this e-mail is hereby excluded. If you are
 not the intended recipient, please notify the sender immediately, destroy
 the original transmission and its attachments and do not disclose the
 contents to any other person, use it for any purpose, or store or copy the
 information in any medium. Copyright in this e-mail and any attachments
 belongs to Alcatel-Lucent and/or its affiliated entities.


 -
 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



Property resolution

2009-10-15 Thread Roland Asmann
Hi all,

I am playing around with some properties in my surefire-plugin... I need the 
${settings.localRepository} in my tests, but it seems this is not being 
resolved. Any other properties I try to pass, seem to work...

Is this a known bug or am I doing something wrong here?

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: roland.asm...@cfc.at
Web: www.cfc.at

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



Strange behavior in hudson when using -Dmaven.repo.local

2009-10-15 Thread Roland Asmann
Hi all,

I'm sending this to both the maven and the hudson list, because I'm not
sure who's causing the problem...

When I build my project in Hudson, I use the flag 'Use private Maven
repository', to make sure my builds don't conflict and actually build with
the dependencies that are available in remote repos.
Now, on hudson I see maven download (so far) 2 POMs to the default local
repo (~/.m2/repository) AND the configured repo. I then tried the
command-line that hudson uses on a local machine and here this does NOT
happen!

The POMs that are downloaded are (so far) always the parent-POMs that are
not in the current project-tree (in this case it's 2 of our company-wide
POMs).

Since all other dependencies seem to be going to the right repository, I
don't think this will actually influence my builds, although I can't be
100% sure.

So, my question is, does anybody else have this behavior? And should I
question the results that hudson gives me?

Would be great if one of the devs of either maven or hudson (or both)
could take a look at this!

Thanks.

Roland



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



Re: How can deploy artefacts without rebuilding project ?

2009-10-12 Thread Roland Asmann
If the artifact still exists, try deploy:deploy.


On Monday 12 October 2009 12:54, boraldo wrote:
 I want to build in 2 steps.
 1. install
 2. deploy

 But if I execute mvn deploy, it executes install phase again.
 If I execute mvn deploy:mvn deploy, error occurs:

 The packaging for this project did not assign a file to the build artifact

 How can I fix it ?

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: roland.asm...@cfc.at
Web: www.cfc.at

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



Re: How can deploy artefacts without rebuilding project ?

2009-10-12 Thread Roland Asmann
This means that you have a non-standard packaging... I guess...

Try deploy:deploy-file. Not the prefered solution (imo), but it should work.
Oh, check the parameters it needs though!


On Monday 12 October 2009 14:45, boraldo wrote:
 deploy:deploy implies to
 The packaging for this project did not assign a file to the build artifact

 MALICE wrote:
  If the artifact still exists, try deploy:deploy.
 
  On Monday 12 October 2009 12:54, boraldo wrote:
  I want to build in 2 steps.
  1. install
  2. deploy
 
  But if I execute mvn deploy, it executes install phase again.
  If I execute mvn deploy:mvn deploy, error occurs:
 
  The packaging for this project did not assign a file to the build
  artifact
 
  How can I fix it ?
 
  --
  Roland Asmann
 
  CFC Informationssysteme Entwicklungsgesellschaft m.b.H
  Bäckerstrasse 1/2/7
  A-1010 Wien
  FN 266155f, Handelsgericht Wien
 
  Tel.: +43/1/513 88 77 - 27
  Fax.: +43/1/513 88 62
  Email: roland.asm...@cfc.at
  Web: www.cfc.at
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: roland.asm...@cfc.at
Web: www.cfc.at

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



Re: Unit test project depending on WAR project code

2009-10-07 Thread Roland Asmann
Personally, I don't put ANY code in the WAR. That will definitely solve your 
problem! :-)


On Wednesday 07 October 2009 16:03, Chris Bredesen wrote:
 All,

 I have split my unit tests out into a separate project which will
 eventually become a module (not there yet).  I've got it mostly sorted
 but I'm getting compile errors on classes that are part of the main
 project which uses war packaging.

 Maven doesn't seem to add the WAR's code into the test module's test
 classpath correctly.  Is this a known issue?  Any idea how to get around
 it?  Maven is definitely finding the artifact in my repository; it's
 just not contributing the WAR's code (I think).

 Any help is appreciated.

 -Chris

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

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: roland.asm...@cfc.at
Web: www.cfc.at

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



Re: Unit test project depending on WAR project code

2009-10-07 Thread Roland Asmann
Thatś not the way I meant it... Sorry if it looked that way!

When I have a WAR-project, I normally create 2 modules: 1 with the java-code 
(package: JAR) and 1 with the other WAR-stuff (JSP, CSS, etc - package: WAR).

That way, I can use the code inside the JAR as a normal dependency in any and 
all tests I have.

Hope this cleared it up a bit. :-)


On Wednesday 07 October 2009 16:41, Chris Bredesen wrote:
 Why stop there?  I'll just not write ANY code.  Stress-free life! :) :)

 On 10/07/2009 10:13 AM, Roland Asmann wrote:
  Personally, I don't put ANY code in the WAR. That will definitely solve
  your problem! :-)
 
  On Wednesday 07 October 2009 16:03, Chris Bredesen wrote:
  All,
 
  I have split my unit tests out into a separate project which will
  eventually become a module (not there yet).  I've got it mostly sorted
  but I'm getting compile errors on classes that are part of the main
  project which uses war packaging.
 
  Maven doesn't seem to add the WAR's code into the test module's test
  classpath correctly.  Is this a known issue?  Any idea how to get around
  it?  Maven is definitely finding the artifact in my repository; it's
  just not contributing the WAR's code (I think).
 
  Any help is appreciated.
 
  -Chris
 
  -
  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

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: roland.asm...@cfc.at
Web: www.cfc.at

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



Re: How to add generated resources directory in a plugin

2009-10-06 Thread Roland Asmann
Werber,

Understandable. Then add the generated folder as a sources-folder and a
resources-folder with a filter on '**/*.java'. I guess that would be the
easiest way, in case more resource-types make it into this folder.

Roland


 Roland,

 I wish I had a choice, but I have to keep backwards-compatibility. Until
 now, we used to offer one property on the Mojo to set the output path
 (with a default of target/generated-sources/castor).

 Now, we are offering a second option for the resource files generated,
 but I still have to cater for those expecting things in the old location.

 Werber

 Roland Asmann wrote:
 Read the part about editing the plugin again... If you're working on the
 actual castor-plugin, wouldn't it be easier to just separate the sources
 and
 resources instead of adding the resources with inclusion/exclusion
 rules?


 On Friday 02 October 2009 13:45, Werner Guttmann wrote:
 Eric,

 the .castor.cdr files are a by-product of generating Java classes from
 an XML schema using the XML code generator of Castor (through the Maven
 plugin for Castor).

 Those resource files are being generated in
 target/generated-sources/castor during code generation.

 I hopes this makes it clearer 

 Werner

 Lewis, Eric wrote:
 Just out of curiosity: Is there a reason that you keep the .cdr files
 in
 src/main/java? IMHO you could have them in src/main/resources, since
 they
 end up in target/classes anyway.

 Best regards,
 Eric

 -Ursprüngliche Nachricht-
 Von: Werner Guttmann [mailto:wgut...@codehaus.org]
 Gesendet: Freitag, 2. Oktober 2009 13:13
 An: Maven Users List
 Betreff: Re: How to add generated resources directory in a plugin

 That does not really match what I am observing .. :-(.

 If I generate Java sources and resources into

 target/generated-sources/castor

 and use

 project.addCompileSourceRoot(target/generated-sources/castor)

 within the Maven plugin for Castor, Maven will include the generated
 Java classes during compilation and put the class files in
 target/classes of the project.

 As a result of this, users of the Maven plugin for Castor
 currently have
 to add the following section to their project POMs.

 resources
resource
   directorytarget/generated-sources/castor/directory
   includes
  include**/*.cdr/include
   /includes
/resource
resource
   directorysrc/main/resources/directory
/resource
 /resources

 to have those .castor.cdr Files copied to target/classes as
 well. As we
 all know, this is error-prone.

 As such, I tried to add code to the Maven plugin for Castor
 as follows:

 Resource resource = new Resource();
 resource.setDirectory( getResourceDestination().getAbsolutePath() );
 ListString includes = new LinkedListString();
 includes.add( **/*.cdr );
 resource.setIncludes( includes );
 project.addResource( resource );

 Problem is that once I add that code, the Java source files start
 showing up in target/classes, which is not ideal.

 Any idea what's going wrong here ?

 Werner

 Roland Asmann wrote:
 I believe this can work (not 100% sure, I generate into two
 different

 directories for sources and resources), but you should
 probably ONLY use the

 addCompileSourceRoot for your directory...

 The way I understand it, is that if you put sources 
 resources there, they

 are compiled to the output dir. Java knows how to handle
 .java-files --

 convert them to classes, and how to handle anything else
 -- just copy.

 If you use the resource-dir, maven will handle the copying
 and will copy

 everything from the source to the target, without compiling.

 So, I presume you have used both calls I gave you, although
 you should only

 use one.

 Hope this helps,

 On Thursday 01 October 2009 15:15, Werner Guttmann wrote:
 Hi Roland,

 does this pattern/recipe change if both resources and Java
 classes would

 be generated in the same directory. I have tried this a
 few days ago

 (trying to automate a few things for the
 castor-maven-plugin), and it

 seems like this does not really work.

 Assume you have a directory where you'll find 

 - A.java
 - B.java
 - .castor.cdr

 where the last is a resource file. If I use above code
 snippets, I can

 see in the target folder after a plugin run and subsequent
 compilation

 the compiled Java classes, the resource file and the source files.

 How can I avoid the source files to be copy across ?

 Regards
 Werner

 Roland Asmann wrote:
 Assuming you already have the maven-project as a variable
 in your plugin

 (if not, add it!):

 project.addCompileSourceRoot(your output directory here);


 And in the case of resources:

 Resource resource = new Resource();
 resource.setDirectory(your output directory here);
 resource.addInclude(**/*);
 project.addResource(resource);

 On Thursday 01 October 2009 13:59, Lewis, Eric wrote:
 Hi

 I'm writing a plugin which generates resources and also
 test resources.

 How in my plugin can I add these directories to the
 sources

Re: M2 : cvsignore and archetypes

2009-10-02 Thread Roland Asmann
We are doing something similar in our company, although I curently can't
tell you the exact solution (not at work yet).
I believe we are using some renaming-scheme like calling those files
'${DOT}cvsignore'  and then have the archetype replace the variable 'DOT'
with '.'.

As I said, I'm not 100% sure if this is our exact solution and if it works
out of the box or if we implemented our own archetype-plugin. You could
try this and I will get back at you when I'm at work to check this.

Roland


 Hi,

 We are stuck on using archetype on a complex multiproject template we
 would like to give to our developpers. We need to automatize the artefact
 publication for obvious reasons, but , it's not possible to add .cvsignore
 files on archetypes using the archetype:create-from-project goal.

 It is important for those files to be present prior to the developper
 first projet commit, otherwise it's a pain to correct afteward.

 Our workaround for the moment is to use the assembly plugin to generete a
 ZIP file of the template projet, then the developper will do a global
 search and replace of the groupID,artifactID and version in the poms.

 As another option I would think of another plugin to take over the job on
 creating those files, like the maven-eclipse-plugin...

 Is there anyone here with a similar issue ?

 Thanks.

 antonio

 -Message d'origine-
 De : Nick Stolwijk [mailto:nick.stolw...@gmail.com]
 Envoyé : jeudi, 1. octobre 2009 19:32
 À : PAROLINI Antonio; Maven Users List
 Objet : Re: Ant to Maven

 See also this link:
 http://maven.apache.org/guides/introduction/introduction-to-the-pom.html

 Nick Stolwijk
 ~Java Developer~

 IPROFS BV.
 Claus Sluterweg 125
 2012 WS Haarlem
 http://www.iprofs.nl



 On Thu, Oct 1, 2009 at 7:28 PM, Nick Stolwijk nick.stolw...@gmail.com
 wrote:
 From each module there will be one main artifact, ie a jar. Sometimes
 there can be multiple artifacts, like javadoc or sources. If you say
 that your ant script generates multiple jars, you will need to have
 multiple modules. That can be child-parent relation, or just a
 aggregator pom.

 Child parent relation:
 Each module has a section parent which point to a pom with shared
 configuration and/or dependency(management).

 Aggregator pom:
 You have multiple modules in subdirectories. You create a pom file
 with the modules tag to kick of all the builds with one command.

 These strategies can be combined. Your parent pom can also be your
 aggregator pom.

 Hth,

 Nick Stolwijk
 ~Java Developer~

 IPROFS BV.
 Claus Sluterweg 125
 2012 WS Haarlem
 http://www.iprofs.nl



 On Thu, Oct 1, 2009 at 7:14 PM, chicagopooldude
 seshu.pit...@cmegroup.com wrote:

 Thanks for your reply I have already started to use the antrun plugin.
 I
 wanted to know if you can please share some documentation on using
 seperate
 modules. Should I use parent-child modules ?
 --
 View this message in context:
 http://www.nabble.com/Ant-to-Maven-tp25696939p25703038.html
 Sent from the Maven - Users mailing list archive at Nabble.com.


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




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





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



Re: How to add generated resources directory in a plugin

2009-10-02 Thread Roland Asmann
Ouch... But like I said: I wasn't sure if it would work. We generate our 
sources and resources in separate folders.

OK, so it doesn't work this way... Maybe it is better to use your solution and 
add the source-folder to the resources. Either use the include, or (probably 
easier) the excludes (**/*.java). That should do the trick.


On Friday 02 October 2009 13:12, Werner Guttmann wrote:
 That does not really match what I am observing .. :-(.

 If I generate Java sources and resources into

 target/generated-sources/castor

 and use

 project.addCompileSourceRoot(target/generated-sources/castor)

 within the Maven plugin for Castor, Maven will include the generated
 Java classes during compilation and put the class files in
 target/classes of the project.

 As a result of this, users of the Maven plugin for Castor currently have
 to add the following section to their project POMs.

 resources
resource
   directorytarget/generated-sources/castor/directory
   includes
  include**/*.cdr/include
   /includes
/resource
resource
   directorysrc/main/resources/directory
/resource
 /resources

 to have those .castor.cdr Files copied to target/classes as well. As we
 all know, this is error-prone.

 As such, I tried to add code to the Maven plugin for Castor as follows:

 Resource resource = new Resource();
 resource.setDirectory( getResourceDestination().getAbsolutePath() );
 ListString includes = new LinkedListString();
 includes.add( **/*.cdr );
 resource.setIncludes( includes );
 project.addResource( resource );

 Problem is that once I add that code, the Java source files start
 showing up in target/classes, which is not ideal.

 Any idea what's going wrong here ?

 Werner

 Roland Asmann wrote:
  I believe this can work (not 100% sure, I generate into two different
  directories for sources and resources), but you should probably ONLY use
  the addCompileSourceRoot for your directory...
 
  The way I understand it, is that if you put sources  resources there,
  they are compiled to the output dir. Java knows how to handle .java-files
  -- convert them to classes, and how to handle anything else -- just
  copy. If you use the resource-dir, maven will handle the copying and will
  copy everything from the source to the target, without compiling.
 
  So, I presume you have used both calls I gave you, although you should
  only use one.
 
  Hope this helps,
 
  On Thursday 01 October 2009 15:15, Werner Guttmann wrote:
  Hi Roland,
 
  does this pattern/recipe change if both resources and Java classes would
  be generated in the same directory. I have tried this a few days ago
  (trying to automate a few things for the castor-maven-plugin), and it
  seems like this does not really work.
 
  Assume you have a directory where you'll find 
 
  - A.java
  - B.java
  - .castor.cdr
 
  where the last is a resource file. If I use above code snippets, I can
  see in the target folder after a plugin run and subsequent compilation
  the compiled Java classes, the resource file and the source files.
 
  How can I avoid the source files to be copy across ?
 
  Regards
  Werner
 
  Roland Asmann wrote:
  Assuming you already have the maven-project as a variable in your
  plugin (if not, add it!):
 
  project.addCompileSourceRoot(your output directory here);
 
 
  And in the case of resources:
 
  Resource resource = new Resource();
  resource.setDirectory(your output directory here);
  resource.addInclude(**/*);
  project.addResource(resource);
 
  On Thursday 01 October 2009 13:59, Lewis, Eric wrote:
  Hi
 
  I'm writing a plugin which generates resources and also test
  resources. How in my plugin can I add these directories to the sources
  paths and the test resources paths? (Except for using the build-helper
  plugin)
 
  Best regards,
  Eric
 
  -
  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

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

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: roland.asm...@cfc.at
Web: www.cfc.at

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



Re: M2 : cvsignore and archetypes

2009-10-02 Thread Roland Asmann
OK, so I checked. We are indeed using our own archetype-plugin. It can resolve 
files that have variables in the name.

This way we can include several 'system'-files (like for CVS) and other files 
that are always needed, but have different names/packages depending on our 
project. Think along the lines of using the groupId as the package-name for 
java-classes.

So, I suggest you look into writing your own archetype-plugin or find one that 
can do similar things as our plugin.


On Friday 02 October 2009 11:21, you wrote:
 We are doing something similar in our company, although I curently can't
 tell you the exact solution (not at work yet).
 I believe we are using some renaming-scheme like calling those files
 '${DOT}cvsignore'  and then have the archetype replace the variable 'DOT'
 with '.'.

 As I said, I'm not 100% sure if this is our exact solution and if it works
 out of the box or if we implemented our own archetype-plugin. You could
 try this and I will get back at you when I'm at work to check this.

 Roland

  Hi,
 
  We are stuck on using archetype on a complex multiproject template we
  would like to give to our developpers. We need to automatize the artefact
  publication for obvious reasons, but , it's not possible to add
  .cvsignore files on archetypes using the archetype:create-from-project
  goal.
 
  It is important for those files to be present prior to the developper
  first projet commit, otherwise it's a pain to correct afteward.
 
  Our workaround for the moment is to use the assembly plugin to generete a
  ZIP file of the template projet, then the developper will do a global
  search and replace of the groupID,artifactID and version in the poms.
 
  As another option I would think of another plugin to take over the job on
  creating those files, like the maven-eclipse-plugin...
 
  Is there anyone here with a similar issue ?
 
  Thanks.
 
  antonio
 
  -Message d'origine-
  De : Nick Stolwijk [mailto:nick.stolw...@gmail.com]
  Envoyé : jeudi, 1. octobre 2009 19:32
  À : PAROLINI Antonio; Maven Users List
  Objet : Re: Ant to Maven
 
  See also this link:
  http://maven.apache.org/guides/introduction/introduction-to-the-pom.html
 
  Nick Stolwijk
  ~Java Developer~
 
  IPROFS BV.
  Claus Sluterweg 125
  2012 WS Haarlem
  http://www.iprofs.nl
 
 
 
  On Thu, Oct 1, 2009 at 7:28 PM, Nick Stolwijk nick.stolw...@gmail.com
 
  wrote:
  From each module there will be one main artifact, ie a jar. Sometimes
  there can be multiple artifacts, like javadoc or sources. If you say
  that your ant script generates multiple jars, you will need to have
  multiple modules. That can be child-parent relation, or just a
  aggregator pom.
 
  Child parent relation:
  Each module has a section parent which point to a pom with shared
  configuration and/or dependency(management).
 
  Aggregator pom:
  You have multiple modules in subdirectories. You create a pom file
  with the modules tag to kick of all the builds with one command.
 
  These strategies can be combined. Your parent pom can also be your
  aggregator pom.
 
  Hth,
 
  Nick Stolwijk
  ~Java Developer~
 
  IPROFS BV.
  Claus Sluterweg 125
  2012 WS Haarlem
  http://www.iprofs.nl
 
 
 
  On Thu, Oct 1, 2009 at 7:14 PM, chicagopooldude
 
  seshu.pit...@cmegroup.com wrote:
  Thanks for your reply I have already started to use the antrun plugin.
  I
  wanted to know if you can please share some documentation on using
  seperate
  modules. Should I use parent-child modules ?
  --
  View this message in context:
  http://www.nabble.com/Ant-to-Maven-tp25696939p25703038.html
  Sent from the Maven - Users mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: roland.asm...@cfc.at
Web: www.cfc.at

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



Re: How to add generated resources directory in a plugin

2009-10-02 Thread Roland Asmann
Read the part about editing the plugin again... If you're working on the 
actual castor-plugin, wouldn't it be easier to just separate the sources and 
resources instead of adding the resources with inclusion/exclusion rules?


On Friday 02 October 2009 13:45, Werner Guttmann wrote:
 Eric,

 the .castor.cdr files are a by-product of generating Java classes from
 an XML schema using the XML code generator of Castor (through the Maven
 plugin for Castor).

 Those resource files are being generated in
 target/generated-sources/castor during code generation.

 I hopes this makes it clearer 

 Werner

 Lewis, Eric wrote:
  Just out of curiosity: Is there a reason that you keep the .cdr files in
  src/main/java? IMHO you could have them in src/main/resources, since they
  end up in target/classes anyway.
 
  Best regards,
  Eric
 
  -Ursprüngliche Nachricht-
  Von: Werner Guttmann [mailto:wgut...@codehaus.org]
  Gesendet: Freitag, 2. Oktober 2009 13:13
  An: Maven Users List
  Betreff: Re: How to add generated resources directory in a plugin
 
  That does not really match what I am observing .. :-(.
 
  If I generate Java sources and resources into
 
  target/generated-sources/castor
 
  and use
 
  project.addCompileSourceRoot(target/generated-sources/castor)
 
  within the Maven plugin for Castor, Maven will include the generated
  Java classes during compilation and put the class files in
  target/classes of the project.
 
  As a result of this, users of the Maven plugin for Castor
  currently have
  to add the following section to their project POMs.
 
  resources
 resource
directorytarget/generated-sources/castor/directory
includes
   include**/*.cdr/include
/includes
 /resource
 resource
directorysrc/main/resources/directory
 /resource
  /resources
 
  to have those .castor.cdr Files copied to target/classes as
  well. As we
  all know, this is error-prone.
 
  As such, I tried to add code to the Maven plugin for Castor
  as follows:
 
  Resource resource = new Resource();
  resource.setDirectory( getResourceDestination().getAbsolutePath() );
  ListString includes = new LinkedListString();
  includes.add( **/*.cdr );
  resource.setIncludes( includes );
  project.addResource( resource );
 
  Problem is that once I add that code, the Java source files start
  showing up in target/classes, which is not ideal.
 
  Any idea what's going wrong here ?
 
  Werner
 
  Roland Asmann wrote:
  I believe this can work (not 100% sure, I generate into two
 
  different
 
  directories for sources and resources), but you should
 
  probably ONLY use the
 
  addCompileSourceRoot for your directory...
 
  The way I understand it, is that if you put sources 
 
  resources there, they
 
  are compiled to the output dir. Java knows how to handle
 
  .java-files --
 
  convert them to classes, and how to handle anything else
 
  -- just copy.
 
  If you use the resource-dir, maven will handle the copying
 
  and will copy
 
  everything from the source to the target, without compiling.
 
  So, I presume you have used both calls I gave you, although
 
  you should only
 
  use one.
 
  Hope this helps,
 
  On Thursday 01 October 2009 15:15, Werner Guttmann wrote:
  Hi Roland,
 
  does this pattern/recipe change if both resources and Java
 
  classes would
 
  be generated in the same directory. I have tried this a
 
  few days ago
 
  (trying to automate a few things for the
 
  castor-maven-plugin), and it
 
  seems like this does not really work.
 
  Assume you have a directory where you'll find 
 
  - A.java
  - B.java
  - .castor.cdr
 
  where the last is a resource file. If I use above code
 
  snippets, I can
 
  see in the target folder after a plugin run and subsequent
 
  compilation
 
  the compiled Java classes, the resource file and the source files.
 
  How can I avoid the source files to be copy across ?
 
  Regards
  Werner
 
  Roland Asmann wrote:
  Assuming you already have the maven-project as a variable
 
  in your plugin
 
  (if not, add it!):
 
  project.addCompileSourceRoot(your output directory here);
 
 
  And in the case of resources:
 
  Resource resource = new Resource();
  resource.setDirectory(your output directory here);
  resource.addInclude(**/*);
  project.addResource(resource);
 
  On Thursday 01 October 2009 13:59, Lewis, Eric wrote:
  Hi
 
  I'm writing a plugin which generates resources and also
 
  test resources.
 
  How in my plugin can I add these directories to the
 
  sources paths and
 
  the test resources paths? (Except for using the
 
  build-helper plugin)
 
  Best regards,
  Eric
 
  -
 
  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

Re: installing src or javadoc into local repository

2009-10-02 Thread Roland Asmann
Check the install-mojo for this:
http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html

Reinstall the jar into your repository and add the 'javadoc' and 'sources'
switches or install them separately with the 'classifier' switch.

Roland



 I apologize for the naive question in advance.  I have installed an
 external jar file into my local repository--very easy.  The jar file
 was built using ant as part of a third-party project.  I would now
 like to add the source and/or the javadocs to my local repository,
 also.  I have the source (in src/java/) and can generate the
 javadoc.  How can I install these files into my local repository (so
 that I have the equivalent of the download sources and javadocs)?

 Thanks,
 Sean

 -
 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: How to add generated resources directory in a plugin

2009-10-01 Thread Roland Asmann
Assuming you already have the maven-project as a variable in your plugin (if 
not, add it!):

project.addCompileSourceRoot(your output directory here);


And in the case of resources:

Resource resource = new Resource();
resource.setDirectory(your output directory here);
resource.addInclude(**/*);
project.addResource(resource);



On Thursday 01 October 2009 13:59, Lewis, Eric wrote:
 Hi

 I'm writing a plugin which generates resources and also test resources.
 How in my plugin can I add these directories to the sources paths and the
 test resources paths? (Except for using the build-helper plugin)

 Best regards,
 Eric

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

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: roland.asm...@cfc.at
Web: www.cfc.at

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



Re: How to add generated resources directory in a plugin

2009-10-01 Thread Roland Asmann
I believe this can work (not 100% sure, I generate into two different 
directories for sources and resources), but you should probably ONLY use the 
addCompileSourceRoot for your directory...

The way I understand it, is that if you put sources  resources there, they 
are compiled to the output dir. Java knows how to handle .java-files -- 
convert them to classes, and how to handle anything else -- just copy.
If you use the resource-dir, maven will handle the copying and will copy 
everything from the source to the target, without compiling.

So, I presume you have used both calls I gave you, although you should only 
use one.

Hope this helps,


On Thursday 01 October 2009 15:15, Werner Guttmann wrote:
 Hi Roland,

 does this pattern/recipe change if both resources and Java classes would
 be generated in the same directory. I have tried this a few days ago
 (trying to automate a few things for the castor-maven-plugin), and it
 seems like this does not really work.

 Assume you have a directory where you'll find 

 - A.java
 - B.java
 - .castor.cdr

 where the last is a resource file. If I use above code snippets, I can
 see in the target folder after a plugin run and subsequent compilation
 the compiled Java classes, the resource file and the source files.

 How can I avoid the source files to be copy across ?

 Regards
 Werner

 Roland Asmann wrote:
  Assuming you already have the maven-project as a variable in your plugin
  (if not, add it!):
 
  project.addCompileSourceRoot(your output directory here);
 
 
  And in the case of resources:
 
  Resource resource = new Resource();
  resource.setDirectory(your output directory here);
  resource.addInclude(**/*);
  project.addResource(resource);
 
  On Thursday 01 October 2009 13:59, Lewis, Eric wrote:
  Hi
 
  I'm writing a plugin which generates resources and also test resources.
  How in my plugin can I add these directories to the sources paths and
  the test resources paths? (Except for using the build-helper plugin)
 
  Best regards,
  Eric
 
  -
  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

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: roland.asm...@cfc.at
Web: www.cfc.at

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



Re: Communication between plugins

2009-09-29 Thread Roland Asmann
My guess would be to write a plugin that depends on this plugin... Then you 
should be able to connect to all the public and (if you extend a class) 
protected methods... Or do you have a reason why that would/could not work?


On Tuesday 29 September 2009 12:00, Vadim wrote:
 Hello,
 In my plugin I need to construct a classpath containing artifacts in the
 pom of the project being analyzed. There's a maven-dependency-plugin which
 already does the specified task
 (BuildClasspathMojohttp://svn.apache.org/viewvc/maven/plugins/tags/maven-d
ependency-plugin-2.1/src/main/java/org/apache/maven/plugin/dependency/BuildC
lasspathMojo.java?view=markup). The question is: how do I reuse this
 functionality in my plugin?

 I've searched unsuccessfully for the explanation on how the interop between
 different maven plugins should happen.
 Thishttp://mail-archives.apache.org/mod_mbox/maven-users/200706.mbox/%3C46
69508e.1020...@apache.org%3ethread mentions that directly invoking mojos
 from plugins is a bad practice as it increases coupling between plugins and
 prohibits reuse (as plugins should be merely maven-specific wrappers of
 existing functionality). Some form of context, shared between plugins is
 mentioned, but I failed to find any documentation on how to use it.
 However (as I understood - and I might be wrong) this context is only
 shared between plugins configured in the pom and can't be used by plugins
 invoking other plugins directly.

 I would be grateful if someone could point me in right direction.

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: roland.asm...@cfc.at
Web: www.cfc.at

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



Re: Communication between plugins

2009-09-29 Thread Roland Asmann
OK, so maybe I should've written a bit more about what I meant.

I indeed meant to create a normal jar-dependency on the plugin and write your 
own plugin. However, that plugin could very well extend the mojo from the 
original and use any other classes from the extended plugin. I mean, it's 
just java!

And sharing the data is nice, but if you need something from an existing 
plugin, you'd have to convince the authors of that plugin to write it for 
you. So that doesn't solve anything!


On Tuesday 29 September 2009 13:05, Stephen Connolly wrote:
 That guess would be wrong.

 You cannot extend plugins in a different group id.  you need to create a
 standard jar dependency and have your plugins be thin wrappers on top of
 the jar dependency.

 If multiple plugins need to share data, AFAIK they should store that data
 in MavenSession

 -Stephen

 2009/9/29 Roland Asmann roland.asm...@cfc.at

  My guess would be to write a plugin that depends on this plugin... Then
  you should be able to connect to all the public and (if you extend a
  class) protected methods... Or do you have a reason why that would/could
  not work?
 
  On Tuesday 29 September 2009 12:00, Vadim wrote:
   Hello,
   In my plugin I need to construct a classpath containing artifacts in
   the pom of the project being analyzed. There's a
   maven-dependency-plugin
 
  which
 
   already does the specified task
   (BuildClasspathMojo
 
  http://svn.apache.org/viewvc/maven/plugins/tags/maven-d
 
  ependency-plugin-2.1/src/main/java/org/apache/maven/plugin/dependency/Bu
  ildC lasspathMojo.java?view=markup). The question is: how do I reuse
   this functionality in my plugin?
  
   I've searched unsuccessfully for the explanation on how the interop
 
  between
 
   different maven plugins should happen.
   This
 
  http://mail-archives.apache.org/mod_mbox/maven-users/200706.mbox/%3C46
 
  69508e.1020...@apache.org%3ethread mentions that directly invoking
   mojos from plugins is a bad practice as it increases coupling between
   plugins
 
  and
 
   prohibits reuse (as plugins should be merely maven-specific wrappers of
   existing functionality). Some form of context, shared between plugins
   is mentioned, but I failed to find any documentation on how to use it.
   However (as I understood - and I might be wrong) this context is only
   shared between plugins configured in the pom and can't be used by
   plugins invoking other plugins directly.
  
   I would be grateful if someone could point me in right direction.
 
  --
  Roland Asmann
 
  CFC Informationssysteme Entwicklungsgesellschaft m.b.H
  Bäckerstrasse 1/2/7
  A-1010 Wien
  FN 266155f, Handelsgericht Wien
 
  Tel.: +43/1/513 88 77 - 27
  Fax.: +43/1/513 88 62
  Email: roland.asm...@cfc.at
  Web: www.cfc.at
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: roland.asm...@cfc.at
Web: www.cfc.at

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



Re: Communication between plugins

2009-09-29 Thread Roland Asmann
On Tuesday 29 September 2009 14:19, Jörg Schaible wrote:
 Roland Asmann wrote at Dienstag, 29. September 2009 13:12:
  OK, so maybe I should've written a bit more about what I meant.
 
  I indeed meant to create a normal jar-dependency on the plugin and write
  your own plugin. However, that plugin could very well extend the mojo
  from the original and use any other classes from the extended plugin. I
  mean, it's just java!

 No you cannot! Every plugin is loaded only once. If you derive from a
 plugin, you will load the other one implicitly. So, what happens now, if
 your user want/have to use the original plugin in a different version than
 the version required by the derived plugin? You will easily break one of
 the two plugins and give your user a hard time, really!

Really? I had no idea... Good to know. I'll be developing a couple of plugins 
in my company over the next couple of weeks, so that's a thing to remember!


  And sharing the data is nice, but if you need something from an existing
  plugin, you'd have to convince the authors of that plugin to write it for
  you. So that doesn't solve anything!

 You can copy the source as long as the functionality is not separated into
 an own artifact.

 - Jörg


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

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: roland.asm...@cfc.at
Web: www.cfc.at

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



Re: [ANN] Maven Trap

2009-09-29 Thread Roland Asmann
On Tuesday 29 September 2009 17:23, nicolas de loof wrote:
   Just ot let you know the color feature is broken on windows platform :(
 
  Yeah, silly windows.  ansi.sys apparently isn't shipped anymore, which
  makes me sad as a former BBS junkie.  If you find a terminal that
  supports ansi color codes, it should work.

 Eclipse console also don't :(

At least the black/red in eclipse is visible (System.out vs System.err), so 
why should other colors be a problem?


  Don
 
   Colorizing console...
   [INFO] Scanning for projects...
   *←[m*[INFO] Reactor build order:
  
   Nicolas
  
   2009/9/29 Don Brown donald.br...@gmail.com
  
   Off and on, I've played with forks of Maven to improve it more to my
   liking.  This time, I've taking a different, hopefully more
   sustainable approach - Maven Trap.  It is an executable interception
   framework and three modules:
  
  * Console Colorization - Pages of white or green text is hard to
   read and makes it easy for critical errors to slip by. This module
   transforms output into ANSI colorized text to make it easier to see
   errors and other key events.
  * Always Offline - A build system should not connect the network
   unless you explicitly give it permission. This module inverts the
   meaning of the -o flag to make the default offline, only to be
   enabled via the -o flag.
  * YAML POM - While XML is great for programs, it sucks for humans.
   This module automatically converts your XML pom.xml file into a
   YAML-formatted pom.yml for either read-only or editable usage.
  
   Since Maven Trap treats Maven as an opaque black box, what it can do
   is limited, however, it provides low-risk integration points that can
   be extended fairly easily and should work with most any version of
   Maven. Each module can be enabled by setting a unique environment
   variable, giving you full control over which features you want without
   modifying your Maven installation.
  
   For more information, see
 
  http://mrdonbrown.blogspot.com/2009/09/introducing-maven-trap-honey-pot-f
 or.html
 
   Don
  
   -
   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

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: roland.asm...@cfc.at
Web: www.cfc.at

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



Re: Multi-module build/dependency behavior?

2009-09-28 Thread Roland Asmann
\steve.seagraves\.m2\repository\xml4j\xml4j\2_0_15\xml4j-2_0_15.jar,

 C:\Users\steve.seagraves\.m2\repository\com\bbn\openmap\4.6.3\openmap-4.6.3.jar]


 On Sun, Sep 27, 2009 at 2:33 PM, Roland Asmann roland.asm...@cfc.at
 wrote:

 It's looking for dependencies in target/classes? Really?

 Normally, Maven reads the POM in the directory you start it from. If
 this
 POM contains modules, those are loaded as well (and if they have
 modules,
 those are loaded too... ad infinitum). Then, if some of those modules
 have
 dependencies to each other, they are NOT loaded from the local
 repository,
 but from the reactor (Maven might shuffle your list of dependencies a
 bit
 to make sure the modules are build in such a way that the dependencies
 are
 already built when another project needs it).

 I hope this answers your question. If not, pleas be a bit more specific
 about what your problem is/what you want to know/do!

 Roland


  When performing [clean] install on multi-module projects, where is
 maven
  supposed to look for (child) dependencies?  Does it look in
 target/classes
  or does it look at the jar previously installed in the local repo?
 
  We have two systems where one seems to be looking in the local repo
 for
  all
  dependencies and one looking in target/classes.  I thought maven
 always
  used
  the local repo only but is this configurable?  How is this supposed to
  work?
 
  -Dave
 



 -
 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: Multi-module build/dependency behavior?

2009-09-28 Thread Roland Asmann
The behavior on system 2 is somehow wrong... Maybe it has something to do with 
the combination of Vista/Cygwin/Maven? At least make sure you have the same 
version of maven running and are using the same (or at least a compatible) 
settings.xml file...

Not sure what else it could be, but imo the correct behavior is that of system 
1.


On Monday 28 September 2009 15:21, David Hoffer wrote:
 No, the problem is with the compiler.  Here is more details on what is
 happening:

 I have a parent pom that has two modules, A  B.

 B depends on A.

 A depends on P which is a 3rd party jar with provided scope.  The task of
 module A is to combine the contents of A  P, this sum is the output of A.

 Now when we build this (clean install) at the parent pom on two systems we
 get two different behaviors.

 System 1: (XP w/ maven 2.1)
 Everything works as expected.  The build of B depends on the final output
 jar of A in its target folder.  I.e. with -X turned on I see its depending
 on .../target/A.jar

 System 2: (Vista, w/ cygwin, maven 2.?)
 Build fails.  The build of B does not depend on the final output jar of A,
 rather it depends on A's target/classes folder.  I.e. with -X turned on I
 see its depending on .../target/classes
 (Note the build fails here because the classes folder is not enough, it
 would also need the P dependency which is not available because it's scope
 is provided.  The desired behavior is as system 1, where dependent builds
 depend on the final output of A.)

 Whey are these builds different?  System 1 is the assumed correct behavior,
 right?  Is this somehow configurable??

 -Dave

 On Mon, Sep 28, 2009 at 12:51 AM, Roland Asmann roland.asm...@cfc.atwrote:
  And for what plugin is this? In a normal scenario, this could be the
  output in the project 'cdf-webtas-overrides' for the test-plugin
  (surefire-plugin). There could be others as well.
 
  This is normal, because the tests need your classes when being run... It
  always uses the classes from the current project + any and all
  dependencies from the local repository.
 
  If you still think this is wrong, please post a little more from the
  Maven log, this small excerpt unfortunately is not quite clear without
  more info!
 
  Roland
 
   That's right maven is looking for a dependency in taget/classes, see
 
  below
 
   for the log.  The one I'm referring to is
   C:\SVNHome\CDF-trunk\cdf-webtas\cdf-webtas-overrides\target\classes,
   it should be referencing the jar, right?
  
   How can this happen?  So far I have only seen this on the one system I
   described.
  
   -Dave
  
   [DEBUG]   (f) classpathElements = [
  
   C:\SVNHome\CDF-trunk\cdf-webtas\cdf-webtas-adapter\target\classes,
 
  C:\Users\steve.seagraves\.m2\repository\com\issinc\cdf\sdk\cdf-public\0.3
 -SNAPSHOT\cdf-public-0.3-SNAPSHOT.jar,
 
 
 
  C:\Users\steve.seagraves\.m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar
 ,
 
 
  C:\Users\steve.seagraves\.m2\repository\xml-apis\xml-apis\1.0.b2\xml-apis
 -1.0.b2.jar,
 
 
 
  C:\Users\steve.seagraves\.m2\repository\org\apache\xmlbeans\xmlbeans\2.4.
 0\xmlbeans-2.4.0.jar,
 
 
 
  C:\Users\steve.seagraves\.m2\repository\stax\stax-api\1.0.1\stax-api-1.0.
 1.jar,
 
 
 
  C:\Users\steve.seagraves\.m2\repository\org\codehaus\groovy\groovy-all\1.
 5.4\groovy-all-1.5.4.jar,
 
 
 
  C:\Users\steve.seagraves\.m2\repository\org\apache\ant\ant\1.7.0\ant-1.7.
 0.jar,
 
 
 
  C:\Users\steve.seagraves\.m2\repository\org\apache\ant\ant-launcher\1.7.0
 \ant-launcher-1.7.0.jar,
 
 
 
  C:\Users\steve.seagraves\.m2\repository\jline\jline\0.9.93\jline-0.9.93.j
 ar,
 
 
 
  C:\Users\steve.seagraves\.m2\repository\com\issinc\commons\slf-service-ap
 i\0.2\slf-service-api-0.2.jar,
 
 
 
  C:\Users\steve.seagraves\.m2\repository\com\issinc\commons\java-commons\0
 .2\java-commons-0.2.jar,
 
 
 
  C:\Users\steve.seagraves\.m2\repository\log4j\log4j\1.2.14\log4j-1.2.14.j
 ar,
 
 
 
  C:\Users\steve.seagraves\.m2\repository\com\google\code\findbugs\jsr305\1
 .3.9\jsr305-1.3.9.jar,
 
 
 
  C:\Users\steve.seagraves\.m2\repository\velocity\velocity\1.4\velocity-1.
 4.jar,
 
 
 
  C:\Users\steve.seagraves\.m2\repository\com\issinc\cdf\sdk\cdf-internal\0
 .3-SNAPSHOT\cdf-internal-0.3-SNAPSHOT.jar,
 
   C:\SVNHome\CDF-trunk\cdf-webtas\cdf-webtas-overrides\target\classes,
 
  C:\Users\steve.seagraves\.m2\repository\commons-beanutils\commons-beanuti
 ls\1.6\commons-beanutils-1.6.jar,
 
 
 
  C:\Users\steve.seagraves\.m2\repository\commons-logging\commons-logging\1
 .1.1\commons-logging-1.1.1.jar,
 
 
 
  C:\Users\steve.seagraves\.m2\repository\commons-collections\commons-colle
 ctions\3.1\commons-collections-3.1.jar,
 
 
 
  C:\Users\steve.seagraves\.m2\repository\commons-codec\commons-codec\1.3\c
 ommons-codec-1.3.jar,
 
 
 
  C:\Users\steve.seagraves\.m2\repository\commons-configuration\commons-con
 figuration\1.6\commons-configuration-1.6.jar,
 
 
 
  C:\Users\steve.seagraves\.m2\repository\commons-lang\commons-lang\2.2\com
 mons-lang-2.2.jar

Re: Multi-module build/dependency behavior?

2009-09-28 Thread Roland Asmann
And like I said: compare the settings.xml files on both systems, maybe there's 
something different in there!


On Monday 28 September 2009 16:14, David Hoffer wrote:
 Yeah, that combination is all I can come up with too for the cause of this
 bug.  I'm waiting to hear back from the developer what version of maven he
 is using (I think 2.1) and then I'll create a JIRA for this.

 -Dave

 On Mon, Sep 28, 2009 at 8:08 AM, Roland Asmann roland.asm...@cfc.at wrote:
  The behavior on system 2 is somehow wrong... Maybe it has something to do
  with
  the combination of Vista/Cygwin/Maven? At least make sure you have the
  same version of maven running and are using the same (or at least a
  compatible) settings.xml file...
 
  Not sure what else it could be, but imo the correct behavior is that of
  system
  1.
 
  On Monday 28 September 2009 15:21, David Hoffer wrote:
   No, the problem is with the compiler.  Here is more details on what is
   happening:
  
   I have a parent pom that has two modules, A  B.
  
   B depends on A.
  
   A depends on P which is a 3rd party jar with provided scope.  The task
   of module A is to combine the contents of A  P, this sum is the output
   of
 
  A.
 
   Now when we build this (clean install) at the parent pom on two systems
 
  we
 
   get two different behaviors.
  
   System 1: (XP w/ maven 2.1)
   Everything works as expected.  The build of B depends on the final
   output jar of A in its target folder.  I.e. with -X turned on I see its
 
  depending
 
   on .../target/A.jar
  
   System 2: (Vista, w/ cygwin, maven 2.?)
   Build fails.  The build of B does not depend on the final output jar of
 
  A,
 
   rather it depends on A's target/classes folder.  I.e. with -X turned on
   I see its depending on .../target/classes
   (Note the build fails here because the classes folder is not enough, it
   would also need the P dependency which is not available because it's
 
  scope
 
   is provided.  The desired behavior is as system 1, where dependent
   builds depend on the final output of A.)
  
   Whey are these builds different?  System 1 is the assumed correct
 
  behavior,
 
   right?  Is this somehow configurable??
  
   -Dave
  
   On Mon, Sep 28, 2009 at 12:51 AM, Roland Asmann roland.asm...@cfc.at
  
  wrote:
And for what plugin is this? In a normal scenario, this could be the
output in the project 'cdf-webtas-overrides' for the test-plugin
(surefire-plugin). There could be others as well.
   
This is normal, because the tests need your classes when being run...
 
  It
 
always uses the classes from the current project + any and all
dependencies from the local repository.
   
If you still think this is wrong, please post a little more from the
Maven log, this small excerpt unfortunately is not quite clear
without more info!
   
Roland
   
 That's right maven is looking for a dependency in taget/classes,
 see
   
below
   
 for the log.  The one I'm referring to is
 C:\SVNHome\CDF-trunk\cdf-webtas\cdf-webtas-overrides\target\classes
, it should be referencing the jar, right?

 How can this happen?  So far I have only seen this on the one
 system
 
  I
 
 described.

 -Dave

 [DEBUG]   (f) classpathElements = [

 C:\SVNHome\CDF-trunk\cdf-webtas\cdf-webtas-adapter\target\classes,
 
  C:\Users\steve.seagraves\.m2\repository\com\issinc\cdf\sdk\cdf-public\0.3
 
   -SNAPSHOT\cdf-public-0.3-SNAPSHOT.jar,
 
  C:\Users\steve.seagraves\.m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar
 
   ,
 
  C:\Users\steve.seagraves\.m2\repository\xml-apis\xml-apis\1.0.b2\xml-apis
 
   -1.0.b2.jar,
 
  C:\Users\steve.seagraves\.m2\repository\org\apache\xmlbeans\xmlbeans\2.4.
 
   0\xmlbeans-2.4.0.jar,
 
  C:\Users\steve.seagraves\.m2\repository\stax\stax-api\1.0.1\stax-api-1.0.
 
   1.jar,
 
  C:\Users\steve.seagraves\.m2\repository\org\codehaus\groovy\groovy-all\1.
 
   5.4\groovy-all-1.5.4.jar,
 
  C:\Users\steve.seagraves\.m2\repository\org\apache\ant\ant\1.7.0\ant-1.7.
 
   0.jar,
 
  C:\Users\steve.seagraves\.m2\repository\org\apache\ant\ant-launcher\1.7.0
 
   \ant-launcher-1.7.0.jar,
 
  C:\Users\steve.seagraves\.m2\repository\jline\jline\0.9.93\jline-0.9.93.j
 
   ar,
 
  C:\Users\steve.seagraves\.m2\repository\com\issinc\commons\slf-service-ap
 
   i\0.2\slf-service-api-0.2.jar,
 
  C:\Users\steve.seagraves\.m2\repository\com\issinc\commons\java-commons\0
 
   .2\java-commons-0.2.jar,
 
  C:\Users\steve.seagraves\.m2\repository\log4j\log4j\1.2.14\log4j-1.2.14.j
 
   ar,
 
  C:\Users\steve.seagraves\.m2\repository\com\google\code\findbugs\jsr305\1
 
   .3.9\jsr305-1.3.9.jar,
 
  C:\Users\steve.seagraves\.m2\repository\velocity\velocity\1.4\velocity-1.
 
   4.jar,
 
  C:\Users\steve.seagraves\.m2\repository\com\issinc\cdf\sdk\cdf-internal\0
 
   .3-SNAPSHOT\cdf-internal-0.3-SNAPSHOT.jar,
   
 C:\SVNHome\CDF-trunk\cdf-webtas\cdf-webtas-overrides\target\classes
,
 
  C

Re: Multi-module build/dependency behavior?

2009-09-28 Thread Roland Asmann
Very strange... I use 2.0.10 and I've NEVER had this problem...
I still think it's a configuration issue. Either because of CygWin or the
settings file.

I'll keep an eye open though, in case this starts to happen to me too!

Roland


 It turns out this is a bug with maven version 2.0.10.  It works fine if
 the
 developer switches to 2.1 or 2.2.1.

 -Dave

 On Mon, Sep 28, 2009 at 8:31 AM, Roland Asmann roland.asm...@cfc.at
 wrote:

 And like I said: compare the settings.xml files on both systems, maybe
 there's
 something different in there!


 On Monday 28 September 2009 16:14, David Hoffer wrote:
  Yeah, that combination is all I can come up with too for the cause of
 this
  bug.  I'm waiting to hear back from the developer what version of
 maven
 he
  is using (I think 2.1) and then I'll create a JIRA for this.
 
  -Dave
 
  On Mon, Sep 28, 2009 at 8:08 AM, Roland Asmann roland.asm...@cfc.at
 wrote:
   The behavior on system 2 is somehow wrong... Maybe it has something
 to
 do
   with
   the combination of Vista/Cygwin/Maven? At least make sure you have
 the
   same version of maven running and are using the same (or at least a
   compatible) settings.xml file...
  
   Not sure what else it could be, but imo the correct behavior is that
 of
   system
   1.
  
   On Monday 28 September 2009 15:21, David Hoffer wrote:
No, the problem is with the compiler.  Here is more details on
 what
 is
happening:
   
I have a parent pom that has two modules, A  B.
   
B depends on A.
   
A depends on P which is a 3rd party jar with provided scope.  The
 task
of module A is to combine the contents of A  P, this sum is the
 output
of
  
   A.
  
Now when we build this (clean install) at the parent pom on two
 systems
  
   we
  
get two different behaviors.
   
System 1: (XP w/ maven 2.1)
Everything works as expected.  The build of B depends on the final
output jar of A in its target folder.  I.e. with -X turned on I
 see
 its
  
   depending
  
on .../target/A.jar
   
System 2: (Vista, w/ cygwin, maven 2.?)
Build fails.  The build of B does not depend on the final output
 jar
 of
  
   A,
  
rather it depends on A's target/classes folder.  I.e. with -X
 turned
 on
I see its depending on .../target/classes
(Note the build fails here because the classes folder is not
 enough,
 it
would also need the P dependency which is not available because
 it's
  
   scope
  
is provided.  The desired behavior is as system 1, where dependent
builds depend on the final output of A.)
   
Whey are these builds different?  System 1 is the assumed correct
  
   behavior,
  
right?  Is this somehow configurable??
   
-Dave
   
On Mon, Sep 28, 2009 at 12:51 AM, Roland Asmann 
 roland.asm...@cfc.at
   
   wrote:
 And for what plugin is this? In a normal scenario, this could be
 the
 output in the project 'cdf-webtas-overrides' for the test-plugin
 (surefire-plugin). There could be others as well.

 This is normal, because the tests need your classes when being
 run...
  
   It
  
 always uses the classes from the current project + any and all
 dependencies from the local repository.

 If you still think this is wrong, please post a little more from
 the
 Maven log, this small excerpt unfortunately is not quite clear
 without more info!

 Roland

  That's right maven is looking for a dependency in
 taget/classes,
  see

 below

  for the log.  The one I'm referring to is
 
 C:\SVNHome\CDF-trunk\cdf-webtas\cdf-webtas-overrides\target\classes
 , it should be referencing the jar, right?
 
  How can this happen?  So far I have only seen this on the one
  system
  
   I
  
  described.
 
  -Dave
 
  [DEBUG]   (f) classpathElements = [
 
 
 C:\SVNHome\CDF-trunk\cdf-webtas\cdf-webtas-adapter\target\classes,
  
  
 C:\Users\steve.seagraves\.m2\repository\com\issinc\cdf\sdk\cdf-public\0.3
  
-SNAPSHOT\cdf-public-0.3-SNAPSHOT.jar,
  
  
 C:\Users\steve.seagraves\.m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar
  
,
  
  
 C:\Users\steve.seagraves\.m2\repository\xml-apis\xml-apis\1.0.b2\xml-apis
  
-1.0.b2.jar,
  
  
 C:\Users\steve.seagraves\.m2\repository\org\apache\xmlbeans\xmlbeans\2.4.
  
0\xmlbeans-2.4.0.jar,
  
  
 C:\Users\steve.seagraves\.m2\repository\stax\stax-api\1.0.1\stax-api-1.0.
  
1.jar,
  
  
 C:\Users\steve.seagraves\.m2\repository\org\codehaus\groovy\groovy-all\1.
  
5.4\groovy-all-1.5.4.jar,
  
  
 C:\Users\steve.seagraves\.m2\repository\org\apache\ant\ant\1.7.0\ant-1.7.
  
0.jar,
  
  
 C:\Users\steve.seagraves\.m2\repository\org\apache\ant\ant-launcher\1.7.0
  
\ant-launcher-1.7.0.jar,
  
  
 C:\Users\steve.seagraves\.m2\repository\jline\jline\0.9.93\jline-0.9.93.j
  
ar,
  
  
 C:\Users\steve.seagraves\.m2\repository\com\issinc\commons\slf-service-ap
  
i\0.2\slf

Re: Eclipse as a dependency

2009-09-27 Thread Roland Asmann
I believe that openArchitectureWare also uses the eclipse-formatter. At
least they have several eclipse-jars in their repo (although I honestly
have no idea how old/new thea are). You might want to check those out?

http://www.openarchitectureware.org/m2/

Roland


 there are some jars already there from an attempt long time ago to
 have eclipse in the repository, under org.eclipse

 On Fri, Sep 25, 2009 at 2:00 AM, Emmanuel Hugonnet ehsavoi...@gmail.com
 wrote:
 Hi,
 I have created a small Maven plugin which uses the Eclipse code
 formatter to
 format my code.
 I would like to release it but the available librairies of Eclipse are
 quite
 old and I don't want my users to have Eclipse installed (that's the
 whole
 point of the plugin). Is there a repository with Eclipse jars somewhere
 ? I
 think that m2eclipse/tycho should be using them but I can't seem to find
 the
 jars. What's the policy concerning these jars ?
 Thans,
 Emmanuel


 -
 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: Multi-module build/dependency behavior?

2009-09-27 Thread Roland Asmann
It's looking for dependencies in target/classes? Really?

Normally, Maven reads the POM in the directory you start it from. If this
POM contains modules, those are loaded as well (and if they have modules,
those are loaded too... ad infinitum). Then, if some of those modules have
dependencies to each other, they are NOT loaded from the local repository,
but from the reactor (Maven might shuffle your list of dependencies a bit
to make sure the modules are build in such a way that the dependencies are
already built when another project needs it).

I hope this answers your question. If not, pleas be a bit more specific
about what your problem is/what you want to know/do!

Roland


 When performing [clean] install on multi-module projects, where is maven
 supposed to look for (child) dependencies?  Does it look in target/classes
 or does it look at the jar previously installed in the local repo?

 We have two systems where one seems to be looking in the local repo for
 all
 dependencies and one looking in target/classes.  I thought maven always
 used
 the local repo only but is this configurable?  How is this supposed to
 work?

 -Dave




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



Re: Building Multiple Eclipse with Maven

2009-09-27 Thread Roland Asmann

 On 2009-09-27, at 6:59 AM, Nayan Hajratwala wrote:

 if you're using the m2eclipse plugin, building project b will force
 a build of project a... but all the jar files will be installed into
 and resolved from your local maven repository (~/.m2/repository),
 not the target directory.


 The JARs will not be resolved from the local repository by default if
 you are using M2Eclipse. They are resolved from the workspace which is
 one of the primary reasons for using M2Eclipse: the live management of
 your dependencies and being able to work with them as you would expect
 in Eclipse. It's when you use the maven-eclipse-plugin that you get
 this un-live connection to the local repository which is an extremely
 inefficient way to work.

I disagree. I've been using the maven-eclipse-plugin ever since we started
working with Maven and I have yet to be disappointed by it. A colleague
wrote a rather nice tutorial on how to set up your workspace for using
Maven and the maven-eclipse-plugin.
(http://maven.apache.org/plugins/maven-eclipse-plugin/examples/multi-module-projects.html)

To be honest though, I haven't looked at m2eclipse in quite some time
(think years, not months), so it might be better than the
maven-eclipse-plugin by now. But as long as thinks work for me, I don' t
think I would switch.


  From the M2Eclipse side we are soon just going to raise a huge
 warning to people using the maven-eclipse-plugin basically saying we
 don't support any interoperability between files generated with the
 maven-eclipse-plugin and properly importing projects into Eclipse
 using M2Eclipse. It's just causing too many support issues.

 We are also not going to support the N:1 mapping of many Maven
 projects to a single Eclipse project because that just destroys the
 natural mapping of Maven to Eclipse projects. It also causes seriously
 problems because if you N Maven project where different plugins are
 used in different projects we can't accurately run the lifecycle
 correctly for each of those projects if you merge them all together.
 In this case we have to run everything for all projects, or have to do
 some very unnatural things to preserve this mapping ourselves which we
 decided not to do. We decided to go the path of having one Eclipse
 project for every Maven project and we'll correct any problems with
 that model.

 Now that we have M2Eclipse synced up with Maven 3.x trunk and 3.x is
 compatible with 2.x this is the way forward. At least if you want to
 use M2Eclipse. We are now in a position to fix problems in Maven 3.x,
 turn around and absorb those changes in M2Eclipse and patch anything
 wrong in M2Eclipse

 Not sure why you would want the jar files in your target
 directory... is there some sort of project specific reason for this?


 ---
 Nayan Hajratwala
 http://agileshrugged.com
 http://twitter.com/nhajratw
 734.658.6032

 On Sep 25, 2009, at 6:41 PM, Piyush Gupta wrote:

 I have configured Multiple project in my eclipse workspace and each
 project
 has its own POM.XML . I have worked with the dependencies with single
 eclipse project with multiple modules in that single project and it
 works
 fine when build with Maven but when working with Different projects
 is there
 any possibility to build the all the project with one single parent
 project?
 I do not want to build all the dependent project and install the
 JAR in
 local repository and than build the parent project I know that will
 work
 fine. What I want to achieve is with out building the dependent
 project I
 will just build the Parent Project and it will build all the
 dependent
 project plus all the Third party JAR's which every project is
 having and put
 it into the local repo and every project's respective target
 directory.



 The project structure in eclipse is like this



 C:\eclipse\workspace

 \ ProjectA

 |

 pom.xml

 |

 src.com.javasource



 \ ProjectB (Child)

 |

 pom.xml

 |

 src.com.javasource



\ ProjectC

 |

 pom.xml

 |

 src.com.javasource



 So when I will compile or run the command on ProjectA 's pom.xml it
 should
 build the ProjectB and ProjectC and create the projectb.jar and
 projectc.jar
 and put those jar's into the respective projects target directory.





 Thanks,

 Jason

 --
 Jason van Zyl
 Founder,  Apache Maven
 http://twitter.com/jvanzyl
 --


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






-
To unsubscribe, e-mail: 

Re: Building Multiple Eclipse with Maven

2009-09-27 Thread Roland Asmann

 On 2009-09-27, at 1:40 PM, Roland Asmann wrote:


 On 2009-09-27, at 6:59 AM, Nayan Hajratwala wrote:

 if you're using the m2eclipse plugin, building project b will force
 a build of project a... but all the jar files will be installed into
 and resolved from your local maven repository (~/.m2/repository),
 not the target directory.


 The JARs will not be resolved from the local repository by default if
 you are using M2Eclipse. They are resolved from the workspace which
 is
 one of the primary reasons for using M2Eclipse: the live management
 of
 your dependencies and being able to work with them as you would
 expect
 in Eclipse. It's when you use the maven-eclipse-plugin that you get
 this un-live connection to the local repository which is an extremely
 inefficient way to work.

 I disagree. I've been using the maven-eclipse-plugin ever since we
 started
 working with Maven and I have yet to be disappointed by it. A
 colleague
 wrote a rather nice tutorial on how to set up your workspace for using
 Maven and the maven-eclipse-plugin.
 (http://maven.apache.org/plugins/maven-eclipse-plugin/examples/multi-module-projects.html
 )


 You are free to work however you like. I'll qualify what I said by
 saying that from what I've observed having real workspace resolution
 make developers more efficient then having to use the local repository
 as a mediator. If you want to use the maven-eclipse-plugin and that
 fits your development workflow that's cool. It's just not going to
 work with M2Eclipse because we just have too many support issues an
 there are no developers who work on both sides to create parity.

Again, the way we work DOES have real workspace resolution. The
maven-eclipse-plugin makes the projects in the reactor reference each
other PER DEFAULT, and any other projects in the workspace if you tell it
to.

I'm not trying to tell anybody not to use M2Eclipse or anything, I just
want to state that it is not correct to say that you can't use the plugin
if you want workspace resolution.


 To be honest though, I haven't looked at m2eclipse in quite some time
 (think years, not months), so it might be better than the
 maven-eclipse-plugin by now. But as long as thinks work for me, I
 don' t
 think I would switch.


 You are free to use whatever you like. We just can support
 interoperability indefinitely so with the 1.0 of M2Eclipse mixed use
 of the maven-eclipse-plugin and M2Eclipse will not be supported.


 From the M2Eclipse side we are soon just going to raise a huge
 warning to people using the maven-eclipse-plugin basically saying we
 don't support any interoperability between files generated with the
 maven-eclipse-plugin and properly importing projects into Eclipse
 using M2Eclipse. It's just causing too many support issues.

 We are also not going to support the N:1 mapping of many Maven
 projects to a single Eclipse project because that just destroys the
 natural mapping of Maven to Eclipse projects. It also causes
 seriously
 problems because if you N Maven project where different plugins are
 used in different projects we can't accurately run the lifecycle
 correctly for each of those projects if you merge them all together.
 In this case we have to run everything for all projects, or have to
 do
 some very unnatural things to preserve this mapping ourselves which
 we
 decided not to do. We decided to go the path of having one Eclipse
 project for every Maven project and we'll correct any problems with
 that model.

 Now that we have M2Eclipse synced up with Maven 3.x trunk and 3.x is
 compatible with 2.x this is the way forward. At least if you want to
 use M2Eclipse. We are now in a position to fix problems in Maven 3.x,
 turn around and absorb those changes in M2Eclipse and patch anything
 wrong in M2Eclipse

 Not sure why you would want the jar files in your target
 directory... is there some sort of project specific reason for this?


 ---
 Nayan Hajratwala
 http://agileshrugged.com
 http://twitter.com/nhajratw
 734.658.6032

 On Sep 25, 2009, at 6:41 PM, Piyush Gupta wrote:

 I have configured Multiple project in my eclipse workspace and each
 project
 has its own POM.XML . I have worked with the dependencies with
 single
 eclipse project with multiple modules in that single project and it
 works
 fine when build with Maven but when working with Different projects
 is there
 any possibility to build the all the project with one single parent
 project?
 I do not want to build all the dependent project and install the
 JAR in
 local repository and than build the parent project I know that will
 work
 fine. What I want to achieve is with out building the dependent
 project I
 will just build the Parent Project and it will build all the
 dependent
 project plus all the Third party JAR's which every project is
 having and put
 it into the local repo and every project's respective target
 directory.



 The project structure in eclipse is like this



 C:\eclipse\workspace

Re: Building Multiple Eclipse with Maven

2009-09-27 Thread Roland Asmann
 On Mon, Sep 28, 2009 at 7:07 AM, Jason van Zyl jvan...@sonatype.com
 wrote:

 I just ran it on a project and that's not what it did. I'm not talking
 only about multi-module projects but other projects you may refer to.
 I'm often working on several related projects where I need to work with
 them all at the same time.

 I'm not trying to tell anybody not to use M2Eclipse or anything, I just
 want to state that it is not correct to say that you can't use the
 plugin
 if you want workspace resolution.


 For inter-project resolution it is. For intra-project (i.e.
 multi-module) is does.

 useProjectReferences is on by default, which will include
 inter-project resolution.

 However the plugin needs to find your workspace in order for it to work.
 If your project is not located underneath your workspace then
 m-eclipse-p can not automatically find it for you (it just walks up
 the directory hierarchy looking for a valid workspace).
 In that case you need to specify the workspace with -Dworkspace

I just looked it up and with the -Dworkspace setting it should indeed
work. I must admit that I currently only work with one multi-module
project, but I am sure it works on the whole workspace since that part was
developed here in my company and donated to the plugin.


 I also work with the eclipse project name being the same as the artifact
 name.
 I'm not sure what m-eclipse-p does if they differ.
 I think I wrote some integration tests for this scenario, but YMMV.

That doesn't matter (according to my colleague, who wrote the original
code for it). Check the plugin details for more info, since there are a
couple of (minor) restrictions.


 -
 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



Incorrect artifacts in repository

2009-09-23 Thread Roland Asmann
Hi all,

I don't know who's responsible, so I hope I'm posting this at the right 
place... I'm switching my company to Nexus, and happened upon a couple of 
problems.

As far as I can see, the reason for this is as follows:
- Originally I had the 2 dev.java.net repositories in my POM, which made Maven 
check those BEFORE it checked repo1.maven.org
- Nexus advises to set the order of your repositories so that the most likely 
one to have a 'hit' be the first in the list -- this would normally be 
repo1.maven.org

Now, since there are a couple of differences between several artifacts, I am 
no longer able to build all of my projects!

The question is, should this be changed in repo1.maven.org and who can do 
this? For now, I can just reconfigure Nexus to check dev.java.net first, but 
that's not the correct solution.

The artifacts that give me problems are:
- javax.xml.soap:saaj-api:1.3 (dependency to activation is different)
- javax.xml.ws:jaxws-api:2.1 (has dependencies in dev.java.net that are NOT in 
repo1.maven.org)

Also there are some differences in other artifacts that are no problem to the 
build (licenses, repositories), but it might be a good idea to sync those as 
well...

So, if I'm not supposed to post this here, I'm sorry -- please direct me to 
the right place. Otherwise I hope someone can look into this problem and fix 
it!


-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: roland.asm...@cfc.at
Web: www.cfc.at

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



Re: Maven2 jsf-web project on Eclipse with details

2009-09-18 Thread Roland Asmann
Have you included TomCat in your server-list in Eclipse?
Does the imported project show as a WAR-project?
Have you added the project to TomCat?
Did eclipse perhaps change the URL under which the application can be
reached?
Do you run TomCat from Eclipse?

Lots of question that you still haven't answered in the description below,
but all the more important to make sure of!



 I want to explain my problems with more details. My aim is to make a
 maven2
 based jsf project and I followed these below steps;

 1. Apache tomcat 6 was installed and environmental variables are set to
 tomcat (it is working-checked)
 2. Eclipse Galileo was installed from its site (eclipse-jee-galileo) that
 contains wtp 3.1
 3. Maven 2.2.1 was installed and necessary settings were done. (it is
 working because version control from command prompt was checked)
 4. I made a jsf application by using this from command prompt : mvn
 archetype:create -DgroupId=alcatell -DartifactId=jsfWeb -DpackageName=web
 -DarchetypeGroupId=com.rfc.maven.archetypes
 -DarchetypeArtifactId=jsf-maven-archetype
 -DremoteRepositories=http://maven.rodcoffin.com/repo
 5. Then it is successfully created and I run  mvn clean,mvn compile, mvn
 install, mvn package and mvn eclipse:eclipse . All are successfull. I took
 my project war file (jsfWeb.war) and copied it under tomcat webapps
 folder.
 Then I run tomcat, it is also fine, my simple login web application works
 when I call it from web browser like http://localhost:8080/jsfWeb/
 BUT;
 I imported the project (import--existing maven project--select jsfWeb)
 but
 it is not working, when I run project on tomcat I always get this error;
 HTTP Status 404 - /jsfWeb. I install m2 plugin on eclipse and I did local
 repository setting, from the project properties all necessary things were
 also done. I update my eclipse but it says all items are installed

 Does the purpose of maven provide a simplicity for creating java project,
 local repo or independent IDE? What can I do? Where is my problem result
 from? Eclipse, maven plugin, tomcat or what is my mistake?

 If you are interesting in my problem, I will be grateful
 Thanks from now







 MavenZede wrote:

 I have been trying to run a maven2 jsf project on Eclipse Galileo, but I
 did not unfortunately. I tried a lot of ways, read thousands of web
 pages.
 My first problem is that I cannot import my maven2 web project into
 Eclipse. I know it should be happen when I run this mvn eclipse:eclipse,
 however it doesnt. The eclipse project file (.project) already came
 after
 I run above mentioned command, but again unfortunately this .project
 file
 could not opened with eclipse. Some specification of system are ;
 ---Apache tomcat 6.0
 ---myFaces 1.2.7 for jsf
 ---Eclipse galileo (3.5 with WTP 3.1)




 --
 View this message in context:
 http://www.nabble.com/Maven2-jsf-web-project-on-Eclipse-tp25491907p25505389.html
 Sent from the Maven - Users mailing list archive at Nabble.com.


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






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



Re: Maven2 jsf-web project on Eclipse with details

2009-09-18 Thread Roland Asmann
Maybe this might help you out:
http://maven.apache.org/plugins/maven-eclipse-plugin/examples/multi-module-projects.html


 I want to explain my problems with more details. My aim is to make a
 maven2
 based jsf project and I followed these below steps;

 1. Apache tomcat 6 was installed and environmental variables are set to
 tomcat (it is working-checked)
 2. Eclipse Galileo was installed from its site (eclipse-jee-galileo) that
 contains wtp 3.1
 3. Maven 2.2.1 was installed and necessary settings were done. (it is
 working because version control from command prompt was checked)
 4. I made a jsf application by using this from command prompt : mvn
 archetype:create -DgroupId=alcatell -DartifactId=jsfWeb -DpackageName=web
 -DarchetypeGroupId=com.rfc.maven.archetypes
 -DarchetypeArtifactId=jsf-maven-archetype
 -DremoteRepositories=http://maven.rodcoffin.com/repo
 5. Then it is successfully created and I run  mvn clean,mvn compile, mvn
 install, mvn package and mvn eclipse:eclipse . All are successfull. I took
 my project war file (jsfWeb.war) and copied it under tomcat webapps
 folder.
 Then I run tomcat, it is also fine, my simple login web application works
 when I call it from web browser like http://localhost:8080/jsfWeb/
 BUT;
 I imported the project (import--existing maven project--select jsfWeb)
 but
 it is not working, when I run project on tomcat I always get this error;
 HTTP Status 404 - /jsfWeb. I install m2 plugin on eclipse and I did local
 repository setting, from the project properties all necessary things were
 also done. I update my eclipse but it says all items are installed

 Does the purpose of maven provide a simplicity for creating java project,
 local repo or independent IDE? What can I do? Where is my problem result
 from? Eclipse, maven plugin, tomcat or what is my mistake?

 If you are interesting in my problem, I will be grateful
 Thanks from now







 MavenZede wrote:

 I have been trying to run a maven2 jsf project on Eclipse Galileo, but I
 did not unfortunately. I tried a lot of ways, read thousands of web
 pages.
 My first problem is that I cannot import my maven2 web project into
 Eclipse. I know it should be happen when I run this mvn eclipse:eclipse,
 however it doesnt. The eclipse project file (.project) already came
 after
 I run above mentioned command, but again unfortunately this .project
 file
 could not opened with eclipse. Some specification of system are ;
 ---Apache tomcat 6.0
 ---myFaces 1.2.7 for jsf
 ---Eclipse galileo (3.5 with WTP 3.1)




 --
 View this message in context:
 http://www.nabble.com/Maven2-jsf-web-project-on-Eclipse-tp25491907p25505389.html
 Sent from the Maven - Users mailing list archive at Nabble.com.


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






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



Re: Maven2 jsf-web project on Eclipse with details

2009-09-18 Thread Roland Asmann
Sorry, that forth question was incorrect. Eclipse can't change the URL.
But, you said it shows up as a Java-Project? I presume packaging is 'war', so 
it should show up as a web-project. 

The nyhou can right-click the server and 'add projects'. I've never used 
that 'run on server', I don't think you need it...

Please read and try the stuff in the link I sent, that should work. Just make 
sure you have the WTP-settings configured for the call to 'mvn 
eclipse:eclipse'.

Good luck!


On Friday 18 September 2009 12:19, MavenZede wrote:
 Thanks for your attention Malice,

 Tomcat is in server list, I defined it from Window--Preferences--Server
 tab (note: lots of time I remove and add it again and again to be able to
 have any chance, anyway)

 imported project seems as Maven-Java project, it comes with its pom.xml

 I added the project on Tomcat within Eclipse by right clicking on project
 then choosing run on server finally selecting Apache tomcat 6.0. Tomcat
 seems run but the error remains. Without any project I just run Tomcat from
 server tab in eclipse but, when I didnot reach localhost (I mean Apache
 welcome page). I dont know, whether it must run or not. In addition, when I
 created any web project inside from Eclipse, it runs without any error on
 tomcat or something else. Just maven project does not work.

 I'm sory, I cannot understand forth question, how can I see this eclipse
 URL settings?

 Thanks from now

 MALICE wrote:
  Have you included TomCat in your server-list in Eclipse?
  Does the imported project show as a WAR-project?
  Have you added the project to TomCat?
  Did eclipse perhaps change the URL under which the application can be
  reached?
  Do you run TomCat from Eclipse?
 
  Lots of question that you still haven't answered in the description
  below, but all the more important to make sure of!
 
  I want to explain my problems with more details. My aim is to make a
  maven2
  based jsf project and I followed these below steps;
 
  1. Apache tomcat 6 was installed and environmental variables are set to
  tomcat (it is working-checked)
  2. Eclipse Galileo was installed from its site (eclipse-jee-galileo)
  that contains wtp 3.1
  3. Maven 2.2.1 was installed and necessary settings were done. (it is
  working because version control from command prompt was checked)
  4. I made a jsf application by using this from command prompt : mvn
  archetype:create -DgroupId=alcatell -DartifactId=jsfWeb
  -DpackageName=web -DarchetypeGroupId=com.rfc.maven.archetypes
  -DarchetypeArtifactId=jsf-maven-archetype
  -DremoteRepositories=http://maven.rodcoffin.com/repo
  5. Then it is successfully created and I run  mvn clean,mvn compile, mvn
  install, mvn package and mvn eclipse:eclipse . All are successfull. I
  took
  my project war file (jsfWeb.war) and copied it under tomcat webapps
  folder.
  Then I run tomcat, it is also fine, my simple login web application
  works when I call it from web browser like http://localhost:8080/jsfWeb/
  BUT;
  I imported the project (import--existing maven project--select jsfWeb)
  but
  it is not working, when I run project on tomcat I always get this error;
  HTTP Status 404 - /jsfWeb. I install m2 plugin on eclipse and I did
  local repository setting, from the project properties all necessary
  things were also done. I update my eclipse but it says all items are
  installed
 
  Does the purpose of maven provide a simplicity for creating java
  project, local repo or independent IDE? What can I do? Where is my
  problem result from? Eclipse, maven plugin, tomcat or what is my
  mistake?
 
  If you are interesting in my problem, I will be grateful
  Thanks from now
 
  MavenZede wrote:
  I have been trying to run a maven2 jsf project on Eclipse Galileo, but
  I did not unfortunately. I tried a lot of ways, read thousands of web
  pages.
  My first problem is that I cannot import my maven2 web project into
  Eclipse. I know it should be happen when I run this mvn
  eclipse:eclipse, however it doesnt. The eclipse project file (.project)
  already came after
  I run above mentioned command, but again unfortunately this .project
  file
  could not opened with eclipse. Some specification of system are ;
  ---Apache tomcat 6.0
  ---myFaces 1.2.7 for jsf
  ---Eclipse galileo (3.5 with WTP 3.1)
 
  --
  View this message in context:
  http://www.nabble.com/Maven2-jsf-web-project-on-Eclipse-tp25491907p25505
 389.html Sent from the Maven - Users mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7

Re: Maven2 jsf-web project on Eclipse

2009-09-17 Thread Roland Asmann
For the web-part you probably need to configure the eclipse:eclipse goal with 
WTP-settings... Check the plugin-description on the exact settings.

I've been using this plugin for almost 3 years now and i works like a charm... 
I have to admit though, I haven't used it in eclipse 3.5 or on TomCat, but 
that shouldn't be a real problem...


On Thursday 17 September 2009 16:08, MavenZede wrote:
 I have been trying to run a maven2 jsf project on Eclipse Galileo, but I
 did not unfortunately. I tried a lot of ways, read thousands of web pages.
 My first problem is that I cannot import my maven2 web project into
 Eclipse. I know it should be happen when I run this mvn eclipse:eclipse,
 however it doesnt. The eclipse project file (.project) already came after I
 run above mentioned command, but again unfortunately this .project file
 could not opened with eclipse. Some specification of system are ;
 ---Apache tomcat 6.0
 ---myFaces 1.2.7 for jsf
 ---Eclipse galileo (3.5 with WTP 3.1)

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: roland.asm...@cfc.at
Web: www.cfc.at

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



Re: Skipping deployment of module

2009-09-14 Thread Roland Asmann
So, I tried to checked this... I can't say if it works, because my build 
crashes. The reason it crashes is because I have no distributionManagement 
in my POM... Does this mean that in order to run mvn:deploy on an 
aggregator-POM, I need to set its ditribution-settings?

Anyway, I solved my initial problem by telling the aggregator that it can 
distribute to ${java.io.tmpdir}. This way I won't pollute our repository with 
aggregators and I'm abel to trigger mvn:deploy on the root-level.

Conclusion: I have no idea if the mentioned setting works, but judging from 
the way Maven works, it should skip the project in which it was set and any 
projects that inherit from this project (probably, the page doesn't state 
otherwise).


On Friday 11 September 2009 18:54, David Hoffer wrote:
 Regarding the link:

 I don't want to deploy one of the artifacts in my multi-module build.
 Can I skip deployment?
 Yes, you can skip deployment of individual modules by configuring the
 deploy plugin as follows:
 plugin
artifactIdmaven-deploy-plugin/artifactId
versionX.Y/version
configuration
  skiptrue/skip
   /configuration
 /plugin

 This example doesn't show how to skip one of the artifacts, rather it
 seems to be an all or nothing example.  Can someone confirm if you can
 skip certain artifacts and if so how?

 -Dave

 On Fri, Sep 11, 2009 at 8:17 AM, Anders Hammar and...@hammar.net wrote:
  I'm a little bit confused. Is the aggregator pom also the parent of the
  modules? If it is, it should also be deployed.
 
  If not, I guess it should be able to make it not deploy by doing exactly
  as described in:
  http://maven.apache.org/plugins/maven-deploy-plugin/faq.html#skip
  Declare this in the aggregator pom. Have you tried it and it doesn't
  work?
 
  /Anders
 
  On Fri, Sep 11, 2009 at 15:48, Roland Asmann roland.asm...@cfc.at wrote:
  Hi all,
 
  Is it possible to skip deployment of a specific module when triggering
  'mvn deploy'? I've read in [1] that it's possible, but I think this will
  only work
  on sub-modules.
 
  My problem is that I have an aggregator-pom that is only used as an
  aggregator
  and should not be deployed. Since itś just a small POM, it wouldn't be a
  real
  big problem if it finds it's way into our company's repository, but
  seeing how we have a lot of those small aggregator-POMs, it might
  clutter the repo.
 
  So, can anybody tell me if [1] works for the parent as well? If nobody
  knows,
  I might just give it a try and see what it does...
 
  Thanks.
 
 
  [1] http://maven.apache.org/plugins/maven-deploy-plugin/faq.html
 
  --
  Roland Asmann
 
  CFC Informationssysteme Entwicklungsgesellschaft m.b.H
  Bäckerstrasse 1/2/7
  A-1010 Wien
  FN 266155f, Handelsgericht Wien
 
  Tel.: +43/1/513 88 77 - 27
  Fax.: +43/1/513 88 62
  Email: roland.asm...@cfc.at
  Web: www.cfc.at
 
  -
  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

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: roland.asm...@cfc.at
Web: www.cfc.at

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



Re: Cobertura in EAR artefacts

2009-09-14 Thread Roland Asmann
Ah, this unfortunately means that you *CAN'T* run the site-build as you 
normally would, since the reports are generated on a per-module basis and you 
would 'update;  your results with a later test.

So, it's best to 'manually' test your coverage or have 2 'passes' of maven's 
site-build to include the updated cobertura-results.

And maybe it needs mentioning, maybe not: stay away from the 'clean'-goal 
between these passes! :-)


On Monday 14 September 2009 18:03, Roland Asmann wrote:
 Couldn't you just package the cobertura-jars in your EAR and run
 integration-tests on them? I believe that Cobertura writes all calls to the
 respective data-files when methods are called... At least, last time I
 checked this worked for me... :-)

 To use the cobertura-jars, just add the cobertura:instrument call in the
 POM and Maven will handle the rest... Be carefull though, it's probably
 best to do this in a test-profile, since your normal artifacts will now
 have Cobertura-classes in them!

 POM-snippet:
 -- SNIPPET --
   profiles
     profile
       idtest/id
       build
         plugins
           plugin
             groupIdorg.codehaus.mojo/groupId
             artifactIdcobertura-maven-plugin/artifactId
             version2.3/version
             executions
               execution
                 idinstrument/id
                 phaseprocess-classes/phase
                 goals
                   goalinstrument/goal
                 /goals
               /execution
             /executions
           /plugin
         /plugins
       /build
       dependencies
         dependency
           groupIdnet.sourceforge.cobertura/groupId
           artifactIdcobertura/artifactId
           version1.9.2/version
         /dependency
       /dependencies
     /profile
   /profiles
 --- SNIPPET ENDS --

 On Monday 14 September 2009 17:21, Frederic Camblor wrote:
  Hi folks !
  I'm facing a problematic concerning the cobertura report.
 
  Suppose we have an EAR Application with :
  - A Business module
  - A Web module
 
  Web layer uses the Business Layer.
  Unit tests are made in both Business and WEB modules.
 
  When I run tests on WEB module, some Business classes are called during
  the test process.
 
  My problem is : I don't know how to parameterize cobertura in order to
  aggregate results from Business layer during the Web Layer tests
  execution.
 
  That is to say, for now on, I've only 10% of test coverage on Business
  layer and 50% of test coverage on Web layer ... because they are
  aggregated * independently* !
  Although I'm sure I could have almost ~40% of test coverage on Business
  layer with the execution of tests on Web layer :(
 
  Someone already faced the problem ?
 
  Thanks in advance
  Frederic

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: roland.asm...@cfc.at
Web: www.cfc.at

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



Re: Cobertura in EAR artefacts

2009-09-14 Thread Roland Asmann
Couldn't you just package the cobertura-jars in your EAR and run 
integration-tests on them? I believe that Cobertura writes all calls to the 
respective data-files when methods are called... At least, last time I 
checked this worked for me... :-)

To use the cobertura-jars, just add the cobertura:instrument call in the POM 
and Maven will handle the rest... Be carefull though, it's probably best to 
do this in a test-profile, since your normal artifacts will now have 
Cobertura-classes in them!

POM-snippet:
-- SNIPPET --
  profiles
    profile
      idtest/id
      build
        plugins
          plugin
            groupIdorg.codehaus.mojo/groupId
            artifactIdcobertura-maven-plugin/artifactId
            version2.3/version
            executions
              execution
                idinstrument/id
                phaseprocess-classes/phase
                goals
                  goalinstrument/goal
                /goals
              /execution
            /executions
          /plugin
        /plugins
      /build
      dependencies
        dependency
          groupIdnet.sourceforge.cobertura/groupId
          artifactIdcobertura/artifactId
          version1.9.2/version
        /dependency
      /dependencies
    /profile
  /profiles
--- SNIPPET ENDS --



On Monday 14 September 2009 17:21, Frederic Camblor wrote:
 Hi folks !
 I'm facing a problematic concerning the cobertura report.

 Suppose we have an EAR Application with :
 - A Business module
 - A Web module

 Web layer uses the Business Layer.
 Unit tests are made in both Business and WEB modules.

 When I run tests on WEB module, some Business classes are called during the
 test process.

 My problem is : I don't know how to parameterize cobertura in order to
 aggregate results from Business layer during the Web Layer tests execution.

 That is to say, for now on, I've only 10% of test coverage on Business
 layer and 50% of test coverage on Web layer ... because they are aggregated
 * independently* !
 Although I'm sure I could have almost ~40% of test coverage on Business
 layer with the execution of tests on Web layer :(

 Someone already faced the problem ?

 Thanks in advance
 Frederic

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: roland.asm...@cfc.at
Web: www.cfc.at

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



Skipping deployment of module

2009-09-11 Thread Roland Asmann
Hi all,

Is it possible to skip deployment of a specific module when triggering 'mvn 
deploy'? I've read in [1] that it's possible, but I think this will only work 
on sub-modules.

My problem is that I have an aggregator-pom that is only used as an aggregator 
and should not be deployed. Since itś just a small POM, it wouldn't be a real 
big problem if it finds it's way into our company's repository, but seeing 
how we have a lot of those small aggregator-POMs, it might clutter the repo.

So, can anybody tell me if [1] works for the parent as well? If nobody knows, 
I might just give it a try and see what it does...

Thanks.


[1] http://maven.apache.org/plugins/maven-deploy-plugin/faq.html

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: roland.asm...@cfc.at
Web: www.cfc.at

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



Re: Skipping deployment of module

2009-09-11 Thread Roland Asmann
No, it's not the parent. I haven't tried the skipping yet, I'm currently 
turning our projects upside-down, so I don't have the time yet... I just 
wanted to check if somebody might now the answer...


On Friday 11 September 2009 16:17, Anders Hammar wrote:
 I'm a little bit confused. Is the aggregator pom also the parent of the
 modules? If it is, it should also be deployed.

 If not, I guess it should be able to make it not deploy by doing exactly as
 described in:
 http://maven.apache.org/plugins/maven-deploy-plugin/faq.html#skip
 Declare this in the aggregator pom. Have you tried it and it doesn't work?

 /Anders

 On Fri, Sep 11, 2009 at 15:48, Roland Asmann roland.asm...@cfc.at wrote:
  Hi all,
 
  Is it possible to skip deployment of a specific module when triggering
  'mvn deploy'? I've read in [1] that it's possible, but I think this will
  only work
  on sub-modules.
 
  My problem is that I have an aggregator-pom that is only used as an
  aggregator
  and should not be deployed. Since itś just a small POM, it wouldn't be a
  real
  big problem if it finds it's way into our company's repository, but
  seeing how we have a lot of those small aggregator-POMs, it might clutter
  the repo.
 
  So, can anybody tell me if [1] works for the parent as well? If nobody
  knows,
  I might just give it a try and see what it does...
 
  Thanks.
 
 
  [1] http://maven.apache.org/plugins/maven-deploy-plugin/faq.html
 
  --
  Roland Asmann
 
  CFC Informationssysteme Entwicklungsgesellschaft m.b.H
  Bäckerstrasse 1/2/7
  A-1010 Wien
  FN 266155f, Handelsgericht Wien
 
  Tel.: +43/1/513 88 77 - 27
  Fax.: +43/1/513 88 62
  Email: roland.asm...@cfc.at
  Web: www.cfc.at
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: roland.asm...@cfc.at
Web: www.cfc.at

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



Question about site deployment

2009-09-11 Thread Roland Asmann
Hi all,

I am currently refactoring a lot of our projects and this means updating all 
POMs. I was looking at the ditributionmanagement-part of my POMs, and I was 
wondering why there is no different setting for the SNAPSHOT- and 
RELEASE-sites, like with the repositories.

We are running nightly builds, that both deploy the SNAPSHOT artifacts and the 
SNAPSHOT sites. However, it would be nice to have these deployed to a 
different location for SNAPSHOTS, so we can delete them when we release the 
projects (in other words: when they are obsolete).

Is there an easy way to accomplish something like this with the 2.0 branch of 
Maven?

Thanks,

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: roland.asm...@cfc.at
Web: www.cfc.at

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



Re: difference between snapshot and rc

2009-08-31 Thread Roland Asmann
Probably depends on what you want...

If you want a reproducable build, go with an RC (it's like a release - it 
shouldn't change over time), if you want the latest development-build, go 
with the SNAPSHOT.


On Monday 31 August 2009 19:04, tubin gen wrote:
 I don't know the difference between snapshot and rc , when  maven
 repository  has both which one should I use

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: roland.asm...@cfc.at
Web: www.cfc.at

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



Re: Maven keeps looking for a POM for an artifact that's already in my local repository

2009-08-26 Thread Roland Asmann
Hi,

Maven tells you there is no POM-file. In your ls-command, you also only return 
a JAR... Is this a copy-paste error or is the POM really missing?

If you deployed the artifact yourself, add a POM to it. If it came from some 
repository, redownload the POM.

Hope this helps!


On Wednesday 26 August 2009 21:00, Chris Bredesen wrote:
 Hello,

 I get this every time I do just about anything with my project:

 Downloading:
 http://repo1.maven.org/maven2/net/sf/gsa-japi/gsa-japi/1.10/gsa-japi-1.10.p
om [INFO] Unable to find resource 'net.sf.gsa-japi:gsa-japi:pom:1.10' in
 repository central (http://repo1.maven.org/maven2)

 This routine is repeated for each of the five repositories I have enabled.

 This artifact is in my local repository:

 $ ls .m2/repository/net/sf/gsa-japi/gsa-japi/1.10/
 gsa-japi-1.10.jar

 Once all this complaining ends, the build does succeed and the artifact
 is even packaged into my WAR.  I don't recall where this artifact
 originally came from but it's quite possible I installed it myself.  I
 guess it's looking for the POM, but how can I tell Maven that there will
 never be a POM for this artifact?

 Thanks,

 Chris

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

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: roland.asm...@cfc.at
Web: www.cfc.at

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



Re: Maven keeps looking for a POM for an artifact that's already in my local repository

2009-08-26 Thread Roland Asmann
Sorry, didn't read until the end...

Create your own POM for this artifact. Either deploy it in a 
company-repository (deploy:deploy-file) or if you're a single user in your 
local repo (install:install-file).

Just look at the documentation for the respective plugin (install or deploy) 
on how to tell Maven the data for the POM.



On Wednesday 26 August 2009 21:00, Chris Bredesen wrote:
 Hello,

 I get this every time I do just about anything with my project:

 Downloading:
 http://repo1.maven.org/maven2/net/sf/gsa-japi/gsa-japi/1.10/gsa-japi-1.10.p
om [INFO] Unable to find resource 'net.sf.gsa-japi:gsa-japi:pom:1.10' in
 repository central (http://repo1.maven.org/maven2)

 This routine is repeated for each of the five repositories I have enabled.

 This artifact is in my local repository:

 $ ls .m2/repository/net/sf/gsa-japi/gsa-japi/1.10/
 gsa-japi-1.10.jar

 Once all this complaining ends, the build does succeed and the artifact
 is even packaged into my WAR.  I don't recall where this artifact
 originally came from but it's quite possible I installed it myself.  I
 guess it's looking for the POM, but how can I tell Maven that there will
 never be a POM for this artifact?

 Thanks,

 Chris

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

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: roland.asm...@cfc.at
Web: www.cfc.at

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



Re: maven build from central repossitory

2009-08-21 Thread Roland Asmann
Hi,

Not 100% sure, but doesn't Hudson have an option to use separate local 
repositories and clean them before builds?


On Friday 21 August 2009 21:00, huser wrote:
 Hi,

 Is there a way to run maven build in such a way that it forcefully
 downloads the artifacts from central/in-house repository instead of using
 the local .m2 repo ?

 I realise cleaning .m2 will force the artifacts download from Nexus (our
 repo manager). But since we run builds through Hudson I cannot always
 create .m2 when I have builds queued up.

 Thanks !

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: roland.asm...@cfc.at
Web: www.cfc.at

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



Re: maven eclipse plugin workspace dependencies resolution

2008-02-07 Thread Roland Asmann
I happen to know a little bit about this (mainly because my colleague created 
these options ;-) ).

I believe that version of the plugin hasn't been released yet, although it 
could be that a SNAPSHOT-release has been made. If not, check out the latest 
sources and build it for yourself, it should work like a charm!


On Thursday 07 February 2008 15:49, da Costa Oliveira, Pedro Manuel wrote:
 Hi All,

 I'm trying to find a better way of using maven and eclipse in my team
 (m2eclipse just creates to many problems with transient dependencies,
 even in 0.0.12).

 So .. while trying to use maven-eclipse-plugin, I came across the
 -Declipse.workspaceToConnect=${workspace_loc}  option
 in http://jira.codehaus.org/browse/MECLIPSE-344.

 I've tried to use it so that the project dependencies inside my eclipse
 would be resolved and added to my library path.
 However that is not working, it still resolves the artifact jar in my
 local repository.

 Has anyone been able to make this work?

 Regards,

 Pedro

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

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



Re: maven eclipse plugin workspace dependencies resolution

2008-02-07 Thread Roland Asmann
It appears there are still some bugs. My colleague suggests adding the 
parameter 'eclipse.projectDir=${basedir}', although he isn't 100% sure this 
will fix your problems...

He also suggests setting some (if not most) of these properties inside your 
POM instead of in the launch.

One point I have to add: make sure eclipse refreshes the projects after your 
build, that could cause this kind of behavior as well!

If nothing else works, you'd have to wait until the release, but I believe 
that will happen pretty soon.


On Thursday 07 February 2008 16:25, da Costa Oliveira, Pedro Manuel wrote:
 Hi,

 I'm running it from inside eclipse.

 I've tried using
 org.apache.maven.plugins:maven-eclipse-plugin:2.5-SNAPSHOT:eclipse
 eclipse:clean eclipse:eclipse  -Dmaven.test.skip.exec=true
 -Declipse.workspaceToConnect=${workspace_loc}
 -Declipse.useProjectReferences=true
 -Dorg.apache.maven.global-settings=V:\Group\IT\\maven\settings.xml

 org.apache.maven.plugins:maven-eclipse-plugin:2.5-SNAPSHOT:eclipse
 -X eclipse:clean eclipse:eclipse  -Dmaven.test.skip.exec=true
 -Declipse.workspaceToConnect=d:\eclipse_home\workspace\trunk 
 -Declipse.useProjectReferences=true
 -Dorg.apache.maven.global-settings=V:\Group\IT\\maven\settings.xml

 And replacing eclipse.workspaceToConnect with eclipse.workspace. It still
 doesn't add the workspace projects as project dependencies.

 For a lot of reasons, my projects are not set up as module projects (don't
 know if that makes any difference in this case). I just want that if my
 project - webservices - dependes on - common - and common is in the
 workspace, that it is added to the webservices project library as a project
 dependency (can debug easily any changes done to dependant projects) and
 not as an artifact dependency.

 Thanks a lot,
 Pedro

 -Original Message-
 From: Roland Asmann [mailto:[EMAIL PROTECTED]
 Sent: jeudi, 7. février 2008 16:06
 To: Maven Users List
 Subject: Re: maven eclipse plugin workspace dependencies resolution

 I asked my colleague, it could be that the parameter has changed. He
 suggests trying 'eclipse.workspace'.

 I presume you are running Maven from inside Eclipse, right? Or filling out
 the correct path instead of '${workspace_loc}', because that is an
 Eclipse-variable! (Forgot to mention that before, sorry!)

 On Thursday 07 February 2008 16:00, da Costa Oliveira, Pedro Manuel wrote:
  I'm using maven-eclipse-plugin 2.5-SNAPSHOT.
  Shouldn't it contain the latest code/fixes?
 
  -Original Message-
  From: Roland Asmann [mailto:[EMAIL PROTECTED]
  Sent: jeudi, 7. février 2008 15:58
  To: Maven Users List
  Subject: Re: maven eclipse plugin workspace dependencies resolution
 
  I happen to know a little bit about this (mainly because my colleague
  created these options ;-) ).
 
  I believe that version of the plugin hasn't been released yet, although
  it could be that a SNAPSHOT-release has been made. If not, check out the
  latest sources and build it for yourself, it should work like a charm!
 
  On Thursday 07 February 2008 15:49, da Costa Oliveira, Pedro Manuel wrote:
   Hi All,
  
   I'm trying to find a better way of using maven and eclipse in my team
   (m2eclipse just creates to many problems with transient dependencies,
   even in 0.0.12).
  
   So .. while trying to use maven-eclipse-plugin, I came across the
   -Declipse.workspaceToConnect=${workspace_loc}  option
   in http://jira.codehaus.org/browse/MECLIPSE-344.
  
   I've tried to use it so that the project dependencies inside my eclipse
   would be resolved and added to my library path.
   However that is not working, it still resolves the artifact jar in my
   local repository.
  
   Has anyone been able to make this work?
  
   Regards,
  
   Pedro

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

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



Re: maven eclipse plugin workspace dependencies resolution

2008-02-07 Thread Roland Asmann
I asked my colleague, it could be that the parameter has changed. He suggests 
trying 'eclipse.workspace'.

I presume you are running Maven from inside Eclipse, right? Or filling out the 
correct path instead of '${workspace_loc}', because that is an 
Eclipse-variable! (Forgot to mention that before, sorry!)


On Thursday 07 February 2008 16:00, da Costa Oliveira, Pedro Manuel wrote:
 I'm using maven-eclipse-plugin 2.5-SNAPSHOT.
 Shouldn't it contain the latest code/fixes?

 -Original Message-
 From: Roland Asmann [mailto:[EMAIL PROTECTED]
 Sent: jeudi, 7. février 2008 15:58
 To: Maven Users List
 Subject: Re: maven eclipse plugin workspace dependencies resolution

 I happen to know a little bit about this (mainly because my colleague
 created these options ;-) ).

 I believe that version of the plugin hasn't been released yet, although it
 could be that a SNAPSHOT-release has been made. If not, check out the
 latest sources and build it for yourself, it should work like a charm!

 On Thursday 07 February 2008 15:49, da Costa Oliveira, Pedro Manuel wrote:
  Hi All,
 
  I'm trying to find a better way of using maven and eclipse in my team
  (m2eclipse just creates to many problems with transient dependencies,
  even in 0.0.12).
 
  So .. while trying to use maven-eclipse-plugin, I came across the
  -Declipse.workspaceToConnect=${workspace_loc}  option
  in http://jira.codehaus.org/browse/MECLIPSE-344.
 
  I've tried to use it so that the project dependencies inside my eclipse
  would be resolved and added to my library path.
  However that is not working, it still resolves the artifact jar in my
  local repository.
 
  Has anyone been able to make this work?
 
  Regards,
 
  Pedro

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

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



Re: maven eclipse plugin workspace dependencies resolution

2008-02-07 Thread Roland Asmann
Sorry to hear that. I guess there's nothing left but wait for the next 
release. Although, I could ask my colleague if we have a working copy of that 
plugin and send it to you. You'll have to wait a bit though, 'cause he 
already left. ;-)


On Thursday 07 February 2008 17:33, da Costa Oliveira, Pedro Manuel wrote:
 Refreshes are configured.
 I tried your suggestion, but .. No luck ;)

 -Original Message-
 From: Roland Asmann [mailto:[EMAIL PROTECTED]
 Sent: jeudi, 7. février 2008 16:39
 To: Maven Users List
 Subject: Re: maven eclipse plugin workspace dependencies resolution

 It appears there are still some bugs. My colleague suggests adding the
 parameter 'eclipse.projectDir=${basedir}', although he isn't 100% sure this
 will fix your problems...

 He also suggests setting some (if not most) of these properties inside your
 POM instead of in the launch.

 One point I have to add: make sure eclipse refreshes the projects after
 your build, that could cause this kind of behavior as well!

 If nothing else works, you'd have to wait until the release, but I believe
 that will happen pretty soon.

 On Thursday 07 February 2008 16:25, da Costa Oliveira, Pedro Manuel wrote:
  Hi,
 
  I'm running it from inside eclipse.
 
  I've tried using
  org.apache.maven.plugins:maven-eclipse-plugin:2.5-SNAPSHOT:eclipse
  eclipse:clean eclipse:eclipse  -Dmaven.test.skip.exec=true
  -Declipse.workspaceToConnect=${workspace_loc}
  -Declipse.useProjectReferences=true
  -Dorg.apache.maven.global-settings=V:\Group\IT\\maven\settings.xml
 
  org.apache.maven.plugins:maven-eclipse-plugin:2.5-SNAPSHOT:eclipse
  -X eclipse:clean eclipse:eclipse  -Dmaven.test.skip.exec=true
  -Declipse.workspaceToConnect=d:\eclipse_home\workspace\trunk
  -Declipse.useProjectReferences=true
  -Dorg.apache.maven.global-settings=V:\Group\IT\\maven\settings.xml
 
  And replacing eclipse.workspaceToConnect with eclipse.workspace. It still
  doesn't add the workspace projects as project dependencies.
 
  For a lot of reasons, my projects are not set up as module projects
  (don't know if that makes any difference in this case). I just want that
  if my project - webservices - dependes on - common - and common is in the
  workspace, that it is added to the webservices project library as a
  project dependency (can debug easily any changes done to dependant
  projects) and not as an artifact dependency.
 
  Thanks a lot,
  Pedro
 
  -Original Message-
  From: Roland Asmann [mailto:[EMAIL PROTECTED]
  Sent: jeudi, 7. février 2008 16:06
  To: Maven Users List
  Subject: Re: maven eclipse plugin workspace dependencies resolution
 
  I asked my colleague, it could be that the parameter has changed. He
  suggests trying 'eclipse.workspace'.
 
  I presume you are running Maven from inside Eclipse, right? Or filling
  out the correct path instead of '${workspace_loc}', because that is an
  Eclipse-variable! (Forgot to mention that before, sorry!)
 
  On Thursday 07 February 2008 16:00, da Costa Oliveira, Pedro Manuel wrote:
   I'm using maven-eclipse-plugin 2.5-SNAPSHOT.
   Shouldn't it contain the latest code/fixes?
  
   -Original Message-
   From: Roland Asmann [mailto:[EMAIL PROTECTED]
   Sent: jeudi, 7. février 2008 15:58
   To: Maven Users List
   Subject: Re: maven eclipse plugin workspace dependencies resolution
  
   I happen to know a little bit about this (mainly because my colleague
   created these options ;-) ).
  
   I believe that version of the plugin hasn't been released yet, although
   it could be that a SNAPSHOT-release has been made. If not, check out
   the latest sources and build it for yourself, it should work like a
   charm!
  
   On Thursday 07 February 2008 15:49, da Costa Oliveira, Pedro Manuel 
wrote:
Hi All,
   
I'm trying to find a better way of using maven and eclipse in my team
(m2eclipse just creates to many problems with transient dependencies,
even in 0.0.12).
   
So .. while trying to use maven-eclipse-plugin, I came across the
-Declipse.workspaceToConnect=${workspace_loc}  option
in http://jira.codehaus.org/browse/MECLIPSE-344.
   
I've tried to use it so that the project dependencies inside my
eclipse would be resolved and added to my library path.
However that is not working, it still resolves the artifact jar in my
local repository.
   
Has anyone been able to make this work?
   
Regards,
   
Pedro

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

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



Re: JavaDoc aggregate-problems

2008-01-27 Thread Roland Asmann
OK, maybe it was on the list... Was a little pissed when I wrote this this
morning and didn't check the list of it. I would like to apologize for my
behavior.

So, after posting I checked out the sources for both the javadoc-plugin
and the surefire-report-plugin and removed the 'aggregator'-tag. If I use
the plugins in that variant, building my sites 'only' takes 53 minutes.
Still a lot, but I think it's the minimum my project will need, seeing the
size of it.

So, I think the discussion should be whether or not to have these plugins
as aggregators or not... I can understand some people might want this, but
it would be great if the plugin can decide whether or not to act that way
on the configuration...

Not sure if this is possible though, so maybe one of the developers couls
shed a little light on this subject?

Thanks,

Roland


 Actually, this problem was mentioned a couple of times before. I have the
 same headache as the generate-source phase is called again, which in my
 case caused the whole source generatred again!

 the defect is in javadoc plug-in's defects list on JIRA  (
 http://jira.codehaus.org/browse/MJAVADOC-137). It seems to be caused by
 @aggregator in the javadoc 2.3. Maybe, we could downgrade it to
 version 2.2and try? I'm interested in knowing if it can solve the
 problem ...


 On 1/26/08, Roland Asmann [EMAIL PROTECTED] wrote:

 So, I went home after this mail last friday, and happened to stumble by
 the
 company today at this early hour. The site-build has finished, and has
 taken
 a grand total of 818 minute, which roughly translates into 13,6 hours!!!

 Is it really necessary to run the mentioned plugins as aggregators? I
 find
 it
 hard to believe that nobody has mentioned this before, because this will
 make
 things impossible for projects that are a little larger than average or
 have
 lots of/slow tests!


 On Friday 25 January 2008 19:31, Roland Asmann wrote:
  Hi all,
 
  Is there a way to tell Maven to NOT run several of the
 reporting-plugins
 in
  aggregate-mode?
 
  At the moment, I am trying to build the sites to my project, which is
  taking FOREVER! I've written down the times that Maven is taking for
  several different calls, and I feel the reporting it taking way too
 long.
 
  If I run my project with 'mvn clean install', it takes about 13
 minutes
 to
  complete. When I throw out the tests, it needs just under 2 minutes.
  However, if II try to run the site ('mvn clean site'), maven uses ages
 to
  complete (not sure yet how long, it has been running for over 4 HOURS
  already, and still no clue as to how long it will take!).
 
  Yes, I know my project is big. It's a multi-module project with about
 60
  modules, but I don't think they should be split into smaller projects.
  Besides, the normal build has an acceptable time-frame (especially if
 we
  skip tests like we do during development), so I feel no need to split
 them.
 
  So, the plugins I've found to trigger in aggregate mode (although I
 have
 no
  idea why they should) are:
  - javadoc:javadoc (not using the aggregate-parameter, so why trigger
 it
  this way?)
  - surefire-report:report
  - surefire-report:report-only
 
  Any help would be greatly appreciated!

 --
 Roland Asmann

 CFC Informationssysteme Entwicklungsgesellschaft m.b.H
 Bäckerstrasse 1/2/7
 A-1010 Wien
 FN 266155f, Handelsgericht Wien

 Tel.: +43/1/513 88 77 - 27
 Fax.: +43/1/513 88 62
 Email: [EMAIL PROTECTED]
 Web: www.cfc.at

 -
 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: JavaDoc aggregate-problems

2008-01-26 Thread Roland Asmann
So, I went home after this mail last friday, and happened to stumble by the 
company today at this early hour. The site-build has finished, and has taken 
a grand total of 818 minute, which roughly translates into 13,6 hours!!!

Is it really necessary to run the mentioned plugins as aggregators? I find it 
hard to believe that nobody has mentioned this before, because this will make 
things impossible for projects that are a little larger than average or have 
lots of/slow tests!


On Friday 25 January 2008 19:31, Roland Asmann wrote:
 Hi all,

 Is there a way to tell Maven to NOT run several of the reporting-plugins in
 aggregate-mode?

 At the moment, I am trying to build the sites to my project, which is
 taking FOREVER! I've written down the times that Maven is taking for
 several different calls, and I feel the reporting it taking way too long.

 If I run my project with 'mvn clean install', it takes about 13 minutes to
 complete. When I throw out the tests, it needs just under 2 minutes.
 However, if II try to run the site ('mvn clean site'), maven uses ages to
 complete (not sure yet how long, it has been running for over 4 HOURS
 already, and still no clue as to how long it will take!).

 Yes, I know my project is big. It's a multi-module project with about 60
 modules, but I don't think they should be split into smaller projects.
 Besides, the normal build has an acceptable time-frame (especially if we
 skip tests like we do during development), so I feel no need to split them.

 So, the plugins I've found to trigger in aggregate mode (although I have no
 idea why they should) are:
 - javadoc:javadoc (not using the aggregate-parameter, so why trigger it
 this way?)
 - surefire-report:report
 - surefire-report:report-only

 Any help would be greatly appreciated!

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

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



JavaDoc aggregate-problems

2008-01-25 Thread Roland Asmann
Hi all,

Is there a way to tell Maven to NOT run several of the reporting-plugins in 
aggregate-mode?

At the moment, I am trying to build the sites to my project, which is taking 
FOREVER! I've written down the times that Maven is taking for several 
different calls, and I feel the reporting it taking way too long.

If I run my project with 'mvn clean install', it takes about 13 minutes to 
complete. When I throw out the tests, it needs just under 2 minutes.
However, if II try to run the site ('mvn clean site'), maven uses ages to 
complete (not sure yet how long, it has been running for over 4 HOURS 
already, and still no clue as to how long it will take!).

Yes, I know my project is big. It's a multi-module project with about 60 
modules, but I don't think they should be split into smaller projects. 
Besides, the normal build has an acceptable time-frame (especially if we skip 
tests like we do during development), so I feel no need to split them.

So, the plugins I've found to trigger in aggregate mode (although I have no 
idea why they should) are:
- javadoc:javadoc (not using the aggregate-parameter, so why trigger it this 
way?)
- surefire-report:report
- surefire-report:report-only

Any help would be greatly appreciated!

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

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



JavaDoc Warnings

2007-11-26 Thread Roland Asmann
Hi all,

I was just building my site again (to check if everything is still okay for an 
upcoming release) and I saw all those ugly JavaDoc warnings fly by.

I've been thinking about this before, but never got around to posting: Is 
there a taglet or something that I can use for my Maven-plugins? Atm I get 
all my warnings because of tags like '@goal', '@phase' and the other 
Maven-tags.

If nothing exists yet, I might write something myself (which will probably end 
up being donated to the community), but if somehting already exists, I can 
save myself the time and effort!

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

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



Re: [eclipse plugin] How to use other project

2007-11-16 Thread Roland Asmann
Create a new Maven-project and add all the projects you have in your workspace 
in the modules-part of the POM.
Now, if any of the projects in your workspace have dependencies to each-other, 
the plugin should handle this correctly when building from this new POM.


On Friday 16 November 2007 17:52, Daniele Dellafiore wrote:
 Hi.

 I am trying to figure out if it is possible to define in pom what
 other eclipse projects, present in the workspace, have to be included
 in project classpath.

 Anyone knows?

 Thanks.

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

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



Re: How to control versioning across multiple POMs?

2007-11-15 Thread Roland Asmann
Looking into your POMs, I think you should start using the release-plugin (is 
you aren't already). Your only problem is that the 'master'-POM doesn't know 
the 'base'-POM. (Seeing there's only 1 of both, why not merge them?).

When you use the 'modules'-tag in Maven, the versions are normally updated by 
the release-plugin. So, I suggest you either add the 'base' as a module in 
the 'master', or add a version-tag to the 'base', which can then be easily 
released by Maven. In this last case however, you do need to update the 
version of the 'master' inside the 'base' manually.

It's the same case we have here in my company, we have a company-wide master, 
which is not allowed to know all projects. If this POM gets updated, we must 
manually update out projects. However, we do not HAVE to do this, since some 
changes to the master might be irrelevant for some projects. Therefor we 
stick with this method and let projects decide whether or not to update. We 
do however send all employees a release-mail, so they at least know there's a 
new version. Updating is then discussed and decided within the projects.


On Wednesday 14 November 2007 23:44, Aaron Zeckoski wrote:
 I have a series of 3 POMs and I need to be able to control versioning
 across them. They are arranged like so:

 master POM (parent of) base POM (parent of) project POM

 There is one master and one base POM but there are many many project
 POMs, roughly 50+ currently with new ones being added

 The master POM has a version (as it seems all children must specify
 the version of the parent correctly in the parent tag). The base POM
 has no version as it inherits from the master. The problem here is
 that we want to upgrade the overall version... except that every
 project POM specifies the version of either the master or base POM (in
 the parent tag). It means we have to somehow coordinate among 50+
 projects (which are controlled by various people/groups) and tell them
 to all change the version of the parent.

 This is not ideal at all and I suspect we are just doing something
 dumb or completely wrong. So, how can we control the overall version
 for all the projects without having to change all of the POMs?

 You can view the source here if you like:
 master: https://source.sakaiproject.org/svn/master/trunk/pom.xml
 base: https://source.sakaiproject.org/contrib/caret/kernel/pom.xml
 sample project:
 https://source.sakaiproject.org/contrib/caret/kernel/alias/pom.xml

 -AZ

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

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



Re: 2 way parent-module POM dependency required?

2007-11-15 Thread Roland Asmann
No, this is not a must... You can link either way if you want, but there's 
several things you have to consider:

If you build the 'parent' and it does not contain the 'modules'-tag, the 
children DO NOT get build.

Just play around with it a bit, Maven is very flexible in this way. I do 
however believe it is described in the documentation, and pretty extensive if 
I recall correctly...


On Wednesday 14 November 2007 23:51, Aaron Zeckoski wrote:
 Is the 2-way parent/module dependency actually the right way to link
 children and parent POMs? This is what we currently have:

 The parent includes definition of a module (or group of modules) like so:
 ...
 groupIdorg.sakaiproject/groupId
 artifactIdbase/artifactId
 packagingpom/packaging
 ...
 modules
   modulealias/module
 /modules
 ...

 Then the child defines a parent like so:
 ...
 parent
   artifactIdbase/artifactId
   groupIdorg.sakaiproject/groupId
   versionM2/version
   relativePath../pom.xml/relativePath
 /parent
 ...

 As a result, we end up with this 2-way linkage bewteen these POMs
 which ends up not being very flexible since all of the POMs have to
 know about each other.

 This seems to be what the docs indicate but I might misunderstand. Are
 we doing something dumb here?

 Sample parent here:
 https://source.sakaiproject.org/contrib/caret/kernel/pom.xml Sample child
 here:
 https://source.sakaiproject.org/contrib/caret/kernel/alias/pom.xml

 Thanks for the help!
 -AZ

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

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



Re: 2 way parent-module POM dependency required?

2007-11-15 Thread Roland Asmann
How about re-writing the plugin to Maven2? Then you can at least remove 
the 'modules'-part in your base-POM...

Otherwise I'm afraid you're indeed stuck with the 2-way dependency.


On Thursday 15 November 2007 12:34, Aaron Zeckoski wrote:
  If you build the 'parent' and it does not contain the 'modules'-tag, the
  children DO NOT get build.

 Yeah, we want to be able to build from either the parent (and build
 everything) or from the child (and just build the child) but we need
 the information in the parent when the child is being built. As a
 result, it looks like we are stuck with the 2-way dependency (at least
 according to what I could understand from the maven site and the maven
 book).

 In maven1 we created a plugin which would walk the source tree so that
 the parents did not have to know about the children. The nice thing
 about this is that you could drop a new project in the source tree and
 it would get picked up and built automatically. All the children only
 knew about one single master POM which provided them with a set of
 properties and shared dependencies.

 I think we are going to have to just be stuck with the tight coupling
 in maven 2 though.
 I would be happy to know I am wrong on this though so feel free to correct
 me.

 :-)

 -AZ

  Just play around with it a bit, Maven is very flexible in this way. I do
  however believe it is described in the documentation, and pretty
  extensive if I recall correctly...
 
  On Wednesday 14 November 2007 23:51, Aaron Zeckoski wrote:
   Is the 2-way parent/module dependency actually the right way to link
   children and parent POMs? This is what we currently have:
  
   The parent includes definition of a module (or group of modules) like
   so: ...
   groupIdorg.sakaiproject/groupId
   artifactIdbase/artifactId
   packagingpom/packaging
   ...
   modules
 modulealias/module
   /modules
   ...
  
   Then the child defines a parent like so:
   ...
   parent
 artifactIdbase/artifactId
 groupIdorg.sakaiproject/groupId
 versionM2/version
 relativePath../pom.xml/relativePath
   /parent
   ...
  
   As a result, we end up with this 2-way linkage bewteen these POMs
   which ends up not being very flexible since all of the POMs have to
   know about each other.
  
   This seems to be what the docs indicate but I might misunderstand. Are
   we doing something dumb here?
  
   Sample parent here:
   https://source.sakaiproject.org/contrib/caret/kernel/pom.xml Sample
   child here:
   https://source.sakaiproject.org/contrib/caret/kernel/alias/pom.xml
  
   Thanks for the help!
   -AZ
 
  --
  Roland Asmann
 
  CFC Informationssysteme Entwicklungsgesellschaft m.b.H
  Bäckerstrasse 1/2/7
  A-1010 Wien
  FN 266155f, Handelsgericht Wien
 
  Tel.: +43/1/513 88 77 - 27
  Fax.: +43/1/513 88 62
  Email: [EMAIL PROTECTED]
  Web: www.cfc.at
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

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



Re: triggering profiles without using command line and without running the default profile?

2007-11-15 Thread Roland Asmann
I'm afraid that combination will not work. Worst case scenario: you define two 
the same profiles, one that is activated when the property is not set, the 
other when it has the value 'core'.


On Thursday 15 November 2007 12:13, Aaron Zeckoski wrote:
 We do need a way to have a default profile OR simply a way so that
 each project can be built using mvn clean install and still work
 without the base. I also wanted to have it able to run when the same
 property is set a certain way as well.

 In other words, if the property is set to core then the default
 profile should run and if no properties are set (mvn clean install)
 then the default profile should still run.

 For example:
 profile
 !--  default profile for sakai core --
   idsakai/id
   activation
 activeByDefaulttrue/activeByDefault
   property
 namesakai.distribution/name
 valuecore/value
   /property
   /activation
 modules
   modulealias-api/api/module
   modulealias-impl/impl/module
   modulealias-impl/pack/module
   modulealias-tool/tool/module
   /modules
   /profile
 profile

 Is it possible to combine them and have come up with something like
 this? (probably not)
 activation
   property
 namesakai.distribution/name
 valuecore/value
   /property
   property
 name!sakai.distribution/name
   /property
 /activation

 I will experiment a bit and see what happens.
 Thanks!
 -AZ

 On Nov 15, 2007 10:51 AM, Roland Asmann [EMAIL PROTECTED] wrote:
  Do you need the default-profile? If not, remove the tag
  'activateByDefault'.
 
  Or you can try setting it to run when your property is NOT set/a certain
  value is NOT set:
 
  property
   name!property/name
  /property
 
  or
 
  property
   nameproperty/name
   value!value/value
  /property
 
  On Wednesday 14 November 2007 23:29, Aaron Zeckoski wrote:
   Yes... I did that. This is not a newbie question (though I wish it
   were). The default profile is still running unless I do something like
   mvn install -Pkernel
  
   Here are the poms:
   Parent: https://source.sakaiproject.org/contrib/caret/kernel/pom.xml
   (this sets a property)
   Project:
   https://source.sakaiproject.org/contrib/caret/kernel/alias/pom.xml
   (this one has the default profile getting activated even though another
   profile is activated via a property)
  
   So, the question is, how do I get the same effect as running mvn
   install -Pkernel (which is to not run the default profile anymore and
   only run the profile that I wanted)?
  
   -AZ
  
   On Nov 14, 2007 5:40 PM, Roland Asmann [EMAIL PROTECTED] wrote:
Check the profile-documentation and use the property-activation.
   
On Wednesday 14 November 2007 18:02, Aaron Zeckoski wrote:
 I need to be able to trigger a specific profile WITHOUT executing
 the default profile AND without having to use the -P command line
 option. Ideally I want to trigger it using some setting in a POM
 file but any method where the user who is building the code can
 still type mvn clean build is fine.

 Can anyone help?
 Thanks
 -AZ
   
--
Roland Asmann
   
CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien
   
Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at
   
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 
  --
  Roland Asmann
 
  CFC Informationssysteme Entwicklungsgesellschaft m.b.H
  Bäckerstrasse 1/2/7
  A-1010 Wien
  FN 266155f, Handelsgericht Wien
 
  Tel.: +43/1/513 88 77 - 27
  Fax.: +43/1/513 88 62
  Email: [EMAIL PROTECTED]
  Web: www.cfc.at
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

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



Re: How to control versioning across multiple POMs?

2007-11-15 Thread Roland Asmann
Well, I read in one of your other messages that you don't have access to the 
other projects and therefor can't use the release-plugin... I'm afraid that 
means you're pretty much stuck with manually updating these versions.

A possible work-around could be to write a Maven-plugin that updates all the 
versions...


On Thursday 15 November 2007 12:28, Aaron Zeckoski wrote:
 Currently the master POM keeps track of things like properties and a
 large set of shared dependencies (among other things).
 The base POM mostly maintains the set of modules (this POM is swapped
 out depending on what kind of release we are doing).
 The project POMs are effectively standalone except that they need the
 properties and shared dependencies from the master POM.

 Do you still think we should put the base and master together (based
 on what I said above)? The key issue here is that the projects need to
 be able to evolve separately and we want to be able to create
 different kinds of releases. A full release which includes all the
 projects, a partial release which includes roughly half of the
 projects, and mini release which includes the minimum set of projects
 for the system to run. Ideally each release has a separate version
 number.

 Currently, we are handling the multiple types of releases with new
 base POMs but we have no way to handle the versioning. I am open to
 completely changing things around as long as we can get the multiple
 types of releases and can control the versions.

 What is the most maintainable way to handle this?
 Thanks!
 -AZ

 On Nov 15, 2007 10:58 AM, Roland Asmann [EMAIL PROTECTED] wrote:
  Looking into your POMs, I think you should start using the release-plugin
  (is you aren't already). Your only problem is that the 'master'-POM
  doesn't know the 'base'-POM. (Seeing there's only 1 of both, why not
  merge them?).
 
  When you use the 'modules'-tag in Maven, the versions are normally
  updated by the release-plugin. So, I suggest you either add the 'base' as
  a module in the 'master', or add a version-tag to the 'base', which can
  then be easily released by Maven. In this last case however, you do need
  to update the version of the 'master' inside the 'base' manually.
 
  It's the same case we have here in my company, we have a company-wide
  master, which is not allowed to know all projects. If this POM gets
  updated, we must manually update out projects. However, we do not HAVE to
  do this, since some changes to the master might be irrelevant for some
  projects. Therefor we stick with this method and let projects decide
  whether or not to update. We do however send all employees a
  release-mail, so they at least know there's a new version. Updating is
  then discussed and decided within the projects.
 
  On Wednesday 14 November 2007 23:44, Aaron Zeckoski wrote:
   I have a series of 3 POMs and I need to be able to control versioning
   across them. They are arranged like so:
  
   master POM (parent of) base POM (parent of) project POM
  
   There is one master and one base POM but there are many many project
   POMs, roughly 50+ currently with new ones being added
  
   The master POM has a version (as it seems all children must specify
   the version of the parent correctly in the parent tag). The base POM
   has no version as it inherits from the master. The problem here is
   that we want to upgrade the overall version... except that every
   project POM specifies the version of either the master or base POM (in
   the parent tag). It means we have to somehow coordinate among 50+
   projects (which are controlled by various people/groups) and tell them
   to all change the version of the parent.
  
   This is not ideal at all and I suspect we are just doing something
   dumb or completely wrong. So, how can we control the overall version
   for all the projects without having to change all of the POMs?
  
   You can view the source here if you like:
   master: https://source.sakaiproject.org/svn/master/trunk/pom.xml
   base: https://source.sakaiproject.org/contrib/caret/kernel/pom.xml
   sample project:
   https://source.sakaiproject.org/contrib/caret/kernel/alias/pom.xml
  
   -AZ
 
  --
  Roland Asmann
 
  CFC Informationssysteme Entwicklungsgesellschaft m.b.H
  Bäckerstrasse 1/2/7
  A-1010 Wien
  FN 266155f, Handelsgericht Wien
 
  Tel.: +43/1/513 88 77 - 27
  Fax.: +43/1/513 88 62
  Email: [EMAIL PROTECTED]
  Web: www.cfc.at
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

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

Re: 2 way parent-module POM dependency required?

2007-11-15 Thread Roland Asmann
True. One question though: why do you use the 'relativePath'-attribute? This 
shouldn't be really necessary, or am I missing something here?


On Thursday 15 November 2007 14:35, Stuart McCulloch wrote:
 On 15/11/2007, Roland Asmann [EMAIL PROTECTED] wrote:
  How about re-writing the plugin to Maven2? Then you can at least remove
  the 'modules'-part in your base-POM...
 
  Otherwise I'm afraid you're indeed stuck with the 2-way dependency.

 also note the parent doesn't have to be the same as the 'containing' POM
 (ie. the one with the modules)

 for example, some projects place settings like dependencyManagement,
 pluginManagement, etc. in a separate POM (say inside a 'poms' directory)
 and have all sub-projects use this as their parent, and have module POMs
 just to support building from the root, not for inheriting settings.

 ie:

pom.xml   (has modules: poms, A, B)

\__ poms / pom.xml

\__ A / pom.xml   (has poms as parent, relativePath ../poms)

\__ B / pom.xml   (has poms as parent, relativePath ../poms)

 this can be really useful when you have various project types inside a
 single
 tree, because each sub-project can inherit settings from a different
 parent, and they won't disturb each other.

 the only tricky part is keeping the relativePath up-to-date, so that builds
 can
 work from any part of a check-out project tree... (I use my own plugin for
 this)

 On Thursday 15 November 2007 12:34, Aaron Zeckoski wrote:
If you build the 'parent' and it does not contain the 'modules'-tag,
 
  the
 
children DO NOT get build.
  
   Yeah, we want to be able to build from either the parent (and build
   everything) or from the child (and just build the child) but we need
   the information in the parent when the child is being built. As a
   result, it looks like we are stuck with the 2-way dependency (at least
   according to what I could understand from the maven site and the maven
   book).
  
   In maven1 we created a plugin which would walk the source tree so that
   the parents did not have to know about the children. The nice thing
   about this is that you could drop a new project in the source tree and
   it would get picked up and built automatically. All the children only
   knew about one single master POM which provided them with a set of
   properties and shared dependencies.
  
   I think we are going to have to just be stuck with the tight coupling
   in maven 2 though.
   I would be happy to know I am wrong on this though so feel free to
 
  correct
 
   me.
  
   :-)
  
   -AZ
  
Just play around with it a bit, Maven is very flexible in this way. I
 
  do
 
however believe it is described in the documentation, and pretty
extensive if I recall correctly...
   
On Wednesday 14 November 2007 23:51, Aaron Zeckoski wrote:
 Is the 2-way parent/module dependency actually the right way to
 link children and parent POMs? This is what we currently have:

 The parent includes definition of a module (or group of modules)
 
  like
 
 so: ...
 groupIdorg.sakaiproject/groupId
 artifactIdbase/artifactId
 packagingpom/packaging
 ...
 modules
   modulealias/module
 /modules
 ...

 Then the child defines a parent like so:
 ...
 parent
   artifactIdbase/artifactId
   groupIdorg.sakaiproject/groupId
   versionM2/version
   relativePath../pom.xml/relativePath
 /parent
 ...

 As a result, we end up with this 2-way linkage bewteen these POMs
 which ends up not being very flexible since all of the POMs have to
 know about each other.

 This seems to be what the docs indicate but I might misunderstand.
 
  Are
 
 we doing something dumb here?

 Sample parent here:
 https://source.sakaiproject.org/contrib/caret/kernel/pom.xml Sample
 child here:
 https://source.sakaiproject.org/contrib/caret/kernel/alias/pom.xml

 Thanks for the help!
 -AZ
   
--
Roland Asmann
   
CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien
   
Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at
   
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 
  --
  Roland Asmann
 
  CFC Informationssysteme Entwicklungsgesellschaft m.b.H
  Bäckerstrasse 1/2/7
  A-1010 Wien
  FN 266155f, Handelsgericht Wien
 
  Tel.: +43/1/513 88 77 - 27
  Fax.: +43/1/513 88 62
  Email: [EMAIL PROTECTED]
  Web: www.cfc.at
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f

Re: triggering profiles without using command line and without running the default profile?

2007-11-15 Thread Roland Asmann
Run 'mvn help:active-profiles' to see which profiles are activated. Seems like 
the property is not handed down or something...


On Thursday 15 November 2007 14:18, Aaron Zeckoski wrote:
 OK, when I use this and run mvn clean install
profiles
   profile
  !-- default profile for sakai core--
  idsakai/id
  activation
 property
name!sakai.distribution/name
 /property
  /activation
  modules
 modulealias-api/api/module
 modulealias-impl/impl/module
 modulealias-impl/pack/module
 modulealias-tool/tool/module
  /modules
   /profile
   profile
  !-- kernel (services + utils only) --
  idkernel/id
  activation
 property
namesakai.distribution/name
valuekernel/value
 /property
  /activation
  modules
 modulealias-api/api/module
 modulealias-impl/impl/module
 modulealias-impl/pack/module
  /modules
   /profile
 ...

 I get the following error (see below). I am not confused about what
 the error is. That is perfectly clear. I AM confused about why it is
 happening. That tool bit is only defined in the top profile and the
 property IS set in the base POM (where the mvn is being run) to cause
 that NOT to run like so:
properties
   sakai.distributionkernel/sakai.distribution
/properties

 Any ideas?
 -AZ


 [INFO] Error building POM (may not be this project's POM).
 Project ID: unknown
 Reason: Could not find the model file
 '/opt/kernel/alias/alias-tool/tool/pom.xml'. for project unknown
 [INFO]
 
 [INFO] Trace
 org.apache.maven.reactor.MavenExecutionException: Could not find the
 model file '/opt/kernel/alias/alias-tool/tool/pom.xml'. for project
 unknown
 at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:378)
 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:290)
 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
 at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
9) at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
l.java:25) at java.lang.reflect.Method.invoke(Method.java:585)
 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.ProjectBuildingException: Could not find the model
 file '/opt/kernel/alias/alias-tool/tool/pom.xml'. for project unknown
 at
 org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenP
rojectBuilder.java:1383) at
 org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInte
rnal(DefaultMavenProjectBuilder.java:477) at
 org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProje
ctBuilder.java:200) at
 org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:553) at
 org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:467) at
 org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:527) at
 org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:527) at
 org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:364) ... 11
 more
 Caused by: java.io.FileNotFoundException:
 /opt/kernel/alias/alias-tool/tool/pom.xml (No such file or directory)
 at java.io.FileInputStream.open(Native Method)
 at java.io.FileInputStream.init(FileInputStream.java:106)
 at java.io.FileReader.init(FileReader.java:55)
 at
 org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenP
rojectBuilder.java:1378) ... 18 more

 On Nov 15, 2007 10:51 AM, Roland Asmann [EMAIL PROTECTED] wrote:
  Do you need the default-profile? If not, remove the tag
  'activateByDefault'.
 
  Or you can try setting it to run when your property is NOT set/a certain
  value is NOT set:
 
  property
name!property/name
  /property
 
  or
 
  property
nameproperty/name
value!value/value
  /property
 
  On Wednesday 14 November 2007 23:29, Aaron Zeckoski wrote:
   Yes... I did that. This is not a newbie question (though I wish it
   were). The default profile is still running unless I do something like
   mvn install -Pkernel
  
   Here are the poms:
   Parent: https://source.sakaiproject.org/contrib/caret/kernel/pom.xml
   (this sets a property)
   Project:
   https://source.sakaiproject.org/contrib/caret/kernel/alias/pom.xml
   (this one has the default profile getting activated even though another

Re: triggering profiles without using command line and without running the default profile?

2007-11-15 Thread Roland Asmann
If this triggers the same exception, add the tool-project shortly, just to 
make sure you can run this command!


On Thursday 15 November 2007 15:08, Roland Asmann wrote:
 Run 'mvn help:active-profiles' to see which profiles are activated. Seems
 like the property is not handed down or something...

 On Thursday 15 November 2007 14:18, Aaron Zeckoski wrote:
  OK, when I use this and run mvn clean install
 profiles
profile
   !-- default profile for sakai core--
   idsakai/id
   activation
  property
 name!sakai.distribution/name
  /property
   /activation
   modules
  modulealias-api/api/module
  modulealias-impl/impl/module
  modulealias-impl/pack/module
  modulealias-tool/tool/module
   /modules
/profile
profile
   !-- kernel (services + utils only) --
   idkernel/id
   activation
  property
 namesakai.distribution/name
 valuekernel/value
  /property
   /activation
   modules
  modulealias-api/api/module
  modulealias-impl/impl/module
  modulealias-impl/pack/module
   /modules
/profile
  ...
 
  I get the following error (see below). I am not confused about what
  the error is. That is perfectly clear. I AM confused about why it is
  happening. That tool bit is only defined in the top profile and the
  property IS set in the base POM (where the mvn is being run) to cause
  that NOT to run like so:
 properties
sakai.distributionkernel/sakai.distribution
 /properties
 
  Any ideas?
  -AZ
 
 
  [INFO] Error building POM (may not be this project's POM).
  Project ID: unknown
  Reason: Could not find the model file
  '/opt/kernel/alias/alias-tool/tool/pom.xml'. for project unknown
  [INFO]
  
  [INFO] Trace
  org.apache.maven.reactor.MavenExecutionException: Could not find the
  model file '/opt/kernel/alias/alias-tool/tool/pom.xml'. for project
  unknown
  at
  org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:378) at
  org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:290) at
  org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125) at
  org.apache.maven.cli.MavenCli.main(MavenCli.java:280) at
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
 :3 9) at
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI
 mp l.java:25) at java.lang.reflect.Method.invoke(Method.java:585)
  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.ProjectBuildingException: Could not find the
  model file '/opt/kernel/alias/alias-tool/tool/pom.xml'. for project
  unknown at
  org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMave
 nP rojectBuilder.java:1383) at
  org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileIn
 te rnal(DefaultMavenProjectBuilder.java:477) at
  org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenPro
 je ctBuilder.java:200) at
  org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:553) at
  org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:467) at
  org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:527) at
  org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:527) at
  org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:364) ... 11
  more
  Caused by: java.io.FileNotFoundException:
  /opt/kernel/alias/alias-tool/tool/pom.xml (No such file or directory)
  at java.io.FileInputStream.open(Native Method)
  at java.io.FileInputStream.init(FileInputStream.java:106)
  at java.io.FileReader.init(FileReader.java:55)
  at
  org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMave
 nP rojectBuilder.java:1378) ... 18 more
 
  On Nov 15, 2007 10:51 AM, Roland Asmann [EMAIL PROTECTED] wrote:
   Do you need the default-profile? If not, remove the tag
   'activateByDefault'.
  
   Or you can try setting it to run when your property is NOT set/a
   certain value is NOT set:
  
   property
 name!property/name
   /property
  
   or
  
   property
 nameproperty/name
 value!value/value
   /property
  
   On Wednesday 14 November 2007 23:29, Aaron Zeckoski wrote:
Yes... I did that. This is not a newbie question (though I wish it
were). The default profile is still running unless I do something
like mvn install -Pkernel
   
Here are the poms

Re: how to use profiles exclusively? (HELP!)

2007-11-15 Thread Roland Asmann
You activate the release-profile yourself by setting the property to the 
expected value!

Remove the properties-tag from the profile and everything should work just 
fine!


On Wednesday 14 November 2007 23:46, dev dev wrote:
 I have defined 2 project profiles (below) and the goal is to be able
 to run in exclusively in devel or release environment (and not both).
 However, when i run mvn help:active-profiles, i got the below message.
 It should be just release and NOT both (devel and release). What did
  you do wrong, is this a bug in Maven2?

 Active Profiles for Project
 'com.mycompany.myproject:myproject-web:pom:1.0.0-SNAPSHOT':

 The following profiles are active:

  - devel (source: pom)
  - release (source: pom)


 +++

 project
 ...
 profile
 idrelease/id
 properties
   environment.typerelease/environment.type
 /properties
 activation
  property
   nameenvironment.type/name
   valuerelease/value
  /property
 /activation
 /profile

 profile
 iddevel/id
 activation
  property
   name!environment.type/name !--This profile
 is activated when no ${environment.type} property is set. --
  /property
 /activation
 /profile

 
 /project

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

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

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



Re: 2 way parent-module POM dependency required?

2007-11-15 Thread Roland Asmann
Understood, but if you have dependencies to you sibling-modules, you'd have 
the same problem...

So, I'd personally always build from the root-project after a fresh 
check-out... And from then on it wouldn't be necessary to use the 
relativePath.

Still, I understand your reasoning and I agree it's probably the best solution 
in your scenario.


On Thursday 15 November 2007 15:25, Stuart McCulloch wrote:
 On 15/11/2007, Roland Asmann [EMAIL PROTECTED] wrote:
  True. One question though: why do you use the 'relativePath'-attribute?
  This
  shouldn't be really necessary, or am I missing something here?

 say you've just checked out a fresh project tree from svn - it's not yet
 been
 released to any remote repository, and you have a clean local repository.

 if you went to a sub-folder and tried mvn install it would complain about
 not
 finding the parent POM (because it's not the same as the containing ..
 POM)

 the relativePath attribute tells Maven where to find the POM if it can't
 find it
 in the local or remote repositories - note that if the parent is the same
 as the containing POM then you shouldn't need to use relativePath

 http://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Ex
ample_2

 HTH

 On Thursday 15 November 2007 14:35, Stuart McCulloch wrote:
   On 15/11/2007, Roland Asmann [EMAIL PROTECTED] wrote:
How about re-writing the plugin to Maven2? Then you can at least
 
  remove
 
the 'modules'-part in your base-POM...
   
Otherwise I'm afraid you're indeed stuck with the 2-way dependency.
  
   also note the parent doesn't have to be the same as the 'containing'
   POM (ie. the one with the modules)
  
   for example, some projects place settings like dependencyManagement,
   pluginManagement, etc. in a separate POM (say inside a 'poms'
   directory) and have all sub-projects use this as their parent, and have
   module POMs just to support building from the root, not for inheriting
   settings.
  
   ie:
  
  pom.xml   (has modules: poms, A, B)
  
  \__ poms / pom.xml
  
  \__ A / pom.xml   (has poms as parent, relativePath ../poms)
  
  \__ B / pom.xml   (has poms as parent, relativePath ../poms)
  
   this can be really useful when you have various project types inside a
   single
   tree, because each sub-project can inherit settings from a different
   parent, and they won't disturb each other.
  
   the only tricky part is keeping the relativePath up-to-date, so that
 
  builds
 
   can
   work from any part of a check-out project tree... (I use my own plugin
 
  for
 
   this)
  
   On Thursday 15 November 2007 12:34, Aaron Zeckoski wrote:
  If you build the 'parent' and it does not contain the
 
  'modules'-tag,
 
the
   
  children DO NOT get build.

 Yeah, we want to be able to build from either the parent (and build
 everything) or from the child (and just build the child) but we
 need the information in the parent when the child is being built.
 As a result, it looks like we are stuck with the 2-way dependency
 (at
 
  least
 
 according to what I could understand from the maven site and the
 
  maven
 
 book).

 In maven1 we created a plugin which would walk the source tree so
 
  that
 
 the parents did not have to know about the children. The nice thing
 about this is that you could drop a new project in the source tree
 
  and
 
 it would get picked up and built automatically. All the children
 
  only
 
 knew about one single master POM which provided them with a set of
 properties and shared dependencies.

 I think we are going to have to just be stuck with the tight
 
  coupling
 
 in maven 2 though.
 I would be happy to know I am wrong on this though so feel free to
   
correct
   
 me.

 :-)

 -AZ

  Just play around with it a bit, Maven is very flexible in this
 
  way. I
 
do
   
  however believe it is described in the documentation, and pretty
  extensive if I recall correctly...
 
  On Wednesday 14 November 2007 23:51, Aaron Zeckoski wrote:
   Is the 2-way parent/module dependency actually the right way to
   link children and parent POMs? This is what we currently have:
  
   The parent includes definition of a module (or group of
   modules)
   
like
   
   so: ...
   groupIdorg.sakaiproject/groupId
   artifactIdbase/artifactId
   packagingpom/packaging
   ...
   modules
 modulealias/module
   /modules
   ...
  
   Then the child defines a parent like so:
   ...
   parent
 artifactIdbase/artifactId
 groupIdorg.sakaiproject/groupId
 versionM2/version
 relativePath../pom.xml/relativePath
   /parent
   ...
  
   As a result, we end up with this 2-way linkage bewteen these
 
  POMs
 
   which ends up not being very flexible since all of the POMs

Re: triggering profiles without using command line and without running the default profile?

2007-11-14 Thread Roland Asmann
Check the profile-documentation and use the property-activation.


On Wednesday 14 November 2007 18:02, Aaron Zeckoski wrote:
 I need to be able to trigger a specific profile WITHOUT executing the
 default profile AND without having to use the -P command line option.
 Ideally I want to trigger it using some setting in a POM file but any
 method where the user who is building the code can still type mvn
 clean build is fine.

 Can anyone help?
 Thanks
 -AZ

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

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



Re: Dependency on another project

2007-11-09 Thread Roland Asmann
Also, do NOT change anything in the POMs of your projects! The new project 
with POM is only a sort of helper-project with a 'builder-POM'.


On Thursday 08 November 2007 20:08, Roland Asmann wrote:
 Sorry I didn't point that out a little better: Yes, it should be a new
 project which only contains a pom.xml.

 Dependencies are only set when they are in the POM. This means that if you
 have project A as a dependency inside the POM of project B, the dependency
 is set from B to A and NOT the other way around.

 Packaging the projects does not change compared to what you're used to,
 since the eclipse-plugin ONLY works on the eclipse-projects (not the
 JARs). Or do you package using Eclipse? In that case I'm not sure what
 happens, but using Maven there's is no problem.

  Would this parent POM be in project A or B, or would it be in its own
  Eclipse
  project that contains nothing but a pom.xml?
 
  Wouldn't your suggested approach result in project A getting included as
  a project-dependency in project B, which isn't necessary? (There'd be a
  bidirectional relationship between project A and B?)
 
  When packaging project A, would project B's JAR be packaged and included,
  or
  would I add a separate dependency element just for that?
 
  Thanks.
 
  MALICE wrote:
  Create a POM that you use as a parent to both. If you build this POM,
  the
  eclipse=plugin for Maven will automatically add project B as a
  dependency
  in
  A. And it will add it as Eclipse project-dependencies, not as
  JAR-dependencies.
 
  Small example:
 
  project
 groupIdsome.thing/groupId
 artifactIdeclipse-master-pom/artifactId
 versionunversioned/version
 modules
 module../project-a/module
 module../project-b/module
 /modules
  /project
 
  On Thursday 08 November 2007 16:44, lightbulb432 wrote:
  Is it possible to specify, as a dependency, another Java project within
  Eclipse? If I have project A that depends on project B and both are
  Maven-managed projects, my current options are as follows:
  - package and install project B everytime it changes, then run mvn
  eclipse:eclipse of project A to point to the latest version of project
  B
  -
  the problem being that this is inefficient
  - within Eclipse, simply add project B as a dependency of project A -
  the
  problem being that I must do this everytime I update any dependency of
  project A must re-run eclipse:eclipse, which overwrites the .classpath
  file
 
  Is there a way of adding, in the dependency element, a reference to
  another
  Eclipse project so that running eclipse:eclipse points to the Eclipse
  workspace version of another project?
 
  Thanks.
 
  --
  Roland Asmann
 
  CFC Informationssysteme Entwicklungsgesellschaft m.b.H
  Bäckerstrasse 1/2/7
  A-1010 Wien
  FN 266155f, Handelsgericht Wien
 
  Tel.: +43/1/513 88 77 - 27
  Fax.: +43/1/513 88 62
  Email: [EMAIL PROTECTED]
  Web: www.cfc.at
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
  --
  View this message in context:
  http://www.nabble.com/Dependency-on-another-project-tf4771718s177.html#a1
 3650420 Sent from the Maven - Users mailing list archive at Nabble.com.
 
 
  -
  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]

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

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



Re: Building a limited set of modules based on pom (or somehow)?

2007-11-09 Thread Roland Asmann
OK, so I checked out the sources and re-read your mails a couple of times. My 
first suggestion still sounds the most workable solution to your problem, 
although I do want to stress that having the parent-POM variable is very 
unstable and error-prone.

To be able to activate more profiles, you probably want to configure the POMs 
a little different from my example. Let me give it a try (using your example 
from the first mail):

Base-POM:
project
  
  !-- These modules should ALWAYS build --
  modules
moduleapi/module
  /modules
  profiles
profile
  idbasic-impl/id
  activation
property
  nameimpl/name
  valuebasic/value
/property
  /activation
  !-- These modules are ADDED to the active module-list
when profile is active --
  modules
moduleimpl/module
  /modules
/profile
profile
  idalternate-impl/id
  activation
property
  nameimpl/name
  valuealternate/value
/property
  /activation
  !-- These modules are ADDED to the active module-list
when profile is active --
  modules
modulealternate-impl/module
  /modules
/profile
profile
  idtool/id
  activation
property
  nametool/name
/property
  /activation
  !-- These modules are ADDED to the active module-list
when profile is active --
  modules
moduletool/module
  /modules
/profile
profile
  idtest/id
  activation
property
  nametest/name
/property
  /activation
  !-- These modules are ADDED to the active module-list
when profile is active --
  modules
moduletest/module
  /modules
/profile
  /profiles
  
/project


Now, you can have parent-POMs that activate none, one or more of these 
profiles, eg:

Parent-POM that activates tests on alternate-impl:
project
  
  properties
implalternate/impl
!-- The value for test is irrelevant, the property just needs to
  exist --
test /
  /properties
  
/project

Parent-POM that activates the tool:
project
  
  properties
!-- The value for tool is irrelevant, the property just needs to
  exist --
tool /
  /properties
  
/project


So, I hope this sorts your problem... You can still combine this with profiles 
in the parent-POM, which means you can have a parent-POM that triggers 
profile 'alternate-impl' and 'test' when started in parent-profile 'p1' 
and 'basic-impl' and 'tool' when started in parent-profile 'p2'.

As I said before I haven't actually tried this sort of activation myself, but 
theoretically it should work. Good luck and feel free to contact me (and the 
mailing-list) if you need some more help.



On Friday 09 November 2007 11:35, Aaron Zeckoski wrote:
 I think the one thing that would help me to work around the build
 problems we are having would be to simply be able to cause a profile
 to be activated (which is not the default profile) without requiring
 the user who is building it to put in a command line parameter of
 -PprofileId. In fact, even more ideal would be the ability to activate
 multiple profiles at once (again without having to type
 -Pprofile1,profile2,profile3

 Our current experimental way to get this working using profiles in the
 base POM of one of the many many projects (that all rely on a parent
 POM) is here:
 https://source.sakaiproject.org/svn/content/branches/SAK-12105/pom.xml

 -AZ

 On Nov 8, 2007 7:52 PM, Roland Asmann [EMAIL PROTECTED] wrote:
  I'm not really sure if I completely understand what you want. I'll check
  your project out tomorrow at work (have no SVN here) and try and see if I
  can figure out what you exactly want and how best to solve this.
 
   On Nov 8, 2007 12:43 PM, Roland Asmann [EMAIL PROTECTED] wrote:
   Correct me if I'm wrong, but you are changing the parent-pom in you
   projects??
   Doesn't sound like very stable development to me...
  
   That is correct and you are right, it is not very stable. This is why
   I am looking for a better option.
  
   I think the ideal situation would be if I could have the effect of
   typing mvn -Pmything without having to put in the -P option. To
   instead have the parent POM able to activate a profile. Does anyone
   know if that is possible?
  
   I will try out what you suggested to see what happens.
   -AZ
  
   Anyway, there is a way to activate profiles based on parent-POMs, it's
   just
   not a very obvious one...
   If you set your profiles to be activated when a specific property is
   set to a
   specific value, you can configure all your profiles as you want and
   set these
   properties with the correct values in the parent-POM.
  
   Example:
  
   profiles
 profile
   activation
 property
   nameparentPom/name
   valuefirstParent/value
 /property
   /activation

Re: Project dependencies use case

2007-11-09 Thread Roland Asmann
I presume you have this use-case in your IDE, since Maven will NEVER use the 
source-code of another project and always refers to the packaged version in 
your repository.

What you need is a 'build-project', which contains both projects as modules. 
Then Maven will recognize they need eachother and build them in the correct 
order. If you use the eclipse-plugin (not sure about other IDEs, I've only 
used eclipse so far), the projects will get source-code references to 
eachother in eclipse.

Look at this thread, were I already discussed this: 
http://www.nabble.com/Dependency-on-another-project-tf4771718s177.html#a13649552


On Friday 09 November 2007 12:34, Hugo Palma wrote:
 I have a use case where i am developing two projects, and project A
 depends on project B.

 What i want to do is a mvn clean compile under project A directory and
 it will also compile project B and use it's classes as a dependency.
 Sounds simple enough but i can't seem to be able to get this use case
 working.

 The problem is that if i declare the dependency to project B in the
 project A pom maven will always look for the installed artifact of B,
 which isn't what i want because i don't want to have to install B every
 time i try to compile A.

 So i guess what i'm looking for is a way to declare that project A
 depends on project B current source code and not it's installed artifact.

 Am i making any sense ?

 Thanks in advance.

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

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

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



Re: Project dependencies use case

2007-11-09 Thread Roland Asmann
You can't.

You can only see if a single projects runs with the latestest installed 
version of another project. This means that you either have to change the 
command you run in ci to 'clean install' or live with the fact that updates 
are only deployed at night.

Is it a problem tyo run 'install' on your ci-server? It only installs to 
local-repo, not to a deployment-server...

Then, there is still the matter of build-order. If both those projects are 
related (like you said), you'd have to make sure that Project B is tested and 
installed BEFORE Project A. You can either do this manually, or create a 
small build-project that handles it for you (as I said, description in the 
other thread).


On Friday 09 November 2007 13:11, Hugo Palma wrote:
 It's actually not about IDE integration. It's about continous integration.

 I have my ci server run the goal clean cobertura:check every hour.
 This allows me to know within the hour if anyone committed any code that
 fails the tests. I only want to generate an artifact for my project once
 a day, at night usually.

 Problem is, if something changes in project B during the day, project A
 won't see the changes because i don't install project B every hour, and
 i don't want to. I just run clean cobertura:check like in every project.

 So, this means that project A will during the day will always be
 compiling with the installed artifact of B from the night before. Which
 again, isn't what i'd like.

 How do you solve this without having to install every project every hour ?

 Roland Asmann wrote:
  I presume you have this use-case in your IDE, since Maven will NEVER use
  the source-code of another project and always refers to the packaged
  version in your repository.
 
  What you need is a 'build-project', which contains both projects as
  modules. Then Maven will recognize they need eachother and build them in
  the correct order. If you use the eclipse-plugin (not sure about other
  IDEs, I've only used eclipse so far), the projects will get source-code
  references to eachother in eclipse.
 
  Look at this thread, were I already discussed this:
  http://www.nabble.com/Dependency-on-another-project-tf4771718s177.html#a1
 3649552
 
  On Friday 09 November 2007 12:34, Hugo Palma wrote:
  I have a use case where i am developing two projects, and project A
  depends on project B.
 
  What i want to do is a mvn clean compile under project A directory and
  it will also compile project B and use it's classes as a dependency.
  Sounds simple enough but i can't seem to be able to get this use case
  working.
 
  The problem is that if i declare the dependency to project B in the
  project A pom maven will always look for the installed artifact of B,
  which isn't what i want because i don't want to have to install B every
  time i try to compile A.
 
  So i guess what i'm looking for is a way to declare that project A
  depends on project B current source code and not it's installed
  artifact.
 
  Am i making any sense ?
 
  Thanks in advance.
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

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



Re: Project dependencies use case

2007-11-09 Thread Roland Asmann
And just running 'clean install'? Since it triggers cobertura as well, 
shouldn't that be enough?


On Friday 09 November 2007 13:37, Hugo Palma wrote:
 Well, the main reason for me not wanting to install is related to a
 behaviour in the cobertura plugin. Basically if i do install
 cobertura:check my tests are run twice. If i just do cobertura:check
 the tests are only run once. I reported this here
 (http://jira.codehaus.org/browse/MCOBERTURA-76).
 That's why i was trying to avoid having to install.

 Thanks...

 Roland Asmann wrote:
  You can't.
 
  You can only see if a single projects runs with the latestest installed
  version of another project. This means that you either have to change the
  command you run in ci to 'clean install' or live with the fact that
  updates are only deployed at night.
 
  Is it a problem tyo run 'install' on your ci-server? It only installs to
  local-repo, not to a deployment-server...
 
  Then, there is still the matter of build-order. If both those projects
  are related (like you said), you'd have to make sure that Project B is
  tested and installed BEFORE Project A. You can either do this manually,
  or create a small build-project that handles it for you (as I said,
  description in the other thread).
 
  On Friday 09 November 2007 13:11, Hugo Palma wrote:
  It's actually not about IDE integration. It's about continous
  integration.
 
  I have my ci server run the goal clean cobertura:check every hour.
  This allows me to know within the hour if anyone committed any code that
  fails the tests. I only want to generate an artifact for my project once
  a day, at night usually.
 
  Problem is, if something changes in project B during the day, project A
  won't see the changes because i don't install project B every hour, and
  i don't want to. I just run clean cobertura:check like in every
  project.
 
  So, this means that project A will during the day will always be
  compiling with the installed artifact of B from the night before. Which
  again, isn't what i'd like.
 
  How do you solve this without having to install every project every hour
  ?
 
  Roland Asmann wrote:
  I presume you have this use-case in your IDE, since Maven will NEVER
  use the source-code of another project and always refers to the
  packaged version in your repository.
 
  What you need is a 'build-project', which contains both projects as
  modules. Then Maven will recognize they need eachother and build them
  in the correct order. If you use the eclipse-plugin (not sure about
  other IDEs, I've only used eclipse so far), the projects will get
  source-code references to eachother in eclipse.
 
  Look at this thread, were I already discussed this:
  http://www.nabble.com/Dependency-on-another-project-tf4771718s177.html#
 a1 3649552
 
  On Friday 09 November 2007 12:34, Hugo Palma wrote:
  I have a use case where i am developing two projects, and project A
  depends on project B.
 
  What i want to do is a mvn clean compile under project A directory and
  it will also compile project B and use it's classes as a dependency.
  Sounds simple enough but i can't seem to be able to get this use case
  working.
 
  The problem is that if i declare the dependency to project B in the
  project A pom maven will always look for the installed artifact of B,
  which isn't what i want because i don't want to have to install B
  every time i try to compile A.
 
  So i guess what i'm looking for is a way to declare that project A
  depends on project B current source code and not it's installed
  artifact.
 
  Am i making any sense ?
 
  Thanks in advance.
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

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



Re: Project dependencies use case

2007-11-09 Thread Roland Asmann
Just read that in the plugin documentation. Too bad, should've been a little 
bit better to configure imo.

That means you're stuck to running it twice I guess... If you trust your 
developers enough and your ci is a pretty much isolated machine, you could 
maybe run 2 maven-calls: 'mvn clean install -Dmaven.test.skip=true' and 'mvn 
cobertura:check', just to speed things up a bit...


On Friday 09 November 2007 13:56, Hugo Palma wrote:
 That doesn't run the check goal of the cobertura plugin. And if i add
 the check goal to executions section in the cobertura plugin
 configuration then i get my tests run twice.

 Roland Asmann wrote:
  And just running 'clean install'? Since it triggers cobertura as well,
  shouldn't that be enough?
 
  On Friday 09 November 2007 13:37, Hugo Palma wrote:
  Well, the main reason for me not wanting to install is related to a
  behaviour in the cobertura plugin. Basically if i do install
  cobertura:check my tests are run twice. If i just do cobertura:check
  the tests are only run once. I reported this here
  (http://jira.codehaus.org/browse/MCOBERTURA-76).
  That's why i was trying to avoid having to install.
 
  Thanks...
 
  Roland Asmann wrote:
  You can't.
 
  You can only see if a single projects runs with the latestest installed
  version of another project. This means that you either have to change
  the command you run in ci to 'clean install' or live with the fact that
  updates are only deployed at night.
 
  Is it a problem tyo run 'install' on your ci-server? It only installs
  to local-repo, not to a deployment-server...
 
  Then, there is still the matter of build-order. If both those projects
  are related (like you said), you'd have to make sure that Project B is
  tested and installed BEFORE Project A. You can either do this manually,
  or create a small build-project that handles it for you (as I said,
  description in the other thread).
 
  On Friday 09 November 2007 13:11, Hugo Palma wrote:
  It's actually not about IDE integration. It's about continous
  integration.
 
  I have my ci server run the goal clean cobertura:check every hour.
  This allows me to know within the hour if anyone committed any code
  that fails the tests. I only want to generate an artifact for my
  project once a day, at night usually.
 
  Problem is, if something changes in project B during the day, project
  A won't see the changes because i don't install project B every hour,
  and i don't want to. I just run clean cobertura:check like in every
  project.
 
  So, this means that project A will during the day will always be
  compiling with the installed artifact of B from the night before.
  Which again, isn't what i'd like.
 
  How do you solve this without having to install every project every
  hour ?
 
  Roland Asmann wrote:
  I presume you have this use-case in your IDE, since Maven will NEVER
  use the source-code of another project and always refers to the
  packaged version in your repository.
 
  What you need is a 'build-project', which contains both projects as
  modules. Then Maven will recognize they need eachother and build them
  in the correct order. If you use the eclipse-plugin (not sure about
  other IDEs, I've only used eclipse so far), the projects will get
  source-code references to eachother in eclipse.
 
  Look at this thread, were I already discussed this:
  http://www.nabble.com/Dependency-on-another-project-tf4771718s177.htm
 l# a1 3649552
 
  On Friday 09 November 2007 12:34, Hugo Palma wrote:
  I have a use case where i am developing two projects, and project A
  depends on project B.
 
  What i want to do is a mvn clean compile under project A directory
  and it will also compile project B and use it's classes as a
  dependency. Sounds simple enough but i can't seem to be able to get
  this use case working.
 
  The problem is that if i declare the dependency to project B in the
  project A pom maven will always look for the installed artifact of
  B, which isn't what i want because i don't want to have to install B
  every time i try to compile A.
 
  So i guess what i'm looking for is a way to declare that project A
  depends on project B current source code and not it's installed
  artifact.
 
  Am i making any sense ?
 
  Thanks in advance.
 
  
 - To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

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



Re: issue with plugin beeing reused

2007-11-09 Thread Roland Asmann
Might be a configuration-error. Please post the part of your POM where the 
ant-run is configured!


On Friday 09 November 2007 15:41, nicolas de loof wrote:
 Hello,

 My project uses the antrun plugin to invoke some custom ant tasks that have
 not (yet) be re-written as mojos. Thos task generate some code ant are tied
 to the generate-source phase

 When I build the project modules all works fine.

 When I run the eclipse:eclipse goal from the parent project, I get a
 classpath issue :
 I've dumped the plugin classpath as shown in
 http://maven.apache.org/plugins/maven-antrun-plugin/examples/classpaths.htm
l:

  [echo] plugin classpath:
 D:\platina\maven2\repository\net\sourceforge\sql2java\sql2java\2.5.0\sql2ja
va- 2.5.0.jar;...

 This path is the classpath set for a previous use of the plugin, in another
 module.
 It seems the plugin has been reused by maven, with no consideration for !=
 dependencies.

 Known issue ?
 Any workaround ?

 Nico.

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

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



Re: What does Configuration Tag in CI Management ?

2007-11-09 Thread Roland Asmann
Check http://maven.apache.org/pom.html#Continuous_Integration_Management

I think this is the e-mail address that is shown as the sender of the mail.


On Friday 09 November 2007 15:39, Mac-Systems wrote:
 Hello,

 while reading about some questions there on the mailing list i stumbeld
 about

 ciManagement
 systemcontinuum/system
 notifiers
 notifier
 typemail/type
 sendOnErrortrue/sendOnError
 sendOnFailuretrue/sendOnFailure
 sendOnSuccessfalse/sendOnSuccess
 sendOnWarningfalse/sendOnWarning

 configuration
 address[EMAIL PROTECTED]/address
 /configuration
 /notifier
 /notifiers
 /ciManagement

 For what exacly is that configuration with EMail Tag ?
 Looking at the XSD for the pom i found this :

 xs:documentation source=descriptionExtended configuration specific to
 this notifier goes here./xs:documentation

 thanks,
 Jens





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

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

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



Re: issue with plugin beeing reused

2007-11-09 Thread Roland Asmann
If one of the ant-runs is defined in a parent to the other, try adding 
inheritedfalse/inherited...


On Friday 09 November 2007 16:15, nicolas de loof wrote:
 Here is my antrun configuration. As you can see, I'm setting some plugin
 dependencies.
 I'm also using antrun in another module to run a java command line class
 from sql2java, set as plugin dependency.

 On the second antrun execution, it's classpath is set from the first one
 (sql2java) and not the expected dependencies.


 plugin
 artifactIdmaven-antrun-plugin/artifactId
 version1.1/version
 executions
   execution
 idcastor/id
 phasegenerate-sources/phase
 configuration
   tasks
 taskdef
   resource=net/sf/antcontrib/antcontrib.properties /
 taskdef name=castor-srcgen
   classname=
 org.exolab.castor.tools.ant.taskdefs.CastorSourceGenTask
   classpathref=maven.plugin.classpath /
 available
  
 file=${project.build.directory}/generated-sources/castor
 property=file.exists value=true /
 if
   not
 isset property=file.exists /
   /not
   then
 mkdir
  
 dir=${project.build.directory}/generated-sources/castor /
 castor-srcgen
   file=${basedir}/src/xsd/SchemaCdeAcces.xsd
   package=sfr.hamlet.commande.daoxml.SchemaCdeAcces

 todir=${project.build.directory}/generated-sources/castor
 /
   /then
 /if
   /tasks
   sourceRoot
 ${project.build.directory}/generated-sources/castor
   /sourceRoot
 /configuration
 goals
   goalrun/goal
 /goals
   /execution
 /executions
 dependencies
   dependency
 groupIdant-contrib/groupId
 artifactIdant-contrib/artifactId
 version1.0b2/version
   /dependency
   dependency
 groupIdorg.codehaus.castor/groupId
 artifactIdcastor-codegen-anttask/artifactId
 version${castor.version}/version
   /dependency
 /dependencies
   /plugin

 2007/11/9, Roland Asmann [EMAIL PROTECTED]:
  Might be a configuration-error. Please post the part of your POM where
  the ant-run is configured!
 
  On Friday 09 November 2007 15:41, nicolas de loof wrote:
   Hello,
  
   My project uses the antrun plugin to invoke some custom ant tasks that
 
  have
 
   not (yet) be re-written as mojos. Thos task generate some code ant are
 
  tied
 
   to the generate-source phase
  
   When I build the project modules all works fine.
  
   When I run the eclipse:eclipse goal from the parent project, I get a
   classpath issue :
   I've dumped the plugin classpath as shown in
 
  http://maven.apache.org/plugins/maven-antrun-plugin/examples/classpaths.h
 tm
 
  l:
  
[echo] plugin classpath:
 
  D:\platina\maven2\repository\net\sourceforge\sql2java\sql2java\2.5.0\sql2
 ja
 
  va- 2.5.0.jar;...
  
   This path is the classpath set for a previous use of the plugin, in
 
  another
 
   module.
   It seems the plugin has been reused by maven, with no consideration for
 
  !=
 
   dependencies.
  
   Known issue ?
   Any workaround ?
  
   Nico.
 
  --
  Roland Asmann
 
  CFC Informationssysteme Entwicklungsgesellschaft m.b.H
  Bäckerstrasse 1/2/7
  A-1010 Wien
  FN 266155f, Handelsgericht Wien
 
  Tel.: +43/1/513 88 77 - 27
  Fax.: +43/1/513 88 62
  Email: [EMAIL PROTECTED]
  Web: www.cfc.at
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

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



Re: Plugins and Multiple projects

2007-11-09 Thread Roland Asmann
Best solution would be to ask them to switch to Maven, but for now I think 
only adding a POM should work. You could ask the developers if they can just 
add the file to their project, so that you don't have to maintain the file in 
a different location. Just tell them it's a resource that you need during the 
build! ;-)


On Friday 09 November 2007 16:36, Grant Ingersoll wrote:
 I suppose I could copy in a pom that I keep somewhere else if and when
 I do a fresh checkout of the project.  Or, I could try to convince the
 authors of that project to convert to Maven.

 Thanks for the help,
 Grant

 From: Roland Asmann [EMAIL PROTECTED]
 Date: November 8, 2007 6:39:51 PM EST
 To: Maven Users List users@maven.apache.org
 Subject: Re: Plugins and Multiple projects


 Seeing that you build the 'other-project' as well, wouldn't it be easier
 to just throw in a pom.xml in that directory and configure the ant-run
 there? That way your project 'is' a Maven-project from now on! ;-)

 I believe that's the easiest solution, because a pom-type-project
 (parent-project) doesn't execute the compile-phase. You could try to
 configure it in another phase that IS run by the pom-lifecycle, but I
 still believe the 'small conversion' I suggested would be the easiest
 way
 to go...

  I have several subprojects of a project, plus another project that is
  not controlled by Maven.  I would like to setup the antrun plugin to
  run ANT on just the subproject that is not controlled by Maven (and I
  don't have the power to change this).  When I put the plugin
  definition into the lifecycle via:
  plugin
  artifactIdmaven-antrun-plugin/artifactId
  executions
execution
  idSolr Build/id
  phasecompile/phase
  inheritedfalse/inherited
 
  configuration
tasks if=
  ant antfile=build.xml dir=other-project
  target=dist/
/tasks
  /configuration
  goals
goalrun/goal
  /goals
/execution
  /executions
/plugin
 
  Maven tries to run this plugin on all of my modules and thus fails b/c
  the build.xml doesn't exist in any of the modules directories.  Is
  there some way to tell it to only run this plugin once, at the top
  level, but still execute the compile phase?

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

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

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



Re: issue with plugin beeing reused

2007-11-09 Thread Roland Asmann
And the ant-run is defined in the parent? Or in the separate modules?


On Friday 09 November 2007 16:47, nicolas de loof wrote:
 Not the case.
 I only have a parent pom to group modules, and all modules are on the same
 hierarchival level.

 2007/11/9, Roland Asmann [EMAIL PROTECTED]:
  If one of the ant-runs is defined in a parent to the other, try adding
  inheritedfalse/inherited...
 
  On Friday 09 November 2007 16:15, nicolas de loof wrote:
   Here is my antrun configuration. As you can see, I'm setting some
   plugin dependencies.
   I'm also using antrun in another module to run a java command line
   class from sql2java, set as plugin dependency.
  
   On the second antrun execution, it's classpath is set from the first
   one (sql2java) and not the expected dependencies.
  
  
   plugin
   artifactIdmaven-antrun-plugin/artifactId
   version1.1/version
   executions
 execution
   idcastor/id
   phasegenerate-sources/phase
   configuration
 tasks
   taskdef
 resource=net/sf/antcontrib/antcontrib.properties /
   taskdef name=castor-srcgen
 classname=
   org.exolab.castor.tools.ant.taskdefs.CastorSourceGenTask
 classpathref=maven.plugin.classpath /
   available
  
   file=${project.build.directory}/generated-sources/castor
   property=file.exists value=true /
   if
 not
   isset property=file.exists /
 /not
 then
   mkdir
  
   dir=${project.build.directory}/generated-sources/castor /
   castor-srcgen
 file=${basedir}/src/xsd/SchemaCdeAcces.xsd

   package=sfr.hamlet.commande.daoxml.SchemaCdeAcces
 
  
 
   todir=${project.build.directory}/generated-sources/castor
   /
 /then
   /if
 /tasks
 sourceRoot
   ${project.build.directory}/generated-sources/castor
 /sourceRoot
   /configuration
   goals
 goalrun/goal
   /goals
 /execution
   /executions
   dependencies
 dependency
   groupIdant-contrib/groupId
   artifactIdant-contrib/artifactId
   version1.0b2/version
 /dependency
 dependency
   groupIdorg.codehaus.castor/groupId
   artifactIdcastor-codegen-anttask/artifactId
   version${castor.version}/version
 /dependency
   /dependencies
 /plugin
  
   2007/11/9, Roland Asmann [EMAIL PROTECTED]:
Might be a configuration-error. Please post the part of your POM
where the ant-run is configured!
   
On Friday 09 November 2007 15:41, nicolas de loof wrote:
 Hello,

 My project uses the antrun plugin to invoke some custom ant tasks
 
  that
 
have
   
 not (yet) be re-written as mojos. Thos task generate some code ant
 
  are
 
tied
   
 to the generate-source phase

 When I build the project modules all works fine.

 When I run the eclipse:eclipse goal from the parent project, I get
 a classpath issue :
 I've dumped the plugin classpath as shown in
 
  http://maven.apache.org/plugins/maven-antrun-plugin/examples/classpaths.h
 
   tm
   
l:

  [echo] plugin classpath:
 
  D:\platina\maven2\repository\net\sourceforge\sql2java\sql2java\2.5.0\sql2
 
   ja
   
va- 2.5.0.jar;...

 This path is the classpath set for a previous use of the plugin, in
   
another
   
 module.
 It seems the plugin has been reused by maven, with no consideration
 
  for
 
!=
   
 dependencies.

 Known issue ?
 Any workaround ?

 Nico.
   
--
Roland Asmann
   
CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien
   
Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at
   
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 
  --
  Roland Asmann
 
  CFC Informationssysteme Entwicklungsgesellschaft m.b.H
  Bäckerstrasse 1/2/7
  A-1010 Wien
  FN 266155f, Handelsgericht Wien
 
  Tel.: +43/1/513 88 77 - 27
  Fax.: +43/1/513 88 62
  Email: [EMAIL PROTECTED]
  Web: www.cfc.at
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f

Re: Building a limited set of modules based on pom (or somehow)?

2007-11-08 Thread Roland Asmann
Correct me if I'm wrong, but you are changing the parent-pom in you projects??
Doesn't sound like very stable development to me...

Anyway, there is a way to activate profiles based on parent-POMs, it's just 
not a very obvious one...
If you set your profiles to be activated when a specific property is set to a 
specific value, you can configure all your profiles as you want and set these 
properties with the correct values in the parent-POM.

Example:

profiles
  profile
activation
  property
nameparentPom/name
valuefirstParent/value
  /property
/activation
modules
  modulemodule1/module
/module
  /profile
  profile
activation
  property
nameparentPom/name
valuesecondParent/value
  /property
/activation
modules
  modulemodule2/module
  modulemodule3/module
/module
  /profile
/profiles

And then in the first parent-POM you define something like:

properties
  parentPomfirstParent/parentPom
/properties

And in the second:

properties
  parentPomsecondParent/parentPom
/properties

Mind you that I haven't tested this, but from normal logic I think this should 
work. At least it's worth a try, 'cause you don't need to trigger the 
profiles from the commandline this way.

Oh, and in case I misunderstood your problem and therefore this is not a 
solution to it, please feel free to post again and help me understand 
better. ;-)

Roland



On Thursday 08 November 2007 11:59, Aaron Zeckoski wrote:
 I am trying to build a limited set of modules based on the parent pom
 file being used. I tried using profiles but there does not seem to be
 a way to trigger a profile based on the parent POM. Here is the
 scenario I am trying to figure out. I have a project base POM which
 has a number of modules. I want to build various subsets of those
 modules depending on a setting in the parent POM for this base POM.

 Here is a sample base POM:
   modules
 moduleapi/module
 moduleimpl/module
 moduletests/module
 modulealternate-impl/module
 moduletool/module
   /modules

 I would like to build just the api and impl modules in circumstance
 one (services only).
   modules
 moduleapi/module
 moduleimpl/module
   /modules

 I would like to optionally add in the tests module and/or the tool
 module to include the tests or the webapp.
   modules
 moduleapi/module
 moduleimpl/module
 moduletool/module
   /modules

 I would also like to be able to specify that I need to use an
 alternate implementation of the service in place of the current impl
 when the service is built.
   modules
 moduleapi/module
 modulealternate-impl/module
 moduletests/module
   /modules

 The final key here is that the parent POM for this project base POM
 will change depending on which set of source code is checked out.
 Currently we have one parent POM which includes all the base POMs for
 all central services and then one which includes modules for all the
 optional services. This has a huge limitation in that we have redefine
 base poms for all the core services to exclude the accompanying
 webapps and tests. I would ideally like to automate this since
 currently we have to maintain huge lists of modules in both (soon to
 be three) the parent POMs.

 It looks like I can accomplish this via profiles, except that those
 require lots of command line parameters. Is there a way to do this
 where the user would not have put a huge number of command line
 paramters down or am I stuck maintaining multiple parent POMs with
 huge lists of modules and multiple base POMs for each project?

 Open to suggestions about restructuring the project layout as well.
 Here is an example of one version of parent POM and a set of base POMs:
 https://source.sakaiproject.org/svn/cafe/trunk/

 -AZ

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

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



Re: maven constantly rebuilding everything

2007-11-08 Thread Roland Asmann
What command are you running? If you start (or end) your builds with 'clean', 
it is only logical that Maven rebuilds everything.

Also, if you checkout your sources from SCM, Maven can't see that there's no 
changes and therefor will build everything again.



On Thursday 08 November 2007 15:49, EJ Ciramella wrote:
 I've just noticed kinda a little delemma here.  From build to build,
 when NOTHING has changed inside module A, I can see that its still
 rebuilding the jar for this particular module.

 Is there any reason this should be happening?  Like say it is set to
 build a snapshot version?  I think it would notice that the source
 directory doesn't contain any changes and not build.

 Any help/suggestions would be greatly appreciated.

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

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



Re: Dependency on another project

2007-11-08 Thread Roland Asmann
Create a POM that you use as a parent to both. If you build this POM, the 
eclipse=plugin for Maven will automatically add project B as a dependency in 
A. And it will add it as Eclipse project-dependencies, not as 
JAR-dependencies.

Small example:

project
groupIdsome.thing/groupId
artifactIdeclipse-master-pom/artifactId
versionunversioned/version
modules
module../project-a/module
module../project-b/module
/modules
/project



On Thursday 08 November 2007 16:44, lightbulb432 wrote:
 Is it possible to specify, as a dependency, another Java project within
 Eclipse? If I have project A that depends on project B and both are
 Maven-managed projects, my current options are as follows:
 - package and install project B everytime it changes, then run mvn
 eclipse:eclipse of project A to point to the latest version of project B -
 the problem being that this is inefficient
 - within Eclipse, simply add project B as a dependency of project A - the
 problem being that I must do this everytime I update any dependency of
 project A must re-run eclipse:eclipse, which overwrites the .classpath file

 Is there a way of adding, in the dependency element, a reference to another
 Eclipse project so that running eclipse:eclipse points to the Eclipse
 workspace version of another project?

 Thanks.

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

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



Re: maven constantly rebuilding everything

2007-11-08 Thread Roland Asmann
From the description of the source:jar-plugin 
(http://maven.apache.org/plugins/maven-source-plugin/jar-mojo.html), I derive 
that this configuration is not possible in the source-jar.

Maybe filing a JIRA might help, until then you can only ignore it (and live 
with the rebuild every time) or remove the source:jar-run from your POM.



On Thursday 08 November 2007 16:33, EJ Ciramella wrote:
 So I added a snippet of configuration from here:

 http://jira.codehaus.org/browse/MJAR-7

 But the same kind of configuration supplied to the source plugin does
 nothing (and it too rebuilds the source jar every time even though there
 are no changes).


 -Original Message-
 From: EJ Ciramella [mailto:[EMAIL PROTECTED]
 Sent: Thursday, November 08, 2007 10:20 AM
 To: Maven Users List
 Subject: RE: maven constantly rebuilding everything

 Rebuilding this same module with -X -e turned on, I see this:

 [DEBUG] isUp2date: false (Input file
 E:\work\up-svcs\lty\proj\LTY-P200712\backoffice\core\pom.properties is
 newer.)

 What exactly is this file and how does it get created?

 -Original Message-
 From: EJ Ciramella [mailto:[EMAIL PROTECTED]
 Sent: Thursday, November 08, 2007 10:12 AM
 To: Maven Users List
 Subject: RE: maven constantly rebuilding everything

 So we regularly use mvn install.  I didn't think that did a clean
 anywhere in its lifecycle.

 And yes, I understand that if the sources have changed, it will recompile,
 etc on down the line, but there are not source file changes, no sync, just
 mvn install then up arrow and run it again and it will build up the jars
 again, here's a look at the output from the up arrow pass.  Is this
 because of our use of snapshot versions or something?

 [INFO]
 NOTE: Maven is executing in offline mode. Any artifacts not already in your
 local repository will be inaccessible.

 [INFO] Scanning for projects...
 [INFO]
 ---
- [INFO] Building Backoffice Core Engine
 [INFO]task-segment: [install]
 [INFO]
 ---
- [INFO] [resources:resources]
 [INFO] Using default encoding to copy filtered resources.
 [INFO] [compiler:compile]
 [INFO] Nothing to compile - all classes are up to date
 [INFO] [resources:testResources]
 [INFO] Using default encoding to copy filtered resources.
 [INFO] [compiler:testCompile]
 [INFO] Nothing to compile - all classes are up to date
 [INFO] [surefire:test]
 [INFO] Surefire report directory:
 E:\work\up-svcs\lty\proj\LTY-P200712\reportsdirectory

 ---
  T E S T S
 ---
 There are no tests to run.

 Results :
 Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

 [INFO] [jar:jar]
 [INFO] Building jar:
 E:\work\up-svcs\lty\proj\LTY-P200712\backoffice\core\target\backofficeCore-
P200712-SNAPSHOT.jar [INFO] Preparing source:jar
 [WARNING] Removing: jar from forked lifecycle, to prevent recursive
 invocation. [INFO] No goals needed for project - skipping
 [INFO] [source:jar {execution: attach-source}]
 [INFO] Building jar:
 E:\work\up-svcs\lty\proj\LTY-P200712\backoffice\core\target\backofficeCore-
P200712-SNAPSHOT-sources.jar [INFO] [install:install]
 [INFO] Installing
 E:\work\up-svcs\lty\proj\LTY-P200712\backoffice\core\target\backofficeCore-
P200712-SNAPSHOT.jar to E:\work\m2\Repository\lty\backofficeCore\P20
 0712-SNAPSHOT\backofficeCore-P200712-SNAPSHOT.jar
 [INFO] Installing
 E:\work\up-svcs\lty\proj\LTY-P200712\backoffice\core\target\backofficeCore-
P200712-SNAPSHOT-sources.jar to E:\work\m2\Repository\lty\backoffice
 Core\P200712-SNAPSHOT\backofficeCore-P200712-SNAPSHOT-sources.jar
 [INFO]
 
 [INFO] BUILD SUCCESSFUL
 [INFO]
 
 [INFO] Total time: 4 seconds
 [INFO] Finished at: Thu Nov 08 10:08:12 EST 2007
 [INFO] Final Memory: 8M/254M
 [INFO]
 

 -Original Message-
 From: Roland Asmann [mailto:[EMAIL PROTECTED]
 Sent: Thursday, November 08, 2007 9:55 AM
 To: Maven Users List
 Subject: Re: maven constantly rebuilding everything

 What command are you running? If you start (or end) your builds with
 'clean', it is only logical that Maven rebuilds everything.

 Also, if you checkout your sources from SCM, Maven can't see that there's
 no changes and therefor will build everything again.

 On Thursday 08 November 2007 15:49, EJ Ciramella wrote:
  I've just noticed kinda a little delemma here.  From build to build,
  when NOTHING has changed inside module A, I can see that its still
  rebuilding the jar for this particular module.
 
  Is there any reason this should be happening?  Like say it is set to
  build a snapshot version?  I think it would notice that the source
  directory

Re: maven constantly rebuilding everything

2007-11-08 Thread Roland Asmann
Go here: http://jira.codehaus.org/browse/MSOURCES
Open up an account (it's free ;-) ) and fill out a new issue.



On Thursday 08 November 2007 16:52, EJ Ciramella wrote:
 Um, how does one file a jira ticket for something like this?

 -Original Message-
 From: Roland Asmann [mailto:[EMAIL PROTECTED]
 Sent: Thursday, November 08, 2007 10:50 AM
 To: Maven Users List
 Subject: Re: maven constantly rebuilding everything

 From the description of the source:jar-plugin

 (http://maven.apache.org/plugins/maven-source-plugin/jar-mojo.html), I
 derive that this configuration is not possible in the source-jar.

 Maybe filing a JIRA might help, until then you can only ignore it (and live
 with the rebuild every time) or remove the source:jar-run from your POM.

 On Thursday 08 November 2007 16:33, EJ Ciramella wrote:
  So I added a snippet of configuration from here:
 
  http://jira.codehaus.org/browse/MJAR-7
 
  But the same kind of configuration supplied to the source plugin does
  nothing (and it too rebuilds the source jar every time even though there
  are no changes).
 
 
  -Original Message-
  From: EJ Ciramella [mailto:[EMAIL PROTECTED]
  Sent: Thursday, November 08, 2007 10:20 AM
  To: Maven Users List
  Subject: RE: maven constantly rebuilding everything
 
  Rebuilding this same module with -X -e turned on, I see this:
 
  [DEBUG] isUp2date: false (Input file
  E:\work\up-svcs\lty\proj\LTY-P200712\backoffice\core\pom.properties is
  newer.)
 
  What exactly is this file and how does it get created?
 
  -Original Message-
  From: EJ Ciramella [mailto:[EMAIL PROTECTED]
  Sent: Thursday, November 08, 2007 10:12 AM
  To: Maven Users List
  Subject: RE: maven constantly rebuilding everything
 
  So we regularly use mvn install.  I didn't think that did a clean
  anywhere in its lifecycle.
 
  And yes, I understand that if the sources have changed, it will
  recompile, etc on down the line, but there are not source file changes,
  no sync, just mvn install then up arrow and run it again and it will
  build up the jars again, here's a look at the output from the up arrow
  pass.  Is this because of our use of snapshot versions or something?
 
  [INFO]
  NOTE: Maven is executing in offline mode. Any artifacts not already in
  your local repository will be inaccessible.
 
  [INFO] Scanning for projects...
  [INFO]
  -
 -- - [INFO] Building Backoffice Core Engine
  [INFO]task-segment: [install]
  [INFO]
  -
 -- - [INFO] [resources:resources]
  [INFO] Using default encoding to copy filtered resources.
  [INFO] [compiler:compile]
  [INFO] Nothing to compile - all classes are up to date
  [INFO] [resources:testResources]
  [INFO] Using default encoding to copy filtered resources.
  [INFO] [compiler:testCompile]
  [INFO] Nothing to compile - all classes are up to date
  [INFO] [surefire:test]
  [INFO] Surefire report directory:
  E:\work\up-svcs\lty\proj\LTY-P200712\reportsdirectory
 
  ---
   T E S T S
  ---
  There are no tests to run.
 
  Results :
  Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
 
  [INFO] [jar:jar]
  [INFO] Building jar:
  E:\work\up-svcs\lty\proj\LTY-P200712\backoffice\core\target\backofficeCor
 e- P200712-SNAPSHOT.jar [INFO] Preparing source:jar
  [WARNING] Removing: jar from forked lifecycle, to prevent recursive
  invocation. [INFO] No goals needed for project - skipping
  [INFO] [source:jar {execution: attach-source}]
  [INFO] Building jar:
  E:\work\up-svcs\lty\proj\LTY-P200712\backoffice\core\target\backofficeCor
 e- P200712-SNAPSHOT-sources.jar [INFO] [install:install]
  [INFO] Installing
  E:\work\up-svcs\lty\proj\LTY-P200712\backoffice\core\target\backofficeCor
 e- P200712-SNAPSHOT.jar to E:\work\m2\Repository\lty\backofficeCore\P20
  0712-SNAPSHOT\backofficeCore-P200712-SNAPSHOT.jar
  [INFO] Installing
  E:\work\up-svcs\lty\proj\LTY-P200712\backoffice\core\target\backofficeCor
 e- P200712-SNAPSHOT-sources.jar to E:\work\m2\Repository\lty\backoffice
  Core\P200712-SNAPSHOT\backofficeCore-P200712-SNAPSHOT-sources.jar [INFO]
  
  [INFO] BUILD SUCCESSFUL
  [INFO]
  
  [INFO] Total time: 4 seconds
  [INFO] Finished at: Thu Nov 08 10:08:12 EST 2007
  [INFO] Final Memory: 8M/254M
  [INFO]
  
 
  -Original Message-
  From: Roland Asmann [mailto:[EMAIL PROTECTED]
  Sent: Thursday, November 08, 2007 9:55 AM
  To: Maven Users List
  Subject: Re: maven constantly rebuilding everything
 
  What command are you running? If you start (or end) your builds with
  'clean', it is only logical that Maven rebuilds

Re: Plugins and Multiple projects

2007-11-08 Thread Roland Asmann
Seeing that you build the 'other-project' as well, wouldn't it be easier
to just throw in a pom.xml in that directory and configure the ant-run
there? That way your project 'is' a Maven-project from now on! ;-)

I believe that's the easiest solution, because a pom-type-project
(parent-project) doesn't execute the compile-phase. You could try to
configure it in another phase that IS run by the pom-lifecycle, but I
still believe the 'small conversion' I suggested would be the easiest way
to go...


 I have several subprojects of a project, plus another project that is
 not controlled by Maven.  I would like to setup the antrun plugin to
 run ANT on just the subproject that is not controlled by Maven (and I
 don't have the power to change this).  When I put the plugin
 definition into the lifecycle via:
 plugin
  artifactIdmaven-antrun-plugin/artifactId
  executions
execution
  idSolr Build/id
  phasecompile/phase
  inheritedfalse/inherited

  configuration
tasks if=
  ant antfile=build.xml dir=other-project
 target=dist/
/tasks
  /configuration
  goals
goalrun/goal
  /goals
/execution
  /executions
/plugin

 Maven tries to run this plugin on all of my modules and thus fails b/c
 the build.xml doesn't exist in any of the modules directories.  Is
 there some way to tell it to only run this plugin once, at the top
 level, but still execute the compile phase?

 Thanks,
 Grant


 --
 Grant Ingersoll
 http://lucene.grantingersoll.com

 Lucene Boot Camp Training:
 ApacheCon Atlanta, Nov. 12, 2007.  Sign up now!  http://www.apachecon.com

 Lucene Helpful Hints:
 http://wiki.apache.org/lucene-java/BasicsOfPerformance
 http://wiki.apache.org/lucene-java/LuceneFAQ



 -
 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: what version of the documentation am I looking at

2007-11-08 Thread Roland Asmann
http://maven.apache.org/plugins/maven-dependency-plugin/project-summary.html

On that page (project-summary) you can always find the version.


 Is it possible to easily find out what version of the documentation I'm
 looking at when I look at the plugin docs?

 For example:

 http://maven.apache.org/plugins/maven-dependency-plugin/index.html

 What version of the plugin is that set of docs for?

 The unpack mojo doesn't have the overWrite attribute we're using:

 http://maven.apache.org/plugins/maven-dependency-plugin/unpack-mojo.html








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



  1   2   3   >