gradle
8.2

# from

abstract fun from(component: SoftwareComponent)

Provides the software component that should be published.

- Any artifacts declared by the component will be included in the publication.
- The dependencies declared by the component will be included in the published meta-data.

Currently 2 types of component are supported: 'components.java' (added by the JavaPlugin) and 'components.web' (added by the WarPlugin). For any individual IvyPublication, only a single component can be provided in this way. The following example demonstrates how to publish the 'java' component to a ivy repository.

    plugins {
        id 'java'
        id 'ivy-publish'
    }

    publishing {
      publications {
        ivy(IvyPublication) {
          from components.java
        }
      }
    }

Content copied to clipboard

#### Parameters

component

The software component to publish.