Skip to main content

Posts

Showing posts from November, 2012

Generate Application Tokens & User Tokens from WSO2 API Manager

WSO2 API Manager provides a complete solution for publishing APIs,creating and managing a developer community and a scalable routing API trafic .If you are already familiar with this product,you are familiar with its one of basic component -'API Store'. A deployed API Store provides a single place to all third party and internal API consumers to browse available APIs and subscribe to them as they want.If such a consumer follow the subscription process of this store-front UI,he'll notice it's a process of subscribing a selected set of APIs into a application and  giving a result with generated three keys as access token,consumer key and consumer secret adhreing to OAuth 2.0 spec. In other words,it's the process of an Application developer [Say John a mobile app developer] select the APIs which needed to use from his application and subscribe to those APIs from his created application.As the result of this subscription process the application developer,John is...

Running a SQL script at build time of a maven project

The above requirement was arisen while working on an implementation of a WSO2 carbon platform feature.I'm planning to write another blog post on how I acomplish writing that feature in a seperated blog.Until that from this blog,I'll explain,how I achieve one part of that work-Run a database sql script on a specific database while building a maven project.This was achieved through using the Apache Maven AntRun Plugin . This plugin could embed to a maven module pom and simply execute it while building the maven project from its pom.What you have to do is add the sql task as the running goal inside the above plugin as shown in below and the full pom.xml can be found from here .If you are going to add this plugin to a pom.xml of a maven project,add it to section of the pom.Note how the jdbc driver,database url,database username/passwords and the database script defined in the plugin.