bmuschko / gradle-cargo-plugin

Gradle plugin that provides deployment capabilities to local and remote containers via Cargo
Apache License 2.0
258 stars 63 forks source link

Add cargo-licensed-dtds to the dependencies and documentation #198

Closed alitokmen closed 4 years ago

alitokmen commented 4 years ago

Add cargo-licensed-dtds to the dependencies and documentation, which allows the gradle-cargo-plugin to be run offline as well as in environments where general Internet access is blocked

bmuschko commented 4 years ago

Can you describe the workflow of the dependency? Is it as follows?

  1. Start a Gradle build that uses the Cargo plugin. All Cargo dependencies will be downloaded from an organization-internal binary repository or a public binary repository. Cargo tasks do not reach out to internet to resolve DTDs for Cargo tasks as it has them locally.
  2. Start another Gradle build. Cargo dependencies are used from the Gradle dependency cache. Cargo tasks do not reach out to internet to resolve DTDs for Cargo tasks as it has them locally.

Without the dependency, every Gradle invocation that executes a Cargo task will potentially try to resolve a DTD. Does that sound about right?

alitokmen commented 4 years ago

In many cases Codehaus Cargo needs to parse some XMLs in deployables (WARs, EARs, etc.) and many of these XMLs use DTDs or schemas, some are Java standards and some are specific to the container (JBoss, WebLogic, etc.).

In order to allow Codehaus Cargo to parse these XMLs while not having to connect to the Internet (to download the XSDs / DTDs), we have this JAR file which contains these.

The reason why these XSDs and DTDs are not in the uberjar is because the uberjar has an Apache Software License (except for the WebSphere Liberty container which has been released under the MIT License), while the XSDs and DTDs have "all kinds of" licenses and hence have to be kept in a separate JAR.

bmuschko commented 4 years ago

Got it. Thanks!