Re: getting relative paths maven + continuum

2007-08-07 Thread Emmanuel Venisse

Continuum doesn't build projects directly. It start maven in the right 
directory then maven do the build and Continuum look at the output and the 
result.

Can you add more details about your problem?

Emmanuel

brad hadfield a écrit :
Hi, 
 
I am a new maven and continuum user.  I'm having problems setting a

relative path because when continuum runs maven it interprets variables
such as ${base.dir} differently than when I run maven from the project
directory.  I assume this is because continuum starts maven in a web app
working directory.  Is there a way to get continuum to start maven in
the project directory?
 
Thanks for any help you can offer.


Brad






Re: getting relative paths maven + continuum

2007-08-07 Thread Christian Gruber
Maven does start in a project directory, but I suspect what you're  
looking for is a parent project's directory.  Because Continuum does  
not necessarily know about parent folders, since it pulls each  
project out individually, you need your build setup to not be  
dependent on folder location.


In other words

Parent
|
- Child 1
|
| Child 2

as a project structure is fine.  However, Continuum will treat them as

Parent
Child 1
Child 2

It will know that Child 1 has a parent of Parent because of the  
metadata, and that is independent of file location.  this is actually  
a factor of Maven, but Continuum uses maven according to Maven's  
intent.  Unfortunately, some bad practice has crept in to how some  
people use Maven, and Continuum's basic assumptions don't support  
some of that.


Maybe if you describe your issue a little more explicitly, someone  
can recommend an alternative way to accomplish the same goal that  
works within Maven's assumptions.


Christian.



On Aug 7, 2007, at 11:22 AM, brad hadfield wrote:


Hi,

I am a new maven and continuum user.  I'm having problems setting a
relative path because when continuum runs maven it interprets  
variables

such as ${base.dir} differently than when I run maven from the project
directory.  I assume this is because continuum starts maven in a  
web app

working directory.  Is there a way to get continuum to start maven in
the project directory?

Thanks for any help you can offer.

Brad



christian gruber + [EMAIL PROTECTED] + mob 410.900.0796 + mob2  
416.998.6023

process coach and architect + ISRÁFÍL CONSULTING SERVICES




RE: getting relative paths maven + continuum

2007-08-07 Thread brad hadfield
Thanks Emmanuel,

I have a property with a path that looks like 
${basedir}/../../../core-parent/trunk/

If I use the variable ${basedir} by running maven from the command line the 
location looks like: C:\CIProjects\ProjectsMain\ 

But when I run the build in Continuum the Maven variable ${basedir} is 
indicated as C:\Continuum\apps\continuum\webapp\WEB-INF\working-directory\21

Obviously I've configured something incorrectly...

-Original Message-
From: Emmanuel Venisse [mailto:[EMAIL PROTECTED] 
Sent: August 7, 2007 11:27 AM
To: continuum-users@maven.apache.org
Subject: Re: getting relative paths maven + continuum

Continuum doesn't build projects directly. It start maven in the right 
directory then maven do the build and Continuum look at the output and the 
result.

Can you add more details about your problem?

Emmanuel

brad hadfield a écrit :
 Hi,
  
 I am a new maven and continuum user.  I'm having problems setting a 
 relative path because when continuum runs maven it interprets 
 variables such as ${base.dir} differently than when I run maven from 
 the project directory.  I assume this is because continuum starts 
 maven in a web app working directory.  Is there a way to get continuum 
 to start maven in the project directory?
  
 Thanks for any help you can offer.
 
 Brad
 
 





Re: getting relative paths maven + continuum

2007-08-07 Thread Christian Gruber
Good point, though it's not entirely true, since if you're using  
maven and always building with the full tree checked-out into a  
comprehensive workspace, this will work.  It's only because continuum  
pulls things out sub-project (maven project) at-a-time that this  
becomes unworkable.


But the solution is more of a maven-users list thing, true.

Christian.

On Aug 7, 2007, at 12:57 PM, Wayne Fay wrote:


You may want to take this over to the Maven Users list as it is really
a Maven issue, not Continuum, and I believe more people are subscribed
to M-U than C-U.


christian gruber + [EMAIL PROTECTED] + mob 410.900.0796 + mob2  
416.998.6023

process coach and architect + ISRÁFÍL CONSULTING SERVICES




RE: getting relative paths maven + continuum

2007-08-07 Thread brad hadfield
Thanks again for all your help,

 just to clarify, the file is not found in a parent project but in a sibling 
project.  We have a situation where a number of Web applications have an XML 
schema file that extends objects found a base schema file. The base schema file 
is part of the base project.  At the time that the JAXB plug-in is called 
both files must be in the same directory.

I'll find a solution and check the Maven users list if required.

Brad

-Original Message-
From: Christian Gruber [mailto:[EMAIL PROTECTED] 
Sent: August 7, 2007 1:01 PM
To: continuum-users@maven.apache.org
Subject: Re: getting relative paths maven + continuum

Good point, though it's not entirely true, since if you're using maven and 
always building with the full tree checked-out into a comprehensive workspace, 
this will work.  It's only because continuum pulls things out sub-project 
(maven project) at-a-time that this becomes unworkable.

But the solution is more of a maven-users list thing, true.

Christian.

On Aug 7, 2007, at 12:57 PM, Wayne Fay wrote:

 You may want to take this over to the Maven Users list as it is really 
 a Maven issue, not Continuum, and I believe more people are subscribed 
 to M-U than C-U.

christian gruber + [EMAIL PROTECTED] + mob 410.900.0796 + mob2
416.998.6023
process coach and architect + ISRÁFÍL CONSULTING SERVICES






Re: getting relative paths maven + continuum

2007-08-07 Thread Christian Gruber
What I've done before is actually created a jar project that contains  
the base schema and only contains the base schema, and make it a  
provided dependency for the other projects.  Then I use the maven  
dependency plugin to grab that .jar, pull it into a temporary folder  
during the build of the dependent project, and either with ant (or a  
little unzip mojo I made) pull the xml file out and put it where it  
needs to be for the local build.  This supports the notion of an  
artifact a little better than relying on file system locations, and  
it also means that you can version that file separately. (if that's  
relevant to you).


In general, I try to take any shared resource or group of resources,  
and pull it into its own project so it can be a first-class maven  
artifact.


christian

On Aug 7, 2007, at 2:17 PM, brad hadfield wrote:


Thanks again for all your help,

 just to clarify, the file is not found in a parent project but in  
a sibling project.  We have a situation where a number of Web  
applications have an XML schema file that extends objects found a  
base schema file. The base schema file is part of the base  
project.  At the time that the JAXB plug-in is called

both files must be in the same directory.

I'll find a solution and check the Maven users list if required.

Brad

-Original Message-
From: Christian Gruber [mailto:[EMAIL PROTECTED]
Sent: August 7, 2007 1:01 PM
To: continuum-users@maven.apache.org
Subject: Re: getting relative paths maven + continuum

Good point, though it's not entirely true, since if you're using  
maven and always building with the full tree checked-out into a  
comprehensive workspace, this will work.  It's only because  
continuum pulls things out sub-project (maven project) at-a-time  
that this becomes unworkable.


But the solution is more of a maven-users list thing, true.

Christian.

On Aug 7, 2007, at 12:57 PM, Wayne Fay wrote:

You may want to take this over to the Maven Users list as it is  
really
a Maven issue, not Continuum, and I believe more people are  
subscribed

to M-U than C-U.


christian gruber + [EMAIL PROTECTED] + mob 410.900.0796 + mob2
416.998.6023
process coach and architect + ISRÁFÍL CONSULTING SERVICES






christian gruber + [EMAIL PROTECTED] + mob 410.900.0796 + mob2  
416.998.6023

process coach and architect + ISRÁFÍL CONSULTING SERVICES




Re: getting relative paths maven + continuum

2007-08-07 Thread Christian Gruber
Yes - I thought it might be this.  You can't do that and expect  
continuum to understand it.  In fact, continuum checked out your  
child projects into their own folders that have no relation to the  
parent.  There's literally no way to know what to set that property to.


If you have things in the parent that are necessary to the children,  
then you need to make sure they are available to the children either  
through metadata, or by being included in an artifact (jar) that the  
children have access to.


You haven't configured things incorrectly - your project design is  
problematic, because it makes the assumption that your folder  
structure is constant.  With maven, you should not make that  
assumption.  With continuum, you cannot make that assumption.


Christian.


On Aug 7, 2007, at 11:45 AM, brad hadfield wrote:


Thanks Emmanuel,

I have a property with a path that looks like ${basedir}/../../../ 
core-parent/trunk/


If I use the variable ${basedir} by running maven from the command  
line the location looks like: C:\CIProjects\ProjectsMain\


But when I run the build in Continuum the Maven variable ${basedir}  
is indicated as C:\Continuum\apps\continuum\webapp\WEB-INF\working- 
directory\21


Obviously I've configured something incorrectly...

-Original Message-
From: Emmanuel Venisse [mailto:[EMAIL PROTECTED]
Sent: August 7, 2007 11:27 AM
To: [EMAIL PROTECTED]
Subject: Re: getting relative paths maven + continuum

Continuum doesn't build projects directly. It start maven in the  
right directory then maven do the build and Continuum look at the  
output and the result.


Can you add more details about your problem?

Emmanuel

brad hadfield a écrit :

Hi,

I am a new maven and continuum user.  I'm having problems setting a
relative path because when continuum runs maven it interprets
variables such as ${base.dir} differently than when I run maven from
the project directory.  I assume this is because continuum starts
maven in a web app working directory.  Is there a way to get  
continuum

to start maven in the project directory?

Thanks for any help you can offer.

Brad








christian gruber + [EMAIL PROTECTED] + mob 410.900.0796 + mob2  
416.998.6023

process coach and architect + ISRÁFÍL CONSULTING SERVICES




RE: getting relative paths maven + continuum

2007-08-07 Thread brad hadfield
Christian, thanks for your help.

This is a situation where an artifact is not workable... this might be too much 
to ask but can you give me an idea how I might use metadata to solve my problem?

Ultimately I must pass a file location to an Ant task... 

Brad


-Original Message-
From: Christian Gruber [mailto:[EMAIL PROTECTED] 
Sent: August 7, 2007 12:17 PM
To: [EMAIL PROTECTED]
Subject: Re: getting relative paths maven + continuum

Yes - I thought it might be this.  You can't do that and expect continuum to 
understand it.  In fact, continuum checked out your child projects into their 
own folders that have no relation to the parent.  There's literally no way to 
know what to set that property to.

If you have things in the parent that are necessary to the children, then you 
need to make sure they are available to the children either through metadata, 
or by being included in an artifact (jar) that the children have access to.

You haven't configured things incorrectly - your project design is 
problematic, because it makes the assumption that your folder structure is 
constant.  With maven, you should not make that assumption.  With continuum, 
you cannot make that assumption.

Christian.


On Aug 7, 2007, at 11:45 AM, brad hadfield wrote:

 Thanks Emmanuel,

 I have a property with a path that looks like ${basedir}/../../../ 
 core-parent/trunk/

 If I use the variable ${basedir} by running maven from the command 
 line the location looks like: C:\CIProjects\ProjectsMain\

 But when I run the build in Continuum the Maven variable ${basedir} is 
 indicated as C:\Continuum\apps\continuum\webapp\WEB-INF\working-
 directory\21

 Obviously I've configured something incorrectly...

 -Original Message-
 From: Emmanuel Venisse [mailto:[EMAIL PROTECTED]
 Sent: August 7, 2007 11:27 AM
 To: [EMAIL PROTECTED]
 Subject: Re: getting relative paths maven + continuum

 Continuum doesn't build projects directly. It start maven in the right 
 directory then maven do the build and Continuum look at the output and 
 the result.

 Can you add more details about your problem?

 Emmanuel

 brad hadfield a écrit :
 Hi,

 I am a new maven and continuum user.  I'm having problems setting a 
 relative path because when continuum runs maven it interprets 
 variables such as ${base.dir} differently than when I run maven from 
 the project directory.  I assume this is because continuum starts 
 maven in a web app working directory.  Is there a way to get 
 continuum to start maven in the project directory?

 Thanks for any help you can offer.

 Brad






christian gruber + [EMAIL PROTECTED] + mob 410.900.0796 + mob2
416.998.6023
process coach and architect + ISRÁFÍL CONSULTING SERVICES






Re: getting relative paths maven + continuum

2007-08-07 Thread Emmanuel Venisse

Christian, It's the best solution.

Emmanuel

Christian Gruber a écrit :
What I've done before is actually created a jar project that contains 
the base schema and only contains the base schema, and make it a 
provided dependency for the other projects.  Then I use the maven 
dependency plugin to grab that .jar, pull it into a temporary folder 
during the build of the dependent project, and either with ant (or a 
little unzip mojo I made) pull the xml file out and put it where it 
needs to be for the local build.  This supports the notion of an 
artifact a little better than relying on file system locations, and it 
also means that you can version that file separately. (if that's 
relevant to you).


In general, I try to take any shared resource or group of resources, and 
pull it into its own project so it can be a first-class maven artifact.


christian

On Aug 7, 2007, at 2:17 PM, brad hadfield wrote:


Thanks again for all your help,

 just to clarify, the file is not found in a parent project but in a 
sibling project.  We have a situation where a number of Web 
applications have an XML schema file that extends objects found a base 
schema file. The base schema file is part of the base project.  At the 
time that the JAXB plug-in is called

both files must be in the same directory.

I'll find a solution and check the Maven users list if required.

Brad

-Original Message-
From: Christian Gruber [mailto:[EMAIL PROTECTED]
Sent: August 7, 2007 1:01 PM
To: [EMAIL PROTECTED]
Subject: Re: getting relative paths maven + continuum

Good point, though it's not entirely true, since if you're using maven 
and always building with the full tree checked-out into a 
comprehensive workspace, this will work.  It's only because continuum 
pulls things out sub-project (maven project) at-a-time that this 
becomes unworkable.


But the solution is more of a maven-users list thing, true.

Christian.

On Aug 7, 2007, at 12:57 PM, Wayne Fay wrote:


You may want to take this over to the Maven Users list as it is really
a Maven issue, not Continuum, and I believe more people are subscribed
to M-U than C-U.


christian gruber + [EMAIL PROTECTED] + mob 410.900.0796 + mob2
416.998.6023
process coach and architect + ISRÁFÍL CONSULTING SERVICES






christian gruber + [EMAIL PROTECTED] + mob 410.900.0796 + mob2 
416.998.6023

process coach and architect + ISRÁFÍL CONSULTING SERVICES









Re: getting relative paths maven + continuum

2007-08-07 Thread Mykel Alvis
+1 .  If you're into managing things with maven, it's pretty much the only
consistently workable way.

On 8/7/07, Emmanuel Venisse [EMAIL PROTECTED] wrote:

 Christian, It's the best solution.

 Emmanuel

 Christian Gruber a écrit :
  In general, I try to take any shared resource or group of resources, and
  pull it into its own project so it can be a first-class maven artifact.
 
  christian


-- 
My friends tell me I have an intimacy problem. But they don't really know
me. -- Garry Shandling
Anyone who has the power to make you believe absurdities has the power to
make you commit injustices. -- Voltaire