You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Brett Porter <br...@apache.org> on 2008/10/17 03:13:50 UTC
Re: svn commit: r705328 - in /maven/core-integration-testing/trunk/core-it-suite/src/test: java/org/apache/maven/it/MavenIT0043Test.java resources/it0043/test/settings.xml
I think this is no longer an issue as long as settings.xml used
"external:*" instead of just "*", which I think is a good enough
requirement for the ITs (last I checked, there were a number of ITs
that relied on this).
Even when using -s settings.xml, if the definitions is in the Maven
installation's settings.xml it'll be applied as -s only overrides the
~/.m2/*
Cheers,
Brett
On 17/10/2008, at 6:07 AM, bentmann@apache.org wrote:
> Author: bentmann
> Date: Thu Oct 16 12:07:44 2008
> New Revision: 705328
>
> URL: http://svn.apache.org/viewvc?rev=705328&view=rev
> Log:
> o Fixed IT to account for usage of repository managers
>
> Added:
> maven/core-integration-testing/trunk/core-it-suite/src/test/
> resources/it0043/test/settings.xml (with props)
> Modified:
> maven/core-integration-testing/trunk/core-it-suite/src/test/java/
> org/apache/maven/it/MavenIT0043Test.java
>
> Modified: maven/core-integration-testing/trunk/core-it-suite/src/
> test/java/org/apache/maven/it/MavenIT0043Test.java
> URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0043Test.java?rev=705328&r1=705327&r2=705328&view=diff
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- maven/core-integration-testing/trunk/core-it-suite/src/test/java/
> org/apache/maven/it/MavenIT0043Test.java (original)
> +++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/
> org/apache/maven/it/MavenIT0043Test.java Thu Oct 16 12:07:44 2008
> @@ -23,6 +23,7 @@
> import org.apache.maven.it.util.ResourceExtractor;
>
> import java.io.File;
> +import java.util.Collections;
> import java.util.Properties;
>
> public class MavenIT0043Test
> @@ -52,6 +53,7 @@
> Properties systemProperties = new Properties();
> systemProperties.put( "expression.expressions", "project/
> repositories,project/pluginRepositories" );
> verifier.setSystemProperties( systemProperties );
> + verifier.setCliOptions( Collections.singletonList( "-s
> settings.xml" ) );
> verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-
> plugin-expression:2.1-SNAPSHOT:eval" );
> verifier.verifyErrorFreeLog();
> verifier.resetStreams();
>
> Added: maven/core-integration-testing/trunk/core-it-suite/src/test/
> resources/it0043/test/settings.xml
> URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0043/test/settings.xml?rev=705328&view=auto
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- maven/core-integration-testing/trunk/core-it-suite/src/test/
> resources/it0043/test/settings.xml (added)
> +++ maven/core-integration-testing/trunk/core-it-suite/src/test/
> resources/it0043/test/settings.xml Thu Oct 16 12:07:44 2008
> @@ -0,0 +1,48 @@
> +<?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.
> +-->
> +
> +<settings>
> + <profiles>
> + <profile>
> + <!--
> + Make sure we also override the repo definition in case a repo
> manager is setup.
> + -->
> + <id>it0043</id>
> + <activation>
> + <activeByDefault>true</activeByDefault>
> + </activation>
> + <repositories>
> + <repository>
> + <id>central</id>
> + <name>it0043</name>
> + <url>file:///${basedir}/target/maven-core-it0043-repo</url>
> + </repository>
> + </repositories>
> + <pluginRepositories>
> + <pluginRepository>
> + <id>central</id>
> + <name>it0043</name>
> + <url>file:///${basedir}/target/maven-core-it0043-repo</url>
> + </pluginRepository>
> + </pluginRepositories>
> + </profile>
> + </profiles>
> +</settings>
>
> Propchange: maven/core-integration-testing/trunk/core-it-suite/src/
> test/resources/it0043/test/settings.xml
> ------------------------------------------------------------------------------
> svn:eol-style = native
>
> Propchange: maven/core-integration-testing/trunk/core-it-suite/src/
> test/resources/it0043/test/settings.xml
> ------------------------------------------------------------------------------
> svn:keywords = Author Date Id Revision
>
>
--
Brett Porter
brett@apache.org
http://blogs.exist.com/bporter/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: svn commit: r705328 - in /maven/core-integration-testing/trunk/core-it-suite/src/test:
java/org/apache/maven/it/MavenIT0043Test.java resources/it0043/test/settings.xml
Posted by Benjamin Bentmann <be...@udo.edu>.
Brett Porter wrote:
> I think this is no longer an issue as long as settings.xml used
> "external:*" instead of just "*", which I think is a good enough
> requirement for the ITs
An IT should be as independent from the outside environment as possible,
i.e. if I can tweak the IT to pass regardless of the installation
settings used by the executing Maven, I believe that's worth to go for.
> Even when using -s settings.xml, if the definitions is in the Maven
> installation's settings.xml it'll be applied as -s only overrides the
> ~/.m2/*
The project description for the IT says:
> Test for repository inheritence - ensure using the same id overrides the defaults
AFAIU, this means the IT is only concerned about the effective POM (and
indeed was previously using help:effective-pom to check) and not the
effective URL that Maven ultimatively picks at runtime to access the
repo. As such, mirror settings should be irrelevant here. And since user
settings override global settings, the added settings.xml will
successfully update the effective POM.
Benjamin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org