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

Could not find artifact org.xerial.sbt:sbt-sonatype:jar:0.2.1 in mvnrepository #37

Closed
rcompton opened this issue Apr 30, 2014 · 5 comments

Comments

@rcompton
Copy link

I'm trying to use a library which apparently depends on org.xerial.sbt. My builds fail when I try to include either one of the below dependencies:

    <dependency>
        <groupId>org.xerial.sbt</groupId>
        <artifactId>sbt-pack_2.10_0.13</artifactId>
        <version>0.5.1</version>
    </dependency>

    <dependency>
        <groupId>com.propensive</groupId>
        <artifactId>rapture-io_2.10</artifactId>
        <version>0.9.1</version>
    </dependency>

Does xerial work only with sbt and not maven? Is there some extra repository I should be including?

For reference, here's the error I get when I try to compile with "mvn3 compile -U -X"

[ERROR] Failed to execute goal on project ears: Could not resolve dependencies for project com.hrl.miq:ears:jar:1.0-SNAPSHOT: Could not find artifact org.xerial.sbt:sbt-sonatype:jar:0.2.1 in mvnrepository (http://repo1.maven.org/maven2) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project ears: Could not resolve dependencies for project com.hrl.miq:ears:jar:1.0-SNAPSHOT: Could not find artifact org.xerial.sbt:sbt-sonatype:jar:0.2.1 in mvnrepository (http://repo1.maven.org/maven2)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:220)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:127)
at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:257)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:200)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:318)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:414)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:357)
Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project com.hrl.miq:ears:jar:1.0-SNAPSHOT: Could not find artifact org.xerial.sbt:sbt-sonatype:jar:0.2.1 in mvnrepository (http://repo1.maven.org/maven2)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:198)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:195)
... 22 more
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact org.xerial.sbt:sbt-sonatype:jar:0.2.1 in mvnrepository (http://repo1.maven.org/maven2)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:384)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:192)
... 23 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact org.xerial.sbt:sbt-sonatype:jar:0.2.1 in mvnrepository (http://repo1.maven.org/maven2)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:459)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:262)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367)
... 24 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.xerial.sbt:sbt-sonatype:jar:0.2.1 in mvnrepository (http://repo1.maven.org/maven2)
at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$6.wrap(WagonRepositoryConnector.java:1012)
at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$6.wrap(WagonRepositoryConnector.java:1004)
at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:725)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

@xerial
Copy link
Owner

xerial commented Apr 30, 2014

Hi,

I think there might be some libraries not in the maven central.
Here is the pom.xml file of sbt-pack in the Maven Central:
http://repo1.maven.org/maven2/org/xerial/sbt/sbt-pack_2.10_0.13/0.5.1/sbt-pack-0.5.1.pom

So sbt-pack is available in the Maven central.

And I also checked the dependency tree of sbt-pack:

[info] Updating {file:/Users/leo/work/git/sbt-pack/}sbt-pack...
[info] Resolving com.mojolly.scalate#scalate-generator_2.10;0.4.2 ...
[info] Done updating.
[info] org.xerial.sbt:sbt-pack:0.5.2-SNAPSHOT
[info]   +-org.fusesource.scalate:scalate-core_2.10:1.6.1
[info]   | +-org.fusesource.scalate:scalate-util_2.10:1.6.1
[info]   | | +-org.scala-lang:scala-library:2.10.0
[info]   | | +-org.slf4j:slf4j-api:1.6.1 (evicted by: 1.7.5)
[info]   | | +-org.slf4j:slf4j-api:1.7.5
[info]   | |
[info]   | +-org.scala-lang:scala-compiler:2.10.0
[info]   | | +-org.scala-lang:scala-library:2.10.0
[info]   | | +-org.scala-lang:scala-reflect:2.10.0
[info]   | |   +-org.scala-lang:scala-library:2.10.0
[info]   | |
[info]   | +-org.slf4j:slf4j-api:1.6.1 (evicted by: 1.7.5)
[info]   | +-org.slf4j:slf4j-api:1.7.5
[info]   |
[info]   +-org.kamranzafar:jtar:2.2
[info]   +-org.slf4j:slf4j-nop:1.7.5
[info]     +-org.slf4j:slf4j-api:1.7.5
[info]

But I couldn't find com.hrl.miq:ears:jar:1.0-SNAPSHOT that is shown in your error message, so there should be another library or plugin that requires com.hrl.miq:ears:jar:1.0-SNAPSHOT.

@rcompton
Copy link
Author

The "ears" jar is just the name of my project. Here's a complete pom.xml
that's failing with the same error (on two different computers):

ryan@3G08:~/mvn_retest/my-app$ cat pom.xml

4.0.0

com.mycompany.app
my-app
1.0-SNAPSHOT
jar

my-app
http://maven.apache.org

UTF-8
  <dependency>
      <groupId>org.xerial.sbt</groupId>
      <artifactId>sbt-pack_2.10_0.13</artifactId>
      <version>0.5.1</version>
  </dependency>

ryan@3G08:~/mvn_retest/my-app$ mvn package -U
[INFO] Scanning for projects...
[INFO]

[INFO]

[INFO] Building my-app 1.0-SNAPSHOT

[INFO]

Downloading:
http://repo.maven.apache.org/maven2/org/xerial/sbt/sbt-pack_2.10_0.13/0.5.1/sbt-pack_2.10_0.13-0.5.1.pom
[WARNING] The POM for org.xerial.sbt:sbt-pack_2.10_0.13:jar:0.5.1 is
missing, no dependency information available
Downloading:
http://repo.maven.apache.org/maven2/org/xerial/sbt/sbt-pack_2.10_0.13/0.5.1/sbt-pack_2.10_0.13-0.5.1.jar

[INFO]

[INFO] BUILD FAILURE

[INFO]

[INFO] Total time: 0.486s
[INFO] Finished at: Wed Apr 30 14:52:03 PDT 2014
[INFO] Final Memory: 3M/118M

[INFO]

[ERROR] Failed to execute goal on project my-app: Could not resolve
dependencies for project com.mycompany.app:my-app:jar:1.0-SNAPSHOT: Could
not find artifact org.xerial.sbt:sbt-pack_2.10_0.13:jar:0.5.1 in central (
http://repo.maven.apache.org/maven2) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

On Wed, Apr 30, 2014 at 2:19 PM, Taro L. Saito notifications@github.comwrote:

Hi,

I think there might be some libraries not in the maven central.
Here is the pom.xml file of sbt-pack in the Maven Central:

http://repo1.maven.org/maven2/org/xerial/sbt/sbt-pack_2.10_0.13/0.5.1/sbt-pack-0.5.1.pom

So sbt-pack is available in the Maven central.

And I also checked the dependency tree of sbt-pack:

[info] Updating {file:/Users/leo/work/git/sbt-pack/}sbt-pack...
[info] Resolving com.mojolly.scalate#scalate-generator_2.10;0.4.2 ...
[info] Done updating.
[info] org.xerial.sbt:sbt-pack:0.5.2-SNAPSHOT
[info] +-org.fusesource.scalate:scalate-core_2.10:1.6.1
[info] | +-org.fusesource.scalate:scalate-util_2.10:1.6.1
[info] | | +-org.scala-lang:scala-library:2.10.0
[info] | | +-org.slf4j:slf4j-api:1.6.1 (evicted by: 1.7.5)
[info] | | +-org.slf4j:slf4j-api:1.7.5
[info] | |
[info] | +-org.scala-lang:scala-compiler:2.10.0
[info] | | +-org.scala-lang:scala-library:2.10.0
[info] | | +-org.scala-lang:scala-reflect:2.10.0
[info] | | +-org.scala-lang:scala-library:2.10.0
[info] | |
[info] | +-org.slf4j:slf4j-api:1.6.1 (evicted by: 1.7.5)
[info] | +-org.slf4j:slf4j-api:1.7.5
[info] |
[info] +-org.kamranzafar:jtar:2.2
[info] +-org.slf4j:slf4j-nop:1.7.5
[info] +-org.slf4j:slf4j-api:1.7.5
[info]

But I couldn't find com.hrl.miq:ears:jar:1.0-SNAPSHOT that is shown in
your error message, so there should be another library or plugin that
requires com.hrl.miq:ears:jar:1.0-SNAPSHOT.


Reply to this email directly or view it on GitHubhttps://github.com//issues/37#issuecomment-41852156
.

@xerial
Copy link
Owner

xerial commented May 1, 2014

Thanks.

sbt projects use a special project name like sbt-pack-(scala version)-(sbt-version), so wrong path is used if we reference sbt-pack in Maven.

The correct path that should be used is:
http://repo.maven.apache.org/maven2/org/xerial/sbt/sbt-pack_2.10_0.13/0.5.1/sbt-pack-0.5.1.pom

@rcompton
Copy link
Author

rcompton commented May 1, 2014

Looking at the link I get the impression that the correct maven dependency
should be:

  <dependency>
      <groupId>org.xerial.sbt</groupId>
      <artifactId>sbt-pack</artifactId>
      <version>0.5.1</version>
  </dependency>

But my build (complete pom below) still fails with "Could not find artifact
org.xerial.sbt:sbt-pack:jar:0.5.1 in central (
http://repo.maven.apache.org/maven2)"

However, if I manually download the jar from
http://repo.maven.apache.org/maven2/org/xerial/sbt/sbt-pack_2.10_0.13/0.5.1/sbt-pack-0.5.1.jarand
copy it to ~/.m2/repository/org/xerial/sbt/sbt-pack/0.5.1 I can get
my
build to work with only a "[WARNING] The POM for
org.xerial.sbt:sbt-pack:jar:0.5.1 is missing, no dependency information
available" .This is not a satisfactory solution when others have to build
my code.


4.0.0

com.mycompany.app
my-app
1.0-SNAPSHOT
jar

my-app
http://maven.apache.org

UTF-8
  <dependency>
      <groupId>org.xerial.sbt</groupId>
      <artifactId>sbt-pack</artifactId>
      <version>0.5.1</version>
  </dependency>

On Thu, May 1, 2014 at 10:45 AM, Taro L. Saito notifications@github.comwrote:

Thanks.

sbt projects use a special project name like sbt-pack-(scala
version)-(sbt-version), so wrong path is used if we reference sbt-pack in
Maven.

The correct path that should be used is:

http://repo.maven.apache.org/maven2/org/xerial/sbt/sbt-pack_2.10_0.13/0.5.1/sbt-pack-0.5.1.pom


Reply to this email directly or view it on GitHubhttps://github.com//issues/37#issuecomment-41934935
.

@xerial
Copy link
Owner

xerial commented Jun 17, 2015

I have no plan to support maven integration. Let me close this ticket.

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

2 participants