You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Brett Porter (JIRA)" <ji...@codehaus.org> on 2008/12/18 14:30:21 UTC

[jira] Closed: (MNG-2896) ${basedir} used in a repository url does not work for parent pom lookup

     [ http://jira.codehaus.org/browse/MNG-2896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter closed MNG-2896.
-----------------------------

         Assignee: Brett Porter
       Resolution: Won't Fix
    Fix Version/s:     (was: Reviewed Pending Version Assignment)

Maven's inheritance model means that interpolation occurs after inheritance, so it is not set at this stage of the project processing.

You can use <relativePath> for the parent to be located in the right location.

> ${basedir} used in a repository url does not work for parent pom lookup
> -----------------------------------------------------------------------
>
>                 Key: MNG-2896
>                 URL: http://jira.codehaus.org/browse/MNG-2896
>             Project: Maven 2
>          Issue Type: Wish
>          Components: POM
>    Affects Versions: 2.0.5
>            Reporter: Stefano Bagnara
>            Assignee: Brett Porter
>
> I use something like this to store locally the dependencies.
> -----
>     <repository>
>       <id>parent-james-stage-m1</id>
>       <name>James stage repository</name>
>       <url>file://${basedir}/stage</url>
>       <layout>legacy</layout>
>       <releases>
>         <enabled>true</enabled>
>         <checksumPolicy>ignore</checksumPolicy>
>       </releases>
>       <snapshots>
>         <enabled>true</enabled>
>         <checksumPolicy>ignore</checksumPolicy>
>       </snapshots>
>     </repository>
> ----
> Everything works fine but the parent resolution: my main pom.xml has a parent and it is not looked up in this repository.
> Well, it is lookedup, but ${basedir} is not expanded and this way the lookup does not work.
> If I replace the ${basedir} with my full path everything works fine, but I cannot obviously do that as the local repository is part of the svn tree (by our choice to not use remote repositories).
> Furthermore: is there a variable to be used instead of ${basedir} that always reference to its own pom.xml folder? I ask this because I have multiple modules inside this project and I had to add another repository to this pom using file://${basedir}/../stage (notice the ..) so that submodules will use the same repository for the lookups, but this sound like an hack.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira