Monday, May 29, 2017

MAVEN Repository

Maven repository are of 3 types

  • Local repository
  • Central repository
  • Remote repository

Local repository

Local repository is the location in your machine where all your dependencies (jars, plugins etc..)will be downloaded when ever we first run the maven command.
It is created automatically.

maven-> config-> setting.xml

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <localRepository>D:\local_repo</localRepository>
</settings>

You have to mention the path in localRepository.

If this is not done then it will create the .m folder at default location.

Central repository

Maven central repository is provided by the maven community, it consist of the all dependencies. when ever dependencies not exit in the local it search in central repository. it does not required any configuration only internet access is required.

Remote repository

Remote Repository  is developer's own custom repository containing required libraries or other project jars.

No comments:

Post a Comment