Skip to content

Smarter loading of resources from WebJars #633

Description

@armanbilge

Some good ideas from @valencik in #628 (comment):

@armanbilge how bad would it be to read the pom.properties at build time? Something like this:

def webjarVersion(artifactId: String): String = {
  val propsPath = s"/META-INF/maven/org.webjars.npm/$artifactId/pom.properties"
  val props = java.util.Properties()
  props.load(classOf[Main.type].getResourceAsStream(propsPath))
  props.getProperty("version")
}

I get that Scala Steward is smart enough to bump both versions, but I never am when manually doing/testing things.

Actually, more so than just versioning, we could have a little helper class for loading resources from webjars

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions