[ http://jira.codehaus.org/browse/MNG-3235?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benjamin Bentmann closed MNG-3235. ---------------------------------- Resolution: Duplicate Fix Version/s: (was: 3.0-beta-1) Assignee: Benjamin Bentmann > Profiles in settings.xml not loaded when running maven without a POM > -------------------------------------------------------------------- > > Key: MNG-3235 > URL: http://jira.codehaus.org/browse/MNG-3235 > Project: Maven 2 & 3 > Issue Type: Bug > Components: Settings > Affects Versions: 2.0.7 > Reporter: Duncan Doyle > Assignee: Benjamin Bentmann > > I've created a custom Maven2 plugin for our SCM system (CA Harvest). This > plugin is deployed in our internal remote repository. This remote repository > is configured as a pluginRepository in my 'settings.xml ' file. The <profile> > in which this repository is configured is loaded using the <activeProfiles> > section. The plugin's groupId ('org.test.tools.maven.harvest') has been > specified in the <pluginGroups> section in my 'settings.xml' file. > The plugin's 'checkout' goal needs to be executed from the commandline > without a POM (because the project's POM is in the SCM system). When I > execute the command 'mvn harvest:checkout' I get the following output: > [INFO] Scanning for projects... > [INFO] Searching repository for plugin with prefix: 'harvest'. > [INFO] org.test.tools.maven.harvest: checking for updates from central > Returning NULL > [INFO] org.apache.maven.plugins : checking for updates from central > [INFO] org.codehaus.mojo: checking for updates from central > [INFO] artifact org.apache.maven.plugins:maven-harvest-plugin: checking for > updates from central > [INFO] > ------------------------------------------------------------------------ > [ERROR] BUILD ERROR > [INFO] > ------------------------------------------------------------------------ > [INFO] The plugin 'org.apache.maven.plugins:maven-harvest-plugin' does not > exist or no valid version could be found > [INFO] > ------------------------------------------------------------------------ > [INFO] For more information, run Maven with the -e switch > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 1 second > [INFO] Finished at: Wed Oct 10 15:27:54 CEST 2007 > [INFO] Final Memory: 3M/6M > [INFO] > ------------------------------------------------------------------------ > It looks to me that only the 'central' repository is scanned for the plugin, > although I have correctly specified my internal remote repository in the > <profile> section of my ' settings.xml' file. Furthermore, when I specify my > internal remote repository as a mirrorOf 'central' the plugin is found. So, > it looks like maven doesn't scan my internal remote repository for the needed > plugin when the repository is specified as a pluginRepository in my ' > settings.xml' file. > The plugin can be used when it is specified in the build section of a POM > (which is done to be able to run the harvest:update goal on a project to > update the sources from the SCM), which to me indicates that my configuration > is correct. It just doesn't look for the plugin when the maven command is > issued without a POM. > What to me indicates that it is a profile problem is the fact that when I > specify my internal remote repo as a mirrorOf central, it can find my custom > plugin, but it can't find other needed jars from central. When I then disable > the mirror section, all the jars from central are loaded, but the build fails > on a custom jar (the SCM utility jar) which is present in another local > remote repo (my third-party repo) which is also defined in my profile. > When using mvn commands on a POM, my configuration (including my profile > settings) works as expected. > I have tried to explicitly enable the needed profile using the -P option, but > that doesn't work either. -- 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