Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling a class which has a maven-dependency which again has a "proviede-scope" dependency fail #3506

Closed
scabug opened this issue May 28, 2010 · 3 comments

Comments

@scabug
Copy link

scabug commented May 28, 2010

Say I have the following maven-modules:

1. origo-legacy -> has a dependency to mail-1.4.1
2. origo-frontend -> dependes on 1
  1. has a dependency to mail-1.4.1 given by the following maven-declaration:
<dependency>
  <groupId>javax.mail</groupId>
  <artifactId>mail</artifactId>
  <version>1.4.1</version>
  <scope>provided</scope>
</dependency>

The problem is that with 2.8.0-RC3 I get the following error compiling 2) with maven:

[INFO] Compiling 76 source files to /home/andreak/dev/origo/frontend/target/classes at 1275054960890
[ERROR] error: error while loading MimeHelper, Missing dependency 'class javax.mail.internet.MimeMessage', required by /home/andreak/dev/origo/legacy/target/officenet_origo-legacy-1.8.4-SNAPSHOT.jar(no/officenet/uno/util/mail/MimeHelper.class)

This works fine with RC2 and below. Note that the dependency on javax.mail:mail is "provided"-scope, in Maven terms, but for some reason Scala needs this class and complains...

Any hints on what's going on? I can "solve" this by including the dependency for javax.mail:mail as "provided" in all my maven-modules, but that should not be necessary, and was not necessary until RC3 came along...

If desirable I can provide a small maven-project which showcases the issue, which works in RC2.

@scabug
Copy link
Author

scabug commented May 28, 2010

Imported From: https://issues.scala-lang.org/browse/SI-3506?orig=1
Reporter: Andreas Joseph Krogh (andreak)

@scabug
Copy link
Author

scabug commented May 28, 2010

@retronym said:
Please provide a test case reproducible using scalac from the command line, without maven. This will rule out possibility that the problem is with Maven or the Maven Scala Plugin.

@scabug scabug closed this as completed May 18, 2011
@scabug
Copy link
Author

scabug commented Dec 28, 2011

Pedro Furlanetto (pedrofurla) said:
Another example of the same behavior: https://issues.scala-lang.org/browse/SI-5343?focusedCommentId=55690#comment-55690

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant