Implementation for provided and optional

* Introduces a `provided` configuration.
* Introduces an `optional` attribute.
* Handles configurations for publishing to Ivy and Maven repos.
* Added unit/integration tests.