Re: [Dev] WSO2 EI - org.apache.cxf.jaxws.spi.ProviderImpl not found

2018-04-18 Thread Shakila Sasikaran
Hi,

Can you try by excluding the other cxf-bundle while adding the dependency?


  x
  x
  
  compile
  

  y
  y

  


Thanks

On Thu, Apr 19, 2018 at 1:24 AM, Júnior  wrote:

> I found tha there is a bundle provided by wso2:
> cxf-bundle-2.6.1.wso2v2.jar
>
> Using it I am getting another problem:
>
> java.lang.LinkageError: loader constraint violation: when resolving method
> "org.apache.ws.commons.schema.XmlSchemaCollection.
> getNamespaceContext()Lorg/apache/ws/commons/schema/utils/NamespacePrefixList;"
> the class loader (instance of 
> org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader)
> of the current class, org/apache/cxf/common/xmlschema/SchemaCollection,
> and the class loader (instance of 
> org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader)
> for the method's defining class, 
> org/apache/ws/commons/schema/XmlSchemaCollection,
> have different Class objects for the type 
> org/apache/ws/commons/schema/utils/NamespacePrefixList
> used in the signature
>
>
> As I could see, there is a bundle exporting this package in a different
> version. Have you seen this error before?
>
> Thanks,
>
>
>
> 2018-04-17 19:25 GMT-03:00 Júnior :
>
>> I tried adding the cxf-bundle:cxf-bundle-2.2.5.jar
>>
>> And I am receiving this error:
>>
>> gogo: BundleException: The bundle "org.apache.cxf.bundle_2.2.5 [172]"
>> could not be resolved. Reason: Missing Constraint: Import-Package:
>> javax.activation; version="[1.1.0,2.0.0)"
>> osgi>
>>
>> Do you know hwo to add this dependency?
>>
>> Thanks,
>>
>> 2018-04-17 6:16 GMT-03:00 Júnior :
>>
>>> Hi Shakila,
>>>
>>> I am not building the jar, it is a third party jar. As I could see, It
>>> has no reference tô cxf, but only jax-ws.
>>>
>>> I am trying to add the required jars to the dropins folder, this is
>>> still in progress.
>>>
>>> Getting the jars from wso2/lib/runtimes/cxf
>>>
>>> Thanks
>>>
>>> Em ter, 17 de abr de 2018 00:32, Shakila Sasikaran 
>>> escreveu:
>>>
 Hi,

 I hope you are building this jar from a maven project. Could you please
 share the pom file of this application? Could you please import the
 relevant package (org.apache.cxf.jaxws.spi) with correct version and
 try?

 Thanks

 On Tue, Apr 17, 2018 at 5:12 AM, Júnior  wrote:

> Hi,
>
> I am adding a jar file that uses a JAX-WS client to invoke a web
> service. When I am trying to execute the code, I am getting this error:
>
> javax.xml.ws.spi.FactoryFinder$ConfigurationError: Provider
> org.apache.cxf.jaxws.spi.ProviderImpl not found
>
> Caused by: javax.xml.ws.spi.FactoryFinder$ConfigurationError:
> Provider org.apache.cxf.jaxws.spi.ProviderImpl not found
> at javax.xml.ws.spi.FactoryFinder$2.run(FactoryFinder.java:130)
> at javax.xml.ws.spi.FactoryFinder.doPrivileged(FactoryFinder.java:220)
> at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:124)
> at javax.xml.ws.spi.FactoryFinder.access$200(FactoryFinder.java:44)
> at javax.xml.ws.spi.FactoryFinder$3.run(FactoryFinder.java:211)
> at javax.xml.ws.spi.FactoryFinder.doPrivileged(FactoryFinder.java:220)
> at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:160)
> at javax.xml.ws.spi.Provider.provider(Provider.java:43)
> at javax.xml.ws.Service.(Service.java:35)
>
>
> Do you know how to overcome this error?
>
> Thanks,
>
> --
> Francisco Ribeiro
> *SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


 --
 Shakila Sasikaran
 Software Engineer
 Mobile :+94 (0) 77 526 6848
 shak...@wso2.com
 WSO2, Inc.
 lean . enterprise . middleware
 http://www.wso2.com/

>>>
>>
>>
>> --
>> Francisco Ribeiro
>> *SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
>>
>
>
>
> --
> Francisco Ribeiro
> *SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
>



-- 
Shakila Sasikaran
Software Engineer
Mobile :+94 (0) 77 526 6848
shak...@wso2.com
WSO2, Inc.
lean . enterprise . middleware
http://www.wso2.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] WSO2 API Manager 2.2.0 Released!

2018-04-18 Thread Mushthaq Rumy
The WSO2 API Management team is pleased to announce the release of version
2.2.0 of the open source WSO2 API Manager.

WSO2 API Manager is a platform for creating, managing, consuming and
monitoring APIs. It employs proven SOA best practices to solve a wide range
of API management challenges such as API provisioning, API governance, API
security and API monitoring. It combines some of the most powerful and
mature components of the WSO2's state-of-the-art Carbon platform to deliver
a smooth and end-to-end API management experience while catering to both
API publisher and API consumer requirements.

WSO2 API Manager is comprised of several modules.

   -

   API Provider: Define new APIs and manage them
   -

   API Store: Browse published APIs and subscribe to them
   -

   API Gateway: The underlying API runtime based on WSO2 ESB
   -

   API Key Manager: Performs Key Generation and Key Validation
   functionalities
   -

   API Traffic Manager: Performs Rate Limiting of API Requests


For more information on WSO2 API Manager please visit
http://wso2.com/products/api-manager. Also take a look at the online
product documentation
.
How to Run

   1.

   Extract the downloaded zip
   2.

   Go to the bin directory in the extracted folder
   3.

   Run the wso2server.sh or wso2server.bat as appropriate
   4.

   Launch a web browser and navigate to https://localhost:9443/publisher to
   access the API provider webapp
   5.

   Navigate to https://localhost:9443/store to access the API store
   6.

   Navigate to https://localhost:9443/admin to access Admin Portal
   7.

   Use "admin", "admin" as the username and password to login as an admin


New Features

WSO2 API Manager version 2.2 is part of WSO2’s Spring 2018 Release

which includes new features and updates across all products, solutions, and
services, that together empower organizations to rapidly comply with GDPR.
For more information on new features please visit
https://docs.wso2.com/display/AM220/About+this+Release
Bug Fixes And Improvements

   -

   JIRA 
   -

   GitHub (product-apim
   
),
   (carbon-apimgt
   
),
   (analytics-apim
   

   )

Known Issues

   -

   JIRA 
   -

   GitHub (product-apim
   
),
   (carbon-apimgt
   
),
   (analytics-apim
   )

How You Can ContributeMailing Lists

Join our mailing list and correspond with the developers directly.

   -

   Developer List : dev@wso2.org | Subscribe | Mail Archive
   
   -

   User List : u...@wso2.org | Subscribe | Mail Archive
   

Reporting Issues

We encourage you to report issues, documentation faults, and feature
requests regarding WSO2 API Manager through the public API Manager Git Repo
.

-- The WSO2 API Manager Team --


-- 
Mushthaq Rumy
*Software Engineer*
Mobile : +94 (0) 779 492140 <%2B94%20%280%29%20773%20451194>
Email : musht...@wso2.com
WSO2, Inc.; http://wso2.com/
lean . enterprise . middleware.


___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 EI - org.apache.cxf.jaxws.spi.ProviderImpl not found

2018-04-18 Thread Júnior
I found tha there is a bundle provided by wso2:  cxf-bundle-2.6.1.wso2v2.jar

Using it I am getting another problem:

java.lang.LinkageError: loader constraint violation: when resolving method
"org.apache.ws.commons.schema.XmlSchemaCollection.getNamespaceContext()Lorg/apache/ws/commons/schema/utils/NamespacePrefixList;"
the class loader (instance of
org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current
class, org/apache/cxf/common/xmlschema/SchemaCollection, and the class
loader (instance of
org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for the method's
defining class, org/apache/ws/commons/schema/XmlSchemaCollection, have
different Class objects for the type
org/apache/ws/commons/schema/utils/NamespacePrefixList used in the signature


As I could see, there is a bundle exporting this package in a different
version. Have you seen this error before?

Thanks,



2018-04-17 19:25 GMT-03:00 Júnior :

> I tried adding the cxf-bundle:cxf-bundle-2.2.5.jar
>
> And I am receiving this error:
>
> gogo: BundleException: The bundle "org.apache.cxf.bundle_2.2.5 [172]"
> could not be resolved. Reason: Missing Constraint: Import-Package:
> javax.activation; version="[1.1.0,2.0.0)"
> osgi>
>
> Do you know hwo to add this dependency?
>
> Thanks,
>
> 2018-04-17 6:16 GMT-03:00 Júnior :
>
>> Hi Shakila,
>>
>> I am not building the jar, it is a third party jar. As I could see, It
>> has no reference tô cxf, but only jax-ws.
>>
>> I am trying to add the required jars to the dropins folder, this is still
>> in progress.
>>
>> Getting the jars from wso2/lib/runtimes/cxf
>>
>> Thanks
>>
>> Em ter, 17 de abr de 2018 00:32, Shakila Sasikaran 
>> escreveu:
>>
>>> Hi,
>>>
>>> I hope you are building this jar from a maven project. Could you please
>>> share the pom file of this application? Could you please import the
>>> relevant package (org.apache.cxf.jaxws.spi) with correct version and
>>> try?
>>>
>>> Thanks
>>>
>>> On Tue, Apr 17, 2018 at 5:12 AM, Júnior  wrote:
>>>
 Hi,

 I am adding a jar file that uses a JAX-WS client to invoke a web
 service. When I am trying to execute the code, I am getting this error:

 javax.xml.ws.spi.FactoryFinder$ConfigurationError: Provider
 org.apache.cxf.jaxws.spi.ProviderImpl not found

 Caused by: javax.xml.ws.spi.FactoryFinder$ConfigurationError: Provider
 org.apache.cxf.jaxws.spi.ProviderImpl not found
 at javax.xml.ws.spi.FactoryFinder$2.run(FactoryFinder.java:130)
 at javax.xml.ws.spi.FactoryFinder.doPrivileged(FactoryFinder.java:220)
 at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:124)
 at javax.xml.ws.spi.FactoryFinder.access$200(FactoryFinder.java:44)
 at javax.xml.ws.spi.FactoryFinder$3.run(FactoryFinder.java:211)
 at javax.xml.ws.spi.FactoryFinder.doPrivileged(FactoryFinder.java:220)
 at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:160)
 at javax.xml.ws.spi.Provider.provider(Provider.java:43)
 at javax.xml.ws.Service.(Service.java:35)


 Do you know how to overcome this error?

 Thanks,

 --
 Francisco Ribeiro
 *SCEA|SCJP|SCWCD|IBM Certified SOA Associate*

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev


>>>
>>>
>>> --
>>> Shakila Sasikaran
>>> Software Engineer
>>> Mobile :+94 (0) 77 526 6848
>>> shak...@wso2.com
>>> WSO2, Inc.
>>> lean . enterprise . middleware
>>> http://www.wso2.com/
>>>
>>
>
>
> --
> Francisco Ribeiro
> *SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
>



-- 
Francisco Ribeiro
*SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] PySiddhi 1.0.0 Released !

2018-04-18 Thread Anusha Jayasundara
PySiddhi 1.0.0 Released!

WSO2 Analytics team is pleased to announce the release of version 1.0.0 of
PySiddhi

PySiddhi is a Python Wrapper for Siddhi Library. The PySiddhi supports
Siddhi 4.x.x. A REST Client is also integrated to interact with WSO2 Stream
Processor 4.x.x.

You can download PySiddhi through python package management system by
running

> pip install pysiddhi4


How to Use

1. PySiddhi is depending on Cython. You can install Cython using the
following command

> pip install cython


2. Download siddhi-sdk distribution from
https://github.com/wso2/siddhi-sdk/releases

3. Extract downloaded siddhi-sdk zip and set the SIDDHISDK_HOME path to
siddhi-sdk directory.

4. Download the siddhi-python-api-proxy-4-1.0.0.jar from
https://github.com/wso2/PySiddhi/releases and copy to /lib
directory.

5. Use the Library using Python.

from PySiddhi4.core.SiddhiManager import SiddhiManager
> sm = SiddhiManager()
> 
> sm.shutdown()


*Refer samples to get more familiar with library functionality[1].

Please refer to Git repository for more details[2].




*How You Can ContributeMailing ListsJoin our mailing list and correspond
with the developers directly.Developer list: dev@wso2.org  |
Subscribe | Mail Archive User forum:
StackOverflow Reporting
IssuesWe encourage you to report issues and feature requests regarding
PySiddhi or in the Carbon base framework through the Github issue
page[3].SupportWe are committed to ensure your enterprise middleware
deployment is completely supported from evaluation to production. Our
unique approach ensures that all support leverages our open development
methodology and is provided by the very same engineers who build the
technology. For more details and to take advantage of this unique
opportunity, visit http://wso2.com/support/ Thank
you for your interest in SIddhi.-The WSO2 Analytics Team-*
[1] https://github.com/wso2/PySiddhi/tree/master/Tests
[2] https://github.com/wso2/PySiddhi#pysiddhi
[3] https://github.com/wso2/PySiddhi/issues


-- 

*Anusha Jayasundara*
Software Engineer | WSO2

Email : anus...@wso2.com
Mobile : +94772601160
Web : http://wso2.com
Lean.Enterprise.Middleware


___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] NPE when request a self contained access token with requested claims in OIDC

2018-04-18 Thread Nilasini Thirunavukkarasu
Hi,

As mentioned in [1], when we request a self-contained access token with
requested claims NPE is thrown.

The root cause is from [2] and [3]. Here we are filtering the claims from
request object where access token is null[3]. When we create jwt token,
before creating the token we are retrieving the requested claims and add
those to jwt claims[2]. So until we got the jwt claims, the JWT won't get
created. Created a git issue to track the issue [4].

Seems like this is a deadlock situation.  Callback handler needs an access
token to populate claims. JwtTokenIssuer is using callback handler to
populate claims in order to issue an access token. Looks like a design
issue in the jwt access token issuer.

Appreciate any input on this.


[1] [Dev] Issues with extra claims when using self-signed tokens
[2]
https://github.com/wso2-extensions/identity-inbound-auth-oauth/blob/master/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/token/JWTTokenIssuer.java#L160
[3]
https://github.com/wso2-extensions/identity-inbound-auth-oauth/blob/v5.6.63/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/openidconnect/DefaultOIDCClaimsCallbackHandler.java#L191
[4] https://github.com/wso2/product-is/issues/3086


Thanks,
Nila.

-- 
Nilasini Thirunavukkarasu
Software Engineer - WSO2

Email : nilas...@wso2.com
Mobile : +94775241823
Web : http://wso2.com/



___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Issues with extra claims when using self signed tokens

2018-04-18 Thread Nilasini Thirunavukkarasu
Hi Ciprian,

The issue is reproducible in default 5.5.0 pack when requesting a
self-contained access token with requested claims. Created a git issue to
track the issue [1].

[1] https://github.com/wso2/product-is/issues/3086

Thanks,
Nila.

On Tue, Apr 17, 2018 at 6:51 PM, Ciprian Sabolovits <
ciprian.sabolov...@cognosante.com> wrote:

> Hello,
>
>
>
> We are running WSO2 IS 550 using self signed tokens,. However it seems
> that we are not able to add any additional OpenID Claims to the JWT tokens.
> Whenever mapping a claim in a Service Provider as per the below a null
> pointer exceptions is thrown.
>
>
>
>1. Enabled Self Signed Tokens in identity.xml
>2. Configured new service provider
>   1. Added email address in the claim configuration
>
>
>1. Enabled OAuth.OpenID connect configuration
>   2. Create a new scope for email
>1. Whenever trying to get a token with a request
>
>
>
> curl --request POST \
>
>   --url https://localhost:9443/oauth2/token \
>
>   --header 'content-type: application/x-www-form-urlencoded' \
>
>   --data 'grant_type=password_id=CLIENT-ID_secret=
> CLIENT-SECRET=foo=foopass=openid%20esante'
>
>
>
> the following error and stacktrace is returned
>
>
>
> [2018-04-17 07:16:36,155] ERROR 
> {org.wso2.carbon.identity.oauth2.OAuth2Service}
> -  Error occurred while issuing the access token for Client ID :
> QWEQWEWQEsasdasda, User ID foo, Scope : [esante, openid] and Grant Type :
> password
>
> java.lang.NullPointerException
>
> at org.wso2.carbon.identity.oauth.tokenprocessor.
> HashingPersistenceProcessor.hash(HashingPersistenceProcessor.java:112)
>
> at org.wso2.carbon.identity.oauth.tokenprocessor.
> HashingPersistenceProcessor.getProcessedAccessTokenIdentifier(
> HashingPersistenceProcessor.java:77)
>
> at org.wso2.carbon.identity.oauth2.dao.AccessTokenDAOImpl.
> getTokenIdByAccessToken(AccessTokenDAOImpl.java:1512)
>
> at org.wso2.carbon.identity.oauth2.dao.AccessTokenDAOImpl.
> getTokenIdByAccessToken(AccessTokenDAOImpl.java:1477)
>
> at org.wso2.carbon.identity.openidconnect.dao.
> RequestObjectDAOImpl.getRequestedClaims(RequestObjectDAOImpl.java:258)
>
> at org.wso2.carbon.identity.openidconnect.RequestObjectService.
> getRequestedClaims(RequestObjectService.java:78)
>
> at org.wso2.carbon.identity.openidconnect.RequestObjectService.
> getRequestedClaimsForIDToken(RequestObjectService.java:94)
>
> at org.wso2.carbon.identity.openidconnect.
> DefaultOIDCClaimsCallbackHandler.filterClaimsFromRequestObject(
> DefaultOIDCClaimsCallbackHandler.java:210)
>
> at org.wso2.carbon.identity.openidconnect.
> DefaultOIDCClaimsCallbackHandler.filterOIDCClaims(
> DefaultOIDCClaimsCallbackHandler.java:192)
>
> at org.wso2.carbon.identity.openidconnect.
> DefaultOIDCClaimsCallbackHandler.filterOIDCClaims(
> DefaultOIDCClaimsCallbackHandler.java:164)
>
> at org.wso2.carbon.identity.openidconnect.
> DefaultOIDCClaimsCallbackHandler.getUserClaimsInOIDCDialect(
> DefaultOIDCClaimsCallbackHandler.java:150)
>
> at org.wso2.carbon.identity.openidconnect.
> DefaultOIDCClaimsCallbackHandler.handleCustomClaims(
> DefaultOIDCClaimsCallbackHandler.java:84)
>
> at org.wso2.carbon.identity.oauth2.token.JWTTokenIssuer.
> handleCustomClaims(JWTTokenIssuer.java:500)
>
> at org.wso2.carbon.identity.oauth2.token.JWTTokenIssuer.
> createJWTClaimSet(JWTTokenIssuer.java:403)
>
> at org.wso2.carbon.identity.oauth2.token.JWTTokenIssuer.
> buildJWTToken(JWTTokenIssuer.java:160)
>
> at org.wso2.carbon.identity.oauth2.token.JWTTokenIssuer.
> accessToken(JWTTokenIssuer.java:111)
>
> at org.wso2.carbon.identity.oauth2.token.handlers.grant.
> AbstractAuthorizationGrantHandler.getNewAccessToken(
> AbstractAuthorizationGrantHandler.java:391)
>
> at org.wso2.carbon.identity.oauth2.token.handlers.grant.
> AbstractAuthorizationGrantHandler.createNewTokenBean(
> AbstractAuthorizationGrantHandler.java:314)
>
> at org.wso2.carbon.identity.oauth2.token.handlers.grant.
> AbstractAuthorizationGrantHandler.generateNewAccessTokenResponse(
> AbstractAuthorizationGrantHandler.java:268)
>
> at org.wso2.carbon.identity.oauth2.token.handlers.grant.
> AbstractAuthorizationGrantHandler.issue(AbstractAuthorizationGrantHand
> ler.java:129)
>
> at org.wso2.carbon.identity.oauth2.token.AccessTokenIssuer.issue(
> AccessTokenIssuer.java:274)
>
> at org.wso2.carbon.identity.oauth2.OAuth2Service.issueAccessToken(
> OAuth2Service.java:225)
>
> at org.wso2.carbon.identity.oauth.endpoint.token.
> OAuth2TokenEndpoint.issueAccessToken(OAuth2TokenEndpoint.java:293)
>
> at org.wso2.carbon.identity.oauth.endpoint.token.
> OAuth2TokenEndpoint.issueAccessToken(OAuth2TokenEndpoint.java:89)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke(
> 

Re: [Dev] How to get the Maven project version into a shell script?

2018-04-18 Thread Me, Myself and I
I use the exec in the following way:

version=$(mvn -q -Dexec.executable=‘echo’ -Dexec.args=‘${project.version}’ 
--non-recursive exec:exec)

I hope this helps,

> On Apr 18, 2018, at 02:12, Thishani Lucas  wrote:
> 
> 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  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
>> 
>> 
>> 
>> ___
>> 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
> lean.enterprise.middle-ware
> 
> Tel: +94 77 2556931 
> LinkedIn: https://www.linkedin.com/in/thishani-lucas/
> 
> 
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to get the Maven project version into a shell script?

2018-04-18 Thread Thishani Lucas
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  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 *
*lean.enterprise.middle-ware*

*Tel: +94 77 2556931 *

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


___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev