You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by barthel <gi...@git.apache.org> on 2016/02/15 19:00:05 UTC

[GitHub] maven-integration-testing pull request: MNG-3092: Adds integration...

GitHub user barthel opened a pull request:

    https://github.com/apache/maven-integration-testing/pull/14

    MNG-3092: Adds integration tests for version range result filter behaviour

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/barthel/maven-integration-testing MNG-3092

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/maven-integration-testing/pull/14.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #14
    
----
commit 162504d0b116a866b972aa49d3d573473292c740
Author: barthel <ba...@users.noreply.github.com>
Date:   2016-02-15T17:31:38Z

    MNG-3092: Adds integration tests for version range result filter behaviour

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing pull request #14: MNG-3092: Adds integration tests...

Posted by michael-o <gi...@git.apache.org>.
Github user michael-o commented on a diff in the pull request:

    https://github.com/apache/maven-integration-testing/pull/14#discussion_r67063784
  
    --- Diff: core-it-suite/src/test/resources/mng-3092/filter-extension/src/main/java/org/apache/maven/its/extensions/MavenITVersionRangeResultFilter.java ---
    @@ -0,0 +1,76 @@
    +package org.apache.maven.its.extensions;
    +
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +import javax.inject.Named;
    +import java.util.Iterator;
    +import javax.inject.Inject;
    +import org.apache.maven.repository.internal.VersionRangeResultFilter;
    +import org.eclipse.aether.resolution.VersionRangeResolutionException;
    +import org.eclipse.aether.resolution.VersionRangeResult;
    +import org.eclipse.aether.spi.log.Logger;
    +import org.eclipse.aether.spi.log.LoggerFactory;
    +import org.eclipse.aether.spi.log.NullLoggerFactory;
    +import org.eclipse.aether.version.Version;
    +import org.eclipse.sisu.Nullable;
    +
    +/**
    + * Example implementation for use in ITs.
    + * <p>
    + * This implementation removes <b>all</b> SNAPSHOT dependencies.</p>
    + * <p>
    + * Part of the test set <a href="https://issues.apache.org/jira/browse/MNG-3092">MNG-3092</a> and only works with Maven
    + * >= 3.4.0-SNAPSHOT</p>
    + */
    +@Named
    +public class MavenITVersionRangeResultFilter implements VersionRangeResultFilter
    +{
    +
    +    private final Logger logger;
    +
    +    @Inject
    +    public MavenITVersionRangeResultFilter( @Nullable LoggerFactory loggerfactory )
    +    {
    +        this.logger = ( ( null == loggerfactory ) ? NullLoggerFactory.LOGGER : loggerfactory.getLogger(
    +                VersionRangeResultFilter.class.getName() ) );
    +    }
    +    
    +    @Override
    +    public VersionRangeResult filterVersionRangeResult( VersionRangeResult versionRangeResult )
    +            throws VersionRangeResolutionException
    +    {
    +        if ( ! ! !"org.apache.maven.its.mng3092".equals( versionRangeResult.getRequest().getArtifact().getGroupId() ) )
    --- End diff --
    
    Three exclamation marks???


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing issue #14: MNG-3092: Adds integration tests for ve...

Posted by barthel <gi...@git.apache.org>.
Github user barthel commented on the issue:

    https://github.com/apache/maven-integration-testing/pull/14
  
    @michael-o I changed something based on your comments.
    * Duplication of version number removed in ```mng-3092/filter-extensionpom.xml```
    * Version number changed in JavaDoc of ```MavenITVersionRangeResultFilter.java```
    * Use only one exclamation mark  ;-)
    
    Of course, the version number in ```MavenITmng3092VersionRangeResultFilterExtensionTest.java``` and ```mng-3092/filter-extension/pom.xml``` has to adapt as soon as possible after the 3.4.0 release.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing pull request #14: MNG-3092: Adds integration tests...

Posted by michael-o <gi...@git.apache.org>.
Github user michael-o commented on a diff in the pull request:

    https://github.com/apache/maven-integration-testing/pull/14#discussion_r67941526
  
    --- Diff: core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3092VersionRangeResultFilterExtensionTest.java ---
    @@ -0,0 +1,132 @@
    +package org.apache.maven.it;
    +
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +import org.apache.maven.it.Verifier;
    +import org.apache.maven.it.util.ResourceExtractor;
    +
    +import java.io.File;
    +import java.util.HashMap;
    +import java.util.List;
    +import java.util.Map;
    +
    +/**
    + * This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-3092">MNG-3092</a>.
    + *
    + * <pre>
    + *   <dependencies>
    + *     <dependency>
    + *       <groupId>org.apache.maven.its.mng3092</groupId>
    + *       <artifactId>a</artifactId>
    + *       <version>[1.0,2.0)</version>
    + *     </dependency>
    + *   </dependencies>
    + * </pre>
    + *
    + * @author Benjamin Bentmann
    + */
    +public class MavenITmng3092VersionRangeResultFilterExtensionTest
    +        extends AbstractMavenIntegrationTestCase
    +{
    +
    +    public MavenITmng3092VersionRangeResultFilterExtensionTest()
    +    {
    +        super( "[3.4.0-SNAPSHOT,)" );
    --- End diff --
    
    Again, make it 3.4.0.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing pull request #14: MNG-3092: Adds integration tests...

Posted by michael-o <gi...@git.apache.org>.
Github user michael-o commented on a diff in the pull request:

    https://github.com/apache/maven-integration-testing/pull/14#discussion_r67233139
  
    --- Diff: core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3092VersionRangeResultFilterExtensionTest.java ---
    @@ -0,0 +1,132 @@
    +package org.apache.maven.it;
    +
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +import org.apache.maven.it.Verifier;
    +import org.apache.maven.it.util.ResourceExtractor;
    +
    +import java.io.File;
    +import java.util.HashMap;
    +import java.util.List;
    +import java.util.Map;
    +
    +/**
    + * This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-3092">MNG-3092</a>.
    + *
    + * <pre>
    + *   <dependencies>
    + *     <dependency>
    + *       <groupId>org.apache.maven.its.mng3092</groupId>
    + *       <artifactId>a</artifactId>
    + *       <version>[1.0,2.0)</version>
    + *     </dependency>
    + *   </dependencies>
    + * </pre>
    + *
    + * @author Benjamin Bentmann
    + */
    +public class MavenITmng3092VersionRangeResultFilterExtensionTest
    +        extends AbstractMavenIntegrationTestCase
    +{
    +
    +    public MavenITmng3092VersionRangeResultFilterExtensionTest()
    +    {
    +        super( "[3.4.0-SNAPSHOT,)" );
    +    }
    +
    +    /**
    +     * Verify that the Maven default behavior will be used without a VersionRangeResultFilter extension.
    +     */
    +    public void testDefault()
    +            throws Exception
    +    {
    +        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3092" );
    +
    +        Verifier verifier = newVerifier( testDir.getAbsolutePath() );
    +        verifier.setAutoclean( false );
    +        verifier.deleteDirectory( "target" );
    +        verifier.deleteArtifacts( "org.apache.maven.its.mng3092" );
    +        verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", verifier.newDefaultFilterProperties() );
    +        verifier.filterFile( "pom-mng-3092.xml", "pom.xml", "UTF-8", verifier.newDefaultFilterProperties() );
    +        verifier.addCliOption( "--settings" );
    +        verifier.addCliOption( "settings.xml" );
    +        verifier.executeGoal( "validate" );
    +        verifier.verifyErrorFreeLog();
    +        verifier.resetStreams();
    +
    +        List<String> classpath = verifier.loadLines( "target/classpath.txt", "UTF-8" );
    +        assertTrue( classpath.toString(), classpath.contains( "a-2.0-SNAPSHOT.jar" ) );
    +    }
    +
    +    /**
    +     * Verify that the Maven VersionRangeResultFilter extension behavior is active and checks that non snapshot
    +     * version will be used.
    +     */
    +    public void testVersionRangeResultFilterExtesionSystemproperties()
    +            throws Exception
    +    {
    +        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3092" );
    +        File extensionDir = new File( testDir, "filter-extension" );
    +
    +        final Map<String, String> filterProperties = new HashMap<>();
    +        filterProperties.put( "@baseurl@", "file://" + testDir.getAbsolutePath() );
    +
    +        Verifier verifier;
    +        verifier = newVerifier( testDir.getAbsolutePath() );
    +        verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", filterProperties );
    +        verifier.filterFile( "extension.xml", ".mvn/extension.xml", "UTF-8", filterProperties );
    +
    +        // install the test extension
    +        verifier = newVerifier( extensionDir.getAbsolutePath(), "remote" );
    +        verifier.filterFile( "pom.xml", "pom.xml", "UTF-8", filterProperties );
    +        verifier.addCliOption( "-f" );
    +        verifier.addCliOption( extensionDir.getAbsolutePath() + "/pom.xml" );
    +        verifier.addCliOption( "-Drat.skip=true" );
    +        verifier.setLogFileName( "install-extension.log" );
    +
    +        verifier.executeGoal( "install" );
    +        verifier.resetStreams();
    +        verifier.verifyErrorFreeLog();
    +
    +        // validate the test project
    +        verifier = newVerifier( testDir.getAbsolutePath() );
    +        verifier.setAutoclean( true );
    +        verifier.setDebug( true );
    +        verifier.setMavenDebug( true );
    +        verifier.filterFile( "pom-mng-3092.xml", "pom.xml", "UTF-8", filterProperties );
    +
    +        verifier.addCliOption( "--settings" );
    +        verifier.addCliOption( testDir.getAbsolutePath() + "/settings.xml" );
    +
    +        verifier.addCliOption( "-Dmaven.ext.class.path="
    +                + verifier.getArtifactPath( "org.apache.maven.its.extensions", "versionrange-resultfilter-extension",
    +                        "3.4.0-SNAPSHOT", "jar" ) );
    --- End diff --
    
    Make it `1.0-SNAPSHOT`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing pull request #14: MNG-3092: Adds integration tests...

Posted by barthel <gi...@git.apache.org>.
Github user barthel commented on a diff in the pull request:

    https://github.com/apache/maven-integration-testing/pull/14#discussion_r67099834
  
    --- Diff: core-it-suite/src/test/resources/mng-3092/filter-extension/src/main/java/org/apache/maven/its/extensions/MavenITVersionRangeResultFilter.java ---
    @@ -0,0 +1,76 @@
    +package org.apache.maven.its.extensions;
    +
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +import javax.inject.Named;
    +import java.util.Iterator;
    +import javax.inject.Inject;
    +import org.apache.maven.repository.internal.VersionRangeResultFilter;
    +import org.eclipse.aether.resolution.VersionRangeResolutionException;
    +import org.eclipse.aether.resolution.VersionRangeResult;
    +import org.eclipse.aether.spi.log.Logger;
    +import org.eclipse.aether.spi.log.LoggerFactory;
    +import org.eclipse.aether.spi.log.NullLoggerFactory;
    +import org.eclipse.aether.version.Version;
    +import org.eclipse.sisu.Nullable;
    +
    +/**
    + * Example implementation for use in ITs.
    + * <p>
    + * This implementation removes <b>all</b> SNAPSHOT dependencies.</p>
    + * <p>
    + * Part of the test set <a href="https://issues.apache.org/jira/browse/MNG-3092">MNG-3092</a> and only works with Maven
    + * >= 3.4.0-SNAPSHOT</p>
    + */
    +@Named
    +public class MavenITVersionRangeResultFilter implements VersionRangeResultFilter
    +{
    +
    +    private final Logger logger;
    +
    +    @Inject
    +    public MavenITVersionRangeResultFilter( @Nullable LoggerFactory loggerfactory )
    +    {
    +        this.logger = ( ( null == loggerfactory ) ? NullLoggerFactory.LOGGER : loggerfactory.getLogger(
    +                VersionRangeResultFilter.class.getName() ) );
    +    }
    +    
    +    @Override
    +    public VersionRangeResult filterVersionRangeResult( VersionRangeResult versionRangeResult )
    +            throws VersionRangeResolutionException
    +    {
    +        if ( ! ! !"org.apache.maven.its.mng3092".equals( versionRangeResult.getRequest().getArtifact().getGroupId() ) )
    --- End diff --
    
    The Apache Aries project use this patterns for a better readability.
    No problem to change that.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing pull request #14: MNG-6049: Adds integration tests...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/maven-integration-testing/pull/14


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing issue #14: MNG-6049: Adds integration tests for ve...

Posted by michael-o <gi...@git.apache.org>.
Github user michael-o commented on the issue:

    https://github.com/apache/maven-integration-testing/pull/14
  
    @barthel Can you also take care of the file names in the PR? `mng3092` to `mng-6049`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing issue #14: MNG-3092: Adds integration tests for ve...

Posted by michael-o <gi...@git.apache.org>.
Github user michael-o commented on the issue:

    https://github.com/apache/maven-integration-testing/pull/14
  
    This merge cannot be accepted. See comments inline as well as:
    
    * the It does not pass because the repo is oncomplete. Several JARs are missing and Maven complains about it:
    
        [INFO] ------------------------------------------------------------------------
        [INFO] Building Maven Integration Test :: MNG-3092 0.1
        [INFO] ------------------------------------------------------------------------
        [INFO] Downloading: file:///D:/Entwicklung/Projekte/maven-integration-testing/core-it-suite/target/test-classes/mng-3092/repo/org/apache/maven/its/mng3092/a/maven-metadata.xml
        [INFO] Downloading: file:target/null/org/apache/maven/its/mng3092/a/maven-metadata.xml
        [INFO] Downloaded: file:///D:/Entwicklung/Projekte/maven-integration-testing/core-it-suite/target/test-classes/mng-3092/repo/org/apache/maven/its/mng3092/a/maven-metadata.xml (453 B at 32 kB/s)
        [INFO] Downloading: file:target/null/org/apache/maven/its/mng3092/a/1.1/a-1.1.pom
        [INFO] Downloading: file:///D:/Entwicklung/Projekte/maven-integration-testing/core-it-suite/target/test-classes/mng-3092/repo/org/apache/maven/its/mng3092/a/1.1/a-1.1.pom
        [INFO] Downloaded: file:///D:/Entwicklung/Projekte/maven-integration-testing/core-it-suite/target/test-classes/mng-3092/repo/org/apache/maven/its/mng3092/a/1.1/a-1.1.pom (1.2 kB at 398 kB/s)
        [INFO] Downloading: file:///D:/Entwicklung/Projekte/maven-integration-testing/core-it-suite/target/test-classes/mng-3092/repo/org/apache/maven/its/mng3092/a/1.2-SNAPSHOT/maven-metadata.xml
        [INFO] Downloaded: file:///D:/Entwicklung/Projekte/maven-integration-testing/core-it-suite/target/test-classes/mng-3092/repo/org/apache/maven/its/mng3092/a/1.2-SNAPSHOT/maven-metadata.xml (376 B at 94 kB/s)
        [INFO] Downloading: file:///D:/Entwicklung/Projekte/maven-integration-testing/core-it-suite/target/test-classes/mng-3092/repo/org/apache/maven/its/mng3092/a/1.2-SNAPSHOT/a-1.2-20100408.111215-1.pom
        [INFO] Downloaded: file:///D:/Entwicklung/Projekte/maven-integration-testing/core-it-suite/target/test-classes/mng-3092/repo/org/apache/maven/its/mng3092/a/1.2-SNAPSHOT/a-1.2-20100408.111215-1.pom (1.2 kB at 401 kB/s)
        [INFO] Downloading: file:target/null/org/apache/maven/its/mng3092/a/1.2/a-1.2.pom
        [INFO] Downloading: file:///D:/Entwicklung/Projekte/maven-integration-testing/core-it-suite/target/test-classes/mng-3092/repo/org/apache/maven/its/mng3092/a/1.2/a-1.2.pom
        [INFO] Downloaded: file:///D:/Entwicklung/Projekte/maven-integration-testing/core-it-suite/target/test-classes/mng-3092/repo/org/apache/maven/its/mng3092/a/1.2/a-1.2.pom (1.2 kB at 1.2 MB/s)
        [INFO] Downloading: file:///D:/Entwicklung/Projekte/maven-integration-testing/core-it-suite/target/test-classes/mng-3092/repo/org/apache/maven/its/mng3092/a/2.0-SNAPSHOT/maven-metadata.xml
        [INFO] Downloaded: file:///D:/Entwicklung/Projekte/maven-integration-testing/core-it-suite/target/test-classes/mng-3092/repo/org/apache/maven/its/mng3092/a/2.0-SNAPSHOT/maven-metadata.xml (376 B at 94 kB/s)
        [INFO] Downloading: file:///D:/Entwicklung/Projekte/maven-integration-testing/core-it-suite/target/test-classes/mng-3092/repo/org/apache/maven/its/mng3092/a/2.0-SNAPSHOT/a-2.0-20100408.111215-1.pom
        [INFO] Downloaded: file:///D:/Entwicklung/Projekte/maven-integration-testing/core-it-suite/target/test-classes/mng-3092/repo/org/apache/maven/its/mng3092/a/2.0-SNAPSHOT/a-2.0-20100408.111215-1.pom (1.2 kB at 241 kB/s)
        [INFO] Downloading: file:///D:/Entwicklung/Projekte/maven-integration-testing/core-it-suite/target/test-classes/mng-3092/repo/org/apache/maven/its/mng3092/a/2.0-SNAPSHOT/a-2.0-20100408.111215-1.jar
        [INFO] ------------------------------------------------------------------------
        [INFO] BUILD FAILURE
        [INFO] ------------------------------------------------------------------------
        [INFO] Total time: 0.377 s
        [INFO] Finished at: 2016-06-15T21:18:47+02:00
        [INFO] Final Memory: 9M/241M
        [INFO] ------------------------------------------------------------------------
        [ERROR] Failed to execute goal on project test-mng3092: Could not resolve dependencies for project org.apache.maven.its.mng3092:test-mng3092:jar:0.1: Could not find artifact org.apache.maven.its.mng3092:a:jar:2.0-20100408.111215-1 in maven-core-it (file:///D:/Entwicklung/Projekte/maven-integration-testing/core-it-suite/target/test-classes/mng-3092/repo) -> [Help 1]
        org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project test-mng3092: Could not resolve dependencies for project org.apache.maven.its.mng3092:test-mng3092:jar:0.1: Could not find artifact org.apache.maven.its.mng3092:a:jar:2.0-20100408.111215-1 in maven-core-it (file:///D:/Entwicklung/Projekte/maven-integration-testing/core-it-suite/target/test-classes/mng-3092/repo)
    
    Please double check the repo and add the missing JARs.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing pull request #14: MNG-3092: Adds integration tests...

Posted by michael-o <gi...@git.apache.org>.
Github user michael-o commented on a diff in the pull request:

    https://github.com/apache/maven-integration-testing/pull/14#discussion_r67233290
  
    --- Diff: core-it-suite/src/test/resources/mng-3092/filter-extension/pom.xml ---
    @@ -0,0 +1,73 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +
    +<!--
    +Licensed to the Apache Software Foundation (ASF) under one
    +or more contributor license agreements.  See the NOTICE file
    +distributed with this work for additional information
    +regarding copyright ownership.  The ASF licenses this file
    +to you under the Apache License, Version 2.0 (the
    +"License"); you may not use this file except in compliance
    +with the License.  You may obtain a copy of the License at
    +
    +  http://www.apache.org/licenses/LICENSE-2.0
    +
    +Unless required by applicable law or agreed to in writing,
    +software distributed under the License is distributed on an
    +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +KIND, either express or implied.  See the License for the
    +specific language governing permissions and limitations
    +under the License.
    +-->
    +
    +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    +         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    +  <modelVersion>4.0.0</modelVersion>
    +
    +  <parent>
    +    <groupId>org.apache.maven</groupId>
    +    <artifactId>maven</artifactId>
    +    <version>3.4.0-SNAPSHOT</version>
    +  </parent>
    +
    +  <groupId>org.apache.maven.its.extensions</groupId>
    +  <artifactId>versionrange-resultfilter-extension</artifactId>
    --- End diff --
    
    Add version `1.0-SNAPSHOT`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing pull request #14: MNG-3092: Adds integration tests...

Posted by michael-o <gi...@git.apache.org>.
Github user michael-o commented on a diff in the pull request:

    https://github.com/apache/maven-integration-testing/pull/14#discussion_r67946906
  
    --- Diff: core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3092VersionRangeResultFilterExtensionTest.java ---
    @@ -0,0 +1,132 @@
    +package org.apache.maven.it;
    +
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +import org.apache.maven.it.Verifier;
    +import org.apache.maven.it.util.ResourceExtractor;
    +
    +import java.io.File;
    +import java.util.HashMap;
    +import java.util.List;
    +import java.util.Map;
    +
    +/**
    + * This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-3092">MNG-3092</a>.
    + *
    + * <pre>
    + *   <dependencies>
    + *     <dependency>
    + *       <groupId>org.apache.maven.its.mng3092</groupId>
    + *       <artifactId>a</artifactId>
    + *       <version>[1.0,2.0)</version>
    + *     </dependency>
    + *   </dependencies>
    + * </pre>
    + *
    + * @author Benjamin Bentmann
    + */
    +public class MavenITmng3092VersionRangeResultFilterExtensionTest
    +        extends AbstractMavenIntegrationTestCase
    +{
    +
    +    public MavenITmng3092VersionRangeResultFilterExtensionTest()
    +    {
    +        super( "[3.4.0-SNAPSHOT,)" );
    --- End diff --
    
    Am 2016-06-21 um 22:28 schrieb barthel:
    >> + *       <groupId>org.apache.maven.its.mng3092</groupId>
    >> + *       <artifactId>a</artifactId>
    >> + *       <version>[1.0,2.0)</version>
    >> + *     </dependency>
    >> + *   </dependencies>
    >> + * </pre>
    >> + *
    >> + * @author Benjamin Bentmann
    >> + */
    >> +public class MavenITmng3092VersionRangeResultFilterExtensionTest
    >> +        extends AbstractMavenIntegrationTestCase
    >> +{
    >> +
    >> +    public MavenITmng3092VersionRangeResultFilterExtensionTest()
    >> +    {
    >> +        super( "[3.4.0-SNAPSHOT,)" );
    >
    > So this test will not execute before 3.4.0 release. I thought I change that close after the 3.4.0 release?
    > If this is not a problem, I'll change this.
    
    It will, see:
    mng3099SettingsProfilesWithNoPom(it).................OK (1.2 s)
    mng3092VersionRangeResultFilterExtension(Default)....OK (1.4 s)
    
    Try it yourself. The -SNAPSHOT is ignored here because we mostly test 
    snapshots.
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing issue #14: MNG-3092: Adds integration tests for ve...

Posted by barthel <gi...@git.apache.org>.
Github user barthel commented on the issue:

    https://github.com/apache/maven-integration-testing/pull/14
  
    @michael-o Done.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing issue #14: MNG-3092: Adds integration tests for ve...

Posted by barthel <gi...@git.apache.org>.
Github user barthel commented on the issue:

    https://github.com/apache/maven-integration-testing/pull/14
  
    @michael-o Missing JARs added and changes included.
    
    Integration tests run successfully:
    ```
    [\u2026]
    -------------------------------------------------------
     T E S T S
    -------------------------------------------------------
    Running integration tests for Maven 3.4.0-SNAPSHOT
    using Maven executable: /Users/barthel/tmp/z-maven-with-pr-70/maven/apache-maven/target/apache-maven-3.4.0-SNAPSHOT/bin/mvn
    Running org.apache.maven.it.IntegrationTestSuite
    Running integration tests for Maven 3.4.0-SNAPSHOT
    using Maven executable: /Users/barthel/tmp/z-maven-with-pr-70/maven/apache-maven/target/apache-maven-3.4.0-SNAPSHOT/bin/mvn
    [\u2026]
    mng3092VersionRangeResultFilterExtension(Default)....OK (0.4 s)
    mng3092VersionRangeResultFilterExtension(VersionRangeResultFilterExtesionSystemProperties)OK (1.6 s)
    [\u2026]
    [INFO] Maven ITs .......................................... SUCCESS [08:43 min]
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    ```
    Checked with my adapted Maven PR validator:
    [https://github.com/barthel/maven-utils/blob/master/maven-pr-validator.sh 70 14](https://github.com/barthel/maven-utils/blob/master/maven-pr-validator.sh)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing pull request #14: MNG-3092: Adds integration tests...

Posted by michael-o <gi...@git.apache.org>.
Github user michael-o commented on a diff in the pull request:

    https://github.com/apache/maven-integration-testing/pull/14#discussion_r67942011
  
    --- Diff: core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3092VersionRangeResultFilterExtensionTest.java ---
    @@ -0,0 +1,132 @@
    +package org.apache.maven.it;
    +
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +import org.apache.maven.it.Verifier;
    +import org.apache.maven.it.util.ResourceExtractor;
    +
    +import java.io.File;
    +import java.util.HashMap;
    +import java.util.List;
    +import java.util.Map;
    +
    +/**
    + * This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-3092">MNG-3092</a>.
    + *
    + * <pre>
    + *   <dependencies>
    + *     <dependency>
    + *       <groupId>org.apache.maven.its.mng3092</groupId>
    + *       <artifactId>a</artifactId>
    + *       <version>[1.0,2.0)</version>
    + *     </dependency>
    + *   </dependencies>
    + * </pre>
    + *
    + * @author Benjamin Bentmann
    + */
    +public class MavenITmng3092VersionRangeResultFilterExtensionTest
    +        extends AbstractMavenIntegrationTestCase
    +{
    +
    +    public MavenITmng3092VersionRangeResultFilterExtensionTest()
    +    {
    +        super( "[3.4.0-SNAPSHOT,)" );
    +    }
    +
    +    /**
    +     * Verify that the Maven default behavior will be used without a VersionRangeResultFilter extension.
    +     */
    +    public void testDefault()
    +            throws Exception
    +    {
    +        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3092" );
    +
    +        Verifier verifier = newVerifier( testDir.getAbsolutePath() );
    +        verifier.setAutoclean( false );
    +        verifier.deleteDirectory( "target" );
    +        verifier.deleteArtifacts( "org.apache.maven.its.mng3092" );
    +        verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", verifier.newDefaultFilterProperties() );
    +        verifier.filterFile( "pom-mng-3092.xml", "pom.xml", "UTF-8", verifier.newDefaultFilterProperties() );
    +        verifier.addCliOption( "--settings" );
    +        verifier.addCliOption( "settings.xml" );
    +        verifier.executeGoal( "validate" );
    +        verifier.verifyErrorFreeLog();
    +        verifier.resetStreams();
    +
    +        List<String> classpath = verifier.loadLines( "target/classpath.txt", "UTF-8" );
    +        assertTrue( classpath.toString(), classpath.contains( "a-2.0-SNAPSHOT.jar" ) );
    +    }
    +
    +    /**
    +     * Verify that the Maven VersionRangeResultFilter extension behavior is active and checks that non snapshot
    +     * version will be used.
    +     */
    +    public void testVersionRangeResultFilterExtesionSystemProperties()
    --- End diff --
    
    `Extesion` => `Extension`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing pull request #14: MNG-3092: Adds integration tests...

Posted by michael-o <gi...@git.apache.org>.
Github user michael-o commented on a diff in the pull request:

    https://github.com/apache/maven-integration-testing/pull/14#discussion_r67059400
  
    --- Diff: core-it-suite/src/test/resources/mng-3092/filter-extension/src/main/java/org/apache/maven/its/extensions/MavenITVersionRangeResultFilter.java ---
    @@ -0,0 +1,76 @@
    +package org.apache.maven.its.extensions;
    +
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +import javax.inject.Named;
    +import java.util.Iterator;
    +import javax.inject.Inject;
    +import org.apache.maven.repository.internal.VersionRangeResultFilter;
    +import org.eclipse.aether.resolution.VersionRangeResolutionException;
    +import org.eclipse.aether.resolution.VersionRangeResult;
    +import org.eclipse.aether.spi.log.Logger;
    +import org.eclipse.aether.spi.log.LoggerFactory;
    +import org.eclipse.aether.spi.log.NullLoggerFactory;
    +import org.eclipse.aether.version.Version;
    +import org.eclipse.sisu.Nullable;
    +
    +/**
    + * Example implementation for use in ITs.
    + * <p>
    + * This implementation removes <b>all</b> SNAPSHOT dependencies.</p>
    + * <p>
    + * Part of the test set <a href="https://issues.apache.org/jira/browse/MNG-3092">MNG-3092</a> and only works with Maven
    + * >= 3.4.0-SNAPSHOT</p>
    --- End diff --
    
    I have changed that already locally to 3.4.0.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing issue #14: MNG-3092: Adds integration tests for ve...

Posted by barthel <gi...@git.apache.org>.
Github user barthel commented on the issue:

    https://github.com/apache/maven-integration-testing/pull/14
  
    Relabelling commit from MNG-3092 to MNG-6049.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing pull request #14: MNG-3092: Adds integration tests...

Posted by michael-o <gi...@git.apache.org>.
Github user michael-o commented on a diff in the pull request:

    https://github.com/apache/maven-integration-testing/pull/14#discussion_r67233084
  
    --- Diff: core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3092VersionRangeResultFilterExtensionTest.java ---
    @@ -0,0 +1,132 @@
    +package org.apache.maven.it;
    +
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +import org.apache.maven.it.Verifier;
    +import org.apache.maven.it.util.ResourceExtractor;
    +
    +import java.io.File;
    +import java.util.HashMap;
    +import java.util.List;
    +import java.util.Map;
    +
    +/**
    + * This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-3092">MNG-3092</a>.
    + *
    + * <pre>
    + *   <dependencies>
    + *     <dependency>
    + *       <groupId>org.apache.maven.its.mng3092</groupId>
    + *       <artifactId>a</artifactId>
    + *       <version>[1.0,2.0)</version>
    + *     </dependency>
    + *   </dependencies>
    + * </pre>
    + *
    + * @author Benjamin Bentmann
    + */
    +public class MavenITmng3092VersionRangeResultFilterExtensionTest
    +        extends AbstractMavenIntegrationTestCase
    +{
    +
    +    public MavenITmng3092VersionRangeResultFilterExtensionTest()
    +    {
    +        super( "[3.4.0-SNAPSHOT,)" );
    +    }
    +
    +    /**
    +     * Verify that the Maven default behavior will be used without a VersionRangeResultFilter extension.
    +     */
    +    public void testDefault()
    +            throws Exception
    +    {
    +        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3092" );
    +
    +        Verifier verifier = newVerifier( testDir.getAbsolutePath() );
    +        verifier.setAutoclean( false );
    +        verifier.deleteDirectory( "target" );
    +        verifier.deleteArtifacts( "org.apache.maven.its.mng3092" );
    +        verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", verifier.newDefaultFilterProperties() );
    +        verifier.filterFile( "pom-mng-3092.xml", "pom.xml", "UTF-8", verifier.newDefaultFilterProperties() );
    +        verifier.addCliOption( "--settings" );
    +        verifier.addCliOption( "settings.xml" );
    +        verifier.executeGoal( "validate" );
    +        verifier.verifyErrorFreeLog();
    +        verifier.resetStreams();
    +
    +        List<String> classpath = verifier.loadLines( "target/classpath.txt", "UTF-8" );
    +        assertTrue( classpath.toString(), classpath.contains( "a-2.0-SNAPSHOT.jar" ) );
    +    }
    +
    +    /**
    +     * Verify that the Maven VersionRangeResultFilter extension behavior is active and checks that non snapshot
    +     * version will be used.
    +     */
    +    public void testVersionRangeResultFilterExtesionSystemproperties()
    --- End diff --
    
    `testVersionRangeResultFilterExtesionSystemproperties` => `testVersionRangeResultFilterExtensionSystemProperties`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing issue #14: MNG-6049: Adds integration tests for ve...

Posted by barthel <gi...@git.apache.org>.
Github user barthel commented on the issue:

    https://github.com/apache/maven-integration-testing/pull/14
  
    @michael-o Done. ITs passed. Merge conflict solved.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing pull request #14: MNG-3092: Adds integration tests...

Posted by michael-o <gi...@git.apache.org>.
Github user michael-o commented on a diff in the pull request:

    https://github.com/apache/maven-integration-testing/pull/14#discussion_r67233942
  
    --- Diff: core-it-suite/src/test/resources/mng-3092/repo/org/apache/maven/its/mng3092/a/2.0-SNAPSHOT/a-2.0-20100408.111215-1.pom ---
    @@ -23,8 +23,8 @@ under the License.
       <modelVersion>4.0.0</modelVersion>
     
       <groupId>org.apache.maven.its.mng3092</groupId>
    -  <artifactId>b</artifactId>
    -  <version>1.0-SNAPSHOT</version>
    +  <artifactId>a</artifactId>
    +  <version>2.0</version>
    --- End diff --
    
    The `SNAPSHOT` got lost!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing pull request #14: MNG-3092: Adds integration tests...

Posted by michael-o <gi...@git.apache.org>.
Github user michael-o commented on a diff in the pull request:

    https://github.com/apache/maven-integration-testing/pull/14#discussion_r67233328
  
    --- Diff: core-it-suite/src/test/resources/mng-3092/filter-extension/pom.xml ---
    @@ -0,0 +1,73 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +
    +<!--
    +Licensed to the Apache Software Foundation (ASF) under one
    +or more contributor license agreements.  See the NOTICE file
    +distributed with this work for additional information
    +regarding copyright ownership.  The ASF licenses this file
    +to you under the Apache License, Version 2.0 (the
    +"License"); you may not use this file except in compliance
    +with the License.  You may obtain a copy of the License at
    +
    +  http://www.apache.org/licenses/LICENSE-2.0
    +
    +Unless required by applicable law or agreed to in writing,
    +software distributed under the License is distributed on an
    +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +KIND, either express or implied.  See the License for the
    +specific language governing permissions and limitations
    +under the License.
    +-->
    +
    +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    +         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    +  <modelVersion>4.0.0</modelVersion>
    +
    +  <parent>
    +    <groupId>org.apache.maven</groupId>
    +    <artifactId>maven</artifactId>
    +    <version>3.4.0-SNAPSHOT</version>
    +  </parent>
    +
    +  <groupId>org.apache.maven.its.extensions</groupId>
    +  <artifactId>versionrange-resultfilter-extension</artifactId>
    +  <packaging>jar</packaging>
    +
    +  <name>Maven IT Plugin :: MNG-3092 :: VersionRangeResultFilter extension</name>
    +  <description>This extension provides an very easy VersionRangeResultFilter for use in Maven ITs.</description>
    +
    +  <properties>
    +    <maven.version>3.4.0-SNAPSHOT</maven.version>
    +  </properties>
    --- End diff --
    
    Remove this block completely.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing issue #14: MNG-6049: Adds integration tests for ve...

Posted by barthel <gi...@git.apache.org>.
Github user barthel commented on the issue:

    https://github.com/apache/maven-integration-testing/pull/14
  
    @michael-o Rename already done. ITs running locally right now.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing pull request #14: MNG-3092: Adds integration tests...

Posted by michael-o <gi...@git.apache.org>.
Github user michael-o commented on a diff in the pull request:

    https://github.com/apache/maven-integration-testing/pull/14#discussion_r67233789
  
    --- Diff: core-it-suite/src/test/resources/mng-3092/filter-extension/src/main/java/org/apache/maven/its/extensions/MavenITVersionRangeResultFilter.java ---
    @@ -0,0 +1,76 @@
    +package org.apache.maven.its.extensions;
    +
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +import javax.inject.Named;
    +import java.util.Iterator;
    +import javax.inject.Inject;
    +import org.apache.maven.repository.internal.VersionRangeResultFilter;
    +import org.eclipse.aether.resolution.VersionRangeResolutionException;
    +import org.eclipse.aether.resolution.VersionRangeResult;
    +import org.eclipse.aether.spi.log.Logger;
    +import org.eclipse.aether.spi.log.LoggerFactory;
    +import org.eclipse.aether.spi.log.NullLoggerFactory;
    +import org.eclipse.aether.version.Version;
    +import org.eclipse.sisu.Nullable;
    +
    +/**
    + * Example implementation for use in ITs.
    + * <p>
    + * This implementation removes <b>all</b> SNAPSHOT dependencies.</p>
    + * <p>
    + * Part of the test set <a href="https://issues.apache.org/jira/browse/MNG-3092">MNG-3092</a>
    + * and only works with Maven >= 3.4.0</p>
    + */
    +@Named
    +public class MavenITVersionRangeResultFilter implements VersionRangeResultFilter
    +{
    +
    +    private final Logger logger;
    +
    +    @Inject
    +    public MavenITVersionRangeResultFilter( @Nullable LoggerFactory loggerfactory )
    +    {
    +        this.logger = ( ( null == loggerfactory ) ? NullLoggerFactory.LOGGER : loggerfactory.getLogger(
    +                VersionRangeResultFilter.class.getName() ) );
    +    }
    +
    +    @Override
    +    public VersionRangeResult filterVersionRangeResult( VersionRangeResult versionRangeResult )
    +            throws VersionRangeResolutionException
    +    {
    +        if ( !"org.apache.maven.its.mng3092".equals( versionRangeResult.getRequest().getArtifact().getGroupId() ) )
    +        {
    +            return versionRangeResult;
    +        }
    +        this.logger.debug( "[MAVEN-IT-CORE-MNG-3092] Version range result instance: " + versionRangeResult );
    +        for ( Iterator<Version> it = versionRangeResult.getVersions().iterator(); it.hasNext(); )
    +        {
    +            // XXX: better way to identify a SNAPSHOT version
    +            if ( String.valueOf( it.next() ).endsWith( "SNAPSHOT" ) )
    --- End diff --
    
    Move `it.next()` to `Version version = it.next()`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing pull request #14: MNG-3092: Adds integration tests...

Posted by michael-o <gi...@git.apache.org>.
Github user michael-o commented on a diff in the pull request:

    https://github.com/apache/maven-integration-testing/pull/14#discussion_r67059081
  
    --- Diff: core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3092VersionRangeResultFilterExtensionTest.java ---
    @@ -0,0 +1,132 @@
    +package org.apache.maven.it;
    +
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +import org.apache.maven.it.Verifier;
    +import org.apache.maven.it.util.ResourceExtractor;
    +
    +import java.io.File;
    +import java.util.HashMap;
    +import java.util.List;
    +import java.util.Map;
    +
    +/**
    + * This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-3092">MNG-3092</a>.
    + *
    + * <pre>
    + *   <dependencies>
    + *     <dependency>
    + *       <groupId>org.apache.maven.its.mng3092</groupId>
    + *       <artifactId>a</artifactId>
    + *       <version>[1.0,2.0)</version>
    + *     </dependency>
    + *   </dependencies>
    + * </pre>
    + *
    + * @author Benjamin Bentmann
    + */
    +public class MavenITmng3092VersionRangeResultFilterExtensionTest
    +        extends AbstractMavenIntegrationTestCase
    +{
    +
    +    public MavenITmng3092VersionRangeResultFilterExtensionTest()
    +    {
    +        super( "[3.4.0-SNAPSHOT,)" );
    +    }
    +
    +    /**
    +     * Verify that the Maven default behavior will be used without a VersionRangeResultFilter extension.
    +     */
    +    public void testDefault()
    +            throws Exception
    +    {
    +        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3092" );
    +
    +        Verifier verifier = newVerifier( testDir.getAbsolutePath() );
    +        verifier.setAutoclean( false );
    +        verifier.deleteDirectory( "target" );
    +        verifier.deleteArtifacts( "org.apache.maven.its.mng3092" );
    +        verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", verifier.newDefaultFilterProperties() );
    +        verifier.filterFile( "pom-mng-3092.xml", "pom.xml", "UTF-8", verifier.newDefaultFilterProperties() );
    +        verifier.addCliOption( "--settings" );
    +        verifier.addCliOption( "settings.xml" );
    +        verifier.executeGoal( "validate" );
    +        verifier.verifyErrorFreeLog();
    +        verifier.resetStreams();
    +
    +        List<String> classpath = verifier.loadLines( "target/classpath.txt", "UTF-8" );
    +        assertTrue( classpath.toString(), classpath.contains( "a-2.0-SNAPSHOT.jar" ) );
    +    }
    +
    +    /**
    +     * Verify that the Maven VersionRangeResultFilter extension behavior is active and checks that non snapshot
    +     * version will be used.
    +     */
    +    public void testVersionRangeResultFilterExtesionSystemproperties()
    +            throws Exception
    +    {
    +        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3092" );
    +        File extensionDir = new File( testDir, "filter-extension" );
    +
    +        final Map<String, String> filterProperties = new HashMap<>();
    +        filterProperties.put( "@baseurl@", "file://" + testDir.getAbsolutePath() );
    +
    +        Verifier verifier;
    +        verifier = newVerifier( testDir.getAbsolutePath() );
    +        verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", filterProperties );
    +        verifier.filterFile( "extension.xml", ".mvn/extension.xml", "UTF-8", filterProperties );
    +
    +        // install the test extension
    +        verifier = newVerifier( extensionDir.getAbsolutePath(), "remote" );
    +        verifier.filterFile( "pom.xml", "pom.xml", "UTF-8", filterProperties );
    +        verifier.addCliOption( "-f" );
    +        verifier.addCliOption( extensionDir.getAbsolutePath() + "/pom.xml" );
    +        verifier.addCliOption( "-Drat.skip=true" );
    +        verifier.setLogFileName( "install-extension.log" );
    +
    +        verifier.executeGoal( "install" );
    +        verifier.resetStreams();
    +        verifier.verifyErrorFreeLog();
    +
    +        // validate the test project
    +        verifier = newVerifier( testDir.getAbsolutePath() );
    +        verifier.setAutoclean( true );
    +        verifier.setDebug( true );
    +        verifier.setMavenDebug( true );
    +        verifier.filterFile( "pom-mng-3092.xml", "pom.xml", "UTF-8", filterProperties );
    +
    +        verifier.addCliOption( "--settings" );
    +        verifier.addCliOption( testDir.getAbsolutePath() + "/settings.xml" );
    +
    +        verifier.addCliOption( "-Dmaven.ext.class.path="
    +                + verifier.getArtifactPath( "org.apache.maven.its.extensions", "versionrange-resultfilter-extension",
    +                        "3.4.0-SNAPSHOT", "jar" ) );
    --- End diff --
    
    Problamatic, see below.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing pull request #14: MNG-3092: Adds integration tests...

Posted by barthel <gi...@git.apache.org>.
Github user barthel commented on a diff in the pull request:

    https://github.com/apache/maven-integration-testing/pull/14#discussion_r67101198
  
    --- Diff: core-it-suite/src/test/resources/mng-3092/filter-extension/pom.xml ---
    @@ -0,0 +1,74 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +
    +<!--
    +Licensed to the Apache Software Foundation (ASF) under one
    +or more contributor license agreements.  See the NOTICE file
    +distributed with this work for additional information
    +regarding copyright ownership.  The ASF licenses this file
    +to you under the Apache License, Version 2.0 (the
    +"License"); you may not use this file except in compliance
    +with the License.  You may obtain a copy of the License at
    +
    +  http://www.apache.org/licenses/LICENSE-2.0
    +
    +Unless required by applicable law or agreed to in writing,
    +software distributed under the License is distributed on an
    +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +KIND, either express or implied.  See the License for the
    +specific language governing permissions and limitations
    +under the License.
    +-->
    +
    +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    +         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    +  <modelVersion>4.0.0</modelVersion>
    +
    +  <parent>
    +    <groupId>org.apache.maven</groupId>
    +    <artifactId>maven</artifactId>
    +    <version>3.4.0-SNAPSHOT</version>
    --- End diff --
    
    Of course, the version number has to change as soon as possible after the 3.4.0 release.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing pull request #14: MNG-3092: Adds integration tests...

Posted by michael-o <gi...@git.apache.org>.
Github user michael-o commented on a diff in the pull request:

    https://github.com/apache/maven-integration-testing/pull/14#discussion_r67233418
  
    --- Diff: core-it-suite/src/test/resources/mng-3092/filter-extension/pom.xml ---
    @@ -0,0 +1,73 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +
    +<!--
    +Licensed to the Apache Software Foundation (ASF) under one
    +or more contributor license agreements.  See the NOTICE file
    +distributed with this work for additional information
    +regarding copyright ownership.  The ASF licenses this file
    +to you under the Apache License, Version 2.0 (the
    +"License"); you may not use this file except in compliance
    +with the License.  You may obtain a copy of the License at
    +
    +  http://www.apache.org/licenses/LICENSE-2.0
    +
    +Unless required by applicable law or agreed to in writing,
    +software distributed under the License is distributed on an
    +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +KIND, either express or implied.  See the License for the
    +specific language governing permissions and limitations
    +under the License.
    +-->
    +
    +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    +         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    +  <modelVersion>4.0.0</modelVersion>
    +
    +  <parent>
    +    <groupId>org.apache.maven</groupId>
    +    <artifactId>maven</artifactId>
    +    <version>3.4.0-SNAPSHOT</version>
    +  </parent>
    +
    +  <groupId>org.apache.maven.its.extensions</groupId>
    +  <artifactId>versionrange-resultfilter-extension</artifactId>
    +  <packaging>jar</packaging>
    +
    +  <name>Maven IT Plugin :: MNG-3092 :: VersionRangeResultFilter extension</name>
    +  <description>This extension provides an very easy VersionRangeResultFilter for use in Maven ITs.</description>
    +
    +  <properties>
    +    <maven.version>3.4.0-SNAPSHOT</maven.version>
    +  </properties>
    +
    +  <dependencies>
    +    <dependency>
    +      <groupId>org.apache.maven</groupId>
    +      <artifactId>maven-core</artifactId>
    +      <scope>provided</scope>
    --- End diff --
    
    Add `<version>${maven.version}</version>`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing pull request #14: MNG-3092: Adds integration tests...

Posted by barthel <gi...@git.apache.org>.
Github user barthel commented on a diff in the pull request:

    https://github.com/apache/maven-integration-testing/pull/14#discussion_r67776474
  
    --- Diff: core-it-suite/src/test/resources/mng-3092/filter-extension/pom.xml ---
    @@ -0,0 +1,73 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +
    +<!--
    +Licensed to the Apache Software Foundation (ASF) under one
    +or more contributor license agreements.  See the NOTICE file
    +distributed with this work for additional information
    +regarding copyright ownership.  The ASF licenses this file
    +to you under the Apache License, Version 2.0 (the
    +"License"); you may not use this file except in compliance
    +with the License.  You may obtain a copy of the License at
    +
    +  http://www.apache.org/licenses/LICENSE-2.0
    +
    +Unless required by applicable law or agreed to in writing,
    +software distributed under the License is distributed on an
    +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +KIND, either express or implied.  See the License for the
    +specific language governing permissions and limitations
    +under the License.
    +-->
    +
    +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    +         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    +  <modelVersion>4.0.0</modelVersion>
    +
    +  <parent>
    +    <groupId>org.apache.maven</groupId>
    +    <artifactId>maven</artifactId>
    +    <version>3.4.0-SNAPSHOT</version>
    +  </parent>
    +
    +  <groupId>org.apache.maven.its.extensions</groupId>
    +  <artifactId>versionrange-resultfilter-extension</artifactId>
    +  <packaging>jar</packaging>
    +
    +  <name>Maven IT Plugin :: MNG-3092 :: VersionRangeResultFilter extension</name>
    +  <description>This extension provides an very easy VersionRangeResultFilter for use in Maven ITs.</description>
    +
    +  <properties>
    +    <maven.version>3.4.0-SNAPSHOT</maven.version>
    +  </properties>
    +
    +  <dependencies>
    +    <dependency>
    +      <groupId>org.apache.maven</groupId>
    +      <artifactId>maven-core</artifactId>
    +      <scope>provided</scope>
    +    </dependency>
    +    <dependency>
    +      <groupId>org.apache.maven</groupId>
    +      <artifactId>maven-aether-provider</artifactId>
    --- End diff --
    
    Already added.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing pull request #14: MNG-3092: Adds integration tests...

Posted by michael-o <gi...@git.apache.org>.
Github user michael-o commented on a diff in the pull request:

    https://github.com/apache/maven-integration-testing/pull/14#discussion_r67058999
  
    --- Diff: core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3092VersionRangeResultFilterExtensionTest.java ---
    @@ -0,0 +1,132 @@
    +package org.apache.maven.it;
    +
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +import org.apache.maven.it.Verifier;
    +import org.apache.maven.it.util.ResourceExtractor;
    +
    +import java.io.File;
    +import java.util.HashMap;
    +import java.util.List;
    +import java.util.Map;
    +
    +/**
    + * This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-3092">MNG-3092</a>.
    + *
    + * <pre>
    + *   <dependencies>
    + *     <dependency>
    + *       <groupId>org.apache.maven.its.mng3092</groupId>
    + *       <artifactId>a</artifactId>
    + *       <version>[1.0,2.0)</version>
    + *     </dependency>
    + *   </dependencies>
    + * </pre>
    + *
    + * @author Benjamin Bentmann
    + */
    +public class MavenITmng3092VersionRangeResultFilterExtensionTest
    +        extends AbstractMavenIntegrationTestCase
    +{
    +
    +    public MavenITmng3092VersionRangeResultFilterExtensionTest()
    +    {
    +        super( "[3.4.0-SNAPSHOT,)" );
    --- End diff --
    
    I have changed that already locally.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing pull request #14: MNG-3092: Adds integration tests...

Posted by michael-o <gi...@git.apache.org>.
Github user michael-o commented on a diff in the pull request:

    https://github.com/apache/maven-integration-testing/pull/14#discussion_r67233015
  
    --- Diff: core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3092VersionRangeResultFilterExtensionTest.java ---
    @@ -0,0 +1,132 @@
    +package org.apache.maven.it;
    +
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +import org.apache.maven.it.Verifier;
    +import org.apache.maven.it.util.ResourceExtractor;
    +
    +import java.io.File;
    +import java.util.HashMap;
    +import java.util.List;
    +import java.util.Map;
    +
    +/**
    + * This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-3092">MNG-3092</a>.
    + *
    + * <pre>
    + *   <dependencies>
    + *     <dependency>
    + *       <groupId>org.apache.maven.its.mng3092</groupId>
    + *       <artifactId>a</artifactId>
    + *       <version>[1.0,2.0)</version>
    + *     </dependency>
    + *   </dependencies>
    + * </pre>
    + *
    + * @author Benjamin Bentmann
    + */
    +public class MavenITmng3092VersionRangeResultFilterExtensionTest
    +        extends AbstractMavenIntegrationTestCase
    +{
    +
    +    public MavenITmng3092VersionRangeResultFilterExtensionTest()
    +    {
    +        super( "[3.4.0-SNAPSHOT,)" );
    --- End diff --
    
    Make that 3.4.0 and it will work.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing pull request #14: MNG-3092: Adds integration tests...

Posted by michael-o <gi...@git.apache.org>.
Github user michael-o commented on a diff in the pull request:

    https://github.com/apache/maven-integration-testing/pull/14#discussion_r67059367
  
    --- Diff: core-it-suite/src/test/resources/mng-3092/filter-extension/pom.xml ---
    @@ -0,0 +1,74 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +
    +<!--
    +Licensed to the Apache Software Foundation (ASF) under one
    +or more contributor license agreements.  See the NOTICE file
    +distributed with this work for additional information
    +regarding copyright ownership.  The ASF licenses this file
    +to you under the Apache License, Version 2.0 (the
    +"License"); you may not use this file except in compliance
    +with the License.  You may obtain a copy of the License at
    +
    +  http://www.apache.org/licenses/LICENSE-2.0
    +
    +Unless required by applicable law or agreed to in writing,
    +software distributed under the License is distributed on an
    +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +KIND, either express or implied.  See the License for the
    +specific language governing permissions and limitations
    +under the License.
    +-->
    +
    +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    +         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    +  <modelVersion>4.0.0</modelVersion>
    +
    +  <parent>
    +    <groupId>org.apache.maven</groupId>
    +    <artifactId>maven</artifactId>
    +    <version>3.4.0-SNAPSHOT</version>
    +  </parent>
    +
    +  <groupId>org.apache.maven.its.extensions</groupId>
    +  <artifactId>versionrange-resultfilter-extension</artifactId>
    +  <version>3.4.0-SNAPSHOT</version>
    --- End diff --
    
    This duplicates the parent version.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing pull request #14: MNG-3092: Adds integration tests...

Posted by michael-o <gi...@git.apache.org>.
Github user michael-o commented on a diff in the pull request:

    https://github.com/apache/maven-integration-testing/pull/14#discussion_r67233825
  
    --- Diff: core-it-suite/src/test/resources/mng-3092/filter-extension/src/main/java/org/apache/maven/its/extensions/MavenITVersionRangeResultFilter.java ---
    @@ -0,0 +1,76 @@
    +package org.apache.maven.its.extensions;
    +
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +import javax.inject.Named;
    +import java.util.Iterator;
    +import javax.inject.Inject;
    +import org.apache.maven.repository.internal.VersionRangeResultFilter;
    +import org.eclipse.aether.resolution.VersionRangeResolutionException;
    +import org.eclipse.aether.resolution.VersionRangeResult;
    +import org.eclipse.aether.spi.log.Logger;
    +import org.eclipse.aether.spi.log.LoggerFactory;
    +import org.eclipse.aether.spi.log.NullLoggerFactory;
    +import org.eclipse.aether.version.Version;
    +import org.eclipse.sisu.Nullable;
    +
    +/**
    + * Example implementation for use in ITs.
    + * <p>
    + * This implementation removes <b>all</b> SNAPSHOT dependencies.</p>
    + * <p>
    + * Part of the test set <a href="https://issues.apache.org/jira/browse/MNG-3092">MNG-3092</a>
    + * and only works with Maven >= 3.4.0</p>
    + */
    +@Named
    +public class MavenITVersionRangeResultFilter implements VersionRangeResultFilter
    +{
    +
    +    private final Logger logger;
    +
    +    @Inject
    +    public MavenITVersionRangeResultFilter( @Nullable LoggerFactory loggerfactory )
    +    {
    +        this.logger = ( ( null == loggerfactory ) ? NullLoggerFactory.LOGGER : loggerfactory.getLogger(
    +                VersionRangeResultFilter.class.getName() ) );
    +    }
    +
    +    @Override
    +    public VersionRangeResult filterVersionRangeResult( VersionRangeResult versionRangeResult )
    +            throws VersionRangeResolutionException
    +    {
    +        if ( !"org.apache.maven.its.mng3092".equals( versionRangeResult.getRequest().getArtifact().getGroupId() ) )
    +        {
    +            return versionRangeResult;
    +        }
    +        this.logger.debug( "[MAVEN-IT-CORE-MNG-3092] Version range result instance: " + versionRangeResult );
    +        for ( Iterator<Version> it = versionRangeResult.getVersions().iterator(); it.hasNext(); )
    +        {
    +            // XXX: better way to identify a SNAPSHOT version
    +            if ( String.valueOf( it.next() ).endsWith( "SNAPSHOT" ) )
    +            {
    +                this.logger.debug( "[MAVEN-IT-CORE-MNG-3092] Remove version: " + it.toString() );
    --- End diff --
    
    use `version` here


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing pull request #14: MNG-3092: Adds integration tests...

Posted by barthel <gi...@git.apache.org>.
Github user barthel commented on a diff in the pull request:

    https://github.com/apache/maven-integration-testing/pull/14#discussion_r67945228
  
    --- Diff: core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3092VersionRangeResultFilterExtensionTest.java ---
    @@ -0,0 +1,132 @@
    +package org.apache.maven.it;
    +
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +import org.apache.maven.it.Verifier;
    +import org.apache.maven.it.util.ResourceExtractor;
    +
    +import java.io.File;
    +import java.util.HashMap;
    +import java.util.List;
    +import java.util.Map;
    +
    +/**
    + * This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-3092">MNG-3092</a>.
    + *
    + * <pre>
    + *   <dependencies>
    + *     <dependency>
    + *       <groupId>org.apache.maven.its.mng3092</groupId>
    + *       <artifactId>a</artifactId>
    + *       <version>[1.0,2.0)</version>
    + *     </dependency>
    + *   </dependencies>
    + * </pre>
    + *
    + * @author Benjamin Bentmann
    + */
    +public class MavenITmng3092VersionRangeResultFilterExtensionTest
    +        extends AbstractMavenIntegrationTestCase
    +{
    +
    +    public MavenITmng3092VersionRangeResultFilterExtensionTest()
    +    {
    +        super( "[3.4.0-SNAPSHOT,)" );
    --- End diff --
    
    So this test will not execute before 3.4.0 release. I thought I change that close after the 3.4.0 release?
    If this is not a problem, I'll change this.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing issue #14: MNG-3092: Adds integration tests for ve...

Posted by barthel <gi...@git.apache.org>.
Github user barthel commented on the issue:

    https://github.com/apache/maven-integration-testing/pull/14
  
    @michael-o Done.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing pull request #14: MNG-3092: Adds integration tests...

Posted by michael-o <gi...@git.apache.org>.
Github user michael-o commented on a diff in the pull request:

    https://github.com/apache/maven-integration-testing/pull/14#discussion_r67233223
  
    --- Diff: core-it-suite/src/test/resources/mng-3092/filter-extension/pom.xml ---
    @@ -0,0 +1,74 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +
    +<!--
    +Licensed to the Apache Software Foundation (ASF) under one
    +or more contributor license agreements.  See the NOTICE file
    +distributed with this work for additional information
    +regarding copyright ownership.  The ASF licenses this file
    +to you under the Apache License, Version 2.0 (the
    +"License"); you may not use this file except in compliance
    +with the License.  You may obtain a copy of the License at
    +
    +  http://www.apache.org/licenses/LICENSE-2.0
    +
    +Unless required by applicable law or agreed to in writing,
    +software distributed under the License is distributed on an
    +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +KIND, either express or implied.  See the License for the
    +specific language governing permissions and limitations
    +under the License.
    +-->
    +
    +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    +         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    +  <modelVersion>4.0.0</modelVersion>
    +
    +  <parent>
    +    <groupId>org.apache.maven</groupId>
    +    <artifactId>maven</artifactId>
    +    <version>3.4.0-SNAPSHOT</version>
    --- End diff --
    
    Remove the parent completely.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing pull request #14: MNG-3092: Adds integration tests...

Posted by michael-o <gi...@git.apache.org>.
Github user michael-o commented on a diff in the pull request:

    https://github.com/apache/maven-integration-testing/pull/14#discussion_r67059339
  
    --- Diff: core-it-suite/src/test/resources/mng-3092/filter-extension/pom.xml ---
    @@ -0,0 +1,74 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +
    +<!--
    +Licensed to the Apache Software Foundation (ASF) under one
    +or more contributor license agreements.  See the NOTICE file
    +distributed with this work for additional information
    +regarding copyright ownership.  The ASF licenses this file
    +to you under the Apache License, Version 2.0 (the
    +"License"); you may not use this file except in compliance
    +with the License.  You may obtain a copy of the License at
    +
    +  http://www.apache.org/licenses/LICENSE-2.0
    +
    +Unless required by applicable law or agreed to in writing,
    +software distributed under the License is distributed on an
    +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +KIND, either express or implied.  See the License for the
    +specific language governing permissions and limitations
    +under the License.
    +-->
    +
    +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    +         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    +  <modelVersion>4.0.0</modelVersion>
    +
    +  <parent>
    +    <groupId>org.apache.maven</groupId>
    +    <artifactId>maven</artifactId>
    +    <version>3.4.0-SNAPSHOT</version>
    --- End diff --
    
    I am not certain wether relying on a snapshot version which will vanish with 3.4.1 is a good idea. This should be stable and reproducible. Maybe a followup commit as soon as 3.4 is released?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing pull request #14: MNG-3092: Adds integration tests...

Posted by barthel <gi...@git.apache.org>.
Github user barthel commented on a diff in the pull request:

    https://github.com/apache/maven-integration-testing/pull/14#discussion_r67776182
  
    --- Diff: core-it-suite/src/test/resources/mng-3092/repo/org/apache/maven/its/mng3092/a/2.0-SNAPSHOT/a-2.0-20100408.111215-1.pom ---
    @@ -23,8 +23,8 @@ under the License.
       <modelVersion>4.0.0</modelVersion>
     
       <groupId>org.apache.maven.its.mng3092</groupId>
    -  <artifactId>b</artifactId>
    -  <version>1.0-SNAPSHOT</version>
    +  <artifactId>a</artifactId>
    +  <version>2.0</version>
    --- End diff --
    
    The ```SNAPSHOT``` is not required anymore and was replaced.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-integration-testing pull request #14: MNG-3092: Adds integration tests...

Posted by michael-o <gi...@git.apache.org>.
Github user michael-o commented on a diff in the pull request:

    https://github.com/apache/maven-integration-testing/pull/14#discussion_r67233439
  
    --- Diff: core-it-suite/src/test/resources/mng-3092/filter-extension/pom.xml ---
    @@ -0,0 +1,73 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +
    +<!--
    +Licensed to the Apache Software Foundation (ASF) under one
    +or more contributor license agreements.  See the NOTICE file
    +distributed with this work for additional information
    +regarding copyright ownership.  The ASF licenses this file
    +to you under the Apache License, Version 2.0 (the
    +"License"); you may not use this file except in compliance
    +with the License.  You may obtain a copy of the License at
    +
    +  http://www.apache.org/licenses/LICENSE-2.0
    +
    +Unless required by applicable law or agreed to in writing,
    +software distributed under the License is distributed on an
    +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +KIND, either express or implied.  See the License for the
    +specific language governing permissions and limitations
    +under the License.
    +-->
    +
    +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    +         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    +  <modelVersion>4.0.0</modelVersion>
    +
    +  <parent>
    +    <groupId>org.apache.maven</groupId>
    +    <artifactId>maven</artifactId>
    +    <version>3.4.0-SNAPSHOT</version>
    +  </parent>
    +
    +  <groupId>org.apache.maven.its.extensions</groupId>
    +  <artifactId>versionrange-resultfilter-extension</artifactId>
    +  <packaging>jar</packaging>
    +
    +  <name>Maven IT Plugin :: MNG-3092 :: VersionRangeResultFilter extension</name>
    +  <description>This extension provides an very easy VersionRangeResultFilter for use in Maven ITs.</description>
    +
    +  <properties>
    +    <maven.version>3.4.0-SNAPSHOT</maven.version>
    +  </properties>
    +
    +  <dependencies>
    +    <dependency>
    +      <groupId>org.apache.maven</groupId>
    +      <artifactId>maven-core</artifactId>
    +      <scope>provided</scope>
    +    </dependency>
    +    <dependency>
    +      <groupId>org.apache.maven</groupId>
    +      <artifactId>maven-aether-provider</artifactId>
    --- End diff --
    
    Add `<version>${maven.version}</version>`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org