You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@continuum.apache.org by Piotr Bzdyl <pi...@bzdyl.net> on 2005/12/22 16:19:22 UTC

Problem with maven 2 modules

Hello,

I have parent pom.xml with following lines:

  <modelVersion>4.0.0</modelVersion>
  <groupId>com.mydomain.projectX</groupId>
  <artifactId>projectX</artifactId>
  <packaging>pom</packaging>
  <version>1.0-SNAPSHOT</version>

  <scm>

    <connection>
      scm:svn:svn://mydomain.com/svnrepo/projectX/trunk/
    </connection>
    <developerConnection>
      scm:svn:svn://mydomain.com/svnrepo/projectX/trunk/
    </developerConnection>
  </scm>
[...]
  <modules>
    <module>projectA</module>
    <module>projectB</module>
  </modules>

and poms of the projectA and projectB (no scm information provided):

  <parent>
    <artifactId>projectX</artifactId>
    <groupId>com.mydomain.projectX</groupId>
    <version>1.0-SNAPSHOT</version>
  </parent>
  <artifactId>projectA</artifactId>

I try to add Maven 2 projectX to the Continuum using URL:
http://repository.mydomain.com/com/mydomain/projectX/projectX/1.0-SNAPSHOT/projectX-1.0-SNAPSHOT.pom

but I get error message:

Could not download
http://repository.mydomain.com/com/mydomain/projectX/projectX/1.0-SNAPSHOT/projectX-1.0-SNAP/projectA/pom.xml:
Unable to validate URL

Could not download
http://repository.mydomain.com/com/mydomain/projectX/projectX/1.0-SNAPSHOT/projectX-1.0-SNAP/projectB/pom.xml:
Unable to validate URL

Why continuum generates so strange URLs to the modules? I checked that I have "/" at the end of the parent project scm url
(scm:svn:svn://mydomain.com/svnrepo/projectX/trunk/).

Does modules projects have to be in the group com.mydomain.projectX.projectX? (projectX group is com.mydomain.projectX)

Best regards,
Piotrek


Re: Problem with maven 2 modules

Posted by Emmanuel Venisse <em...@venisse.net>.

Piotr Bzdyl a écrit :
> Hello,
> 
>> When you add a project with modules, on your server that host pom, you 
>> need to have the correct directory structure.
>>
>> In your case, you need to have on your http server, this structure:
>> projectX
>>     your_pom_X_file
>>     projectA
>>         your_pom_A_file
>>     projectB
>>         your_pom_B_file
>>
>> So you can't use a maven repository for adding project if your project 
>> contains modules.
> 
> 
> IMHO it doesn't make sense to not use maven2 repository to fetch child 
> poms - it's pointless to publish poms using special directory layout 
> required by continuum instead of using existing maven2 repository 
> standard. When do you plan to introduce support for scm checking out of 
> modules?

We can't find child poms in maven repository because we have only a directory name (generally the 
same as artifactId) but we don't have groupId and version. We are in discussion (for maven 2.1) for 
adding groupId/artifactId/version in module declaration. If we implement it in maven, continuum will 
can find child pom in maven repository.

File an issue, and we'll perhaps include it in 1.1

> 
> And another issue:
> 
>>> http://repository.mydomain.com/com/mydomain/projectX/projectX/1.0-SNAPSHOT/projectX-1.0-SNAP/projectA/pom.xml: 
>>
>>
>>
> Why generated module pom URL has ..../projectX-1.0-SNAP/... instead of 
> ..../projectX-1.0-SNAPSHOT/...? Is it a bug?

sure, file an issue.

Emanuel


Re: Problem with maven 2 modules

Posted by Piotr Bzdyl <pi...@bzdyl.net>.
Hello,
> When you add a project with modules, on your server that host pom, you 
> need to have the correct directory structure.
>
> In your case, you need to have on your http server, this structure:
> projectX
>     your_pom_X_file
>     projectA
>         your_pom_A_file
>     projectB
>         your_pom_B_file
>
> So you can't use a maven repository for adding project if your project 
> contains modules.

IMHO it doesn't make sense to not use maven2 repository to fetch child 
poms - it's pointless to publish poms using special directory layout 
required by continuum instead of using existing maven2 repository 
standard. When do you plan to introduce support for scm checking out of 
modules?

And another issue:
>> http://repository.mydomain.com/com/mydomain/projectX/projectX/1.0-SNAPSHOT/projectX-1.0-SNAP/projectA/pom.xml: 
>
Why generated module pom URL has ..../projectX-1.0-SNAP/... instead of 
..../projectX-1.0-SNAPSHOT/...? Is it a bug?


Best regards,
Piotrek

Re: Problem with maven 2 modules

Posted by Piotr Bzdyl <pi...@bzdyl.net>.
Hello,
> When you add a project with modules, on your server that host pom, you 
> need to have the correct directory structure.
>
> In your case, you need to have on your http server, this structure:
> projectX
>     your_pom_X_file
>     projectA
>         your_pom_A_file
>     projectB
>         your_pom_B_file
>
> So you can't use a maven repository for adding project if your project 
> contains modules.

IMHO it doesn't make sense to not use maven2 repository to fetch child 
poms - it's pointless to publish poms using special directory layout 
required by continuum instead of using existing maven2 repository 
standard. When do you plan to introduce support for scm checking out of 
modules?

And another issue:
>> http://repository.mydomain.com/com/mydomain/projectX/projectX/1.0-SNAPSHOT/projectX-1.0-SNAP/projectA/pom.xml: 
>
Why generated module pom URL has ..../projectX-1.0-SNAP/... instead of 
..../projectX-1.0-SNAPSHOT/...? Is it a bug?


Best regards,
Piotrek

Re: Problem with maven 2 modules

Posted by Emmanuel Venisse <em...@venisse.net>.
When you add a project with modules, on your server that host pom, you need to have the correct 
directory structure.

In your case, you need to have on your http server, this structure:
projectX
     your_pom_X_file
     projectA
         your_pom_A_file
     projectB
         your_pom_B_file

So you can't use a maven repository for adding project if your project contains modules.

In future version, we'll perhaps download modules from scm instead of use the url.

Emmanuel

Piotr Bzdyl a écrit :
> Hello,
> 
> I have parent pom.xml with following lines:
> 
>  <modelVersion>4.0.0</modelVersion>
>  <groupId>com.mydomain.projectX</groupId>
>  <artifactId>projectX</artifactId>
>  <packaging>pom</packaging>
>  <version>1.0-SNAPSHOT</version>
> 
>  <scm>
> 
>    <connection>
>      scm:svn:svn://mydomain.com/svnrepo/projectX/trunk/
>    </connection>
>    <developerConnection>
>      scm:svn:svn://mydomain.com/svnrepo/projectX/trunk/
>    </developerConnection>
>  </scm>
> [...]
>  <modules>
>    <module>projectA</module>
>    <module>projectB</module>
>  </modules>
> 
> and poms of the projectA and projectB (no scm information provided):
> 
>  <parent>
>    <artifactId>projectX</artifactId>
>    <groupId>com.mydomain.projectX</groupId>
>    <version>1.0-SNAPSHOT</version>
>  </parent>
>  <artifactId>projectA</artifactId>
> 
> I try to add Maven 2 projectX to the Continuum using URL:
> http://repository.mydomain.com/com/mydomain/projectX/projectX/1.0-SNAPSHOT/projectX-1.0-SNAPSHOT.pom 
> 
> 
> but I get error message:
> 
> Could not download
> http://repository.mydomain.com/com/mydomain/projectX/projectX/1.0-SNAPSHOT/projectX-1.0-SNAP/projectA/pom.xml: 
> 
> Unable to validate URL
> 
> Could not download
> http://repository.mydomain.com/com/mydomain/projectX/projectX/1.0-SNAPSHOT/projectX-1.0-SNAP/projectB/pom.xml: 
> 
> Unable to validate URL
> 
> Why continuum generates so strange URLs to the modules? I checked that I 
> have "/" at the end of the parent project scm url
> (scm:svn:svn://mydomain.com/svnrepo/projectX/trunk/).
> 
> Does modules projects have to be in the group 
> com.mydomain.projectX.projectX? (projectX group is com.mydomain.projectX)
> 
> Best regards,
> Piotrek
> 
> 
> 
>