rokpoto.com
rokpoto.com

Reputation: 10766

Meaning of id tag in repository tag in pom.xml

Does repository identified by id have to exist at repository manager (Artifactory) or specifying correct url is enough?

<pluginRepositories>
<pluginRepository>
  <id>id</id>
  <name>name</name>
  <url>repo_mgr_url/repo_name</name>
</pluginRepository>
</pluginRepositories>

Maven build fails and from error i understood that plugin hasn't been found in repository identified by id. I checked and found that indeed such repository doesn't exist in repository manager. I changed the id to some existing repository id and issue resolved. But didn't modify the url tag.

So, wonder what's the meaning of id if url hasn't changed? Searched in maven documentation to no avail.

Upvotes: 0

Views: 1027

Answers (1)

J Fabian Meier
J Fabian Meier

Reputation: 35823

The id field can be anything. It has no meaning in the resolving the artifact.

You probably had some caching issue which caused a fail first and then it worked.

Upvotes: 2

Related Questions