[rhq-project/rhq] e7124e: [BZ 873471] Token replacement takes into account <...
by Lukas Krejci
Branch: refs/heads/bug/873471
Home: https://github.com/rhq-project/rhq
Commit: e7124e5c9d97b3f363aae608395fe6f2e332f244
https://github.com/rhq-project/rhq/commit/e7124e5c9d97b3f363aae608395fe6f...
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: 2014-06-25 (Wed, 25 Jun 2014)
Changed paths:
M modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/AntLauncher.java
M modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/AntMain.java
M modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/task/BundleTask.java
M modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/type/AbstractFileType.java
M modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/type/AbstractUrlFileType.java
M modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/type/DeploymentUnitType.java
M modules/common/ant-bundle/src/test/java/org/rhq/bundle/ant/AntLauncherTest.java
A modules/common/ant-bundle/src/test/resources/ant-properties/deploy.xml
A modules/common/ant-bundle/src/test/resources/ant-properties/deployed.file
A modules/common/ant-bundle/src/test/resources/ant-properties/in-bundle.properties
Log Message:
-----------
[BZ 873471] Token replacement takes into account <property> properties
The ant users are used to defining properties using the standard ant
<property> task. We now recognize such properties when replacing
tokens in the bundle files.
To support <property file="..." /> format, the file in question has
to be defined as a bundle file using rhq:file or rhq:url-file. This
would make it deployed though, which might not be what the bundle
author wants, so a new attribute "deploy" has been added to all the
rhq:file, rhq:archive, rhq:url-file and rhq:url-archive, defaulting
to true, meaning whether to deploy the file/archive or not.
Also, the standard Ant <property> task can now appear inside
rhq:bundle alongside the rhq:input-property.
An example deploy.xml might look like this:
<?xml version="1.0"?>
<project name="property-demo" default="main"
xmlns:rhq="antlib:org.rhq.bundle">
<rhq:bundle name="Property loading demo" version="1.0">
<rhq:input-property name="user.provided"/>
<property name="bundle.defined" value="xxx"/>
<property file="in-bundle.properties"/>
<rhq:deployment-unit name="sample-deployment-unit"
compliance="full">
<rhq:file name="in-bundle.properties" deploy="false"/>
<rhq:file name="deployed.file" replace="true" />
</rhq:deployment-unit>
</rhq:bundle>
<target name="main"/>
</project>
The deployed.file mentioned above could contain the
@@bundle.defined(a)@ token which would be replaced with "xxx". It could
also contain tokens with names of any properties defined in the
"in-bundle.properties" file that is supposed to be placed in the
bundle file alongside the deploy.xml.
Commit: 026d67869bb506490f4de477fdc23e0bb8c5627b
https://github.com/rhq-project/rhq/commit/026d67869bb506490f4de477fdc23e0...
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: 2014-06-27 (Fri, 27 Jun 2014)
Changed paths:
M modules/common/ant-bundle/src/test/java/org/rhq/bundle/ant/AntLauncherTest.java
Log Message:
-----------
[BZ 873471] Added a testcase for loading properties from absolute path
Commit: 311c26f029b8dfcb02c382d410d6bd132fefa692
https://github.com/rhq-project/rhq/commit/311c26f029b8dfcb02c382d410d6bd1...
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: 2014-06-27 (Fri, 27 Jun 2014)
Changed paths:
M modules/common/ant-bundle/pom.xml
M modules/common/ant-bundle/src/test/java/org/rhq/bundle/ant/AntLauncherTest.java
R modules/common/ant-bundle/src/test/resources/ant-properties/deploy.xml
A modules/common/ant-bundle/src/test/resources/ant-properties/deploy.xml.properties-in-bundle
A modules/common/ant-bundle/src/test/resources/ant-properties/deploy.xml.properties-out-of-bundle
Log Message:
-----------
[BZ 873471] Added a testcase for loading properties from URL
+ a bit of test refactoring.
Commit: 1f1ad430bee1864d20256aad699e636717ed2652
https://github.com/rhq-project/rhq/commit/1f1ad430bee1864d20256aad699e636...
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: 2014-06-30 (Mon, 30 Jun 2014)
Changed paths:
M modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/AntLauncher.java
M modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/task/BundleTask.java
A modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/task/PropertyTask.java
M modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/type/AbstractFileType.java
M modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/type/DeploymentUnitType.java
M modules/common/ant-bundle/src/main/resources/org/rhq/bundle/antlib.xml
M modules/common/ant-bundle/src/test/java/org/rhq/bundle/ant/AntLauncherTest.java
M modules/common/ant-bundle/src/test/resources/ant-properties/deploy.xml.properties-in-bundle
A modules/common/ant-bundle/src/test/resources/ant-properties/deploy.xml.properties-in-bundle-props-deployed
A modules/common/ant-bundle/src/test/resources/ant-properties/deploy.xml.rhq-property-tag-in-bundle
A modules/common/ant-bundle/src/test/resources/ant-properties/deploy.xml.rhq-property-tag-in-destination
Log Message:
-----------
[BZ 873471] Support loading props from destination-relative paths.
This is done through a custom rhq:property task that extends Ant's
default property task and adds the new "relativeToDeployDir" boolean
attribute.
The properties (both "property" and "rhq:property") are handled in the
bundle task alongside the "rhq:input-property".
Commit: d1c0a1aa3218cbefca559be98bd845c113a3a456
https://github.com/rhq-project/rhq/commit/d1c0a1aa3218cbefca559be98bd845c...
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: 2014-07-01 (Tue, 01 Jul 2014)
Changed paths:
M modules/common/ant-bundle/pom.xml
M modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/task/PropertyTask.java
M modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/type/AbstractFileType.java
M modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/type/AbstractUrlFileType.java
Log Message:
-----------
[BZ 873471] Clean up - javadocs, unused methods, obsolete properties
Compare: https://github.com/rhq-project/rhq/compare/e7124e5c9d97^...d1c0a1aa3218
9 years, 10 months