Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven Central Google mirror settings.xml for App Engine

Google has just announced the availability of Maven Central mirror (article)

I have a Google App Engine Maven Java project and I already use Jenkins on Google Compute Engine to build and deploy my project.

Where should I put the settings.xml file in my project? Aside the pom.xml, in WEB-INF?

like image 495
Freddy Boucher Avatar asked Dec 14 '25 08:12

Freddy Boucher


1 Answers

The settings.xml file does not belong in your project. This is a private file that is kept on the filesystem and is not version-controled. When adding a mirror inside the settings, there is no reason for the POM to be modified.

There are two locations for the Maven settings:

  • The Maven install: $M2_HOME/conf/settings.xml.
  • A user's install: ${user.home}/.m2/settings.xml

The former settings.xml is called global settings (since it resides inside the Maven installation itself), while the latter is referred to as user settings. If both files exists, their contents gets merged, with the user-specific settings.xml being dominant.

I would suggest that you put this information inside your user settings, so as not to modify your Maven installation.

like image 66
Tunaki Avatar answered Dec 16 '25 22:12

Tunaki



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!