[scala-tools] Enforcing Scala version with Maven

View: New views
5 Messages — Rating Filter:   Alert me  

[scala-tools] Enforcing Scala version with Maven

by bearfeeder :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Folks,

Is there any way we can use Maven to enforce Scala versions such that libraries compiled with a certain version of Scala can only be used with the same version of Scala?

Thanks,

David

--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

Re: [scala-tools] Enforcing Scala version with Maven

by Josh Suereth :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, there is a configuration parameter to do this.  Unfortunately, a lot of libraries have scala-library listed as a "provided" dependency, which does not get enforced.

I believe Heiko already sent the configuration parameter you can use.

Sent from my iPhone

On Jun 9, 2009, at 1:50 PM, David Pollak <feeder.of.the.bears@...> wrote:

Folks,

Is there any way we can use Maven to enforce Scala versions such that libraries compiled with a certain version of Scala can only be used with the same version of Scala?

Thanks,

David

--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

Re: [scala-tools] Enforcing Scala version with Maven

by Heiko Seeberger-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Josh,

The parameter will *not* make the build fail but only log with a leading "error" instead of a leading "warning". The Mojo should additionally throw an Exception. I did this locally and it worked. If you give me access to the repo I will patch it.

Heiko

2009/6/10 Josh Suereth <joshua.suereth@...>
Yes, there is a configuration parameter to do this.  Unfortunately, a lot of libraries have scala-library listed as a "provided" dependency, which does not get enforced.

I believe Heiko already sent the configuration parameter you can use.

Sent from my iPhone

On Jun 9, 2009, at 1:50 PM, David Pollak <feeder.of.the.bears@...> wrote:

Folks,

Is there any way we can use Maven to enforce Scala versions such that libraries compiled with a certain version of Scala can only be used with the same version of Scala?

Thanks,

David

--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp



--
My blog: heikoseeberger.name
Follow me: twitter.com/hseeberger
OSGi on Scala: www.scalamodules.org
Lift, the simply functional web framework: liftweb.net

Re: [scala-tools] Enforcing Scala version with Maven

by Josh Suereth :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Np! 

DavidB, want your ok before adding Heiko as a committee

Sent from my iPhone

On Jun 10, 2009, at 5:06 AM, Heiko Seeberger <heiko.seeberger@...> wrote:

Josh,

The parameter will *not* make the build fail but only log with a leading "error" instead of a leading "warning". The Mojo should additionally throw an Exception. I did this locally and it worked. If you give me access to the repo I will patch it.

Heiko

2009/6/10 Josh Suereth <joshua.suereth@...>
Yes, there is a configuration parameter to do this.  Unfortunately, a lot of libraries have scala-library listed as a "provided" dependency, which does not get enforced.

I believe Heiko already sent the configuration parameter you can use.

Sent from my iPhone

On Jun 9, 2009, at 1:50 PM, David Pollak <feeder.of.the.bears@...> wrote:

Folks,

Is there any way we can use Maven to enforce Scala versions such that libraries compiled with a certain version of Scala can only be used with the same version of Scala?

Thanks,

David

--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp



--
My blog: heikoseeberger.name
Follow me: twitter.com/hseeberger
OSGi on Scala: www.scalamodules.org
Lift, the simply functional web framework: liftweb.net

Parent Message unknown Fwd: [scala-tools] Enforcing Scala version with Maven

by Heiko Seeberger-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I fixed it in ScalaMojoSupport.checkArtifactForScalaVersion().

Even before the fix I could not build successfully (see below). Hence I had to remove the maven-invoker-plugin from the POM. Then I could successfully test my fix with ScalaModules.

I pushed the fix as a new branch wip-scala-versions. If you merge it, please take care of my temporary change in the POM.

The build error:

[ERROR] The following builds failed:
[ERROR] *  testLotsofJavaFiles/pom.xml
[ERROR] *  testLotsofJavaFilesNoFork/pom.xml
[ERROR] *  vscaladocOnMultiModules/pom.xml
[INFO] ---------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] : org.apache.maven.plugin.invoker.InvokerMojo@cbb3fa
3 builds failed.

Cheers
Heiko

2009/6/10 David Bernard <david.bernard.31@...>

Did, I forgot to notify you.


On Wed, Jun 10, 2009 at 11:33, Josh Suereth <joshua.suereth@...> wrote:
Np! 

DavidB, want your ok before adding Heiko as a committee

Sent from my iPhone

On Jun 10, 2009, at 5:06 AM, Heiko Seeberger <heiko.seeberger@...> wrote:

Josh,

The parameter will *not* make the build fail but only log with a leading "error" instead of a leading "warning". The Mojo should additionally throw an Exception. I did this locally and it worked. If you give me access to the repo I will patch it.

Heiko

2009/6/10 Josh Suereth <joshua.suereth@...joshua.suereth@...>
Yes, there is a configuration parameter to do this.  Unfortunately, a lot of libraries have scala-library listed as a "provided" dependency, which does not get enforced.

I believe Heiko already sent the configuration parameter you can use.

Sent from my iPhone

On Jun 9, 2009, at 1:50 PM, David Pollak <feeder.of.the.bears@...feeder.of.the.bears@...> wrote:

Folks,

Is there any way we can use Maven to enforce Scala versions such that libraries compiled with a certain version of Scala can only be used with the same version of Scala?

Thanks,

David

--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp



--
My blog: heikoseeberger.name
Follow me: twitter.com/hseeberger
OSGi on Scala: www.scalamodules.org
Lift, the simply functional web framework: liftweb.net




--
My blog: heikoseeberger.name
Follow me: twitter.com/hseeberger
OSGi on Scala: www.scalamodules.org
Lift, the simply functional web framework: liftweb.net



--
My blog: heikoseeberger.name
Follow me: twitter.com/hseeberger
OSGi on Scala: www.scalamodules.org
Lift, the simply functional web framework: liftweb.net