# maven

fun ERROR CLASS: Symbol not found for RepositoryHandler.maven(url: Any): ERROR CLASS: Ambiguity: maven, [org/gradle/kotlin/dsl/maven, org/gradle/kotlin/dsl/maven](source)

Adds and configures a Maven repository.

The provided url value is evaluated as per org.gradle.api.Project.uri. This means, for example, you can pass in a `File` object, or a relative path to be evaluated relative to the project directory.

#### Return

The added repository.

#### Parameters

url

the base URL of this repository. This URL is used to find both POMs and artifact files.

#### See also

RepositoryHandler.maven
MavenArtifactRepository.setUrl

fun ERROR CLASS: Symbol not found for RepositoryHandler.maven(url: Any, action: ERROR CLASS: Symbol not found for MavenArtifactRepository.() -> Unit): ERROR CLASS: Ambiguity: maven, [org/gradle/kotlin/dsl/maven, org/gradle/kotlin/dsl/maven](source)

Adds and configures a Maven repository.

The provided url value is evaluated as per org.gradle.api.Project.uri. This means, for example, you can pass in a `File` object, or a relative path to be evaluated relative to the project directory.

#### Return

The added repository.

#### Parameters

url

The base URL of this repository. This URL is used to find both POMs and artifact files.

action

The action to use to configure the repository.

#### See also

RepositoryHandler.maven
MavenArtifactRepository.setUrl