Error Reading Settings.xml
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Maven command to determine which settings.xml file Maven is using up vote 138 down vote favorite 38 How do I use maven command line to determine which settings.xml file Maven is picking up? maven-2 command-line settings share|improve this question edited Mar 27 '15 at 14:18 Ciro Santilli 烏坎事件2016六四事件 法轮功 52.2k10222166 asked Aug 11 '09 at 15:43 harschware 4,965113964 add a comment| 6 Answers 6 active oldest votes up vote 167 down vote accepted Start maven with -X option (debug) and examine the beginning of the output. There should be something like this: ... [INFO] Error stacktraces are turned on. [DEBUG] Reading global settings from c:\....\apache-maven-3.0.3\conf\settings.xml [DEBUG] Reading user settings from c:\....\.m2\settings.xml [DEBUG] Using local repository at C:\....\repository ... (Original directory names are removed by me) share|improve this answer answered May 10 '12 at 7:18 elek 1,896195 4 Perhaps this wasn't in the debug output until maven 3 was released, but your post some 2.5 years later is finally the exact answer I was looking for (sorry for the 6 month delay in noticing it). –harschware Nov 12 '12 at 17:25 add a comment| up vote 121 down vote Your comment to cletus' (correct) answer implies that there are multiple Maven settings files involved. Maven always uses either one or two settings files. The global settings defined in (${M2_HOME}/conf/settings.xml) is always required. The user settings file (defined in ${user.home}/.m2/settings.xml) is optional. Any settings defined in the user settings take precedence over the corresponding global settings. You can override the location of the global and user settings from the command line, the following example will set the global settings to c:\global\settings.xml and the user settings to c:\user\settings.xml: mvn install --settings c:\user\settings.xml --global-settings c:\global\settings.xml Currently there is no property or means to establish what user and global settings files were used
This Site Careers Other all forums Forum: Ant, Maven and Other Build Tools Error reading settings.xml: Error reading settings file Niceguyi Damodharan Greenhorn Posts: 2 I like... posted 8 years ago Maven 2.0.9 is installed in my system since 3 months past and I had http://stackoverflow.com/questions/1261215/maven-command-to-determine-which-settings-xml-file-maven-is-using used for building many projects. When I try to run 'mvn package' today, I m getting following error... Error reading settings.xml: Error reading settings file Someone please help me out in this regards. Anadi Misra Ranch Hand Posts: https://coderanch.com/t/109227/tools/Error-reading-settings-xml-Error 69 posted 8 years ago Hi, please provide the settings.xml Anadi Mishra. Niceguyi Damodharan Greenhorn Posts: 2 I like... posted 8 years ago I have attached the settings.xml content below..
it, so I simplified it and I still get an error. If I add the java plugin, it'll run but https://discuss.gradle.org/t/error-reading-settings-file-while-trying-simple-project-with-maven-plugin/2301 it'll also take over package type which I need to be "pom". Here's the error: jryan:parent$ ../gradlew uploadArchives :uploadArchives [ant:null] Error reading settings file '/var/folders/44/lyp59ywhj4l0hbn2q633q0ww0009sb/T/gradle_empty_settings8855699673800409157.xml' - ignoring. Error was: /var/folders/44/lyp59ywhj4l0hbn2q633q0ww0009sb/T/gradle_empty_settings8855699673800409157.xml (No https://maven.apache.org/settings.html such file or directory) My project build.gradle is below and it's very similar the the documentation examples: apply plugin: 'maven' uploadArchives { repositories.mavenDeployer { repository(url: "file://localhost/${rootProject.rootDir}/repo") } } I'm also error reading finding that this simple use of the maven plugin does not add the "install" task, like it used it and as it is specified in the documentation. I'm using m8. Peter_Niederwieser (Peter Niederwieser) 2012-02-17 23:15:00 UTC #2 Please provide the output of 'gradlew -v' and 'gradlew -s uploadArchives'. The Maven plugin only adds an 'install' task for projects that have the Java error reading settings.xml plugin applied. Gradle can't currently help you much with creating a parent POM. I'd consider creating it by hand (or with Groovy scripting means) and adding it to the 'archives' configuration for publication. quidryan (Justin Ryan) 2012-02-18 00:02:00 UTC #3 Thanks. I can see how MavenPlugin only adds the install task to projects with the Java plugin, not exactly intuitive. Just creating the POM by hand probably is the best way, thanks again. Oh by the way, here's the output from -v and -s uploadArchives (note, no stack trace is shown) ------------------------------------------------------------ Gradle 1.0-milestone-8 ------------------------------------------------------------ Gradle build time: Monday, February 13, 2012 11:53:32 PM UTC Groovy: 1.8.4 Ant: Apache Ant(TM) version 1.8.2 compiled on December 20 2010 Ivy: 2.2.0 JVM: 1.6.0_29 (Apple Inc. 20.4-b02-402) OS: Mac OS X 10.7.2 x86_64 lgmac-jryan2:curator-parent jryan$ ../gradlew -b error.gradle -s uploadArchives :uploadArchives [ant:null] Error reading settings file '/var/folders/44/lyp59ywhj4l0hbn2q633q0ww0009sb/T/gradle_empty_settings8030818672837693956.xml' - ignoring. Error was: /var/folders/44/lyp59ywhj4l0hbn2q633q0ww0009sb/T/gradle_empty_settings8030818672837693956.xml (No such file or directory) BUILD SUCCESSFUL Total time: 2.366 secs yennick_trevels (Yennick Trevels) 2012-06-11 21:00:00 UTC #4 Hi, I'm getting the exact same error with Gradle RC3. gradlew -v: ------------------------------------------------------------ Gradle 1.0-r
Maven User Centre Maven in 5 Minutes Getting Started Guide Getting Help Settings Reference POM Reference Plugin Developer Centre Maven Repository Centre Maven Developer Centre Books and Resources Security Community Community Overview How to Contribute Maven Repository Getting Help Issue Tracking Source Repository The Maven Team Project Documentation Project Information Maven Projects Archetype Doxia JXR Maven Parent POMs Plugins Plugin Testing Plugin Tools Resource Bundles SCM Shared Components Skins Surefire Wagon ASF How Apache Works Foundation Sponsoring Apache Thanks Settings Reference Introduction Quick Overview Settings Details Simple Values Plugin Groups Servers Password Encryption Mirrors Proxies Profiles Activation Repositories Plugin Repositories Active Profiles Introduction Quick Overview The settings element in the settings.xml file contains elements used to define values which configure Maven execution in various ways, like the pom.xml, but should not be bundled to any specific project, or distributed to an audience. These include values such as the local repository location, alternate remote repository servers, and authentication information. There are two locations where a settings.xml file may live: The Maven install: ${maven.home}/conf/settings.xml A user’s install: ${user.home}/.m2/settings.xml The former settings.xml are also called global settings, the latter settings.xml are referred to as user settings. If both files exists, their contents gets merged, with the user-specific settings.xml being dominant. Tip: If you need to create user-specific settings from scratch, it’s easiest to copy the global settings from your Maven installation to your ${user.home}/.m2 directory. Maven’s default settings.xml is a template with comments and examples so you can quickly tweak it to match your needs. Here is an overview of the top elements under settings: