The classifier’s existence depends on whether it was previously defined.
Let’s assume that all uploaded artifacts have a defined classifier. All artifacts can be defined in the ivy.xml file as:
or in shorthand as:
<dependency org="com.example" name="module" rev="3.0"/>
if all that is necessary is the jar file. The short hand dependency tag will define the [artifact] attribute as the same as the [module] attribute and the [type] attribute as jar. Please refer to ivy.xml and ivysettings.xml to gain a better understanding.
Now that we can define which artifacts to retrieve, actually retrieving the artifacts is the easy part. Basically, this is the only line needed:
Publishing an artifact to the artifactory is just as easy.
<ivy:publish resolver="nexus" organisation="com.example" module="module" revision="3.0" status="publish" overwrite="true" forcedeliver="true">
FYI, since the ivy:retrieve and ivy:publish will be defined inside an Apache Ant build file, it is possible to define a property for the organization, module, revision, and status. If these attributes are defined as an Apache Ant property, the ivy.xml file will inherit the properties. The Ant properties can then be used to automatically populate the ivy.xml’s info tag.