Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2.0.9
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
Several conditions have to be met to show this bug.
1) Be in an environment that does not have access to repo1.maven.org, (such as a corporate environment)
2) Have no content in your local repository (a fresh install of maven 2.0.4)
3) Attempt to use a plugin that has no project requirement (such as archetype:create)
The plugin fails because access to repo1.maven.org cannot be accessed.
Recommended solution:
Create a settings.xml profile that changes the location of the 'central' repository to point to an internal resource (such as a maven-proxy installation).
<settings>
<profiles>
<profile>
<id>use_internal</id>
<repositories>
<repository>
<id>central</id>
<name>Internal Central Repository</name>
<url>http://repo.internal.com/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<name>Internal Central Repository</name>
<url>http://repo.internal.com/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>use_internal</activeProfile>
</activeProfiles>
</settings>
Try again.
Still fails.
The reason is that the default behaviour for non-project execution is to use the maven super pom, however there is a bug with that flow that does not allow for the merging of the settings.xml profiles.
Attachments
Issue Links
| This issue is duplicated by: | ||||
| MNG-3337 | Downloading plugins for an inhouse repository problem |
|
|
|
| MNG-2236 | DefaultMavenProjectBuilder.buildStandaloneSuperProject() should include a ProfileManager that includes active profiles from settings.xml |
|
|
|
| MNG-1928 | ignores pluginRepository in settings.xml, honors in POM |
|
|
|
| MNG-2716 | pluginRepositories seems to be ignored when running a goal without pom.xml |
|
|
|
| MNG-3235 | Profiles in settings.xml not loaded when running maven without a POM |
|
|
|
| MNG-2918 | Active-by-default profiles from settings.xml are not active without pom.xml |
|
|
|
| This issue relates to: | ||||
| ARCHETYPE-66 | The archetype:create goal ignores activated profiles in local settings.xml |
|
|
|
| ARCHETYPE-59 | archetype plugin doesn't use private plugin repository configured in <MAVEN-HOME>/conf/settings.xml |
|
|
|
| ARCHETYPE-89 | archetypeng:create doesn't use configured repos to find artifacts |
|
|
|
| MNG-4109 | When running a plugin, project builder does not pick up settings profiles |
|
|
|
| MNG-4246 | plugin resolution failures during pom-less execution (like archetype:generate) |
|
|
|
Patch against maven-core and maven-project in ..
https://svn.apache.org/repos/asf/maven/components/branches/maven-2.0.x
Revision: 398684