Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Aether/New and Noteworthy"

Line 34: Line 34:
 
* <tt>aether.offline.protocols</tt>: Comma-separated list of protocols which are accessible even in offline mode, e.g. "file"
 
* <tt>aether.offline.protocols</tt>: Comma-separated list of protocols which are accessible even in offline mode, e.g. "file"
 
* <tt>aether.offline.hosts</tt>: Comma-separated list of hostnames which are accessible even in offline mode, e.g. "localhost"
 
* <tt>aether.offline.hosts</tt>: Comma-separated list of hostnames which are accessible even in offline mode, e.g. "localhost"
 +
 +
=== Pre-managed Dependency Attributes ===
 +
 +
Previously, the methods <tt>DependencyNode.getPremanaged*()</tt> could be used to obtain the version and scope of a dependency before
 +
it was updated by dependency management. To reduce memory consumption for ordinary dependency resolution, these methods have been
 +
removed and their backing data is no longer recorded for each node by default. The pre-managed attributes can still be obtained via
 +
a new configuration property, see <tt>DependencyManagerUtils</tt> for details regarding its usage.
  
  

Revision as of 15:54, 10 February 2013

0.9.0.M2 (not yet released)

Note: There is currently no released version of the maven-aether-provider that builds upon this release of Aether Core so this milestone release is not of direct interest to users seeking access to Maven repositories. Early adopters interested in evaluating the new codebase can find an updated maven-aether-provider at https://github.com/bentmann/maven-3.

See our issue tracker for a list of resolved issues.

Conflict Resolution

In previous versions, the JavaEffectiveScopeCalculator and NearestVersionConflictResolver were responsible to resolve scope and version conflicts and deliver a cleaned up dependency tree. However, the separation of scope and version handling in two isolated dependency graph transformers suffers from a conceptual flaw and caused subtle bugs regarding the effective scope of dependencies. The mentioned classes have been replaced with the new ConflictResolver transformer. This new transformer handles both version and scope conflicts and provides hooks to customize the conflict resolution. To achieve the same kind of conflict resolution as offered previously by the broken transformers, use new ConflictResolver( new NearestVersionSelector(), new JavaScopeSelector(), new SimpleOptionalitySelector(), new JavaScopeDeriver() ).

The SimpleOptionalitySelector hints at another significant fix: The optional flag now gets similar processing during transitive dependency resolution as the scope, i.e. the effective optional flag is subject to the optionality of ancestor nodes and conflict resolution. For instance, transitive dependencies of optional dependencies are now considered optional as well.

As detailed in the API docs of the ConflictResolver, the new graph transformer also supports a verbose mode. This mode can be used to obtain a dependency tree which resembles the dependency hierarchy tab in m2e.

Last but not least, early feedback suggests the new conflict resolution code executes significantly faster than the old code.

Offline Mode

Is a remote repository with the URL "file:/whatever" accessible in offline mode? To allow clients to answer this question appropriately, the internal implementation has been refactored to centralize the offline decision in a new component called OfflineController. The default implementation of this component supports two configuration properties to address common requirements:

  • aether.offline.protocols: Comma-separated list of protocols which are accessible even in offline mode, e.g. "file"
  • aether.offline.hosts: Comma-separated list of hostnames which are accessible even in offline mode, e.g. "localhost"

Pre-managed Dependency Attributes

Previously, the methods DependencyNode.getPremanaged*() could be used to obtain the version and scope of a dependency before it was updated by dependency management. To reduce memory consumption for ordinary dependency resolution, these methods have been removed and their backing data is no longer recorded for each node by default. The pre-managed attributes can still be obtained via a new configuration property, see DependencyManagerUtils for details regarding its usage.


0.9.0.M1 (2012-10-03)

This is the first release of Aether since its migration to the Eclipse Foundation. As such the items listed below indicate changes compared to the previous Sonatype Aether codebase.

Note: There is currently no released version of the maven-aether-provider that builds upon this release of Aether Core so this milestone release is not of direct interest to users seeking access to Maven repositories. Early adopters interested in evaluating the new codebase can find an updated maven-aether-provider at https://github.com/bentmann/maven-3.

See our issue tracker for a list of fixed issues.

Namespace org.eclipse.aether

All code has been moved into the package org.eclipse.aether and sub packages. Likewise, the group ID of the artifacts deployed to the Central Repository has changed to org.eclipse.aether.

Clean up of API

Besides the new package namespace, the API has been changed in some places to ease usage and maintenance. The list below is not exhaustive but focuses on changes where updates to client code are not obvious:

  • TransferEvent.RequestType.GET_EXISTENCE was introduced to allow transfer listeners to distinguish between actual downloads and mere existence checks.
  • FilteredRepositorySystemSession was removed and its usages should be replaced with DefaultRepositorySystemSession and its copy constructor.
  • The properties transferErrorCachingEnabled and notFoundCachingEnabled of RepositorySystemSession have been replaced by ResolutionErrorPolicy, SimpleResolutionErrorPolicy provides a stock implementation.
  • The properties ignoreMissingArtifactDescriptor and ignoreInvalidArtifactDescriptor of RepositorySystemSession have been replaced by ArtifactDescriptorPolicy, SimpleArtifactDescriptorPolicy provides a stock implementation.
  • Authentication was remodeled into an interface, the new AuthenticationBuilder provides a way to obtain a stock implementation.
  • RemoteRepository instances have been made immutable, RemoteRepository.Builder assists in their instantiation.

OSGi-enabled Manifests

Thanks to a contributor, the JAR manifests have been extended with attributes to support use of Aether in an OSGi container. Providing an update site for Aether is an unresolved todo in our issue tracker, contributions welcome.

Support for JSR-330

The components making up the implemenation of Aether have been enriched with javax.inject annotations to support wiring by a JSR-330 compliant container. The class AetherModule helps to set up bindings for the popular Guice container. Likewise, the JARs are equipped with Sisu index files to support efficient component discovery when using Sisu.

Back to the top