Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Included feature publishM2 #1113

Merged
merged 4 commits into from
Apr 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,5 @@ cache:
apt: true
directories:
- $HOME/.sbt
- $HOME/.m2
- $HOME/.ivy2
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,15 @@ object SettingsHelper {
checksums = checksums.value,
logging = UpdateLogging.DownloadOnly,
overwrite = isSnapshot.value
)
),
publishM2Configuration := new PublishConfiguration(
ivyFile = None,
resolverName = Resolver.mavenLocal.name,
artifacts = packagedArtifacts.value,
checksums = checksums.value,
logging = UpdateLogging.DownloadOnly,
overwrite = isSnapshot.value
)
)
) ++ addPackage(config, packageTask, extension, classifier) ++ addResolver(config)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ object SettingsHelper {
.withArtifacts(packagedArtifacts.value.toVector)
.withChecksums(checksums.value.toVector)
.withOverwrite(isSnapshot.value)
.withLogging(UpdateLogging.DownloadOnly),
publishM2Configuration := PublishConfiguration()
.withResolverName(Resolver.mavenLocal.name)
.withArtifacts(packagedArtifacts.value.toVector)
.withChecksums(checksums.value.toVector)
.withOverwrite(isSnapshot.value)
.withLogging(UpdateLogging.DownloadOnly)
)
) ++ addPackage(config, packageTask, extension, classifier) ++ addResolver(config)
Expand Down
4 changes: 4 additions & 0 deletions src/sbt-test/universal/publish/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,9 @@ lazy val testResolver =

// Workaround for ivy configuration bug
resolvers += testResolver
resolvers += Resolver.mavenLocal

// Workaround for overwriting packages at .m2 directory
isSnapshot in ThisBuild := true

publishTo in Universal := Some(testResolver)
4 changes: 3 additions & 1 deletion src/sbt-test/universal/publish/test
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Ensure we can publish to local file system.
> universal:publish
# Ensure isSnpashot works correctly
> universal:publish
> universal:publish
# Ensure we can publish to local maven repository.
> universal:publishM2