You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Marc Wirth (JIRA)" <ji...@codehaus.org> on 2010/06/23 13:45:12 UTC

[jira] Created: (MNG-4714) "legacy" repositories are silently treated as "default" repositories?

"legacy" repositories are silently treated as "default" repositories?
---------------------------------------------------------------------

                 Key: MNG-4714
                 URL: http://jira.codehaus.org/browse/MNG-4714
             Project: Maven 2 & 3
          Issue Type: Bug
          Components: Artifacts and Repositories
    Affects Versions: 3.0-beta-1
            Reporter: Marc Wirth
            Priority: Minor
         Attachments: pom.xml

Support for legacy repositories was removed for http://jira.codehaus.org/browse/MNG-4204 but if you now try to build something were an artifact exists only on a "legacy" repository the build will warn:

[WARNING] 'repositories.repository.layout' for maven-repository.dev.java.net uses the deprecated value 'legacy'. @ 
...
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects

but then the build just fails with a missing artifact message.

Class org.apache.maven.repository.legacy.LegacyRepositorySystem has explicitly:


    public ArtifactRepository createArtifactRepository( String repositoryId, String url, ArtifactRepositoryLayout repositoryLayout, ArtifactRepositoryPolicy snapshots, ArtifactRepositoryPolicy releases )
    {
        if ( repositoryLayout == null )
        {
            repositoryLayout = layouts.get( "default" );
        }
...
    }

So while the LegacyRepositoryLayout does not exist anymore, Maven will treat the repository as Default-Repository and of course fail to find something.

>From my point of view the Warning at the beginning should rather be an error. The reference to "future" versions is also quite misleading as the support was already removed in the current version (-> org.apache.maven.model.validation.DefaultModelValidator#validateRepository reports that violation).

What's the intended behaviour here?




-- 
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

        

[jira] Updated: (MNG-4714) "legacy" repositories are silently treated as "default" repositories?

Posted by "Marc Wirth (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-4714?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marc Wirth updated MNG-4714:
----------------------------

    Attachment: pom.xml

Example pom.xml to demonstrate

> "legacy" repositories are silently treated as "default" repositories?
> ---------------------------------------------------------------------
>
>                 Key: MNG-4714
>                 URL: http://jira.codehaus.org/browse/MNG-4714
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Artifacts and Repositories
>    Affects Versions: 3.0-beta-1
>            Reporter: Marc Wirth
>            Priority: Minor
>         Attachments: pom.xml
>
>
> Support for legacy repositories was removed for http://jira.codehaus.org/browse/MNG-4204 but if you now try to build something were an artifact exists only on a "legacy" repository the build will warn:
> [WARNING] 'repositories.repository.layout' for maven-repository.dev.java.net uses the deprecated value 'legacy'. @ 
> ...
> [WARNING] For this reason, future Maven versions might no longer support building such malformed projects
> but then the build just fails with a missing artifact message.
> Class org.apache.maven.repository.legacy.LegacyRepositorySystem has explicitly:
>     public ArtifactRepository createArtifactRepository( String repositoryId, String url, ArtifactRepositoryLayout repositoryLayout, ArtifactRepositoryPolicy snapshots, ArtifactRepositoryPolicy releases )
>     {
>         if ( repositoryLayout == null )
>         {
>             repositoryLayout = layouts.get( "default" );
>         }
> ...
>     }
> So while the LegacyRepositoryLayout does not exist anymore, Maven will treat the repository as Default-Repository and of course fail to find something.
> From my point of view the Warning at the beginning should rather be an error. The reference to "future" versions is also quite misleading as the support was already removed in the current version (-> org.apache.maven.model.validation.DefaultModelValidator#validateRepository reports that violation).
> What's the intended behaviour here?

-- 
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

        

[jira] Closed: (MNG-4714) "legacy" repositories are silently treated as "default" repositories?

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-4714?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MNG-4714.
----------------------------------

    Resolution: Not A Bug
      Assignee: Benjamin Bentmann

bq. From my point of view the Warning at the beginning should rather be an error. 
No, because the offending repository declaration might actually not be relevant to the project, e.g. because a repository manager is used instead.

bq. The reference to "future" versions is also quite misleading
The message from the validator has been improved. The last sentence is a general text that is meant to stress the importance of the previous warnings, encouraging users to actually fix the project instead of happily ignoring it.

> "legacy" repositories are silently treated as "default" repositories?
> ---------------------------------------------------------------------
>
>                 Key: MNG-4714
>                 URL: http://jira.codehaus.org/browse/MNG-4714
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Artifacts and Repositories
>    Affects Versions: 3.0-beta-1
>            Reporter: Marc Wirth
>            Assignee: Benjamin Bentmann
>            Priority: Minor
>         Attachments: pom.xml
>
>
> Support for legacy repositories was removed for http://jira.codehaus.org/browse/MNG-4204 but if you now try to build something were an artifact exists only on a "legacy" repository the build will warn:
> [WARNING] 'repositories.repository.layout' for maven-repository.dev.java.net uses the deprecated value 'legacy'. @ 
> ...
> [WARNING] For this reason, future Maven versions might no longer support building such malformed projects
> but then the build just fails with a missing artifact message.
> Class org.apache.maven.repository.legacy.LegacyRepositorySystem has explicitly:
>     public ArtifactRepository createArtifactRepository( String repositoryId, String url, ArtifactRepositoryLayout repositoryLayout, ArtifactRepositoryPolicy snapshots, ArtifactRepositoryPolicy releases )
>     {
>         if ( repositoryLayout == null )
>         {
>             repositoryLayout = layouts.get( "default" );
>         }
> ...
>     }
> So while the LegacyRepositoryLayout does not exist anymore, Maven will treat the repository as Default-Repository and of course fail to find something.
> From my point of view the Warning at the beginning should rather be an error. The reference to "future" versions is also quite misleading as the support was already removed in the current version (-> org.apache.maven.model.validation.DefaultModelValidator#validateRepository reports that violation).
> What's the intended behaviour here?

-- 
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