m2: I know profiles are not inherited, but...

2008-02-12 Thread Amshoff Christoph , Köln
Hi all.

I am having troubles with profiles in a multi-module environment.

Say there is a project "father" defining multiple modules in its POM like this:


son1
son2



Additionally, there is a section defining some profiles for different 
environments in the father's POM: 




env-nb


env
nb



somePath




db2


path.db2jar




db2
db2
8.2
system
${path.db2jar}






The first profile (used for nightly builds) is triggered by specifying -Denv=nb 
on the command line; the second profile (adding a dependency to DB2 related JAR 
file) is activated when the variable path.db2jar is set.

Now, when I look at the effective POM for "father" project with -Denv=nb 
command line option given, everything is fine: the property "path.db2jar" is 
defined and the additional dependency is added.

I understand that profiles are not inherited from the parent, but only the 
effect they have on the POM. 

However, for all aggregated projects like son1, son2 etc., the property is set 
(inherited) correctly, but NOT the dependency!  I would have expected to see 
both the property and the dependency active in effective POM of all childs... 
so... why isn't that the case? BTW, yes, the child POM do reference the 
father's POM as parent.

Any ideas? Help is greatly appreciated!

Thanks,
Christoph.



[m2] How to get source JARs when sharing eclipse config -- best p ractices?

2006-09-07 Thread Amshoff Christoph, Köln
Hi,

we are using the eclipse plugin to create the Eclipse configuration, and
specify the -DdownloadSources=true switch to download the source JARs and
include them into the .classpath file. This is pretty cool, but

As usual, the .project and .classpath files are checked into CVS to share
them with the team. Now what about the source JARs, how do the rest of the
team get them from our internal maven-repo into their private one? The
classes JARs are downloaded when calling mvn compile, for example, as they
are defined in the POM's dependency section. But the source JARs aren't (and
shouldn't), so how to download them? Does everybody have to call mvn
eclipse:eclipse -DdownloadSources=true for that? Is there a better / simpler
way?

Any suggestions are welcome...

Thanks,
Christoph.


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



AW: [M2] Problem deploying to filesystem on remote server [SOLVED ]

2006-08-30 Thread Amshoff Christoph, Köln
Eventually, I got it...

The solution was to use backslashes (we are on Windows!) instead of slashes.
So I now have something like


  central
  FJA Internal Repository
  file:xxx\\yyy\\maven2-server\\target\\repo-local


I thought the URL should rather be in an OS independent format (using
slashes) and Maven/Java would expand to specific file path format... but
this seems not to work properly.

Boy, this was a tough one. At least, this should be documented in the guides
or BBwM book!!!

Thanx,
Christoph.


> -Ursprüngliche Nachricht-
> Von: Doug Douglass [mailto:[EMAIL PROTECTED] 
> Gesendet: Freitag, 25. August 2006 20:51
> An: Maven Users List
> Betreff: Re: [M2] Problem deploying to filesystem on remote server
> 
> 
> Hmmm, the deploy succeeds but the artifact is neither local 
> (like before)
> nor on the specified remote host?
> 
> Perhaps running maven with -X will give some more detail on 
> where the deploy
> is actually going. You might also try running the deploy 
> manually via the
> deploy:deploy-file goal with the same URL and see what happens.
> 
> Also, maybe try a different remote file:// location, just to 
> make sure it's
> not something "funny" with file://xxx/yyy.
> 
> Doug
> 
> On 8/25/06, "Amshoff Christoph, Köln" 
> <[EMAIL PROTECTED]> wrote:
> >
> > Doug,
> >
> > thanks for your reply... I was a bit surprised to get none up to now
> > ;o)  So
> > thanks a lot.
> >
> > Well, you are right, the file was put into a local 
> directory. So I changed
> > the URL to the file://host/share/some/path style:
> >
> > 
> >   central
> >   FJA Internal Repository
> >   file://xxx/yyy/maven2-server/target/repo-local
> >   false
> > 
> >
> > And now the file is not in the local directoy anymore 
> (except my local M2
> > repository, of course) -- but not on the server either!
> > Any ideas?
> >
> > Thanks,
> > Christoph.
> >
> >
> > > -Ursprüngliche Nachricht-
> > > Von: Doug Douglass [mailto:[EMAIL PROTECTED]
> > > Gesendet: Freitag, 25. August 2006 16:06
> > > An: Maven Users List
> > > Betreff: Re: [M2] Problem deploying to filesystem on remote server
> > >
> > >
> > > Christoph,
> > >
> > > Have you resolved this problem yet?
> > >
> > > I think you may find that maven deployed your artifact 
> into a local
> > > directory. Look for a directory in the root of your local
> > > filesystem with
> > > the same name as the remote host. I say this because your
> > > file url doesn't
> > > appear to be correct for a remote location. I think it should be "
> > > file://host/some/path", or if the remote location is a
> > > windows share the url
> > > should be " file://host/share/some/path".
> > >
> > > HTH,
> > > Doug
> > >
> > > On 8/23/06, "Amshoff Christoph, Köln" <
> > > [EMAIL PROTECTED]> wrote:
> > > >
> > > > Hi,
> > > >
> > > > I'm new to Maven2 and trying to deploy my first JAR... 
> alas without
> > > > success
> > > > up to now.
> > > >
> > > > We are running an internal repository using Maven-Proxy
> > > (using it as a
> > > > proxy
> > > > to "central" and for hosting our own artifacts).
> > > > This is working well, and now I would like to put my 
> JARs (snapshot
> > > > version)
> > > > onto this server using the deploy goal with file system
> > > configuration.
> > > >
> > > > In my POM, I configured the settings like this:
> > > >
> > > > 
> > > >   central
> > > >   xxx
> > > >   
> file:///[a_server]/maven2-server/target/repo-local
> > > >   false
> > > > 
> > > >
> > > > The output seems to be ok, it says "551 K uploaded", but
> > > the file has NOT
> > > > been copied. Even with enabled debug information (see
> > > below) I don't see
> > > > any
> > > > problems... or is this "not adding permissions to wagon 
> connection"
> > > > telling
> > > > me anything? And yes, I have full access to the specified
> > > folder on the
> > > > remote computer.
> > > >
> > > > Is file system deploy 

AW: [m2] "Shortening the Command Line" when executing plugins

2006-08-28 Thread Amshoff Christoph, Köln
Yes, exactly. Just directly copied from the "Guide to Developing Java
Plugins":



  
sample.plugin
  


I tried to use the settings.xml in /conf, too, but with no
success as well.

So what's wrong?
Christoph.

> -Ursprüngliche Nachricht-
> Von: Gareth Tilley [mailto:[EMAIL PROTECTED] 
> Gesendet: Montag, 28. August 2006 15:17
> An: users@maven.apache.org
> Betreff: Re: [m2] "Shortening the Command Line" when executing plugins
> 
> 
> 
> 
> "Amshoff Christoph, Köln" wrote:
> > 
> > Hi,
> > 
> > I followed the "Guide to Developing Java Plugins" and performed the
> > mentioned steps to compile and install the sample plugin. 
> When executing,
> > the command line "mvn sample.plugin:maven-hello-plugin:sayhi" 
> > is executed successfully. 
> > 
> > But when I try to "shorten the command line" like suggested 
> in the guide,
> > both of the following ways are failing:
> > 
> > -- Maven will try expanding the artifactId: "mvn
> > sample.plugin:hello:sayhi"
> > is giving me the error "The plugin 'sample.plugin:hello' 
> does not exist or
> > no valid version could be found"
> > 
> > -- Add your plugin's groupId to the list of groupIds 
> searched by default
> > in
> > ${user.home}/.m2/settings.xml file: "mvn 
> maven-hello-plugin:sayhi" is
> > producing the error "The plugin
> > 'org.apache.maven.plugins:maven-maven-hello-plugin-plugin' 
> does not exist
> > or
> > no valid version could be found"
> > 
> > What am I missing here? Is the Plugin Guide wrong? Are these ways of
> > reducing command line only working with deployed plugins (I did only
> > install
> > it)? Any help is appreciated.
> > 
> > Thanks,
> > Christoph.
> > 
> > 
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> > 
> 
> >-- Add your plugin's groupId to the list of groupIds 
> searched by default in
> >${user.home}/.m2/settings.xml file: "mvn maven-hello-plugin:sayhi" is
> >producing the error "The plugin
> >'org.apache.maven.plugins:maven-maven-hello-plugin-plugin' 
> does not exist
> or
> >no valid version could be found"
> 
> Is this what you have in your settings.xml?
> 
>   
> sample.plugin
>   
> 
> -- 
> View this message in context: 
> http://www.nabble.com/-m2--%22Shortening-the-Command-Line%22-w
hen-executing-plugins-tf2176547.html#a6020063
Sent from the Maven - Users forum 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]



[m2] "Shortening the Command Line" when executing plugins

2006-08-28 Thread Amshoff Christoph, Köln
Hi,

I followed the "Guide to Developing Java Plugins" and performed the
mentioned steps to compile and install the sample plugin. When executing,
the command line "mvn sample.plugin:maven-hello-plugin:sayhi" 
is executed successfully. 

But when I try to "shorten the command line" like suggested in the guide,
both of the following ways are failing:

-- Maven will try expanding the artifactId: "mvn sample.plugin:hello:sayhi"
is giving me the error "The plugin 'sample.plugin:hello' does not exist or
no valid version could be found"

-- Add your plugin's groupId to the list of groupIds searched by default in
${user.home}/.m2/settings.xml file: "mvn maven-hello-plugin:sayhi" is
producing the error "The plugin
'org.apache.maven.plugins:maven-maven-hello-plugin-plugin' does not exist or
no valid version could be found"

What am I missing here? Is the Plugin Guide wrong? Are these ways of
reducing command line only working with deployed plugins (I did only install
it)? Any help is appreciated.

Thanks,
Christoph.


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



AW: [M2] Problem deploying to filesystem on remote server

2006-08-25 Thread Amshoff Christoph, Köln
Doug,

thanks for your reply... I was a bit surprised to get none up to now ;o)  So
thanks a lot.

Well, you are right, the file was put into a local directory. So I changed
the URL to the file://host/share/some/path style:


  central
  FJA Internal Repository
  file://xxx/yyy/maven2-server/target/repo-local
  false


And now the file is not in the local directoy anymore (except my local M2
repository, of course) -- but not on the server either!
Any ideas?

Thanks,
Christoph.


> -Ursprüngliche Nachricht-
> Von: Doug Douglass [mailto:[EMAIL PROTECTED] 
> Gesendet: Freitag, 25. August 2006 16:06
> An: Maven Users List
> Betreff: Re: [M2] Problem deploying to filesystem on remote server
> 
> 
> Christoph,
> 
> Have you resolved this problem yet?
> 
> I think you may find that maven deployed your artifact into a local
> directory. Look for a directory in the root of your local 
> filesystem with
> the same name as the remote host. I say this because your 
> file url doesn't
> appear to be correct for a remote location. I think it should be "
> file://host/some/path", or if the remote location is a 
> windows share the url
> should be " file://host/share/some/path".
> 
> HTH,
> Doug
> 
> On 8/23/06, "Amshoff Christoph, Köln" < 
> [EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > I'm new to Maven2 and trying to deploy my first JAR... alas without
> > success
> > up to now.
> >
> > We are running an internal repository using Maven-Proxy 
> (using it as a
> > proxy
> > to "central" and for hosting our own artifacts).
> > This is working well, and now I would like to put my JARs (snapshot
> > version)
> > onto this server using the deploy goal with file system 
> configuration.
> >
> > In my POM, I configured the settings like this:
> >
> > 
> >   central
> >   xxx
> >   file:///[a_server]/maven2-server/target/repo-local
> >   false
> > 
> >
> > The output seems to be ok, it says "551 K uploaded", but 
> the file has NOT
> > been copied. Even with enabled debug information (see 
> below) I don't see
> > any
> > problems... or is this "not adding permissions to wagon connection"
> > telling
> > me anything? And yes, I have full access to the specified 
> folder on the
> > remote computer.
> >
> > Is file system deploy only working locally?
> > What else should I use to deploy to Maven-Repo?
> >
> > Any help is appreciated...
> >
> > Thanks in advance,
> > Christoph.
> >
> > --- snip ---
> > [INFO] [deploy:deploy]
> > [INFO] Retrieving previous build number from central
> > [DEBUG] repository metadata for: 'snapshot 
> sss:foundation:4.3.2-SNAPSHOT'
> > could not be found on repository: central
> > [DEBUG] not adding permissions to wagon connection
> > Uploading:
> >
> > 
> file:///[a_server]/maven2-server/target/repo-local/xxx/yyy/4.3
.2-SNAPSHOT/yy
> y-4.3.2-SNAPSHOT.jar
>
>
 yy-4.3.2-SNAPSHOT.jar >
> 551K uploaded
> [INFO] Retrieving previous metadata from central
> [DEBUG] repository metadata for: 'artifact sss:foundation' could not be
> found on repository: central
> [INFO] Uploading repository metadata for: 'artifact sss:foundation'
> [DEBUG] not adding permissions to wagon connection
> [INFO] Retrieving previous metadata from central
> [DEBUG] repository metadata for: 'snapshot sss:foundation:4.3.2-SNAPSHOT'
> could not be found on repository: central
> [INFO] Uploading repository metadata for: 'snapshot
> sss:foundation:4.3.2-SNAPSHOT'
> [DEBUG] not adding permissions to wagon connection
> [INFO] Retrieving previous metadata from central
> [DEBUG] project information for foundation 4.3.2-SNAPSHOT could not be
> found
> on repository: central
> [INFO] Uploading project information for foundation 4.3.2-SNAPSHOT
> [DEBUG] not adding permissions to wagon connection
> --- snap ---
>
>
> -
> 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]



AW: [m2] Same output dir for maven and eclipse?

2006-08-24 Thread Amshoff Christoph, Köln
Well... I thought there could be problems when merging class files generated
by Maven with those generated by Eclipse. Not sure how Eclipse handels this
situation. 

But when Maven's Eclipse plugin (don't know that yet) is setting it up this
way, it's probably safe.

Thanx,
Christoph.

> -Ursprüngliche Nachricht-
> Von: Ralph Pöllath [mailto:[EMAIL PROTECTED] 
> Gesendet: Donnerstag, 24. August 2006 11:46
> An: Maven Users List
> Betreff: Re: [m2] Same output dir for maven and eclipse?
> 
> 
> On 24.08.2006, at 10:45, Amshoff Christoph, Köln wrote:
> > I'm setting up a project where team members could use 
> either Maven2 or
> > Eclipse to build the project. Normally, Maven will be used during  
> > CI/nightly
> > builds and Eclipse by developers.
> 
> Same here.
> 
> > The question is: where is the particular output of these builds  
> > going? Do
> > you recommend to use the same output folder for compiled 
> classes of  
> > both
> > tools, or what are the best practices in this case?
> 
> Is there any reason to separate the output folders? We use the maven  
> eclipse plugin [1] to generate our eclipse project files, which re- 
> uses maven's output directories for eclipse (at least by default).
> 
> Cheers,
> -Ralph.
> 
> [1] http://maven.apache.org/plugins/maven-eclipse-plugin/overview.html
> 
> 
> > If not using the same folder, I wish to put both output folder  
> > under target.
> > So I would have to configure maven to use target/maven/classes and
> > target/maven/test-classes, for example. How do I set the 
> "main" output
> > folder used for all build results (classes, test-classes, 
> site, source
> > generation, ...)? Setting just "directory" attribute in my POM  
> > (Maven docu
> > says: "The directory where all files generated by the build are  
> > placed") is
> > not working, so do I have to set all paths separately?
> >
> > Thanks for your hints,
> > Christoph.
> 
> 
> -
> 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]



[m2] Same output dir for maven and eclipse?

2006-08-24 Thread Amshoff Christoph, Köln
I'm setting up a project where team members could use either Maven2 or
Eclipse to build the project. Normally, Maven will be used during CI/nightly
builds and Eclipse by developers.

The question is: where is the particular output of these builds going? Do
you recommend to use the same output folder for compiled classes of both
tools, or what are the best practices in this case?

If not using the same folder, I wish to put both output folder under target.
So I would have to configure maven to use target/maven/classes and
target/maven/test-classes, for example. How do I set the "main" output
folder used for all build results (classes, test-classes, site, source
generation, ...)? Setting just "directory" attribute in my POM (Maven docu
says: "The directory where all files generated by the build are placed") is
not working, so do I have to set all paths separately?

Thanks for your hints,
Christoph.


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



[M2] Problem deploying to filesystem on remote server

2006-08-23 Thread Amshoff Christoph, Köln
Hi,

I'm new to Maven2 and trying to deploy my first JAR... alas without success
up to now.

We are running an internal repository using Maven-Proxy (using it as a proxy
to "central" and for hosting our own artifacts).
This is working well, and now I would like to put my JARs (snapshot version)
onto this server using the deploy goal with file system configuration.

In my POM, I configured the settings like this:


  central
  xxx
  file:///[a_server]/maven2-server/target/repo-local
  false


The output seems to be ok, it says "551 K uploaded", but the file has NOT
been copied. Even with enabled debug information (see below) I don't see any
problems... or is this "not adding permissions to wagon connection" telling
me anything? And yes, I have full access to the specified folder on the
remote computer.

Is file system deploy only working locally? 
What else should I use to deploy to Maven-Repo?

Any help is appreciated...

Thanks in advance,
Christoph.

--- snip ---
[INFO] [deploy:deploy]
[INFO] Retrieving previous build number from central
[DEBUG] repository metadata for: 'snapshot sss:foundation:4.3.2-SNAPSHOT'
could not be found on repository: central
[DEBUG] not adding permissions to wagon connection
Uploading:
file:///[a_server]/maven2-server/target/repo-local/xxx/yyy/4.3.2-SNAPSHOT/yy
y-4.3.2-SNAPSHOT.jar
 
551K uploaded
[INFO] Retrieving previous metadata from central
[DEBUG] repository metadata for: 'artifact sss:foundation' could not be
found on repository: central
[INFO] Uploading repository metadata for: 'artifact sss:foundation'
[DEBUG] not adding permissions to wagon connection
[INFO] Retrieving previous metadata from central
[DEBUG] repository metadata for: 'snapshot sss:foundation:4.3.2-SNAPSHOT'
could not be found on repository: central
[INFO] Uploading repository metadata for: 'snapshot
sss:foundation:4.3.2-SNAPSHOT'
[DEBUG] not adding permissions to wagon connection
[INFO] Retrieving previous metadata from central
[DEBUG] project information for foundation 4.3.2-SNAPSHOT could not be found
on repository: central
[INFO] Uploading project information for foundation 4.3.2-SNAPSHOT
[DEBUG] not adding permissions to wagon connection
--- snap ---


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