IBM / cics-bundle-maven

The plugin to build and deploy CICS bundles in a Maven build.
https://ibm.github.io/cics-bundle-maven/plugin-info.html
Eclipse Public License 2.0
18 stars 25 forks source link

Support user property overrides #121

Closed ind1go closed 4 years ago

ind1go commented 4 years ago

Maven plugins permit the use of user properties, i.e. system properties that are recognised by the plugin and can be used to override its configuration. For example, from the invoker plugin:

image.png

These give flexibility to the build and allow overriding in different environments more easily.

Best practice for user properties is now to pick a prefix (invoker above) to namespace your properties, avoiding clashes with other plugins.

davenice commented 4 years ago

When we implement this, it would be great to address review comment on https://github.com/IBM/cics-bundle-maven/pull/120 - if we did this we could revert the URLs in the pom to https://yourcicsurl.9080 and then override with a user property in the invoker plugin.

davenice commented 4 years ago

can we go with: cicsbundle.username cicsbundle.password cicsbundle.url cicsbundle.insecure cicsbundle.bunddef cicsbundle.region cicsbundle.cicsplex cicsbundle.csdgroup cicsbundle.classifier cicsbundle.bundle

?

davenice commented 4 years ago

@stewartfrancis @sophiegreen @ind1go please - keen to get this done.

davenice commented 4 years ago

Also I don't think I can address the review comment on #120 here because although the user property for cicsbundle.url works, it will not override the url specified in the pom (you'd have to use a variable to achieve this, I think).

davenice commented 4 years ago

by implementing these variables, i was able to deploy my bundle without having any of the deployment config in my pom.xml, like this:

**mvn clean install com.ibm.cics:cics-bundle-maven-plugin:0.0.2-SNAPSHOT:deploy -Dcicsbundle.url=https://myhost:28951 -Dcicsbundle.username=USER -Dcicsbundle.password=PASS -Dcicsbundle.bunddef=DNDEMO2 -Dcicsbundle.csdgroup=DEMO -Dcicsbundle.cicsplex=CICSPLX -Dcicsbundle.region=IYCWEMW2 -Dcicsbundle.bundle=/Users/mydir/Documents/development/cics-bundle-demo/dn-demo-war/target/dn-demo-war-0.0.1-SNAPSHOT-cics-bundle.zip -Dcicsbundle.insecure=true

I haven't yet worked out if I can make use of the <dependency> tag - I don't think I can, have to specify the bundle path. However it's interesting that we can do this.