The Maven2 settings.xml file to my understanding is looked for in two places:
- Under the conf folder in your Maven2 installation directory - In the user home directory under .m2/ I do not think that a settings.xml file needs to present at all. The Maven2 conf folder has a default settings.xml file. I never tried to remove that. Andreas -----Original Message----- From: Feniks Nator [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 05, 2006 12:18 AM To: continuum-users@maven.apache.org Subject: continuum and settings.xml Hello, I'd like to know how continuum (possibly maven) detect it's settings.xml. As I understand continuum prints out the location of settings.xml. This comes from our log file: INFO | jvm 1 | 2006/09/05 08:54:34 | 2006-09-05 08:54:34,033 [WrapperSimpleAppMain] DEBUG MavenSettingsBuilder - Building Maven global-level settings from: 'D:\javadev\tools\continuum\continuum- 1.0.3\bin\win32\conf\settings.xml' INFO | jvm 1 | 2006/09/05 08:54:34 | 2006-09-05 08:54:34,033 [WrapperSimpleAppMain] DEBUG MavenSettingsBuilder - Building Maven user-level settings from: 'C:\Documents and Settings\continuum\.m2\settings.xml' If the files are present or not, these lines arein the log files. Because I had some trouble I tried out following combinations: Location of settings.xml %MAVEN_HOME%\conf %CONTINUUM_HOME%\bin\win32\conf (1) not present not present (2) not present present (3) present not present (4) present present 1,2 and 3 result in errors. 4 does not. So it seems the the settings.xmlfile must be present at both locations...? The errors (part of) are listed below. For your info: there is one master project, containing several modules. The modules have the master as parent POM, the master uses a company wide parent POM. The local repository is empty, this is tested with a clean installation of maven/continuum. (1) No settings.xml specified. Continuum Error Cannot build maven project from s:\TEMP\system\continuum\viewcvs\checkout\myproject\master\pom.xml (Cannot find parent: mycompany.common:common-masterpom for project: mycompany.myproject:myproject-master:pom:2.5-SNAPSHOT). INFO | jvm 1 | 2006/09/01 15:47:17 | 2006-09-01 15:47:17,345 [WrapperSimpleAppMain] DEBUG MavenSettingsBuilder - Building Maven global-level settings from: 'D:\javadev\tools\continuum\continuum- 1.0.3\bin\win32\conf\settings.xml' INFO | jvm 1 | 2006/09/01 15:47:17 | 2006-09-01 15:47:17,345 [WrapperSimpleAppMain] DEBUG MavenSettingsBuilder - Building Maven user-level settings from: 'C:\Documents and Settings\continuum\.m2\settings.xml' INFO | jvm 1 | 2006/09/01 15:51:55 | 2006-09-01 15:51:55,704 [SocketListener0-1] ERROR MavenBuilderHelper - Cannot build maven project from s:\TEMP\system\continuum\viewcvs\checkout\myproject\master\pom.xml (Cannot find parent: mycompany.common:common-masterpom for project: mycompany.myproject:myproject-master:pom:2.5-SNAPSHOT). INFO | jvm 1 | 2006/09/01 15:51:55 | INFO | jvm 1 | 2006/09/01 15:51:55 | org.apache.maven.project.ProjectBuildingException: Cannot find parent: mycompany.common:common-masterpom for project: mycompany.myproject:myproject-master:pom:2.5-SNAPSHOT INFO | jvm 1 | 2006/09/01 15:51:55 | at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage( DefaultMavenProjectBuilder.java:1161) INFO | jvm 1 | 2006/09/01 15:51:55 | at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal( DefaultMavenProjectBuilder.java:674) INFO | jvm 1 | 2006/09/01 15:51:55 | at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileI nternal (DefaultMavenProjectBuilder.java:416) INFO | jvm 1 | 2006/09/01 15:51:55 | at org.apache.maven.project.DefaultMavenProjectBuilder.build( DefaultMavenProjectBuilder.java:201) INFO | jvm 1 | 2006/09/01 15:51:55 | at org.apache.maven.continuum.execution.maven.m2.DefaultMavenBuilderHelper. getMavenProject (DefaultMavenBuilderHelper.java:306) INFO | jvm 1 | 2006/09/01 15:51:55 | at org.apache.maven.continuum.project.builder.maven.MavenTwoContinuumProjec tBuilder.readModules (MavenTwoContinuumProjectBuilder.java:99) INFO | jvm 1 | 2006/09/01 15:51:55 | Caused by: org.apache.maven.project.ProjectBuildingException: Error getting POM for ' mycompany.common:common-masterpom' from the repository: Error transferring file INFO | jvm 1 | 2006/09/01 15:51:55 | mycompany.common:common-masterpom:pom:1.0.0 INFO | jvm 1 | 2006/09/01 15:51:55 | INFO | jvm 1 | 2006/09/01 15:51:55 | from the specified remote repositories: INFO | jvm 1 | 2006/09/01 15:51:55 | central ( http://repo1.maven.org/maven2) <-- I think this is normal, default maven settings when nothing else specified. (2) settings.xml present in %CONTINUUM_HOME%\bin\win32\conf I this case adding the master project results in all projects being added to continuum. However the master project can not be built because the parent POM is not found. Apparently the settings from settings.xml are not taken into account. Our settings.xml overrides central so that our projects go to our internal (company) repository. But continuum seems to go to repo1.maven.org Error: INFO | jvm 1 | 2006/09/01 16:06:02 | [INFO] Scanning for projects... INFO | jvm 1 | 2006/09/01 16:06:02 | Downloading: http://repo1.maven.org /maven2/mycompany/common/common-masterpom/1.0.0/common-masterpom-1.0.0.p om INFO | jvm 1 | 2006/09/01 16:06:02 | [INFO] ------------------------------------------------------------------------ INFO | jvm 1 | 2006/09/01 16:06:02 | [ERROR] FATAL ERROR INFO | jvm 1 | 2006/09/01 16:06:02 | [INFO] ------------------------------------------------------------------------ INFO | jvm 1 | 2006/09/01 16:06:02 | [INFO] Error building POM (may not be this project's POM). INFO | jvm 1 | 2006/09/01 16:06:02 | INFO | jvm 1 | 2006/09/01 16:06:02 | INFO | jvm 1 | 2006/09/01 16:06:02 | Project ID: mycompany.myproject:myproject-master:pom:2.5-SNAPSHOT INFO | jvm 1 | 2006/09/01 16:06:02 | INFO | jvm 1 | 2006/09/01 16:06:02 | Reason: Cannot find parent: mycompany.common:common-masterpom for project: mycompany.myproject:myproject-master:pom:2.5-SNAPSHOT INFO | jvm 1 | 2006/09/01 16:06:02 | INFO | jvm 1 | 2006/09/01 16:06:02 | INFO | jvm 1 | 2006/09/01 16:06:02 | [INFO] ------------------------------------------------------------------------ INFO | jvm 1 | 2006/09/01 16:06:02 | [INFO] Trace INFO | jvm 1 | 2006/09/01 16:06:02 | org.apache.maven.reactor.MavenExecutionException: Cannot find parent: mycompany.common:common-masterpom for project: mycompany.myproject:myproject-master:pom:2.5-SNAPSHOT INFO | jvm 1 | 2006/09/01 16:06:02 | at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:365) (3) settings.xml only present in %MAVEN_HOME%\conf I think in this case the modules were not added to continuum. INFO | jvm 1 | 2006/09/01 16:23:37 | 2006-09-01 16:23:37,345 [SocketListener0-0] ERROR MavenBuilderHelper - Cannot build maven project from s:\TEMP\system\continuum\viewcvs\checkout\myproject\master\pom.xml (Cannot find parent: mycompany.common:common-masterpom for project: mycompany.myproject:myproject-master:pom:2.5-SNAPSHOT). INFO | jvm 1 | 2006/09/01 16:23:37 | INFO | jvm 1 | 2006/09/01 16:23:37 | org.apache.maven.project.ProjectBuildingException: Cannot find parent: mycompany.common:common-masterpom for project: mycompany.myproject:myproject-master:pom:2.5-SNAPSHOT INFO | jvm 1 | 2006/09/01 16:23:37 | at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage( DefaultMavenProjectBuilder.java:1161) INFO | jvm 1 | 2006/09/01 16:23:37 | at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal( DefaultMavenProjectBuilder.java:674) INFO | jvm 1 | 2006/09/01 16:23:37 | at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileI nternal (DefaultMavenProjectBuilder.java:416) INFO | jvm 1 | 2006/09/01 16:23:37 | at org.apache.maven.project.DefaultMavenProjectBuilder.build( DefaultMavenProjectBuilder.java:201) (4) settings.xml present in both locations. Adding the master project works fine, all modules are also added, our internal repository is used. Conclusion: settings.xml (the same) must be present at both locations: %MAVEN_HOME%\conf and %CONTINUUM_HOME%\bin\win32\conf ?? Anyone who can explain/confirm this? Thanks