# Publish a library to Maven without project compile dependencies

**URL:** <https://discuss.gradle.org/t/publish-a-library-to-maven-without-project-compile-dependencies/30404>\
**Category:** Help/Discuss\
**Created:** [February 1, 2019, 1:31am UTC](https://discuss.gradle.org/t/publish-a-library-to-maven-without-project-compile-dependencies/30404 "2019-02-01T01:31:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![karolz-ms](https://avatars.discourse-cdn.com/v4/letter/k/ee7513/32.png) [@karolz-ms](https://discuss.gradle.org/u/karolz-ms)\
**Post date:** [February 1, 2019, 1:31am UTC](https://discuss.gradle.org/t/publish-a-library-to-maven-without-project-compile-dependencies/30404/1 "2019-02-01T01:31:41Z")

</div>

I have a `java-library` library project that has compile-time dependency on a couple other libraries:

```gradle
dependencies {
  compile project(':other-library')
  ...
}

```

Each library has a Maven publication defined in `build.gradle` (via `maven-publish` plugin). When I publish my library (`gradle publish`), all dependencies are published as well. I would like to have a way to publish just the root project library. How can I do this?
