Skip to content

Commit

Permalink
Revert packaging='pom' behavior change introduced in c5823ad. Fixes #810
Browse files Browse the repository at this point in the history
.  Ref #636.
  • Loading branch information
harrah committed Jul 11, 2013
1 parent 544565b commit d8b3118
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 47 deletions.
11 changes: 7 additions & 4 deletions ivy/src/main/scala/sbt/Ivy.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion sbt/src/sbt-test/dependency-management/pom-packaging/test

This file was deleted.

1 change: 0 additions & 1 deletion src/sphinx/Community/ChangeSummary_0.13.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <packaging-pom>` 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)
Expand Down
17 changes: 0 additions & 17 deletions src/sphinx/Detailed-Topics/Library-Management.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
~~~~~~~~~~

Expand Down

0 comments on commit d8b3118

Please sign in to comment.