You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@continuum.apache.org by Wim Deblauwe <wi...@gmail.com> on 2005/11/02 13:29:17 UTC

pom.xml in a build directory

Hi,

I'm using a structure where my pom.xml is in a subdirectory called build
like this:

module-name
+ build
+ pom.xml
+ src
+ ...

Continuum seems to handle this case inproperly. In "working-directory\21" of
my continuum installation, only the contents of the build directory is
copied there. As a result no java files can be found to compile. I'm using
scm:local by the way and I also extend a parent pom. This parent pom gets
read, because I specify there that my reports should be in a temp directory
and this happens.

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

regards,

Wim

Re: pom.xml in a build directory

Posted by Wim Deblauwe <wi...@gmail.com>.
Alas, it does not work. I tried it and it fails with the following error:

org.apache.maven.continuum.execution.ContinuumBuildExecutorException: Error
while mapping metadata.
at
org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor.updateProjectFromCheckOut
(MavenTwoBuildExecutor.java:91)
at
org.apache.maven.continuum.core.action.UpdateProjectFromWorkingDirectoryContinuumAction.execute
(UpdateProjectFromWorkingDirectoryContinuumAction.java:59)
at org.apache.maven.continuum.buildcontroller.DefaultBuildController.build(
DefaultBuildController.java:168)
at
org.apache.maven.continuum.buildcontroller.BuildProjectTaskExecutor.executeTask
(BuildProjectTaskExecutor.java:53)
at
org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor$ExecutorRunnable.run
(ThreadedTaskQueueExecutor.java:103)
at java.lang.Thread.run(Thread.java:595)
Caused by:
org.apache.maven.continuum.execution.maven.m2.MavenBuilderHelperException:
Cannot build maven project from C:\Program Files\Apache Software
Foundation\continuum-
1.0\bin\win32\..\..\apps\continuum\working-directory\26\pom.xml.
at
org.apache.maven.continuum.execution.maven.m2.DefaultMavenBuilderHelper.getMavenProject
(DefaultMavenBuilderHelper.java:260)
at
org.apache.maven.continuum.execution.maven.m2.DefaultMavenBuilderHelper.mapMetadataToProject
(DefaultMavenBuilderHelper.java:89)
at
org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor.updateProjectFromCheckOut
(MavenTwoBuildExecutor.java:87)
... 5 more
Caused by: org.apache.maven.project.ProjectBuildingException: Could not find
the model file 'C:\Program Files\Apache Software Foundation\continuum-
1.0\bin\win32\..\..\apps\continuum\working-directory\26\pom.xml'.
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(
DefaultMavenProjectBuilder.java:1061)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFile(
DefaultMavenProjectBuilder.java:291)
at org.apache.maven.project.DefaultMavenProjectBuilder.build(
DefaultMavenProjectBuilder.java:283)
at
org.apache.maven.continuum.execution.maven.m2.DefaultMavenBuilderHelper.getMavenProject
(DefaultMavenBuilderHelper.java:252)
... 7 more
Caused by: java.io.FileNotFoundException: C:\Program Files\Apache Software
Foundation\continuum-
1.0\bin\win32\..\..\apps\continuum\working-directory\26\pom.xml (The system
cannot find the file specified)
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(
DefaultMavenProjectBuilder.java:1056)
... 10 more


Everything is copied ok in the working directory, and I changed the pom file
in the build definition to "build/pom.xml", but it seems like continuum does
not take that into account (judging from the path that is displayed in the
file not found exception)

should this be reported as a bug?

regards,

Wim


2005/11/2, Doug Douglass <dd...@denverdata.com>:
>
> Wim,
>
> Your problem is similar, but...
>
> My project layout is:
>
> <root>
> + build
> ++ project.xml
> + <module1>
> ++ project.xml
> ++ src
> + <module2>
> ++ project.xml
> ++src
>
> Here's what I had done in my case:
>
> 1) Add project using the "build" POM/project.xml
>
> 2) Change the scm url in the continuum project definition to point to
> the parent module ("module-name" in your case, "<root>" in my case).
>
> 3) Change POM filename in the continuum build definition for the
> project to "build/pom.xml" ("build/project.xml" in my case ).
>
> Continuum should now properly checkout all the code in your "module-name".
>
> In my case, the build then fails because I don't have a POM at the
> "module-name" level, so the issue I reported had to do with continuum
> not using the POM filename from the build definition. Your situation may
> actually succeed because you have a POM at the "module-name" level.
>
> FYI, a quick glance at
>
> org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor.updateProjectFromCheckOut
> ()
> shows it has a similarly hard-coded POM filename as
>
> org.apache.maven.continuum.execution.maven.m1.MavenOneBuildExecutor.updateProjectFromCheckOut
> ()
>
> HTH,
> Doug
>
> Wim Deblauwe wrote:
>
> >Should I open a new issue in JIRA for my problem or just comment on the
> >current one?
> >
> >2005/11/2, Doug Douglass <dd...@denverdata.com>:
> >
> >
> >>I reported this problem for maven 1 projects:
> >>
> >>http://jira.codehaus.org/browse/CONTINUUM-381
> >>
> >>
> >>Wim Deblauwe wrote:
> >>
> >>
> >>>Hi,
> >>>
> >>>I'm using a structure where my pom.xml is in a subdirectory called
> build
> >>>like this:
> >>>
> >>>module-name
> >>>+ build
> >>>+ pom.xml
> >>>+ src
> >>>+ ...
> >>>
> >>>Continuum seems to handle this case inproperly. In
> >>>
> >>>
> >>"working-directory\21" of
> >>
> >>
> >>>my continuum installation, only the contents of the build directory is
> >>>copied there. As a result no java files can be found to compile. I'm
> >>>
> >>>
> >>using
> >>
> >>
> >>>scm:local by the way and I also extend a parent pom. This parent pom
> >>>
> >>>
> >>gets
> >>
> >>
> >>>read, because I specify there that my reports should be in a temp
> >>>
> >>>
> >>directory
> >>
> >>
> >>>and this happens.
> >>>
> >>>Is this a known bug or am I doing something wrong?
> >>>
> >>>regards,
> >>>
> >>>Wim
> >>>
> >>>
> >>>
> >>
> >>
> >
> >
> >
>

Re: pom.xml in a build directory

Posted by Doug Douglass <dd...@denverdata.com>.
Wim,

Your problem is similar, but...

My project layout is:

<root>
+ build
++ project.xml
+ <module1>
++ project.xml
++ src
+ <module2>
++ project.xml
++src

Here's what I had done in my case:

   1) Add project using the "build" POM/project.xml

   2) Change the scm url in the continuum project definition to point to 
the parent module ("module-name" in your case, "<root>" in my case).

   3) Change POM filename in the continuum build definition for the 
project to "build/pom.xml" ("build/project.xml" in my case ).

Continuum should now properly checkout all the code in your "module-name".

In my case, the build then fails because I don't have a POM at the 
"module-name" level, so the issue I reported had to do with continuum 
not using the POM filename from the build definition. Your situation may 
actually succeed because you have a POM at the "module-name" level.

FYI, a quick glance at 
org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor.updateProjectFromCheckOut() 
shows it has a similarly hard-coded POM filename as  
org.apache.maven.continuum.execution.maven.m1.MavenOneBuildExecutor.updateProjectFromCheckOut()

HTH,
Doug

Wim Deblauwe wrote:

>Should I open a new issue in JIRA for my problem or just comment on the
>current one?
>
>2005/11/2, Doug Douglass <dd...@denverdata.com>:
>  
>
>>I reported this problem for maven 1 projects:
>>
>>http://jira.codehaus.org/browse/CONTINUUM-381
>>
>>
>>Wim Deblauwe wrote:
>>    
>>
>>>Hi,
>>>
>>>I'm using a structure where my pom.xml is in a subdirectory called build
>>>like this:
>>>
>>>module-name
>>>+ build
>>>+ pom.xml
>>>+ src
>>>+ ...
>>>
>>>Continuum seems to handle this case inproperly. In
>>>      
>>>
>>"working-directory\21" of
>>    
>>
>>>my continuum installation, only the contents of the build directory is
>>>copied there. As a result no java files can be found to compile. I'm
>>>      
>>>
>>using
>>    
>>
>>>scm:local by the way and I also extend a parent pom. This parent pom
>>>      
>>>
>>gets
>>    
>>
>>>read, because I specify there that my reports should be in a temp
>>>      
>>>
>>directory
>>    
>>
>>>and this happens.
>>>
>>>Is this a known bug or am I doing something wrong?
>>>
>>>regards,
>>>
>>>Wim
>>>
>>>      
>>>
>>    
>>
>
>  
>

Re: pom.xml in a build directory

Posted by Emmanuel Venisse <em...@venisse.net>.
comment the current pom.

if you can attach a simple project that reproduce the problem, it will be good.

Emmanuel

Wim Deblauwe a écrit :
> Should I open a new issue in JIRA for my problem or just comment on the
> current one?
> 
> 2005/11/2, Doug Douglass <dd...@denverdata.com>:
> 
>>I reported this problem for maven 1 projects:
>>
>>http://jira.codehaus.org/browse/CONTINUUM-381
>>
>>
>>Wim Deblauwe wrote:
>>
>>>Hi,
>>>
>>>I'm using a structure where my pom.xml is in a subdirectory called build
>>>like this:
>>>
>>>module-name
>>>+ build
>>>+ pom.xml
>>>+ src
>>>+ ...
>>>
>>>Continuum seems to handle this case inproperly. In
>>
>>"working-directory\21" of
>>
>>>my continuum installation, only the contents of the build directory is
>>>copied there. As a result no java files can be found to compile. I'm
>>
>>using
>>
>>>scm:local by the way and I also extend a parent pom. This parent pom
>>
>>gets
>>
>>>read, because I specify there that my reports should be in a temp
>>
>>directory
>>
>>>and this happens.
>>>
>>>Is this a known bug or am I doing something wrong?
>>>
>>>regards,
>>>
>>>Wim
>>>
>>
>>
> 


Re: pom.xml in a build directory

Posted by Wim Deblauwe <wi...@gmail.com>.
Should I open a new issue in JIRA for my problem or just comment on the
current one?

2005/11/2, Doug Douglass <dd...@denverdata.com>:
>
> I reported this problem for maven 1 projects:
>
> http://jira.codehaus.org/browse/CONTINUUM-381
>
>
> Wim Deblauwe wrote:
> > Hi,
> >
> > I'm using a structure where my pom.xml is in a subdirectory called build
> > like this:
> >
> > module-name
> > + build
> > + pom.xml
> > + src
> > + ...
> >
> > Continuum seems to handle this case inproperly. In
> "working-directory\21" of
> > my continuum installation, only the contents of the build directory is
> > copied there. As a result no java files can be found to compile. I'm
> using
> > scm:local by the way and I also extend a parent pom. This parent pom
> gets
> > read, because I specify there that my reports should be in a temp
> directory
> > and this happens.
> >
> > Is this a known bug or am I doing something wrong?
> >
> > regards,
> >
> > Wim
> >
>
>

Re: pom.xml in a build directory

Posted by Doug Douglass <dd...@denverdata.com>.
I reported this problem for maven 1 projects:

    http://jira.codehaus.org/browse/CONTINUUM-381


Wim Deblauwe wrote:
> Hi,
> 
> I'm using a structure where my pom.xml is in a subdirectory called build
> like this:
> 
> module-name
> + build
> + pom.xml
> + src
> + ...
> 
> Continuum seems to handle this case inproperly. In "working-directory\21" of
> my continuum installation, only the contents of the build directory is
> copied there. As a result no java files can be found to compile. I'm using
> scm:local by the way and I also extend a parent pom. This parent pom gets
> read, because I specify there that my reports should be in a temp directory
> and this happens.
> 
> Is this a known bug or am I doing something wrong?
> 
> regards,
> 
> Wim
>