You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Joakim Erdfelt (JIRA)" <ji...@codehaus.org> on 2006/05/02 03:30:41 UTC
[jira] Created: (MNG-2261) Profiles ignored when working with
non-projects (such as archetype:create)
Profiles ignored when working with non-projects (such as archetype:create)
--------------------------------------------------------------------------
Key: MNG-2261
URL: http://jira.codehaus.org/browse/MNG-2261
Project: Maven 2
Type: Bug
Components: General
Versions: 2.0.4
Reporter: Joakim Erdfelt
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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (MNG-3099) Profiles ignored when working with
non-projects (such as archetype:create)
Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-3099?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brett Porter updated MNG-3099:
------------------------------
Fix Version/s: 2.1
> Profiles ignored when working with non-projects (such as archetype:create)
> --------------------------------------------------------------------------
>
> Key: MNG-3099
> URL: http://jira.codehaus.org/browse/MNG-3099
> Project: Maven 2
> Issue Type: Bug
> Reporter: Joakim Erdfelt
> Assignee: John Casey
> Priority: Blocker
> Fix For: 2.1
>
> Attachments: MNG-2261-2.patch, MNG-2261.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (MNG-2261) Profiles ignored when working with
non-projects (such as archetype:create)
Posted by "Carlos Sanchez (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2261?page=all ]
Carlos Sanchez updated MNG-2261:
--------------------------------
Fix Version: 2.0.5
> Profiles ignored when working with non-projects (such as archetype:create)
> --------------------------------------------------------------------------
>
> Key: MNG-2261
> URL: http://jira.codehaus.org/browse/MNG-2261
> Project: Maven 2
> Type: Bug
> Components: General
> Versions: 2.0.4
> Reporter: Joakim Erdfelt
> Fix For: 2.0.5
> Attachments: MNG-2261.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (MNG-2261) Profiles ignored when working with
non-projects (such as archetype:create)
Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2261?page=comments#action_69626 ]
John Casey commented on MNG-2261:
---------------------------------
I found that a similar piece of code already exists in the trunk, written by mkleint in revId 415000. I'm trying to lift that piece instead, for consistency's sake. If that works, I'll add some unit tests and call it good.
At a basic level, all we need to do is verify that the superPOM, when loaded standalone, is injected with existing properties from active profiles. We should be able to work up a much more elemental unit test to give this a try, and then come back around to the type of test explained above for one more level of verification.
> Profiles ignored when working with non-projects (such as archetype:create)
> --------------------------------------------------------------------------
>
> Key: MNG-2261
> URL: http://jira.codehaus.org/browse/MNG-2261
> Project: Maven 2
> Type: Bug
> Components: General
> Versions: 2.0.4
> Reporter: Joakim Erdfelt
> Assignee: John Casey
> Priority: Blocker
> Fix For: 2.0.5
> Attachments: MNG-2261-2.patch, MNG-2261.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (MNG-2261) Profiles ignored when working with
non-projects (such as archetype:create)
Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2261?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brett Porter updated MNG-2261:
------------------------------
Fix Version/s: (was: 2.0.5)
2.0.6
> Profiles ignored when working with non-projects (such as archetype:create)
> --------------------------------------------------------------------------
>
> Key: MNG-2261
> URL: http://jira.codehaus.org/browse/MNG-2261
> Project: Maven 2
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.4
> Reporter: Joakim Erdfelt
> Assigned To: John Casey
> Priority: Blocker
> Fix For: 2.0.6
>
> Attachments: MNG-2261-2.patch, MNG-2261.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Moved: (MNG-3099) Profiles ignored when working with
non-projects (such as archetype:create)
Posted by "Joakim Erdfelt (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-3099?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joakim Erdfelt moved ARCHETYPE-76 to MNG-3099:
----------------------------------------------
Key: MNG-3099 (was: ARCHETYPE-76)
Project: Maven 2 (was: Maven Archetype)
> Profiles ignored when working with non-projects (such as archetype:create)
> --------------------------------------------------------------------------
>
> Key: MNG-3099
> URL: http://jira.codehaus.org/browse/MNG-3099
> Project: Maven 2
> Issue Type: Bug
> Reporter: Joakim Erdfelt
> Assignee: John Casey
> Priority: Blocker
> Attachments: MNG-2261-2.patch, MNG-2261.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MNG-2261) Profiles ignored when working with
non-projects (such as archetype:create)
Posted by "Bulent Erdemir (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2261?page=comments#action_85551 ]
Bulent Erdemir commented on MNG-2261:
-------------------------------------
Hi,
I checked out the trunk, compiled, assembled and installed. And tried to execute archetype:create but it still won't honor the global settings.xml file. Am I missing something ?
Note: When I compiled and assembled, maven-2.0.6-SNAPSHOT-bin.zip is created and I used this for testing.
Does any one has any comments on this ?
Bulent Erdemir
> Profiles ignored when working with non-projects (such as archetype:create)
> --------------------------------------------------------------------------
>
> Key: MNG-2261
> URL: http://jira.codehaus.org/browse/MNG-2261
> Project: Maven 2
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.4
> Reporter: Joakim Erdfelt
> Assigned To: John Casey
> Priority: Blocker
> Fix For: 2.0.5
>
> Attachments: MNG-2261-2.patch, MNG-2261.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Moved: (MRM-411) Profiles ignored when working with
non-projects (such as archetype:create)
Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRM-411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jason van Zyl moved MNG-2261 to MRM-411:
----------------------------------------
Affects Version/s: (was: 2.0.4)
Fix Version/s: (was: 2.0.7)
Component/s: (was: General)
Complexity: (was: Intermediate)
Key: MRM-411 (was: MNG-2261)
Project: Archiva (was: Maven 2)
> Profiles ignored when working with non-projects (such as archetype:create)
> --------------------------------------------------------------------------
>
> Key: MRM-411
> URL: http://jira.codehaus.org/browse/MRM-411
> Project: Archiva
> Issue Type: Bug
> Reporter: Joakim Erdfelt
> Assignee: John Casey
> Priority: Blocker
> Attachments: MNG-2261-2.patch, MNG-2261.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (MNG-3099) Profiles ignored when working with
non-projects (such as archetype:create)
Posted by "William Ferguson (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-3099?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
William Ferguson updated MNG-3099:
----------------------------------
Attachment: Plugin-showing-MNG3099.zip
Invoking a Mojo that doesn't require a project (ie *@requiresProject false* in your Mojo) doesn't load the Profiles defined in LOCAL_HOME settings or MAVEN_HOME settings.
In an effort to make this issue as explicit as possible, I have attached Plugin-showing-MNG3099.zip
It contains a plugin project (with a Mojo conigured with *requiresProject false*) and local and global settings files.
Put the local and global settings files in the normal place and build and install the plugin.
Then from the plugin project folder execute:
{code}
D:\Modules\maven-test-plugin>mvn com.yarris.maven.plugins:maven-test-plugin:profile-props
[INFO] Scanning for projects...
[INFO] snapshot com.yarris.maven.plugins:maven-test-plugin:1.0-SNAPSHOT: checking for updates from snapshot
[INFO] ----------------------------------------------------------------------------
[INFO] Building maven-test-plugin
[INFO] task-segment: [com.yarris.maven.plugins:maven-test-plugin:profile-props] (aggregator-style)
[INFO] ----------------------------------------------------------------------------
[INFO] [test:profile-props]
[INFO] local-profile-prop=local-profile-prop-value
[INFO] global-profile-prop=global-profile-prop-value
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Thu Sep 13 15:47:18 EST 2007
[INFO] Final Memory: 2M/4M
[INFO] ------------------------------------------------------------------------
{code}
Note that the local-profile-prop and global-profile-prop have resolved to the expected values.
Now execute:
{code}
D:\Modules\maven-test-plugin>mvn com.yarris.maven.plugins:maven-test-plugin:profile-props -f no-pom.xml
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [com.yarris.maven.plugins:maven-test-plugin:profile-props] (aggregator-style)
[INFO] ----------------------------------------------------------------------------
[INFO] [test:profile-props]
[INFO] local-profile-prop=null
[INFO] global-profile-prop=null
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Thu Sep 13 15:48:56 EST 2007
[INFO] Final Memory: 2M/4M
[INFO] ------------------------------------------------------------------------
{code}
Note how local-profile-prop and global-profile-prop no longer have values.
As has been noted the most common example of this is archetype:create which requires the remote repository to be explicitly provided on the command line via the remoteRepositories System property if you are pulling an archetype from somewhere other than central. Eg
{code}
mvn archetype:create -DgroupId=com.yarris -DartifactId=foo-project -DarchetypeGroupId=com.yarris.maven.archetype \
-DarchetypeArtifactId=archetype-standard -DremoteRepositories=http://somewhere.com.au:8080/proximity/repository/release
{code}
It should be possible to define an active Profile in either local or global settings.xml that defines a remote repository, and have the archetype pulled from that repository.
It should also be possible to refer to a property provided by an active Profile
But it occurs for any Mojo that does not require a project.
> Profiles ignored when working with non-projects (such as archetype:create)
> --------------------------------------------------------------------------
>
> Key: MNG-3099
> URL: http://jira.codehaus.org/browse/MNG-3099
> Project: Maven 2
> Issue Type: Bug
> Reporter: Joakim Erdfelt
> Assignee: John Casey
> Priority: Blocker
> Fix For: 2.1
>
> Attachments: MNG-2261-2.patch, MNG-2261.patch, Plugin-showing-MNG3099.zip
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Reopened: (MNG-2261) Profiles ignored when working with
non-projects (such as archetype:create)
Posted by "Wendy Smoak (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2261?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wendy Smoak reopened MNG-2261:
------------------------------
Reopening based on comments and ARCHETYPE-66.
> Profiles ignored when working with non-projects (such as archetype:create)
> --------------------------------------------------------------------------
>
> Key: MNG-2261
> URL: http://jira.codehaus.org/browse/MNG-2261
> Project: Maven 2
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.4
> Reporter: Joakim Erdfelt
> Assigned To: John Casey
> Priority: Blocker
> Fix For: 2.0.5
>
> Attachments: MNG-2261-2.patch, MNG-2261.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (ARCHETYPE-76) Profiles ignored when working with
non-projects (such as archetype:create)
Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/ARCHETYPE-76?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jason van Zyl updated ARCHETYPE-76:
-----------------------------------
After looking the code this is definitlely archetype specific and specific to any mojo using resolution capabilties that are not done in the same way that Maven does it. If you look up the artifact resolver, or downloader, without initializings the WagonManager then there will be no meshing of the settings.xml. I'll make a more general issue for this.
> Profiles ignored when working with non-projects (such as archetype:create)
> --------------------------------------------------------------------------
>
> Key: ARCHETYPE-76
> URL: http://jira.codehaus.org/browse/ARCHETYPE-76
> Project: Maven Archetype
> Issue Type: Bug
> Reporter: Joakim Erdfelt
> Assignee: John Casey
> Priority: Blocker
> Attachments: MNG-2261-2.patch, MNG-2261.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Moved: (ARCHETYPE-76) Profiles ignored when working with
non-projects (such as archetype:create)
Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/ARCHETYPE-76?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jason van Zyl moved MRM-411 to ARCHETYPE-76:
--------------------------------------------
Key: ARCHETYPE-76 (was: MRM-411)
Project: Maven Archetype (was: Archiva)
> Profiles ignored when working with non-projects (such as archetype:create)
> --------------------------------------------------------------------------
>
> Key: ARCHETYPE-76
> URL: http://jira.codehaus.org/browse/ARCHETYPE-76
> Project: Maven Archetype
> Issue Type: Bug
> Reporter: Joakim Erdfelt
> Assignee: John Casey
> Priority: Blocker
> Attachments: MNG-2261-2.patch, MNG-2261.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (MNG-2261) Profiles ignored when working with
non-projects (such as archetype:create)
Posted by "Joakim Erdfelt (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2261?page=all ]
Joakim Erdfelt updated MNG-2261:
--------------------------------
Attachment: MNG-2261.patch
> Profiles ignored when working with non-projects (such as archetype:create)
> --------------------------------------------------------------------------
>
> Key: MNG-2261
> URL: http://jira.codehaus.org/browse/MNG-2261
> Project: Maven 2
> Type: Bug
> Components: General
> Versions: 2.0.4
> Reporter: Joakim Erdfelt
> Attachments: MNG-2261.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Closed: (MNG-2261) Profiles ignored when working with
non-projects (such as archetype:create)
Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2261?page=all ]
John Casey closed MNG-2261:
---------------------------
Resolution: Fixed
Unit test applied to trunk that will verify that repositories and properties injected into the standalone superPOM via profile are available in the project instance.
Also, merged the changes to implementation and unit test into the 2.0.x branch, and verified that all ITs which are active still run.
> Profiles ignored when working with non-projects (such as archetype:create)
> --------------------------------------------------------------------------
>
> Key: MNG-2261
> URL: http://jira.codehaus.org/browse/MNG-2261
> Project: Maven 2
> Type: Bug
> Components: General
> Versions: 2.0.4
> Reporter: Joakim Erdfelt
> Assignee: John Casey
> Priority: Blocker
> Fix For: 2.0.5
> Attachments: MNG-2261-2.patch, MNG-2261.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (MNG-2261) Profiles ignored when working with
non-projects (such as archetype:create)
Posted by "Carlos Sanchez (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2261?page=all ]
Carlos Sanchez updated MNG-2261:
--------------------------------
Attachment: MNG-2261-2.patch
> Profiles ignored when working with non-projects (such as archetype:create)
> --------------------------------------------------------------------------
>
> Key: MNG-2261
> URL: http://jira.codehaus.org/browse/MNG-2261
> Project: Maven 2
> Type: Bug
> Components: General
> Versions: 2.0.4
> Reporter: Joakim Erdfelt
> Fix For: 2.0.5
> Attachments: MNG-2261-2.patch, MNG-2261.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (MNG-2261) Profiles ignored when working with
non-projects (such as archetype:create)
Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2261?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jason van Zyl updated MNG-2261:
-------------------------------
Fix Version/s: (was: 2.0.6)
2.0.7
> Profiles ignored when working with non-projects (such as archetype:create)
> --------------------------------------------------------------------------
>
> Key: MNG-2261
> URL: http://jira.codehaus.org/browse/MNG-2261
> Project: Maven 2
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.4
> Reporter: Joakim Erdfelt
> Assigned To: John Casey
> Priority: Blocker
> Fix For: 2.0.7
>
> Attachments: MNG-2261-2.patch, MNG-2261.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MNG-2261) Profiles ignored when working with
non-projects (such as archetype:create)
Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_98220 ]
Jason van Zyl commented on MNG-2261:
------------------------------------
The archetype problem is really something similar to the staging plugin problem where the wagons being setup aren't getting populated with repository, proxy, or authentication information from the settings.xml. Each of these plugins does it's own thing which is the problem. We need a base class for all these things to use. Or a utilitity. Making a note.
> Profiles ignored when working with non-projects (such as archetype:create)
> --------------------------------------------------------------------------
>
> Key: MNG-2261
> URL: http://jira.codehaus.org/browse/MNG-2261
> Project: Maven 2
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.4
> Reporter: Joakim Erdfelt
> Assignee: John Casey
> Priority: Blocker
> Fix For: 2.0.7
>
> Attachments: MNG-2261-2.patch, MNG-2261.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (MNG-3099) Profiles ignored when working with
non-projects (such as archetype:create)
Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-3099?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Casey closed MNG-3099.
---------------------------
Resolution: Fixed
Fix Version/s: 2.0.9
should be fixed in revIds:
618391
618393
> Profiles ignored when working with non-projects (such as archetype:create)
> --------------------------------------------------------------------------
>
> Key: MNG-3099
> URL: http://jira.codehaus.org/browse/MNG-3099
> Project: Maven 2
> Issue Type: Bug
> Reporter: Joakim Erdfelt
> Assignee: John Casey
> Priority: Blocker
> Fix For: 2.0.9, 2.1
>
> Attachments: MNG-2261-2.patch, MNG-2261.patch, Plugin-showing-MNG3099.zip
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Issue Comment Edited: (MNG-3099) Profiles ignored when
working with non-projects (such as archetype:create)
Posted by "William Ferguson (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-3099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_107214 ]
William Ferguson edited comment on MNG-3099 at 9/13/07 12:57 AM:
-----------------------------------------------------------------
Invoking a Mojo that doesn't require a project (ie *@requiresProject false* in your Mojo) doesn't load the Profiles defined in LOCAL_HOME settings or MAVEN_HOME settings.
In an effort to make this issue as explicit as possible, I have attached Plugin-showing-MNG3099.zip
It contains a plugin project (with a Mojo conigured with *@requiresProject false*) and local and global settings files.
Put the local and global settings files in the normal place and build and install the plugin.
Then from the plugin project folder execute:
{quote}
D:\Modules\maven-test-plugin>mvn com.yarris.maven.plugins:maven-test-plugin:profile-props
[INFO] Scanning for projects...
[INFO] snapshot com.yarris.maven.plugins:maven-test-plugin:1.0-SNAPSHOT: checking for updates from snapshot
[INFO] ----------------------------------------------------------------------------
[INFO] Building maven-test-plugin
[INFO] task-segment: [com.yarris.maven.plugins:maven-test-plugin:profile-props] (aggregator-style)
[INFO] ----------------------------------------------------------------------------
[INFO] [test:profile-props]
[INFO] local-profile-prop=local-profile-prop-value
[INFO] global-profile-prop=global-profile-prop-value
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Thu Sep 13 15:47:18 EST 2007
[INFO] Final Memory: 2M/4M
[INFO] ------------------------------------------------------------------------
{quote}
Note that the local-profile-prop and global-profile-prop have resolved to the expected values.
Now execute:
{quote}
D:\Modules\maven-test-plugin>mvn com.yarris.maven.plugins:maven-test-plugin:profile-props -f no-pom.xml
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [com.yarris.maven.plugins:maven-test-plugin:profile-props] (aggregator-style)
[INFO] ----------------------------------------------------------------------------
[INFO] [test:profile-props]
[INFO] local-profile-prop=null
[INFO] global-profile-prop=null
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Thu Sep 13 15:48:56 EST 2007
[INFO] Final Memory: 2M/4M
[INFO] ------------------------------------------------------------------------
{quote}
Note how local-profile-prop and global-profile-prop no longer have values.
As has been noted the most common example of this is archetype:create which requires the remote repository to be explicitly provided on the command line via the remoteRepositories System property if you are pulling an archetype from somewhere other than central. Eg
{code}
mvn archetype:create -DgroupId=com.yarris -DartifactId=foo-project -DarchetypeGroupId=com.yarris.maven.archetype \
-DarchetypeArtifactId=archetype-standard -DremoteRepositories=http://somewhere.com.au:8080/proximity/repository/release
{code}
It should be possible to define an active Profile in either local or global settings.xml that defines a remote repository, and have the archetype pulled from that repository.
It should also be possible to refer to a property provided by an active Profile
But it occurs for any Mojo that does not require a project.
was:
Invoking a Mojo that doesn't require a project (ie *@requiresProject false* in your Mojo) doesn't load the Profiles defined in LOCAL_HOME settings or MAVEN_HOME settings.
In an effort to make this issue as explicit as possible, I have attached Plugin-showing-MNG3099.zip
It contains a plugin project (with a Mojo conigured with *requiresProject false*) and local and global settings files.
Put the local and global settings files in the normal place and build and install the plugin.
Then from the plugin project folder execute:
{code}
D:\Modules\maven-test-plugin>mvn com.yarris.maven.plugins:maven-test-plugin:profile-props
[INFO] Scanning for projects...
[INFO] snapshot com.yarris.maven.plugins:maven-test-plugin:1.0-SNAPSHOT: checking for updates from snapshot
[INFO] ----------------------------------------------------------------------------
[INFO] Building maven-test-plugin
[INFO] task-segment: [com.yarris.maven.plugins:maven-test-plugin:profile-props] (aggregator-style)
[INFO] ----------------------------------------------------------------------------
[INFO] [test:profile-props]
[INFO] local-profile-prop=local-profile-prop-value
[INFO] global-profile-prop=global-profile-prop-value
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Thu Sep 13 15:47:18 EST 2007
[INFO] Final Memory: 2M/4M
[INFO] ------------------------------------------------------------------------
{code}
Note that the local-profile-prop and global-profile-prop have resolved to the expected values.
Now execute:
{code}
D:\Modules\maven-test-plugin>mvn com.yarris.maven.plugins:maven-test-plugin:profile-props -f no-pom.xml
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [com.yarris.maven.plugins:maven-test-plugin:profile-props] (aggregator-style)
[INFO] ----------------------------------------------------------------------------
[INFO] [test:profile-props]
[INFO] local-profile-prop=null
[INFO] global-profile-prop=null
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Thu Sep 13 15:48:56 EST 2007
[INFO] Final Memory: 2M/4M
[INFO] ------------------------------------------------------------------------
{code}
Note how local-profile-prop and global-profile-prop no longer have values.
As has been noted the most common example of this is archetype:create which requires the remote repository to be explicitly provided on the command line via the remoteRepositories System property if you are pulling an archetype from somewhere other than central. Eg
{code}
mvn archetype:create -DgroupId=com.yarris -DartifactId=foo-project -DarchetypeGroupId=com.yarris.maven.archetype \
-DarchetypeArtifactId=archetype-standard -DremoteRepositories=http://somewhere.com.au:8080/proximity/repository/release
{code}
It should be possible to define an active Profile in either local or global settings.xml that defines a remote repository, and have the archetype pulled from that repository.
It should also be possible to refer to a property provided by an active Profile
But it occurs for any Mojo that does not require a project.
> Profiles ignored when working with non-projects (such as archetype:create)
> --------------------------------------------------------------------------
>
> Key: MNG-3099
> URL: http://jira.codehaus.org/browse/MNG-3099
> Project: Maven 2
> Issue Type: Bug
> Reporter: Joakim Erdfelt
> Assignee: John Casey
> Priority: Blocker
> Fix For: 2.1
>
> Attachments: MNG-2261-2.patch, MNG-2261.patch, Plugin-showing-MNG3099.zip
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (MNG-3099) Profiles ignored when working with
non-projects (such as archetype:create)
Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-3099?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brett Porter updated MNG-3099:
------------------------------
Fix Version/s: (was: 2.1)
> Profiles ignored when working with non-projects (such as archetype:create)
> --------------------------------------------------------------------------
>
> Key: MNG-3099
> URL: http://jira.codehaus.org/browse/MNG-3099
> Project: Maven 2
> Issue Type: Bug
> Reporter: Joakim Erdfelt
> Assignee: John Casey
> Priority: Blocker
> Fix For: 2.0.9
>
> Attachments: MNG-2261-2.patch, MNG-2261.patch, Plugin-showing-MNG3099.zip
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (ARCHETYPE-76) Profiles ignored when working with
non-projects (such as archetype:create)
Posted by "Joakim Erdfelt (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/ARCHETYPE-76?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_98439 ]
Joakim Erdfelt commented on ARCHETYPE-76:
-----------------------------------------
This is not archetype specific.
The problem outlined here occurs for any non-project plugin that accesses the repository system.
This problem also exists in the stage:copy plugin.
> Profiles ignored when working with non-projects (such as archetype:create)
> --------------------------------------------------------------------------
>
> Key: ARCHETYPE-76
> URL: http://jira.codehaus.org/browse/ARCHETYPE-76
> Project: Maven Archetype
> Issue Type: Bug
> Reporter: Joakim Erdfelt
> Assignee: John Casey
> Priority: Blocker
> Attachments: MNG-2261-2.patch, MNG-2261.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MNG-2261) Profiles ignored when working with
non-projects (such as archetype:create)
Posted by "Jason Melnick (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_89473 ]
Jason Melnick commented on MNG-2261:
------------------------------------
This bug needs to be reopened as it still does not work
> Profiles ignored when working with non-projects (such as archetype:create)
> --------------------------------------------------------------------------
>
> Key: MNG-2261
> URL: http://jira.codehaus.org/browse/MNG-2261
> Project: Maven 2
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.4
> Reporter: Joakim Erdfelt
> Assigned To: John Casey
> Priority: Blocker
> Fix For: 2.0.5
>
> Attachments: MNG-2261-2.patch, MNG-2261.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MNG-3099) Profiles ignored when working with
non-projects (such as archetype:create)
Posted by "Joakim Erdfelt (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-3099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_101693 ]
Joakim Erdfelt commented on MNG-3099:
-------------------------------------
This is not archetype specific.
This occurs with the maven-eclipse-plugin too.
> Profiles ignored when working with non-projects (such as archetype:create)
> --------------------------------------------------------------------------
>
> Key: MNG-3099
> URL: http://jira.codehaus.org/browse/MNG-3099
> Project: Maven 2
> Issue Type: Bug
> Reporter: Joakim Erdfelt
> Assignee: John Casey
> Priority: Blocker
> Attachments: MNG-2261-2.patch, MNG-2261.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (MNG-2261) Profiles ignored when working with
non-projects (such as archetype:create)
Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2261?page=all ]
Brett Porter updated MNG-2261:
------------------------------
Priority: Blocker (was: Major)
> Profiles ignored when working with non-projects (such as archetype:create)
> --------------------------------------------------------------------------
>
> Key: MNG-2261
> URL: http://jira.codehaus.org/browse/MNG-2261
> Project: Maven 2
> Type: Bug
> Components: General
> Versions: 2.0.4
> Reporter: Joakim Erdfelt
> Priority: Blocker
> Fix For: 2.0.5
> Attachments: MNG-2261-2.patch, MNG-2261.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (MNG-2261) Profiles ignored when working with
non-projects (such as archetype:create)
Posted by "Wendy Smoak (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_90033 ]
Wendy Smoak commented on MNG-2261:
----------------------------------
Workaround: mvn ... -f /path/to/simple.pom
and "simple.pom" contains the following:
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>MNG-2261-workaround</artifactId>
<packaging>pom</packaging>
<version>1</version>
</project>
If there is "a project" involved, Maven will use the profiles and repositories in settings.xml
For archetype:create, you don't want a pom.xml in the current directory or the plugin will add a <module> to it and hook it up as the newly created project's parent, so use the -f switch to point it at a file somewhere else.
For other things such as deploy:deploy-file, having a pom.xml file in the current directory works fine. (If you're actually deploying a pom with -DpomFile=..., then name that one something else, or just use -f as above.)
Related thread: http://www.nabble.com/Maven-ignoring-Artifactory-proxy-settings--t3397576s177.html
> Profiles ignored when working with non-projects (such as archetype:create)
> --------------------------------------------------------------------------
>
> Key: MNG-2261
> URL: http://jira.codehaus.org/browse/MNG-2261
> Project: Maven 2
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.4
> Reporter: Joakim Erdfelt
> Assigned To: John Casey
> Priority: Blocker
> Fix For: 2.0.6
>
> Attachments: MNG-2261-2.patch, MNG-2261.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MNG-3099) Profiles ignored when working with
non-projects (such as archetype:create)
Posted by "Joakim Erdfelt (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-3099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_101694 ]
Joakim Erdfelt commented on MNG-3099:
-------------------------------------
When working in limited environments, NONE of the $HOME/conf/settings.xml or the $HOME/.m2/settings.xml values are merged.
This is important when working with custom repositories for example.
> Profiles ignored when working with non-projects (such as archetype:create)
> --------------------------------------------------------------------------
>
> Key: MNG-3099
> URL: http://jira.codehaus.org/browse/MNG-3099
> Project: Maven 2
> Issue Type: Bug
> Reporter: Joakim Erdfelt
> Assignee: John Casey
> Priority: Blocker
> Attachments: MNG-2261-2.patch, MNG-2261.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira