You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jason Pyeron (JIRA)" <ji...@codehaus.org> on 2011/08/26 19:32:32 UTC

[jira] Created: (MNG-5167) relative local repository settings

relative local repository settings
----------------------------------

                 Key: MNG-5167
                 URL: https://jira.codehaus.org/browse/MNG-5167
             Project: Maven 2 & 3
          Issue Type: New Feature
          Components: Settings
    Affects Versions: 3.0.3, 3.0.4
            Reporter: Jason Pyeron


see patch

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-5167) relative local repository settings

Posted by "Jason Pyeron (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-5167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=279222#comment-279222 ] 

Jason Pyeron commented on MNG-5167:
-----------------------------------

I think it is worth noting from a do no harm approach, looking at lines 249, 250, 269, 286 of the patch it should be clear that if the user does not configure maven with this element then the behavior will remain unchanged.

> relative local repository settings
> ----------------------------------
>
>                 Key: MNG-5167
>                 URL: https://jira.codehaus.org/browse/MNG-5167
>             Project: Maven 2 & 3
>          Issue Type: New Feature
>          Components: Settings
>    Affects Versions: 3.0.3, 3.0.4
>            Reporter: Jason Pyeron
>         Attachments: MNG-5167.patch
>
>
> see patch

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MNG-5167) relative local repository settings

Posted by "Jason Pyeron (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MNG-5167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason Pyeron updated MNG-5167:
------------------------------

    Attachment: MNG-5167.patch

This allows a user to specify how relative repository paths are resolved as compared to the present CWD resolution only.

CWD is the default after this patch to maintain backwards compatability.

permission is granted for inclusion.

> relative local repository settings
> ----------------------------------
>
>                 Key: MNG-5167
>                 URL: https://jira.codehaus.org/browse/MNG-5167
>             Project: Maven 2 & 3
>          Issue Type: New Feature
>          Components: Settings
>    Affects Versions: 3.0.3, 3.0.4
>            Reporter: Jason Pyeron
>         Attachments: MNG-5167.patch
>
>
> see patch

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-5167) relative local repository settings

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-5167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=279223#comment-279223 ] 

Herve Boutemy commented on MNG-5167:
------------------------------------

settings is interpolated
why don't you simply write
{code:xml}<settings>
  <localRepository>${env.M2_HOME}/../../../lib/mvn</localRepository>
</settings>{code}

did I miss something?

(apart from your use case that I frankly don't fully understand: you're putting not only your source in the SCM but the full Maven binaries + local repo?)

notice: you should not call the local repository "mvn" since it is really confusing. Why not "local-repository"?

> relative local repository settings
> ----------------------------------
>
>                 Key: MNG-5167
>                 URL: https://jira.codehaus.org/browse/MNG-5167
>             Project: Maven 2 & 3
>          Issue Type: New Feature
>          Components: Settings
>    Affects Versions: 3.0.3, 3.0.4
>            Reporter: Jason Pyeron
>         Attachments: MNG-5167.patch
>
>
> see patch

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-5167) relative local repository settings

Posted by "Jason Pyeron (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-5167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=279250#comment-279250 ] 

Jason Pyeron commented on MNG-5167:
-----------------------------------

confirmed, ${maven.home} is able to locate a local repository relative to the maven home.

But I am unable to get any other properties to function as they have not yet been initialized yet.

Currently, the patch supports

LOCAL_REPOSITORY_RELATIVE_TO_VALUES.POM
LOCAL_REPOSITORY_RELATIVE_TO_VALUES.M2_HOME
LOCAL_REPOSITORY_RELATIVE_TO_VALUES.BASEDIRECTORY
LOCAL_REPOSITORY_RELATIVE_TO_VALUES.WORKINGDIRECTORY
LOCAL_REPOSITORY_RELATIVE_TO_VALUES.DEFAULT  // As far as I have been able to test, DEFAULT and WORKINGDIRECTORY should and do behave the same, but the code for an explicit working directory is different that the current code. So the defaul uses an unchanged logic, and the working directory explicitly uses the CWD.

I am working on adding support for
LOCAL_REPOSITORY_RELATIVE_TO_VALUES.ROOT_PARENT_POM but this is also going to come when a few other issues in the configuration engin and reactor are fixed too.


> relative local repository settings
> ----------------------------------
>
>                 Key: MNG-5167
>                 URL: https://jira.codehaus.org/browse/MNG-5167
>             Project: Maven 2 & 3
>          Issue Type: New Feature
>          Components: Settings
>    Affects Versions: 3.0.3, 3.0.4
>            Reporter: Jason Pyeron
>         Attachments: MNG-5167.patch
>
>
> see patch

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-5167) relative local repository settings

Posted by "Manfred Moser (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-5167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=279249#comment-279249 ] 

Manfred Moser commented on MNG-5167:
------------------------------------

Following up to the CMMI requirement as discussed on the dev mailing list.

>>
This whole argument is totally a red herring. You will not be able to have all artifacts in the SCM system. At least you have to specify the tool chain to actually run the build including operating system, java and so on.

These do not necessary have to be in the SCM system but have to be in the official record for the filing.

It is totally feasible to add a repo manager as just another required build tool and add a backup/export of the repository content as part of the code that you put on the dvd. You could even just do a clean build on a fresh machine and take a copy of the local repo. Or even create a virtual machine image with the full setup.

It will work just fine off the grid. In fact with Maven it will run better if you use a repo manager than without..

I have done that in the past for escrow services in the healthcare industry fullfilling all requirements and passing various audits for ISO and FDA approval.

The requirement you cite as part CMMI L3 and such does imho not really exist in this strict sense of pure SCM storage. You have to be able to do a reproducible build without anything beyond what you supply for escrow .. but that has nothing to do with SCM. And if you controlling the content of your repository for build reproducability is one of the dedicated enterprise features of e.g. Nexus Pro (and others like Artifactory).

Cludging something into Maven itself feels wrong to me.

PS: also look at e.g. the Debian project and their integration with Maven. It all build complete offline since this is part of their requirement for bootstirapping so this kind of behaviour is already possible. 

> relative local repository settings
> ----------------------------------
>
>                 Key: MNG-5167
>                 URL: https://jira.codehaus.org/browse/MNG-5167
>             Project: Maven 2 & 3
>          Issue Type: New Feature
>          Components: Settings
>    Affects Versions: 3.0.3, 3.0.4
>            Reporter: Jason Pyeron
>         Attachments: MNG-5167.patch
>
>
> see patch

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-5167) relative local repository settings

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-5167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=279237#comment-279237 ] 

Herve Boutemy commented on MNG-5167:
------------------------------------

ok, I can reproduce when unsetting M2_HOME

can you try
{code:xml}<settings>
  <localRepository>${maven.home}/../../../lib/mvn</localRepository>
</settings>{code}

it seems to work for me

about the "ARB naming conventions", I'm interested in a pointer. And I continue to think the actual directory is misleading. Would "./lib/mvn/local-repository" be ABR compliant?

> relative local repository settings
> ----------------------------------
>
>                 Key: MNG-5167
>                 URL: https://jira.codehaus.org/browse/MNG-5167
>             Project: Maven 2 & 3
>          Issue Type: New Feature
>          Components: Settings
>    Affects Versions: 3.0.3, 3.0.4
>            Reporter: Jason Pyeron
>         Attachments: MNG-5167.patch
>
>
> see patch

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-5167) relative local repository settings

Posted by "Jason Pyeron (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-5167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=279228#comment-279228 ] 

Jason Pyeron commented on MNG-5167:
-----------------------------------

Already tried that and this is why it does not work:

Adding to surefire booter test classpath: C:\Documents and Settings\All Users\Desktop\projects\cascade\trunk\tmp\test\${env.M2_HOME}\..\..\..\lib\mvn\org\apache\maven\surefire\surefire-booter\2.7.2\surefire-booter-2.7.2.jar Scope: compile

as to the lib/mvn it was copied from a project which was following ARB naming conventions and I did not get to choose the name.

> relative local repository settings
> ----------------------------------
>
>                 Key: MNG-5167
>                 URL: https://jira.codehaus.org/browse/MNG-5167
>             Project: Maven 2 & 3
>          Issue Type: New Feature
>          Components: Settings
>    Affects Versions: 3.0.3, 3.0.4
>            Reporter: Jason Pyeron
>         Attachments: MNG-5167.patch
>
>
> see patch

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-5167) relative local repository settings

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MNG-5167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason van Zyl updated MNG-5167:
-------------------------------

    Assignee: Jason van Zyl
    
> relative local repository settings
> ----------------------------------
>
>                 Key: MNG-5167
>                 URL: https://jira.codehaus.org/browse/MNG-5167
>             Project: Maven 2 & 3
>          Issue Type: New Feature
>          Components: Settings
>    Affects Versions: 3.0.3, 3.0.4
>            Reporter: Jason Pyeron
>            Assignee: Jason van Zyl
>         Attachments: MNG-5167.patch
>
>
> see patch

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-5167) relative local repository settings

Posted by "Jason Pyeron (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-5167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=279221#comment-279221 ] 

Jason Pyeron commented on MNG-5167:
-----------------------------------

- What problem you're trying to solve

Presently the local repository can only be specified as an absolute path or relative to the current working directory (CWD). In a CMMI (http://en.wikipedia.org/wiki/Capability_Maturity_Model_Integration) Level 3 and greater environment it is often a requirement to have all project dependencies at all times (or at a minimum at release milestones) in the SCM system. 

Each developer workstation may not be configured identically and it would be burdensome to expect a configuration change for a build tool.

By allowing project relative repository paths, the configuration can be predicted and controlled.

- Why you think it's important

As a measure of importance, this patch is being used in production in 3 different companies in a production capacity presently. This patch allows a switch to maven from a manual dependency management approach without breaking policies.

- Examples of how it would be used

Project structure:

./
./bin
./lib/mvn
./src
./var/opt/apache-maven-3.0.4-SNAPSHOT/
./var/opt/apache-maven-3.0.4-SNAPSHOT/conf/settings.xml: <settings><localRepositoryRelativeTo>M2_HOME</localRepositoryRelativeTo><localRepository>../../../lib/mvn</localRepository></settings>


> relative local repository settings
> ----------------------------------
>
>                 Key: MNG-5167
>                 URL: https://jira.codehaus.org/browse/MNG-5167
>             Project: Maven 2 & 3
>          Issue Type: New Feature
>          Components: Settings
>    Affects Versions: 3.0.3, 3.0.4
>            Reporter: Jason Pyeron
>         Attachments: MNG-5167.patch
>
>
> see patch

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira