Hello Charan,
In the RuleApp archive, this information is stored into META-INF/archive.xml file.
In maven, you can use the provided ANT task directly using the maven-antrun-plugin :
<plugin>
[...]
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<!-- Install ruleapps -->
<execution>
<id>install-ruleapps</id>
<phase>generate-test-resources</phase>
<configuration>
<tasks>
<taskdef name="res-write-file" classname="ilog.rules.res.tools.persistence.IlrWriteFileTask">
<classpath refid="maven.runtime.classpath" />
</taskdef>
<taskdef name="for" classname="net.sf.antcontrib.logic.ForTask">
<classpath refid="maven.runtime.classpath" />
</taskdef>
<for param="file">
<path>
<fileset dir="${ruleapps.download.dir}">
<include name="**/*.jar"/>
</fileset>
</path>
<sequential>
<echo>Installing ruleApp @{file}</echo>
<res-write-file
failonerror="true" dir="${ruleset.repository.path}"
file="@{file}"
mergingpolicy="REPLACE_MERGING_POLICY"/>
</sequential>
</for>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
[...]
</plugin>
Hope this helps,
Nicolas
------------------------------
NICOLAS PEULVAST
------------------------------
Original Message:
Sent: Wed May 11, 2022 09:15 PM
From: Charan Paladugu
Subject: Equivalent for the ant task 'res-write-file' in Build Command Maven plugin
When I use a decision deployment in the Rule Designer to deploy the RuleApp to a 'Local Rule Execution Server on Java SE' target server (res_data folder), the RuleApp/1.0 and Ruleset/1.0 folders contain the below mandatory files for the rules execution using j2serulesession. However, the RuleApp archive produced by the maven plugin for the same deployment doesn't include the below files.
1) creation_date.txt
2) properties.txt
3) display_name.txt
Isn't that a bug in the Build Command maven plugin? If not, why is there a difference in the created archives content?
------------------------------
Charan Paladugu
------------------------------