Is there a way to read a text from a text.file and set it to maven property in pom.xml maven? I am trying with the below code. But, I will need to read the text from tmp.txt and assign it to the maven property "token".
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.5.0</version>
<executions>
<execution>
<id>generate-random-string</id>
<phase>install</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>bash</executable>
<arguments>
<argument>temp.sh</argument>
</arguments>
<workingDirectory>temp.txt</workingDirectory>
</configuration>
</execution>
</executions>
</plugin>
temp.sh
PWD=${openssl rand hex 12}
echo $PWD >> temp.txt