Hi Nipuni,

Is it feasible to read the property directly from the file system? For
example, we can get the project version from the file META-INF/maven/${
groupId}/${artifactId}/pom.properties of the jar.

On Wed, Apr 18, 2018 at 11:06 AM, Nipuni Bhagya <nipu...@wso2.com> wrote:

> Hi,
>
> Thanks for the quick response.
>
> If you can run the shell script as a step in maven process, you can easily
>> pass the ${project.version} using exec-maven-plugin
>>
>
> Hi Amalka,
>
> The issue is we run the script after maven process.
>
>
>> You can use xmlstarlet to read the version of the project without adding
>>> a maven plugin to POM file. I used this to read XML values in the command
>>> line. An example can be found here [2]
>>>
>>> [1]: http://xmlstar.sourceforge.net/doc/UG/xmlstarlet-ug.html
>>> [2]: https://stackoverflow.com/questions/12640152/xmlstarlet
>>> -select-value
>>>
>>
> Hi Abimaran,
>
> It was initially decided not to use any external tools for this task. So
> we will need an approach which does not require any external XML tools.
>
> --
>
>
>
> *Kind Regards,Nipuni Bhagya*
>
> *Software Engineering Intern*
> *WSO2*
>
>
>
> *Mobile : +94 0779028904 <+94%2077%20767%201807>*
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Regards,

*Thishani Lucas*
*Software Engineer*
*WSO2 Lanka (Private) Limited**: http://wso2.com <http://wso2.com/>*
*lean.enterprise.middle-ware*

*Tel: +94 77 2556931 *

*LinkedIn: https://www.linkedin.com/in/thishani-lucas/
<https://www.linkedin.com/in/thishani-lucas/>*

<http://wso2.com/signature>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to