[ 
https://issues.apache.org/jira/browse/MNG-5984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15169825#comment-15169825
 ] 

Hudson commented on MNG-5984:
-----------------------------

SUCCESS: Integrated in maven-3.x #1251 (See 
[https://builds.apache.org/job/maven-3.x/1251/])
[MNG-5984] Maven core extension resolution ignores repositories from (schulte: 
rev 62374f51fd05b233fc34e39c294322fa3823e4d7)
* 
maven-embedder/src/main/java/org/apache/maven/cli/configuration/SettingsXmlConfigurationProcessor.java
* maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java


> Maven core extension resolution ignores repositories from activeByDefault 
> profiles in settings.xml
> --------------------------------------------------------------------------------------------------
>
>                 Key: MNG-5984
>                 URL: https://issues.apache.org/jira/browse/MNG-5984
>             Project: Maven
>          Issue Type: Bug
>          Components: Profiles, Settings
>    Affects Versions: 3.3.9
>            Reporter: Gabriƫl Konat
>            Assignee: Christian Schulte
>            Priority: Minor
>             Fix For: 3.4.0
>
>
> When building a project with a core extension in {{.mvn/extensions.xml}}, 
> where the core extension is not installed locally but needs to be retrieved 
> from a remote repository, profiles from {{settings.xml}} with repositories 
> which are {{<activeByDefault>true</activeByDefault>}}, are ignored, failing 
> the resolution of the core extension.
> If the profile is activated from within an {{activeProfiles}} section, they 
> are not ignored and resolution succeeds.
> Concrete example:
> {code:xml|title=.mvn/extensions.xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <extensions>
>   <extension>
>     <groupId>org.metaborg</groupId>
>     <artifactId>spoofax-maven-plugin-pomless</artifactId>
>     <version>2.0.0-SNAPSHOT</version>
>   </extension>
> </extensions>
> {code}
> {code:xml|title=~/.m2/settings.xml}
> <?xml version="1.0" ?>
> <settings
>   xmlns="http://maven.apache.org/SETTINGS/1.0.0";
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>   xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 
> http://maven.apache.org/xsd/settings-1.0.0.xsd";
> >
>   <profiles>
>     <profile>
>       <id>add-metaborg-snapshot-repos</id>
>       <activation>
>         <activeByDefault>true</activeByDefault>
>       </activation>
>       <repositories>
>         <repository>
>           <id>metaborg-snapshot-repo</id>
>           
> <url>http://artifacts.metaborg.org/content/repositories/snapshots/</url>
>           <releases>
>             <enabled>false</enabled>
>           </releases>
>           <snapshots>
>             <enabled>true</enabled>
>           </snapshots>
>         </repository>
>       </repositories>
>       <pluginRepositories>
>         <pluginRepository>
>           <id>metaborg-snapshot-repo</id>
>           
> <url>http://artifacts.metaborg.org/content/repositories/snapshots/</url>
>           <releases>
>             <enabled>false</enabled>
>           </releases>
>           <snapshots>
>             <enabled>true</enabled>
>           </snapshots>
>         </pluginRepository>
>       </pluginRepositories>
>     </profile>
>   </profiles>
> </settings>
> {code}
> Results in failed resolution:
> {code:title=mvn -Dmaven.repo.local=.cleanmvnrepo clean verify}
> [WARNING] The POM for 
> org.metaborg:spoofax-maven-plugin-pomless:jar:2.0.0-SNAPSHOT is missing, no 
> dependency information available
> [WARNING] Failed to read extensions descriptor 
> /Users/gohla/spoofax/master/repo/spoofax-releng/sdf/org.metaborg.meta.lang.sdf/.mvn/extensions.xml:
>  Plugin org.metaborg:spoofax-maven-plugin-pomless:2.0.0-SNAPSHOT or one of 
> its dependencies could not be resolved: Could not find artifact 
> org.metaborg:spoofax-maven-plugin-pomless:jar:2.0.0-SNAPSHOT
> {code}
> Whereas with the following settings file it succeeds to resolve the core 
> extension:
> {code:xml|title=~/.m2/settings.xml}
> <?xml version="1.0" ?>
> <settings
>   xmlns="http://maven.apache.org/SETTINGS/1.0.0";
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>   xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 
> http://maven.apache.org/xsd/settings-1.0.0.xsd";
> >
>   <profiles>
>     <profile>
>       <id>add-metaborg-snapshot-repos</id>
>       <repositories>
>         <repository>
>           <id>metaborg-snapshot-repo</id>
>           
> <url>http://artifacts.metaborg.org/content/repositories/snapshots/</url>
>           <releases>
>             <enabled>false</enabled>
>           </releases>
>           <snapshots>
>             <enabled>true</enabled>
>           </snapshots>
>         </repository>
>       </repositories>
>       <pluginRepositories>
>         <pluginRepository>
>           <id>metaborg-snapshot-repo</id>
>           
> <url>http://artifacts.metaborg.org/content/repositories/snapshots/</url>
>           <releases>
>             <enabled>false</enabled>
>           </releases>
>           <snapshots>
>             <enabled>true</enabled>
>           </snapshots>
>         </pluginRepository>
>       </pluginRepositories>
>     </profile>
>   </profiles>
>   <activeProfiles>
>     <activeProfile>add-metaborg-snapshot-repos</activeProfile>
>   </activeProfiles>
> </settings>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to