diff --git a/ivy/src/main/scala/sbt/Ivy.scala b/ivy/src/main/scala/sbt/Ivy.scala index 7b253408a..852103195 100644 --- a/ivy/src/main/scala/sbt/Ivy.scala +++ b/ivy/src/main/scala/sbt/Ivy.scala @@ -245,14 +245,17 @@ private object IvySbt // Technically, this should be applied to module configurations. // That would require custom subclasses of all resolver types in ConvertResolver (a delegation approach does not work). // It would be better to get proper support into Ivy. + // A workaround is to configure the ModuleConfiguration resolver to be a ChainResolver. // // This method is only used by the pom parsing code in Ivy to find artifacts it doesn't know about. // In particular, a) it looks up source and javadoc classifiers b) it looks up a main artifact for packaging="pom" // sbt now provides the update-classifiers or requires explicitly specifying classifiers explicitly - // Providing a main artifact for packaging="pom" does not seem to be correct and the lookup can be expensive, so - // sbt now requires this artifact to be explicitly declared. - override def locate(artifact: IArtifact) = null -// if(hasImplicitClassifier(artifact)) null else super.locate(artifact) + // Providing a main artifact for packaging="pom" does not seem to be correct and the lookup can be expensive. + // + // Ideally this could just skip the lookup, but unfortunately several artifacts in practice do not follow the + // correct behavior for packaging="pom" and so it is only skipped for source/javadoc classifiers. + override def locate(artifact: IArtifact) = if(hasImplicitClassifier(artifact)) null else super.locate(artifact) + override def getDependency(dd: DependencyDescriptor, data: ResolveData) = { if(data.getOptions.getLog != LogOptions.LOG_QUIET) diff --git a/sbt/src/sbt-test/dependency-management/pom-packaging/project/PomTest.scala b/sbt/src/sbt-test/dependency-management/pom-packaging/project/PomTest.scala deleted file mode 100644 index 13e56c32b..000000000 --- a/sbt/src/sbt-test/dependency-management/pom-packaging/project/PomTest.scala +++ /dev/null @@ -1,24 +0,0 @@ -import sbt._ -import Keys._ - -object PomTest extends Build -{ - override def settings = super.settings :+ (TaskKey[Unit]("check-pom") <<= checkPom) - - lazy val subJar = Project("sub-jar", file("subJar")) - lazy val subWar = Project("sub-war", file("subWar")) settings( warArtifact) - lazy val subParent = Project("sub-parent", file("subParent")) settings( publishArtifact in Compile := false ) - - def art(p: ProjectReference) = makePom in p - def checkPom = (art(subJar), art(subWar), art(subParent)) map { (jar, war, pom) => - checkPackaging(jar, "jar") - checkPackaging(war, "war") - checkPackaging(pom, "pom") - } - def checkPackaging(pom: File, expected: String) = - { - val packaging = (xml.XML.loadFile(pom) \\ "packaging").text - if(packaging != expected) error("Incorrect packaging for '" + pom + "'. Expected '" + expected + "', but got '" + packaging + "'") - } - def warArtifact = artifact in (Compile, packageBin) ~= { _.copy(`type` = "war", extension = "war") } -} \ No newline at end of file diff --git a/sbt/src/sbt-test/dependency-management/pom-packaging/test b/sbt/src/sbt-test/dependency-management/pom-packaging/test deleted file mode 100644 index c8edbfbcd..000000000 --- a/sbt/src/sbt-test/dependency-management/pom-packaging/test +++ /dev/null @@ -1 +0,0 @@ -> check-pom \ No newline at end of file diff --git a/src/sphinx/Community/ChangeSummary_0.13.0.rst b/src/sphinx/Community/ChangeSummary_0.13.0.rst index 89d7a5bdf..c3fa0b004 100644 --- a/src/sphinx/Community/ChangeSummary_0.13.0.rst +++ b/src/sphinx/Community/ChangeSummary_0.13.0.rst @@ -13,7 +13,6 @@ Features, fixes, changes with compatibility implications (incomplete, please hel - Support for plugin configuration in ``project/plugins/`` has been removed. It was deprecated since 0.11.2. - Dropped support for tab completing the right side of a setting for the ``set`` command. The new task macros make this tab completion obsolete. - The convention for keys is now camelCase only. Details below. -- sbt no longer looks for main artifacts for poms with ``packaging="pom"``. For details, see the :ref:`relevant Library Management section ` and gh-636. - Fixed the default classifier for tests to be ``tests`` for proper Maven compatibility. - The global settings and plugins directories are now versioned. Global settings go in ``~/.sbt/0.13/`` and global plugins in ``~/.sbt/0.13/plugins/`` by default. Explicit overrides, such as via the ``sbt.global.base`` system property, are still respected. (gh-735) - sbt no longer canonicalizes files passed to scalac. (gh-723) diff --git a/src/sphinx/Detailed-Topics/Library-Management.rst b/src/sphinx/Detailed-Topics/Library-Management.rst index dfac311bc..b771c8356 100644 --- a/src/sphinx/Detailed-Topics/Library-Management.rst +++ b/src/sphinx/Detailed-Topics/Library-Management.rst @@ -513,23 +513,6 @@ This is confirmed by the output of ``show update``: **Note:** this is an Ivy-only feature and will not be included in a published pom.xml. - -.. _packaging-pom: - -packaging="pom" -~~~~~~~~~~~~~~~ - -A pom.xml that has `packaging="pom"` is not supposed to have artifacts. -However, some published poms have an associated main artifact, so Ivy checks if one exists. -This check can be time consuming to the point of taking most of the time for `update` on larger projects. -Therefore, sbt disables this check and requires you to explicitly request the main jar. - -For example, - -:: - - libraryDependencies += "org.apache.velocity" % "velocity" % "1.5" jar() - Publishing ~~~~~~~~~~