If I create a proxy repo in Nexus with policy set as "release" and it's referencing the group repo that contains SNAPSHOTs. Should the proxy repo contain SNAPSHOT artifacts? No... but the metadata contains the SNAPSHOT versions. Isn't this a discrepancy?

Furthermore, if the pom file is referencing this proxy repo and has a dependency on a maven plugin, maven will try to download the latest version that is defined in metadata and the build is going to fail since the SNAPSHOT artifact is not available.

If this is not a bug, how do you work around it?



On 11/11/10 2:16 AM, Anders Hammar wrote:
The first repos are group repos. The latter one is just a repo. You can tell from the urls.

If the group repo contains a snapshot proxy repo, it will contain snapshot info in the metadata. It's not a bug.

/Anders

On Thu, Nov 11, 2010 at 11:12, Jane Young <[email protected] <mailto:[email protected]>> wrote:

    Hi Anders,

    The reason GlassFish Nexus group repository is  referencing
    http://repository.jboss.org/nexus/content/groups/public/  is
    because it contains specific glassfish  versions of Weld artifacts.
    See:
    
https://repository.jboss.org/nexus/content/groups/public/org/jboss/weld/weld-osgi-bundle/
    vs
    
http://repository.jboss.org/nexus/content/groups/public-jboss/org/jboss/weld/weld-osgi-bundle/

    Also, the repository is recommended by Pete Muir (Weld project lead).

    Is there another JBoss repository that does not contain SNAPSHOT
    artifacts of org.apache or codehaus?  This is causing a lot of
    builds issues in  GlassFish and other subprojects (JavaMail, HK2
    etc...)


    Also, isn't this a bug in Nexus?  Why does the maven-metadata.xml
    contain SNAPSHOT versions if I create a proxy with repository
    policy as "release".
    For example the URL for maven-enforcer-plugin artifact in the
    proxy created for  JBoss repo in GlassFish Nexus server:
    
http://maven.glassfish.org/content/repositories/JBoss/org/apache/maven/plugins/maven-enforcer-plugin/

    It contains no artifacts but there is a maven-metatdata.xml for
    the SNAPSHOT versions.

    Is this a bug?

    Jane



    On 11/11/10 1:07 AM, Anders Hammar wrote:

        I think the problem is that you're proxying one of the repo
        groups of
        JBoss's Nexus instance. That one includes the apache
        snapshots, which is
        intentional:
        http://community.jboss.org/message/564903#564903

        Instead, proxy the appropriate release repos. The jboss repo
        group 'public'
        also proxies Maven central I believe, which you don't want.

        There's info about the new nexus instance at JBoss at the
        JBoss blog:
        http://community.jboss.org/en/build/blog
        You should be able to find info there regarding which repos
        you should
        proxy.

        /Anders

        On Thu, Nov 11, 2010 at 00:00, Jane
        Young<[email protected] <mailto:[email protected]>>
         wrote:

            I'm not sure if this is the right forum to post this
            question.  If not,
             please advice me where to post this question.

            I setup a Nexus group repository that references several proxy
            repositories.   This group repo only references the
            released (non-SNAPSHOT)
            artifacts.

            The group repo references: JBoss Maven repo and  Maven
            central repo.
            The JBoss Maven repo contains SNAPSHOT artifacts (e.g.
            
https://repository.jboss.org/nexus/content/groups/public/org/apache/maven/plugins/maven-enforcer-plugin/
            )

            and Maven central repo contains released versions (e.g.
            
http://repo2.maven.org/maven2/org/apache/maven/plugins/maven-enforcer-plugin/
            )

            The group repo should only contain the released version
            from Maven central:
            See:
            
http://maven.glassfish.org/content/groups/glassfish/org/apache/maven/plugins/maven-enforcer-plugin/

            However, the maven-metadata.xml file contains both
            SNAPSHOT and
            non-SNAPSHOT:

            
http://maven.glassfish.org/content/groups/glassfish/org/apache/maven/plugins/maven-enforcer-plugin/maven-metadata.xml

            This is creating some problem in our build since some of
            pom file do not
            include the version of the plugin, so maven will try to
            download the latest
            version, which is a SNAPSHOT version but the group repo
            does not have the
            SNAPSHOT artifact.

            Is this a bug?  I have tried rebuilding metadata but it
            still contains
            SNAPSHOT versions.
            Is there a workaround?

            Thanks,
            Jane



            
---------------------------------------------------------------------
            To unsubscribe, e-mail: [email protected]
            <mailto:[email protected]>
            For additional commands, e-mail:
            [email protected]
            <mailto:[email protected]>





Reply via email to