dbecvarik: url should be deprecated only, otherwise it will make all of current descriptors unusable.
diff --git a/dogen/generator.py b/dogen/generator.py
index 52fa501..d59602d 100644
--- a/dogen/generator.py
+++ b/dogen/generator.py
@@ -58,7 +58,7 @@ class Generator(object):
         r = requests.get(location, verify=self.ssl_verify, stream=True)
 
         if r.status_code != 200:
-            raise Exception("Could not download file from %s" % location)
+            raise Error("Could not download file from %s" % location)
 
         with open(output, 'wb') as f:
             for chunk in r.iter_content(chunk_size=1024):
@@ -253,10 +253,23 @@ class Generator(object):
         self.cfg['artifacts'] = {}
 
         for source in self.cfg['sources']:
-            url = source['url']
-            target = source.get('target')
+            url = source.get('url')
+            artifact = source.get('artifact')
+
+            if url:
+                self.log.warn("The 'url' key is deprecated, please use 'artifact' for specifying the %s artifact location" % url)
+
+                if artifact:
+                    self.log.warn("You specified both: 'artifact' and 'url' for a source file, 'artifact': will be used: %s" % artifact)
+                else:
+                    # Backward compatibility
+                    artifact = url
 
-            basename = os.path.basename(url)
+            if not artifact:
+                raise Error("Artifact location for one or more sources was not provided, please check your image descriptor!")
+
+            basename = os.path.basename(artifact)
+            target = source.get('target')
 
             # In case we specify target name for the artifact - use it
             if not target:
@@ -270,7 +283,7 @@ class Generator(object):
             md5sum = source.get('md5sum')
 
             if md5sum:
-                self.log.warn("The 'md5sum' key is deprecated, please use 'md5' for %s. Or better switch to sha256 or sha1." % url)
+                self.log.warn("The 'md5sum' key is deprecated, please use 'md5' for %s. Or better switch to sha256 or sha1." % artifact)
 
                 # Backwards compatibility for md5sum
                 if not source.get('md5'):
@@ -295,17 +308,17 @@ class Generator(object):
                 sources_cache = os.environ.get("DOGEN_SOURCES_CACHE")
 
                 if sources_cache:
-                    url = sources_cache.replace('#filename#', basename)
+                    artifact = sources_cache.replace('#filename#', basename)
 
                     if algorithms:
                         if len(algorithms) > 1:
-                            self.log.warn("You specified multiple algorithms for '%s' url, but only '%s' will be used to fetch it from cache" % (url, algorithms[0]))
+                            self.log.warn("You specified multiple algorithms for '%s' artifact, but only '%s' will be used to fetch it from cache" % (artifact, algorithms[0]))
 
-                        url = url.replace('#hash#', source[algorithms[0]]).replace('#algorithm#', algorithms[0])
+                        artifact = artifact.replace('#hash#', source[algorithms[0]]).replace('#algorithm#', algorithms[0])
 
-                    self.log.info("Using '%s' as cached location for artifact" % url)
+                    self.log.info("Using '%s' as cached location for artifact" % artifact)
 
-                self._fetch_file(url, filename)
+                self._fetch_file(artifact, filename)
 
                 if algorithms:
                     for algorithm in algorithms:
@@ -327,6 +340,6 @@ class Generator(object):
         filesum = hash.hexdigest()
 
         if filesum.lower() != checksum.lower():
-            raise Exception("The %s computed for the '%s' file ('%s') doesn't match the '%s' value" % (algorithm, filename, filesum, checksum))
+            raise Error("The %s computed for the '%s' file ('%s') doesn't match the '%s' value" % (algorithm, filename, filesum, checksum))
 
         self.log.debug("Hash is correct.")
diff --git a/dogen/schema/kwalify_schema.yaml b/dogen/schema/kwalify_schema.yaml
index a54aa67..b8035d1 100644
--- a/dogen/schema/kwalify_schema.yaml
+++ b/dogen/schema/kwalify_schema.yaml
@@ -66,8 +66,9 @@ map:
   sources:
     seq:
       - map:
-          url: {type: str}
-          md5sum: {type: str}
+          url: {type: str} # deprecated, use artifact
+          artifact: {type: str}
+          md5sum: {type: str} # deprecated, use md5
           md5: {type: str}
           sha1: {type: str}
           sha256: {type: str}
diff --git a/dogen/template_helper.py b/dogen/template_helper.py
index 3e88f03..e36693b 100644
--- a/dogen/template_helper.py
+++ b/dogen/template_helper.py
@@ -10,7 +10,7 @@ class TemplateHelper(object):
         if target:
             return target
 
-        return os.path.basename(source['url'])
+        return os.path.basename(source['artifact'])
 
     def cmd(self, arr):
         """

Rename "url" in sources to "artifact"
It doesn't need to be a URL, it can be a filename only too. It's a bit misleading to call it "url".
diff --git a/tests/schemas/good/openshift_amq_6.2_image.yaml b/tests/schemas/good/openshift_amq_6.2_image.yaml
index fa4f3cf..2cde6e8 100644
--- a/tests/schemas/good/openshift_amq_6.2_image.yaml
+++ b/tests/schemas/good/openshift_amq_6.2_image.yaml
@@ -51,10 +51,10 @@ scripts:
     - package: os-amq-permissions
       exec: install.sh
 sources:
-    - url: http://redacted/jolokia-jvm-1.3.2.redhat-1-agent.jar
+    - artifact: http://redacted/jolokia-jvm-1.3.2.redhat-1-agent.jar
       md5: 1b996b9083f537917b307309b0e2f16d
-    - url: http://redacted/openshift-activemq-plugin-1.0.0.Final-redhat-1.jar
+    - artifact: http://redacted/openshift-activemq-plugin-1.0.0.Final-redhat-1.jar
       md5: 325fbbaff0f7dbea42203346d9c3bf98
-    - url: http://redacted/jboss-dmr-1.2.2.Final-redhat-1.jar
+    - artifact: http://redacted/jboss-dmr-1.2.2.Final-redhat-1.jar
       md5: 8df4cbf6f39c3bce21de16ad708084d5
 
diff --git a/tests/schemas/good/openshift_datagrid_6.5_image.yaml b/tests/schemas/good/openshift_datagrid_6.5_image.yaml
index b20b77e..67ff7a1 100644
--- a/tests/schemas/good/openshift_datagrid_6.5_image.yaml
+++ b/tests/schemas/good/openshift_datagrid_6.5_image.yaml
@@ -150,17 +150,17 @@ scripts:
       exec: configure.sh
       user: 185
 sources:
-    - url: http://redacted/jolokia-jvm-1.3.2.redhat-1-agent.jar
+    - artifact: http://redacted/jolokia-jvm-1.3.2.redhat-1-agent.jar
       md5: 1b996b9083f537917b307309b0e2f16d
-    - url: http://redacted/javax.json-1.0.4.jar
+    - artifact: http://redacted/javax.json-1.0.4.jar
       md5: 569870f975deeeb6691fcb9bc02a9555
-    - url: http://redacted/jboss-logmanager-ext-1.0.0.Alpha2-redhat-1.jar
+    - artifact: http://redacted/jboss-logmanager-ext-1.0.0.Alpha2-redhat-1.jar
       md5: 7c743e35463db5f55f415dd666d705c5
-    - url: http://redacted/openshift-ping-common-1.0.0.Final-redhat-1.jar
+    - artifact: http://redacted/openshift-ping-common-1.0.0.Final-redhat-1.jar
       md5: bafa4db7efe4082d76cde2fa9499bf84
-    - url: http://redacted/openshift-ping-dns-1.0.0.Final-redhat-1.jar
+    - artifact: http://redacted/openshift-ping-dns-1.0.0.Final-redhat-1.jar
       md5: 71bbfdf795a2c65e4473df242f765490
-    - url: http://redacted/openshift-ping-kube-1.0.0.Final-redhat-1.jar
+    - artifact: http://redacted/openshift-ping-kube-1.0.0.Final-redhat-1.jar
       md5: 145add030a89c3ed588dce27b0f24999
-    - url: http://redacted/oauth-20100527.jar
+    - artifact: http://redacted/oauth-20100527.jar
       md5: 91c7c70579f95b7ddee95b2143a49b41
diff --git a/tests/schemas/good/openshift_eap_6.4_image.yaml b/tests/schemas/good/openshift_eap_6.4_image.yaml
index 2b24f39..0ab9029 100644
--- a/tests/schemas/good/openshift_eap_6.4_image.yaml
+++ b/tests/schemas/good/openshift_eap_6.4_image.yaml
@@ -97,23 +97,23 @@ scripts:
       exec: configure.sh
       user: 185
 sources:
-    - url: http://redacted/jolokia-jvm-1.3.2.redhat-1-agent.jar
+    - artifact: http://redacted/jolokia-jvm-1.3.2.redhat-1-agent.jar
       md5: 1b996b9083f537917b307309b0e2f16d
-    - url: http://redacted/javax.json-1.0.4.jar
+    - artifact: http://redacted/javax.json-1.0.4.jar
       md5: 569870f975deeeb6691fcb9bc02a9555
-    - url: http://redacted/jboss-logmanager-ext-1.0.0.Alpha2-redhat-1.jar
+    - artifact: http://redacted/jboss-logmanager-ext-1.0.0.Alpha2-redhat-1.jar
       md5: 7c743e35463db5f55f415dd666d705c5
-    - url: http://redacted/openshift-ping-common-1.0.0.Final-redhat-1.jar
+    - artifact: http://redacted/openshift-ping-common-1.0.0.Final-redhat-1.jar
       md5: bafa4db7efe4082d76cde2fa9499bf84
-    - url: http://redacted/openshift-ping-dns-1.0.0.Final-redhat-1.jar
+    - artifact: http://redacted/openshift-ping-dns-1.0.0.Final-redhat-1.jar
       md5: 71bbfdf795a2c65e4473df242f765490
-    - url: http://redacted/openshift-ping-kube-1.0.0.Final-redhat-1.jar
+    - artifact: http://redacted/openshift-ping-kube-1.0.0.Final-redhat-1.jar
       md5: 145add030a89c3ed588dce27b0f24999
-    - url: http://redacted/oauth-20100527.jar
+    - artifact: http://redacted/oauth-20100527.jar
       md5: 91c7c70579f95b7ddee95b2143a49b41
-    - url: http://redacted/activemq-rar-5.11.0.redhat-621084.rar
+    - artifact: http://redacted/activemq-rar-5.11.0.redhat-621084.rar
       md5: 207e17ac8102c93233fe2764d1fe8499
-    - url: http://redacted/rh-sso-7.0.0-eap6-adapter.zip
+    - artifact: http://redacted/rh-sso-7.0.0-eap6-adapter.zip
       md5: 6fd81306ea4297307dcc5f51712e5f95
-    - url: http://redacted/rh-sso-7.0.0-saml-eap6-adapter.zip
+    - artifact: http://redacted/rh-sso-7.0.0-saml-eap6-adapter.zip
       md5: 3b953c114dd09f86e71e18cd57d8af56
diff --git a/tests/schemas/good/openshift_eap_7.0_image.yaml b/tests/schemas/good/openshift_eap_7.0_image.yaml
index 08f5a5c..7c0c4b4 100644
--- a/tests/schemas/good/openshift_eap_7.0_image.yaml
+++ b/tests/schemas/good/openshift_eap_7.0_image.yaml
@@ -106,23 +106,23 @@ scripts:
       exec: configure.sh
       user: 185
 sources:
-    - url: http://redacted/jolokia-jvm-1.3.2.redhat-1-agent.jar
+    - artifact: http://redacted/jolokia-jvm-1.3.2.redhat-1-agent.jar
       md5: 1b996b9083f537917b307309b0e2f16d
-    - url: http://redacted/javax.json-1.0.4.jar
+    - artifact: http://redacted/javax.json-1.0.4.jar
       md5: 569870f975deeeb6691fcb9bc02a9555
-    - url: http://redacted/jboss-logmanager-ext-1.0.0.Alpha2-redhat-1.jar
+    - artifact: http://redacted/jboss-logmanager-ext-1.0.0.Alpha2-redhat-1.jar
       md5: 7c743e35463db5f55f415dd666d705c5
-    - url: http://redacted/openshift-ping-common-1.0.0.Final-redhat-1.jar
+    - artifact: http://redacted/openshift-ping-common-1.0.0.Final-redhat-1.jar
       md5: bafa4db7efe4082d76cde2fa9499bf84
-    - url: http://redacted/openshift-ping-dns-1.0.0.Final-redhat-1.jar
+    - artifact: http://redacted/openshift-ping-dns-1.0.0.Final-redhat-1.jar
       md5: 71bbfdf795a2c65e4473df242f765490
-    - url: http://redacted/openshift-ping-kube-1.0.0.Final-redhat-1.jar
+    - artifact: http://redacted/openshift-ping-kube-1.0.0.Final-redhat-1.jar
       md5: 145add030a89c3ed588dce27b0f24999
-    - url: http://redacted/oauth-20100527.jar
+    - artifact: http://redacted/oauth-20100527.jar
       md5: 91c7c70579f95b7ddee95b2143a49b41
-    - url: http://redacted/activemq-rar-5.11.0.redhat-621084.rar
+    - artifact: http://redacted/activemq-rar-5.11.0.redhat-621084.rar
       md5: 207e17ac8102c93233fe2764d1fe8499
-    - url: http://redacted/rh-sso-7.0.0-eap7-adapter.zip
+    - artifact: http://redacted/rh-sso-7.0.0-eap7-adapter.zip
       md5: 1542c1014d9ebc24522839a5fa8bee4d
-    - url: http://redacted/rh-sso-7.0.0-saml-eap7-adapter.zip
+    - artifact: http://redacted/rh-sso-7.0.0-saml-eap7-adapter.zip
       md5: ce858a47c707b362a968ffd5c66768dd
diff --git a/tests/schemas/good/openshift_fuse-camel_6.3_image.yaml b/tests/schemas/good/openshift_fuse-camel_6.3_image.yaml
index 953fa45..9c5855d 100644
--- a/tests/schemas/good/openshift_fuse-camel_6.3_image.yaml
+++ b/tests/schemas/good/openshift_fuse-camel_6.3_image.yaml
@@ -100,23 +100,23 @@ scripts:
       user: 185
       exec: configure.sh
 sources:
-    - url: http://redacted/jolokia-jvm-1.3.2.redhat-1-agent.jar
+    - artifact: http://redacted/jolokia-jvm-1.3.2.redhat-1-agent.jar
       md5: 1b996b9083f537917b307309b0e2f16d
-    - url: http://redacted/javax.json-1.0.4.jar
+    - artifact: http://redacted/javax.json-1.0.4.jar
       md5: 569870f975deeeb6691fcb9bc02a9555
-    - url: http://redacted/jboss-logmanager-ext-1.0.0.Alpha2-redhat-1.jar
+    - artifact: http://redacted/jboss-logmanager-ext-1.0.0.Alpha2-redhat-1.jar
       md5: 7c743e35463db5f55f415dd666d705c5
-    - url: http://redacted/openshift-ping-common-1.0.0.Final-redhat-1.jar
+    - artifact: http://redacted/openshift-ping-common-1.0.0.Final-redhat-1.jar
       md5: bafa4db7efe4082d76cde2fa9499bf84
-    - url: http://redacted/openshift-ping-dns-1.0.0.Final-redhat-1.jar
+    - artifact: http://redacted/openshift-ping-dns-1.0.0.Final-redhat-1.jar
       md5: 71bbfdf795a2c65e4473df242f765490
-    - url: http://redacted/openshift-ping-kube-1.0.0.Final-redhat-1.jar
+    - artifact: http://redacted/openshift-ping-kube-1.0.0.Final-redhat-1.jar
       md5: 145add030a89c3ed588dce27b0f24999
-    - url: http://redacted/oauth-20100527.jar
+    - artifact: http://redacted/oauth-20100527.jar
       md5: 91c7c70579f95b7ddee95b2143a49b41
-    - url: http://redacted/activemq-rar-5.11.0.redhat-621084.rar
+    - artifact: http://redacted/activemq-rar-5.11.0.redhat-621084.rar
       md5: 207e17ac8102c93233fe2764d1fe8499
-    - url: http://redacted/rh-sso-7.0.0-eap6-adapter.zip
+    - artifact: http://redacted/rh-sso-7.0.0-eap6-adapter.zip
       md5: 6fd81306ea4297307dcc5f51712e5f95
-    - url: http://redacted/rh-sso-7.0.0-saml-eap6-adapter.zip
+    - artifact: http://redacted/rh-sso-7.0.0-saml-eap6-adapter.zip
       md5: 3b953c114dd09f86e71e18cd57d8af56
diff --git a/tests/schemas/good/openshift_kieserver_6.2_image.yaml b/tests/schemas/good/openshift_kieserver_6.2_image.yaml
index 3a1bd93..77134f3 100644
--- a/tests/schemas/good/openshift_kieserver_6.2_image.yaml
+++ b/tests/schemas/good/openshift_kieserver_6.2_image.yaml
@@ -129,12 +129,12 @@ scripts:
       user: 185
       exec: configure.sh
 sources:
-    - url: http://redacted/jboss-bpmsuite-6.2.1.GA-redhat-2-deployable-eap6.x.zip
+    - artifact: http://redacted/jboss-bpmsuite-6.2.1.GA-redhat-2-deployable-eap6.x.zip
       md5: b63c7dfe82a44a140cce3a824c8c2e90
-    - url: http://redacted/openshift-kieserver-common-1.0.2.Final-redhat-1.jar
+    - artifact: http://redacted/openshift-kieserver-common-1.0.2.Final-redhat-1.jar
       md5: 5858103206d0bcc4695aad38a7430c75
-    - url: http://redacted/openshift-kieserver-jms-1.0.2.Final-redhat-1.jar
+    - artifact: http://redacted/openshift-kieserver-jms-1.0.2.Final-redhat-1.jar
       md5: 4a80b12399c49a1d274bbd1c62b49b65
-    - url: http://redacted/openshift-kieserver-web-1.0.2.Final-redhat-1.jar
+    - artifact: http://redacted/openshift-kieserver-web-1.0.2.Final-redhat-1.jar
       md5: adf602d027020b30cc5743d3d5d8e2f7
 
diff --git a/tests/schemas/good/openshift_kieserver_6.3_image.yaml b/tests/schemas/good/openshift_kieserver_6.3_image.yaml
index caf4912..010b945 100644
--- a/tests/schemas/good/openshift_kieserver_6.3_image.yaml
+++ b/tests/schemas/good/openshift_kieserver_6.3_image.yaml
@@ -130,13 +130,13 @@ scripts:
       user: 185
       exec: configure.sh
 sources:
-    - url: http://redacted/jboss-bpmsuite-6.3.0.GA-deployable-eap6.x.zip
+    - artifact: http://redacted/jboss-bpmsuite-6.3.0.GA-deployable-eap6.x.zip
       md5: 4e283717b0f295adf7025971065d6db8
-    - url: http://redacted/jboss-bpmsuite-6.3.0.GA-supplementary-tools.zip
+    - artifact: http://redacted/jboss-bpmsuite-6.3.0.GA-supplementary-tools.zip
       md5: b3d135e2d297f1e89d9ff8357c1e9aac
-    - url: http://redacted/openshift-kieserver-common-1.0.2.Final-redhat-1.jar
+    - artifact: http://redacted/openshift-kieserver-common-1.0.2.Final-redhat-1.jar
       md5: 5858103206d0bcc4695aad38a7430c75
-    - url: http://redacted/openshift-kieserver-jms-1.0.2.Final-redhat-1.jar
+    - artifact: http://redacted/openshift-kieserver-jms-1.0.2.Final-redhat-1.jar
       md5: 4a80b12399c49a1d274bbd1c62b49b65
-    - url: http://redacted/openshift-kieserver-web-1.0.2.Final-redhat-1.jar
+    - artifact: http://redacted/openshift-kieserver-web-1.0.2.Final-redhat-1.jar
       md5: adf602d027020b30cc5743d3d5d8e2f7
diff --git a/tests/schemas/good/openshift_sso_7.0_image.yaml b/tests/schemas/good/openshift_sso_7.0_image.yaml
index 76cee4f..0c43530 100644
--- a/tests/schemas/good/openshift_sso_7.0_image.yaml
+++ b/tests/schemas/good/openshift_sso_7.0_image.yaml
@@ -96,18 +96,18 @@ scripts:
     - package: os-sso
       exec: configure.sh
 sources:
-    - url: http://redacted/jolokia-jvm-1.3.2.redhat-1-agent.jar
+    - artifact: http://redacted/jolokia-jvm-1.3.2.redhat-1-agent.jar
       md5: 1b996b9083f537917b307309b0e2f16d
-    - url: http://redacted/javax.json-1.0.4.jar
+    - artifact: http://redacted/javax.json-1.0.4.jar
       md5: 569870f975deeeb6691fcb9bc02a9555
-    - url: http://redacted/jboss-logmanager-ext-1.0.0.Alpha2-redhat-1.jar
+    - artifact: http://redacted/jboss-logmanager-ext-1.0.0.Alpha2-redhat-1.jar
       md5: 7c743e35463db5f55f415dd666d705c5
-    - url: http://redacted/openshift-ping-common-1.0.0.Final-redhat-1.jar
+    - artifact: http://redacted/openshift-ping-common-1.0.0.Final-redhat-1.jar
       md5: bafa4db7efe4082d76cde2fa9499bf84
-    - url: http://redacted/openshift-ping-dns-1.0.0.Final-redhat-1.jar
+    - artifact: http://redacted/openshift-ping-dns-1.0.0.Final-redhat-1.jar
       md5: 71bbfdf795a2c65e4473df242f765490
-    - url: http://redacted/openshift-ping-kube-1.0.0.Final-redhat-1.jar
+    - artifact: http://redacted/openshift-ping-kube-1.0.0.Final-redhat-1.jar
       md5: 145add030a89c3ed588dce27b0f24999
-    - url: http://redacted/oauth-20100527.jar
+    - artifact: http://redacted/oauth-20100527.jar
       md5: 91c7c70579f95b7ddee95b2143a49b41
 
diff --git a/tests/schemas/good/openshift_webserver-tomcat7_3.0_image.yaml b/tests/schemas/good/openshift_webserver-tomcat7_3.0_image.yaml
index 4c4d54e..c7e5991 100644
--- a/tests/schemas/good/openshift_webserver-tomcat7_3.0_image.yaml
+++ b/tests/schemas/good/openshift_webserver-tomcat7_3.0_image.yaml
@@ -93,11 +93,11 @@ scripts:
       user: 185
       exec: configure.sh
 sources:
-    - url: http://redacted/jolokia-jvm-1.3.2.redhat-1-agent.jar
+    - artifact: http://redacted/jolokia-jvm-1.3.2.redhat-1-agent.jar
       md5: 1b996b9083f537917b307309b0e2f16d
-    - url: http://redacted/json-smart-1.1.1.jar
+    - artifact: http://redacted/json-smart-1.1.1.jar
       md5: c382c9109020d001b96329c2057ba933
-    - url: http://redacted/commons-lang-2.6.0.redhat-4.jar
+    - artifact: http://redacted/commons-lang-2.6.0.redhat-4.jar
       md5: 0da0fbfb0ff2160df3a4832d28003361
-    - url: http://redacted/jsonevent-layout-1.7-redhat-1.jar
+    - artifact: http://redacted/jsonevent-layout-1.7-redhat-1.jar
       md5: 08f9aa037ac91c4aaa0d5dabf143a60e
diff --git a/tests/schemas/good/openshift_webserver-tomcat8_3.0_image.yaml b/tests/schemas/good/openshift_webserver-tomcat8_3.0_image.yaml
index 6a0b095..b7039a3 100644
--- a/tests/schemas/good/openshift_webserver-tomcat8_3.0_image.yaml
+++ b/tests/schemas/good/openshift_webserver-tomcat8_3.0_image.yaml
@@ -93,11 +93,11 @@ scripts:
       user: 185
       exec: configure.sh
 sources:
-    - url: http://redacted/jolokia-jvm-1.3.2.redhat-1-agent.jar
+    - artifact: http://redacted/jolokia-jvm-1.3.2.redhat-1-agent.jar
       md5: 1b996b9083f537917b307309b0e2f16d
-    - url: http://redacted/json-smart-1.1.1.jar
+    - artifact: http://redacted/json-smart-1.1.1.jar
       md5: c382c9109020d001b96329c2057ba933
-    - url: http://redacted/commons-lang-2.6.0.redhat-4.jar
+    - artifact: http://redacted/commons-lang-2.6.0.redhat-4.jar
       md5: 0da0fbfb0ff2160df3a4832d28003361
-    - url: http://redacted/jsonevent-layout-1.7-redhat-1.jar
+    - artifact: http://redacted/jsonevent-layout-1.7-redhat-1.jar
       md5: 08f9aa037ac91c4aaa0d5dabf143a60e
diff --git a/tests/test_unit_generate_configuration.py b/tests/test_unit_generate_configuration.py
index 531ee8e..268f9d5 100644
--- a/tests/test_unit_generate_configuration.py
+++ b/tests/test_unit_generate_configuration.py
@@ -245,7 +245,7 @@ class TestConfig(unittest.TestCase):
     @mock.patch('dogen.generator.Generator._fetch_file')
     def test_handling_sources_without_specified_md5sum(self, mock_fetch_file):
         with self.descriptor as f:
-            f.write("sources:\n  - url: http://somehost.com/file.zip".encode())
+            f.write("sources:\n  - artifact: http://somehost.com/file.zip".encode())
 
         generator = Generator(self.log, self.args)
         generator.configure()
@@ -257,7 +257,7 @@ class TestConfig(unittest.TestCase):
     @mock.patch('dogen.generator.Generator._fetch_file')
     def test_handling_sources(self, mock_fetch_file, mock_check_sum):
         with self.descriptor as f:
-            f.write("sources:\n  - url: http://somehost.com/file.zip\n    md5: e9013fc202c87be48e3b302df10efc4b".encode())
+            f.write("sources:\n  - artifact: http://somehost.com/file.zip\n    md5: e9013fc202c87be48e3b302df10efc4b".encode())
 
         generator = Generator(self.log, self.args)
         generator.configure()
@@ -270,7 +270,7 @@ class TestConfig(unittest.TestCase):
     @mock.patch('dogen.generator.Generator._fetch_file')
     def test_handling_sources_with_multiple_hashes(self, mock_fetch_file, mock_check_sum):
         with self.descriptor as f:
-            f.write("sources:\n  - url: http://somehost.com/file.zip\n    md5: e9013fc202c87be48e3b302df10efc4b\n    sha1: 105bfe02a86ba69be5506cd559a54c4b252fb132".encode())
+            f.write("sources:\n  - artifact: http://somehost.com/file.zip\n    md5: e9013fc202c87be48e3b302df10efc4b\n    sha1: 105bfe02a86ba69be5506cd559a54c4b252fb132".encode())
 
         generator = Generator(self.log, self.args)
         generator.configure()
@@ -284,7 +284,7 @@ class TestConfig(unittest.TestCase):
     @mock.patch('dogen.generator.Generator._fetch_file')
     def test_handling_sources_with_multiple_hashes_and_cache_url(self, mock_fetch_file, mock_check_sum):
         with self.descriptor as f:
-            f.write("sources:\n  - url: http://somehost.com/file.zip\n    md5: e9013fc202c87be48e3b302df10efc4b\n    sha1: 105bfe02a86ba69be5506cd559a54c4b252fb132".encode())
+            f.write("sources:\n  - artifact: http://somehost.com/file.zip\n    md5: e9013fc202c87be48e3b302df10efc4b\n    sha1: 105bfe02a86ba69be5506cd559a54c4b252fb132".encode())
 
         k = mock.patch.dict(os.environ, {'DOGEN_SOURCES_CACHE':'http://cache/get?#algorithm#=#hash#'})
         k.start()
@@ -301,7 +301,7 @@ class TestConfig(unittest.TestCase):
     @mock.patch('dogen.generator.Generator._fetch_file')
     def test_handling_sources_with_deprecated_md5sum(self, mock_fetch_file, mock_check_sum):
         with self.descriptor as f:
-            f.write("sources:\n  - url: http://somehost.com/file.zip\n    md5sum: e9013fc202c87be48e3b302df10efc4b".encode())
+            f.write("sources:\n  - artifact: http://somehost.com/file.zip\n    md5sum: e9013fc202c87be48e3b302df10efc4b".encode())
 
         generator = Generator(self.log, self.args)
         generator.configure()
@@ -314,7 +314,7 @@ class TestConfig(unittest.TestCase):
     @mock.patch('dogen.generator.Generator._fetch_file')
     def test_handling_sources_with_sha1(self, mock_fetch_file, mock_check_sum):
         with self.descriptor as f:
-            f.write("sources:\n  - url: http://somehost.com/file.zip\n    sha1: 105bfe02a86ba69be5506cd559a54c4b252fb132".encode())
+            f.write("sources:\n  - artifact: http://somehost.com/file.zip\n    sha1: 105bfe02a86ba69be5506cd559a54c4b252fb132".encode())
 
         generator = Generator(self.log, self.args)
         generator.configure()
@@ -327,7 +327,7 @@ class TestConfig(unittest.TestCase):
     @mock.patch('dogen.generator.Generator._fetch_file')
     def test_handling_sources_with_sha256(self, mock_fetch_file, mock_check_sum):
         with self.descriptor as f:
-            f.write("sources:\n  - url: http://somehost.com/file.zip\n    sha256: 9912afca5a08e9e05174c5fbb7a9a1510283d5952f90796c6a3e8bc78217e2fb".encode())
+            f.write("sources:\n  - artifact: http://somehost.com/file.zip\n    sha256: 9912afca5a08e9e05174c5fbb7a9a1510283d5952f90796c6a3e8bc78217e2fb".encode())
 
         generator = Generator(self.log, self.args)
         generator.configure()
@@ -341,7 +341,7 @@ class TestConfig(unittest.TestCase):
     @mock.patch('dogen.generator.Generator._fetch_file')
     def test_handling_sources_when_local_file_exists_and_is_correct(self, mock_fetch_file, mock_check_sum, mock_path):
         with self.descriptor as f:
-            f.write("sources:\n  - url: http://somehost.com/file.zip\n    md5: e9013fc202c87be48e3b302df10efc4b".encode())
+            f.write("sources:\n  - artifact: http://somehost.com/file.zip\n    md5: e9013fc202c87be48e3b302df10efc4b".encode())
 
         generator = Generator(self.log, self.args)
         generator.configure()
@@ -354,7 +354,7 @@ class TestConfig(unittest.TestCase):
     @mock.patch('dogen.generator.Generator._fetch_file')
     def test_handling_sources_when_local_file_exists_and_is_broken(self, mock_fetch_file, mock_check_sum, mock_path):
         with self.descriptor as f:
-            f.write("sources:\n  - url: http://somehost.com/file.zip\n    md5: e9013fc202c87be48e3b302df10efc4b".encode())
+            f.write("sources:\n  - artifact: http://somehost.com/file.zip\n    md5: e9013fc202c87be48e3b302df10efc4b".encode())
 
         generator = Generator(self.log, self.args)
         generator.configure()
@@ -366,7 +366,7 @@ class TestConfig(unittest.TestCase):
     @mock.patch('dogen.generator.Generator._fetch_file')
     def test_handling_sources_with_target_filename(self, mock_fetch_file, mock_check_sum):
         with self.descriptor as f:
-            f.write("sources:\n  - url: http://somehost.com/file.zip\n    md5: e9013fc202c87be48e3b302df10efc4b\n    target: target.zip".encode())
+            f.write("sources:\n  - artifact: http://somehost.com/file.zip\n    md5: e9013fc202c87be48e3b302df10efc4b\n    target: target.zip".encode())
 
         generator = Generator(self.log, self.args)
         generator.configure()
@@ -378,7 +378,7 @@ class TestConfig(unittest.TestCase):
     @mock.patch('dogen.generator.Generator._fetch_file')
     def test_handling_sources_with_cache_url(self, mock_fetch_file, mock_check_sum):
         with self.descriptor as f:
-            f.write("sources:\n  - url: http://somehost.com/file.zip\n    md5: e9013fc202c87be48e3b302df10efc4b".encode())
+            f.write("sources:\n  - artifact: http://somehost.com/file.zip\n    md5: e9013fc202c87be48e3b302df10efc4b".encode())
 
         k = mock.patch.dict(os.environ, {'DOGEN_SOURCES_CACHE':'http://cache/get?#algorithm#=#hash#'})
         k.start()
@@ -393,7 +393,7 @@ class TestConfig(unittest.TestCase):
     @mock.patch('dogen.generator.Generator._fetch_file')
     def test_handling_sources_with_cache_url_and_target_filename(self, mock_fetch_file, mock_check_sum):
         with self.descriptor as f:
-            f.write("sources:\n  - url: http://somehost.com/file.zip\n    md5: e9013fc202c87be48e3b302df10efc4b\n    target: target.zip".encode())
+            f.write("sources:\n  - artifact: http://somehost.com/file.zip\n    md5: e9013fc202c87be48e3b302df10efc4b\n    target: target.zip".encode())
 
         k = mock.patch.dict(os.environ, {'DOGEN_SOURCES_CACHE':'http://cache/get?#algorithm#=#hash#'})
         k.start()
@@ -408,7 +408,7 @@ class TestConfig(unittest.TestCase):
     @mock.patch('dogen.generator.Generator._fetch_file')
     def test_handling_sources_with_cache_url_with_filename_to_replace(self, mock_fetch_file, mock_check_sum):
         with self.descriptor as f:
-            f.write("sources:\n  - url: http://somehost.com/file.zip\n    md5: e9013fc202c87be48e3b302df10efc4b\n    target: target.zip".encode())
+            f.write("sources:\n  - artifact: http://somehost.com/file.zip\n    md5: e9013fc202c87be48e3b302df10efc4b\n    target: target.zip".encode())
 
         k = mock.patch.dict(os.environ, {'DOGEN_SOURCES_CACHE':'http://cache/#filename#'})
         k.start()
@@ -418,3 +418,31 @@ class TestConfig(unittest.TestCase):
         k.stop()
 
         mock_fetch_file.assert_called_with('http://cache/file.zip', 'target/target.zip')
+
+    # https://github.com/jboss-dockerfiles/dogen/issues/132
+    @mock.patch('dogen.generator.Generator.check_sum')
+    @mock.patch('dogen.generator.Generator._fetch_file')
+    def test_handling_sources_with_url_and_artifact_keys_set(self, mock_fetch_file, mock_check_sum):
+        with self.descriptor as f:
+            f.write("sources:\n  - url: http://something.com\n    artifact: http://somehost.com/file.zip\n    md5: e9013fc202c87be48e3b302df10efc4b\n    target: target.zip".encode())
+
+        generator = Generator(self.log, self.args)
+        generator.configure()
+        generator.handle_sources()
+
+        self.log.warn.assert_any_call("The 'url' key is deprecated, please use 'artifact' for specifying the http://something.com artifact location")
+        self.log.warn.assert_any_call("You specified both: 'artifact' and 'url' for a source file, 'artifact': will be used: http://somehost.com/file.zip")
+        mock_fetch_file.assert_called_with('http://somehost.com/file.zip', 'target/target.zip')
+
+    @mock.patch('dogen.generator.Generator._fetch_file')
+    def test_handling_sources_should_fail_when_no_artifact_nor_url_is_provided(self, mock_fetch_file):
+        with self.descriptor as f:
+            f.write("sources:\n  - md5: e9013fc202c87be48e3b302df10efc4b\n    target: target.zip".encode())
+
+        generator = Generator(self.log, self.args)
+        generator.configure()
+
+        with self.assertRaises(Error) as cm:
+            generator.handle_sources()
+
+        self.assertEquals(str(cm.exception), "Artifact location for one or more sources was not provided, please check your image descriptor!")

pip install -e .
parse_log_pytest
requirements.txt
pytest pytest-cov mock
apt-get update apt-get install -y gcc
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
certifi==2025.1.31
charset-normalizer==3.4.1
coverage==7.8.0
docopt==0.6.2
-e git+https://github.com/jboss-dockerfiles/dogen.git@a155c8b0383d66f5a4f81501e855edfcb148cb3e#egg=dogen
exceptiongroup==1.2.2
idna==3.10
iniconfig==2.1.0
Jinja2==3.1.6
MarkupSafe==3.0.2
mock==5.2.0
packaging==24.2
pluggy==1.5.0
pykwalify==1.8.0
pytest==8.3.5
pytest-cov==6.0.0
python-dateutil==2.9.0.post0
PyYAML==6.0.2
requests==2.32.3
ruamel.yaml==0.18.10
ruamel.yaml.clib==0.2.12
six==1.17.0
tomli==2.2.1
urllib3==2.3.0

name: dogen
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - certifi==2025.1.31
      - charset-normalizer==3.4.1
      - coverage==7.8.0
      - docopt==0.6.2
      - exceptiongroup==1.2.2
      - idna==3.10
      - iniconfig==2.1.0
      - jinja2==3.1.6
      - markupsafe==3.0.2
      - mock==5.2.0
      - packaging==24.2
      - pluggy==1.5.0
      - pykwalify==1.8.0
      - pytest==8.3.5
      - pytest-cov==6.0.0
      - python-dateutil==2.9.0.post0
      - pyyaml==6.0.2
      - requests==2.32.3
      - ruamel-yaml==0.18.10
      - ruamel-yaml-clib==0.2.12
      - six==1.17.0
      - tomli==2.2.1
      - urllib3==2.3.0
prefix: /opt/conda/envs/dogen

tests/test_unit_generate_configuration.py::TestConfig::test_handling_sources tests/test_unit_generate_configuration.py::TestConfig::test_handling_sources_should_fail_when_no_artifact_nor_url_is_provided tests/test_unit_generate_configuration.py::TestConfig::test_handling_sources_when_local_file_exists_and_is_broken tests/test_unit_generate_configuration.py::TestConfig::test_handling_sources_when_local_file_exists_and_is_correct tests/test_unit_generate_configuration.py::TestConfig::test_handling_sources_with_cache_url tests/test_unit_generate_configuration.py::TestConfig::test_handling_sources_with_cache_url_and_target_filename tests/test_unit_generate_configuration.py::TestConfig::test_handling_sources_with_cache_url_with_filename_to_replace tests/test_unit_generate_configuration.py::TestConfig::test_handling_sources_with_deprecated_md5sum tests/test_unit_generate_configuration.py::TestConfig::test_handling_sources_with_multiple_hashes tests/test_unit_generate_configuration.py::TestConfig::test_handling_sources_with_multiple_hashes_and_cache_url tests/test_unit_generate_configuration.py::TestConfig::test_handling_sources_with_sha1 tests/test_unit_generate_configuration.py::TestConfig::test_handling_sources_with_sha256 tests/test_unit_generate_configuration.py::TestConfig::test_handling_sources_with_target_filename tests/test_unit_generate_configuration.py::TestConfig::test_handling_sources_with_url_and_artifact_keys_set tests/test_unit_generate_configuration.py::TestConfig::test_handling_sources_without_specified_md5sum
tests/test_unit_generate_configuration.py::TestConfig::test_custom_script_exec tests/test_unit_generate_configuration.py::TestConfig::test_custom_script_exec_not_env tests/test_unit_generate_configuration.py::TestConfig::test_custom_script_user_not_default tests/test_unit_generate_configuration.py::TestConfig::test_custom_script_user_not_env tests/test_unit_generate_configuration.py::TestConfig::test_custom_scripts_dir_in_cli_should_override_in_descriptor tests/test_unit_generate_configuration.py::TestConfig::test_custom_scripts_dir_in_descriptor tests/test_unit_generate_configuration.py::TestConfig::test_custom_template_in_cli_should_override_in_descriptor tests/test_unit_generate_configuration.py::TestConfig::test_custom_template_in_descriptor tests/test_unit_generate_configuration.py::TestConfig::test_default_script_exec tests/test_unit_generate_configuration.py::TestConfig::test_default_script_user tests/test_unit_generate_configuration.py::TestConfig::test_default_values tests/test_unit_generate_configuration.py::TestConfig::test_do_not_skip_ssl_verification_in_cli_false_should_override_descriptor tests/test_unit_generate_configuration.py::TestConfig::test_do_not_skip_ssl_verification_in_descriptor tests/test_unit_generate_configuration.py::TestConfig::test_env_provided_script_user tests/test_unit_generate_configuration.py::TestConfig::test_env_supplied_script_exec tests/test_unit_generate_configuration.py::TestConfig::test_fail_if_version_mismatch tests/test_unit_generate_configuration.py::TestConfig::test_no_scripts_defined tests/test_unit_generate_configuration.py::TestConfig::test_scripts_dir_found_by_convention tests/test_unit_generate_configuration.py::TestConfig::test_skip_ssl_verification_in_descriptor
dogen/schema/kwalify_schema.yaml dogen/generator.py dogen/template_helper.py
dogen/schema/kwalify_schema.yaml dogen/generator.py dogen/template_helper.py