Skip to content

Commit

Permalink
Merge pull request #769 from Dwolla/issue-768
Browse files Browse the repository at this point in the history
use the same base classpath for empty packages as is used for normal packages
  • Loading branch information
SethTisue committed Jul 10, 2023
2 parents 293acf4 + cc299fc commit 7662b5a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ final class MiMaLib(cp: Seq[File], log: Logging = ConsoleLogging) {

private def createEmptyPackage(missingDirOrJar: File): PackageInfo = {
log.debug(s"not a directory or jar file: $missingDirOrJar. This is normal for POM-only modules. Proceeding with empty set of packages.")
val defs = new Definitions(ClassPath.base)
val defs = new Definitions(classpath)
new DefinitionsTargetPackageInfo(defs.root)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
organization := "com.typesafe"
name := "pom-only-project"
version := "1.1.0"
mimaPreviousArtifacts := Set(organization.value %% moduleName.value % "1.0.0")
scalaVersion := "2.13.11"

// this is an arbitrary dependency, but one that's known to cause issues in POM-only projects
// see https://github.com/lightbend/mima/issues/768 for more context
libraryDependencies += "com.twitter" %% "util-core" % "22.7.0"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % System.getProperty("plugin.version"))
6 changes: 6 additions & 0 deletions sbtplugin/src/sbt-test/sbt-mima-plugin/pom-only-project/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
> set version := "1.0.0"
> publishLocal

> reload

> mimaReportBinaryIssues

0 comments on commit 7662b5a

Please sign in to comment.