Comments (6)
Hi @dunnololda Sorry for the inconvenient. The plugin is still young, and may have some bugs.
About your situation, you can type show library-dependencies
on sbt console to see if the correct
dependencies are imported. If not, maybe there're some bugs in the plugin, and please tell me which artifact is wrong if allowed.
Thanks.
from sbt-maven-plugin.
Hi shivawu!
Ok, here is one of my maven projects I test your plugin on:
https://github.com/dunnololda/scala-cli
You can clone it and do the same things.
Here is what I doing:
In scala-cli folder I create the folder project:
$ mkdir project
$ cd project
Then I create plugins.sbt file in it and add the plugin definition to this file:
$ cat project/plugins.sbt
addSbtPlugin("com.github.shivawu" % "sbt-maven-plugin" % "0.1.0")
Then here is the sbt output:
$ sbt
[info] Loading project definition from /home/andrey/java/workspace-scala/scala-cli/project
[info] Loading [pom.xml]
[success] POM definition loaded
[info] Set current project to default-36153a (in build file:/home/andrey/java/workspace-scala/scala-cli/)
show library-dependencies
[info] List(org.scala-lang:scala-library:2.9.2)
compile
[info] Compiling 5 Scala sources to /home/andrey/java/workspace-scala/scala-cli/target/scala-2.9.2/classes...
[error] /home/andrey/java/workspace-scala/scala-cli/src/main/scala/com/github/dunnololda/cli/MySimpleLogger.scala:3: object slf4j is not a member of package org
[error] import org.slf4j.LoggerFactory
[error] ^
[error] one error found
error Compilation failed
[error] Total time: 4 s, completed 10.04.2013 13:11:41
So where are all the dependencies?) Sbt version: 0.12.3
from sbt-maven-plugin.
I've fixed the bug(it's very stupid, shame on me) and released another version.
However, there're some other problems in your project, like your artifact id has properties in it, which is not considered yet by this plugin right now.
I'll fix this maybe tomorrow, there're still some testing work to do.
from sbt-maven-plugin.
However, there're some other problems in your project, like your artifact id has properties in it, which is not considered yet by this plugin right now.
In my another project where artifactId has no properties included, version 0.1.1 works fine (compilation works). Although, "show library-dependencies" shows only scala:
show library-dependencies
[info] List(org.scala-lang:scala-library:2.9.2)
Is it correct? In my dependencies list I also have casbah, akka and serveral other libraries.
In scala-cli sbt fails to start:
$ sbt
[info] Loading project definition from /home/andrey/java/workspace-scala/scala-cli/project
[info] Loading [pom.xml]
[info] Use pom.xml automatically
[info] Loading maven settings from /home/andrey/.m2/settings.xml
[error] sbt.IncompatiblePluginsException: Binary incompatibility in plugins detected.
[error] Use 'last' for the full log.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
Is it because of artifactId with properties? If you can fix it pls do, as this way to compile scala libraries for many scala versions is very convenient (and compatible with sbt's %%).
from sbt-maven-plugin.
- I tried some of your projects and they all worked ok(except for one, which maven doesn't succeed to compile), and
show library-dependencies
on each project works ok. If it only shows scala-library, there're definitely some problems, but I didn't manage to reproduce it, maybe cause I'm using my current snapshot version. - About the properties in artifact, if you type
l
when the error occurs, you can see that's the reason. And yes, it can be fixed, but now I only come up with a workaround, with the limitation of that it can only resolve properties WITHOUT inheritance. If you define your property in the parent pom, it will not be resolved.
Maven will give a warning about property in artifact id, so it's not supposed to use that way. And, with this plugin, you don't need the scala version in the artifact id, you can just setcrossScalaVersions
in build.sbt, and sbt will do that for you, I think that's the correct way to archive this. - You can try my snapshot version(0.1.2-SNAPSHOT) by now(add sonatype snapshot repository to your pom.xml), the relase version will be released in 1-2 days.
from sbt-maven-plugin.
@dunnololda I've released a 0.1.2, try it out!
from sbt-maven-plugin.
Related Issues (16)
- Maven goals HOT 1
- multi-module usage? HOT 1
- Does this plugin support Maven plugin, maven-shade-plugin for example
- pom reference is relative, cannot load a pom within emacs+ensime HOT 1
- allow global plugin setting?
- Release for Scala 2.10/2.11
- Question, shouldn't I define also build.sbt in root folder?
- "How about, pom.xml for the model, and build.sbt for the behavior?"
- Use with ProjectRef
- Release version on Maven Central
- Issue with getting project.version
- Properties should be resolved also in the basic info of project
- `library-dependencies` has two scala-library in it
- sbt.IncompatiblePluginsException: Binary incompatibility in plugins detected
- Cannot find sbt-maven-plugin HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sbt-maven-plugin.