Is there anyway开发者_开发问答 to use a maven plugin on SBT?
No. sbt does support pom.xml in limited way via sbt-pom-reader, but we do not support the use of maven plugins. It has its own plugin ecosystem, so maybe you could find similar one that does the job.
If you need to pull in Maven plugin as a library, you would need this setting:
classpathTypes += "maven-plugin"
A maven plugin is a jar
file, but with packaging maven-plugin
, not jar
as it would be usual. But, apparently, SBT does not like it or does not find it, for some reason. Try forcing the URL, like this:
libraryDependencies ++=
Seq (
"com.example" % "myartifact" % "1.59" from
"http://server:8081/artifactory/plugins-release-local/" +
"com/example/myartifact/1.59/myartifact-1.59.jar" )
From my experience, classpathTypes += "maven-plugin"
seems not to be necessary but I guess it might be in case the resource you are downloading is not a .jar
or other file extensions SBT knows that should participate in the CLASSPATH.
精彩评论