This repository contains major components which are used to build the API Manager product.
If you want to build carbon-apimgt from the source code:
- Install Java 8 (http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
- Install Apache Maven 3.x.x (https://maven.apache.org/download.cgi#)
- Get a clone or download the source from this repository (https://github.com/wso2/carbon-apimgt.git).
- Run the Maven command
mvn clean install
from thecarbon-apimgt
directory.
-
Install docker
-
Go inside to the carbon-apimgt directory
-
Run integration test by giving following commands
- mvn clean install -P local-h2
- mvn clean install -P local-mysql
- mvn clean install -P local-postgres
- mvn clean install -P local-mssql
- mvn clean install -P local-oracle
* mvn -P local-mysql -Dmaven.failsafe.debug verify
Note: local-mysql is the profile. Use other profiles accordingly.
* mvn -Dmaven.surefire.debug="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent -Djava.compiler=NONE" test
1. Build following repositories.
* https://github.com/swagger-api/swagger-codegen
* https://github.com/sanjeewa-malalgoda/swagger2MSF4J
2. If you going to add or modify the publisher REST API then add your API definition changes into the publisher-api.yaml
Likewise, if you are going to add or modify the store REST API then add your API definition changes into the store-api.yaml
3 Build the org.wso2.carbon.apimgt.rest.api.publisher or org.wso2.carbon.apimgt.rest.api.store REST API components with following command.
* mvn swagger2msf4j:generate
NOTE: This command will erase some existing classes. Please filter relevant changes which regard to your modification.
4. Increase the service count by number of APIs that you create(This requires only if you add new API).
<carbon.component>
osgi.service; objectClass="org.wso2.msf4j.Microservice"; serviceCount="5"
</carbon.component>