Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Local Artifactory & Nexus sbt setup
def buildTimestampSuffix = ";build.timestamp=" + new java.util.Date().getTime
val localArtifactoryRelease = "local-artifactory-release" at "http://localhost:8081/artifactory/libs-release"
val localArtifactorySnapshot = "local-artifactory-snapshot" at "http://localhost:8081/artifactory/libs-snapshot"
val localArtifactoryReleaseLocal = "local-artifactory-release-local" at "http://localhost:8081/artifactory/libs-release-local"
def localArtifactorySnapshotLocal = "local-artifactory-snapshot-local" at "http://localhost:8081/artifactory/libs-snapshot-local" + buildTimestampSuffix
val localArtifactoryCreds = Credentials("Artifactory Realm", "localhost", "admin", "password")
// credentials += localArtifactoryCreds
// publishTo := Some(if (isSnapshot.value) localArtifactorySnapshotLocal else localArtifactoryReleaseLocal)
val localNexusReleases = "local-nexus-releases" at "http://localhost:8081/nexus/content/repositories/releases"
val localNexusSnapshots = "local-nexus-snapshots" at "http://localhost:8081/nexus/content/repositories/snapshots"
val localNexusCreds = Credentials("Sonatype Nexus Repository Manager", "localhost", "admin", "admin123")
// resolvers += localNexusSnapshots
// credentials += localNexusCreds
// publishTo := Some(if (isSnapshot.value) localNexusSnapshots else localNexusReleases)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment