Skip to content

Commit

Permalink
Merge pull request #612 from rosensilva/main
Browse files Browse the repository at this point in the history
configure maven to download mi from github
  • Loading branch information
sajithaliyanage authored Jan 28, 2021
2 parents 151c81b + 753bb69 commit f9464cb
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,45 @@
<artifactId>org.wso2.integrationstudio.carbonserver44microei40</artifactId>
<packaging>eclipse-plugin</packaging>
<name>Integration Studio Enterprise Integrator (Carbon 4.4 based)</name>
<build>
<plugins>
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>${maven.download.plugin}</version>
<executions>
<execution>
<id>download-mi-runtime</id>
<phase>initialize</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://github.com/wso2/micro-integrator/releases/download/v${mi.product.version}/wso2mi-${mi.product.version}.zip</url>
<unpack>false</unpack>
<outputDirectory>${project.basedir}/resources/server/</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>exec-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<version>${org.codehaus.mojo.exec.maven.plugin}</version>
<executions>
<execution>
<id>change-mi-deployment-toml</id>
<phase>initialize</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<commandlineArgs>${mi.product.version}</commandlineArgs>
<executable>${project.basedir}/resources/scripts/configure-mi-script.sh</executable>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#! /bin/bash
BASE_DIR=$(pwd)
PRODUCT_VERSION=$1
SERVER_PATH_ROOT=$BASE_DIR/resources/server

echo BASE_DIR: $BASE_DIR, PRODUCT_VERSION: $PRODUCT_VERSION and SERVER_PATH_ROOT: $SERVER_PATH_ROOT

# Micro Integrator configurations
DEPLOYMENT_FILE=deployment.toml
DEPLOYMENT_FILE_PATH=$SERVER_PATH_ROOT/$DEPLOYMENT_FILE

# Unzip micro esb to relevant packages
unzip $SERVER_PATH_ROOT/wso2mi-${PRODUCT_VERSION}.zip -d $SERVER_PATH_ROOT

# Cleanup
rm $SERVER_PATH_ROOT/wso2mi-$PRODUCT_VERSION.zip

# Rename as "microesb" (this is the static name used in EI Tooling code)
mv $SERVER_PATH_ROOT/wso2mi-$PRODUCT_VERSION $SERVER_PATH_ROOT/microesb

# Replace "deployment.toml" in Micro Integrator
cp -f $DEPLOYMENT_FILE_PATH $SERVER_PATH_ROOT/microesb/conf

# Zip the packages with microesb and JDK
cd $SERVER_PATH_ROOT
zip -r microesb.zip microesb/
rm -r microesb

echo Completed Micro Integrator Packaging

This file was deleted.

7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@
<module>components/bps-tools</module>
</modules>
</profile>
<profile>
<id>server-tools</id>
<modules>
<module>components/studio-platform</module>
<module>components/sever-tools</module>
</modules>
</profile>
<profile>
<activation>
<activeByDefault>true</activeByDefault>
Expand Down

0 comments on commit f9464cb

Please sign in to comment.