Skip to content
This repository has been archived by the owner on Apr 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #977 from sajithaliyanage/master
Browse files Browse the repository at this point in the history
Pack API controller with Integration Studio
  • Loading branch information
sajithaliyanage authored May 15, 2020
2 parents d9abe5c + b5a8e68 commit 9479bde
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 1 deletion.
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
<wso2.tomcat.version>7.0.59.wso2v3</wso2.tomcat.version>
<mi.product.version>1.1.0-beta3</mi.product.version>
<apache.maven.version>3.6.3</apache.maven.version>
<apim.ctl.version>3.1.1</apim.ctl.version>
</properties>
<repositories>
<repository>
Expand Down
69 changes: 68 additions & 1 deletion rcp-product/org.wso2.developerstudio.rcp.product/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,73 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.3.0</version>
<executions>
<execution>
<id>download-apictl-linux-i586</id>
<phase>prepare-package</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://github.com/wso2/product-apim-tooling/releases/download/v${apim.ctl.version}/apictl-${apim.ctl.version}-linux-i586.tar.gz</url>
<unpack>false</unpack>
<outputDirectory>${project.build.directory}/apictl/apictl-linux-i586</outputDirectory>
</configuration>
</execution>
<execution>
<id>download-apictl-linux-x64</id>
<phase>prepare-package</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://github.com/wso2/product-apim-tooling/releases/download/v${apim.ctl.version}/apictl-${apim.ctl.version}-linux-x64.tar.gz</url>
<unpack>false</unpack>
<outputDirectory>${project.build.directory}/apictl/apictl-linux-x64</outputDirectory>
</configuration>
</execution>
<execution>
<id>download-apictl-windows-i586</id>
<phase>prepare-package</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://github.com/wso2/product-apim-tooling/releases/download/v${apim.ctl.version}/apictl-${apim.ctl.version}-windows-i586.zip</url>
<unpack>false</unpack>
<outputDirectory>${project.build.directory}/apictl/apictl-windows-i586</outputDirectory>
</configuration>
</execution>
<execution>
<id>download-apictl-windows-x64</id>
<phase>prepare-package</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://github.com/wso2/product-apim-tooling/releases/download/v${apim.ctl.version}/apictl-${apim.ctl.version}-windows-x64.zip</url>
<unpack>false</unpack>
<outputDirectory>${project.build.directory}/apictl/apictl-windows-x64</outputDirectory>
</configuration>
</execution>
<execution>
<id>download-apictl-macosx-x64</id>
<phase>prepare-package</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://github.com/wso2/product-apim-tooling/releases/download/v${apim.ctl.version}/apictl-${apim.ctl.version}-macosx-x64.tar.gz</url>
<unpack>false</unpack>
<outputDirectory>${project.build.directory}/apictl/apictl-macosx-x64</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
Expand Down Expand Up @@ -177,7 +244,7 @@
<goal>exec</goal>
</goals>
<configuration>
<commandlineArgs>${mi.product.version} ${apache.maven.version}</commandlineArgs>
<commandlineArgs>${mi.product.version} ${apache.maven.version} ${apim.ctl.version}</commandlineArgs>
<executable>${project.basedir}/scripts/installer-script-oxygen.sh</executable>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
BASE_DIR=$(pwd)
PRODUCT_VERSION=$1
APACHE_MAVEN_VERSION=$2
APIM_CTL_VERSION=$3

echo BASE_DIR $BASE_DIR and PRODUCT_VERSION $PRODUCT_VERSION

Expand Down Expand Up @@ -37,6 +38,14 @@ JDK_DISTRIBUTION_PATH_LINUX=$JDK_DISTRIBUTION_PATH/jdk-linux
JDK_DISTRIBUTION_PATH_WINDOWS=$JDK_DISTRIBUTION_PATH/jdk-windows
JDK_DISTRIBUTION_PATH_MACOS=$JDK_DISTRIBUTION_PATH/jdk-macos

# Location of apictl distributions
APICTL_DISTRIBUTION_PATH=$BASE_DIR/target/apictl
APICTL_DISTRIBUTION_PATH_LINUX_86=$APICTL_DISTRIBUTION_PATH/apictl-linux-i586
APICTL_DISTRIBUTION_PATH_LINUX_64=$APICTL_DISTRIBUTION_PATH/apictl-linux-x64
APICTL_DISTRIBUTION_PATH_WINDOWS_86=$APICTL_DISTRIBUTION_PATH/apictl-windows-i586
APICTL_DISTRIBUTION_PATH_WINDOWS_64=$APICTL_DISTRIBUTION_PATH/apictl-windows-x64
APICTL_DISTRIBUTION_PATH_MACOSX_64=$APICTL_DISTRIBUTION_PATH/apictl-macosx-x64

# Micro Integrator configurations
DEPLOYMENT_FILE=deployment.toml
DEPLOYMENT_FILE_PATH=resources/$DEPLOYMENT_FILE
Expand Down Expand Up @@ -96,6 +105,27 @@ rm -rf $PRODUCT_PATH_ROOT/WSO2-Integration-Studio-win32.win32.x86.zip
rm -rf $PRODUCT_PATH_ROOT/WSO2-Integration-Studio-win32.win32.x86_64.zip
rm -rf $PRODUCT_PATH_ROOT/WSO2-Integration-Studio-macosx.cocoa.x86_64.tar.gz

# Extract api-ctl to relevant packages
pushd ${APICTL_DISTRIBUTION_PATH_LINUX_86}
tar xzf apictl-$APIM_CTL_VERSION-linux-i586.tar.gz -C $PRODUCT_PATH_LINUX_86
popd

pushd ${APICTL_DISTRIBUTION_PATH_LINUX_64}
tar xzf apictl-$APIM_CTL_VERSION-linux-x64.tar.gz -C $PRODUCT_PATH_LINUX_64
popd

pushd ${APICTL_DISTRIBUTION_PATH_WINDOWS_86}
unzip apictl-$APIM_CTL_VERSION-windows-i586.zip -d $PRODUCT_PATH_WIN_86
popd

pushd ${APICTL_DISTRIBUTION_PATH_WINDOWS_64}
unzip apictl-$APIM_CTL_VERSION-windows-x64.zip -d $PRODUCT_PATH_WIN_64
popd

pushd ${APICTL_DISTRIBUTION_PATH_MACOSX_64}
tar xzf apictl-$APIM_CTL_VERSION-macosx-x64.tar.gz -C $PRODUCT_PATH_MACOS/DeveloperStudio.app/Contents/Eclipse
popd

# Extract JDK distributions
pushd ${JDK_DISTRIBUTION_PATH_LINUX}
mv $JDK_DISTRIBUTION_FILE_PREFIX* $JDK_DISTRIBUTION_NAME.tar.gz
Expand Down Expand Up @@ -210,6 +240,7 @@ popd
# Cleanup
rm $PRODUCT_PATH_ROOT/wso2mi-$PRODUCT_VERSION.zip
rm $PRODUCT_PATH_ROOT/apache-maven-${APACHE_MAVEN_VERSION}-bin.zip
rm -rf $APICTL_DISTRIBUTION_PATH
rm -rf $PRODUCT_PATH_ROOT/temp
rm -rf $PRODUCT_PATH_ROOT/IntegrationStudio
rm -rf $JDK_DISTRIBUTION_PATH
Expand Down

0 comments on commit 9479bde

Please sign in to comment.