Monday, January 26, 2009

Maven: WTF

I'm on the train, trying to do a build, and this happens:

[INFO] ------------------------------------------------------------------------
[INFO] Building myProject
[INFO] task-segment: [clean]
[INFO] ------------------------------------------------------------------------
[INFO] artifact org.scala-tools:maven-scala-plugin: checking for updates from scala-tools.org
[WARNING] repository metadata for: 'artifact org.scala-tools:maven-scala-plugin' could not be retrieved from repository: scala-tools.org due to an error: Error transferring file
[INFO] Repository 'scala-tools.org' will be blacklisted


WTF?

Because I'm not online maven totally explodes and threatens to blacklist stuff?

I'm sure this is 'configurable' or whatever...but wtf, this just shouldn't happen. Since I wasn't online, I couldn't easily lookup what to do, so I couldn't build at all. Thanks Maven.

I'm thoroughly annoyed.

4 comments:

  1. "mvn -o _your command_"

    so, for example,

    mvn -o clean jetty:run

    Maven will run in offline mode, and look in your ~/.m2 repository

    ReplyDelete
  2. If you know you're gonna be on the go offline, in order to make sure you have everything local, you can prepare your environment and ask maven to go offline with the following command:
    mvn dependency:go-offline

    Regards,

    Cédric Vidal

    ReplyDelete
  3. All,

    I appreciate the help and everything. It's nice, and useful to know, and I'm sure I'll be using it.

    I want to say this though - it's a stupid error, it's dumb default behavior, and it's something I shouldn't have to do. If I'm offline, then it should figure that out, and attempt to do an offline build. I shouldn't need to tell it that I'm offline.

    -Jack

    ReplyDelete
  4. I'm reasonably sure that a blacklist doesn't last longer than the current run of Maven. It just prevents Maven from trying repeatedly to get the same inaccessible thing.

    ReplyDelete