This documentation is for WSO2 Carbon 4.4.6. View documentation for the latest release.
Page Comparison - Creating New Server Profiles (v.1 vs v.2) - Carbon 4.4.6 - WSO2 Documentation

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
maxLevel3
minLevel3

Installing features to the default profile

The Carbon kernel gets shipped with the default profile. Therefore, it is just a matter of installing new features on top of the existing 'default' profile.

Code Block
<execution>
	<id>3-p2-profile-generation</id>
	<phase>package</phase>
	<goals>
		<goal>p2-profile-gen</goal>
	</goals>
	<configuration>
		<profile>default</profile>
		<metadataRepository>file:${basedir}/target/p2-repo</metadataRepository>
		<artifactRepository>file:${basedir}/target/p2-repo</artifactRepository>
		<destination>
			${basedir}/target/wso2carbon-core-${carbon.kernel.version}/repository/components
		</destination>
		<deleteOldProfileFiles>true</deleteOldProfileFiles>
		<features>
			<feature>
				<id>org.wso2.carbon.custom.feature.group</id>
				<version>$custom.verion</version>
			</feature>
		</features>
	</configuration>
</execution>

Creating a new server profile and installing features

Creating a new server profile is equal to materializing a new profile. Therefore, first we have to publish the product definition to a P2-repo and refer it while materializing a product.

Publishing the product definition to p2-repo

Code Block
<execution>
	<id>publishing product</id>
	<phase>package</phase>
	<goals>
		<goal>publish-product</goal>
	</goals>
	<configuration>
		<productConfigurationFile>
			${basedir}/carbon.product
		</productConfigurationFile>
		<executable>
			${basedir}/target/org.eclipse.equinox.executable_3.5.0.v20110530-7P7NFUFFLWUl76mart
		</executable>
		<metadataRepository>file:${basedir}/target/p2-repo</metadataRepository>
		<artifactRepository>file:${basedir}/target/p2-repo</artifactRepository>
	</configuration>
</execution>

Creating a new user profile

Code Block
<execution>
	<id>creating a new profile</id>
	<phase>package</phase>
	<goals>
		<goal>materialize-product</goal>
	</goals>
	<configuration>
		<productConfigurationFile>${basedir}/carbon.product</productConfigurationFile>
		<metadataRepository>file:${basedir}/target/p2-repo</metadataRepository>
		<artifactRepository>file:${basedir}/target/p2-repo</artifactRepository>
		<targetPath>file:${basedir}/target/wso2carbon-core-${carbon.kernel.version}/repository/components</targetPath>
		<profile>worker</profile>
	</configuration>
</execution>

Installing features to 'worker' profile

Code Block
<execution>
	<id>p2-profile-generation-for-worker-profile</id>
	<phase>package</phase>
	<goals>
		<goal>p2-profile-gen</goal>
	</goals>
	<configuration>
		<profile>worker</profile>
		<metadataRepository>file:${basedir}/target/p2-repo</metadataRepository>
		<artifactRepository>file:${basedir}/target/p2-repo</artifactRepository>
		<destination>
			${basedir}/target/wso2carbon-core-${carbon.kernel.version}/repository/components
		</destination>
		<deleteOldProfileFiles>true</deleteOldProfileFiles>
		<features>
			<feature>
			<id>org.wso2.carbon.core.common.feature.group</id>
			<version>${carbon.platform.version}</version>
			</feature>
			<feature>
			<id>org.wso2.carbon.core.server.feature.group</id>
			<version>${carbon.platform.version}</version>
			</feature>
			<feature>
			<id>org.wso2.carbon.core.runtime.feature.group</id>
			<version>${carbon.platform.version}</version>
			</feature>
			<feature>
				<id>org.wso2.carbon.custom.feature.group</id>
				<version>$custom.verion</version>
			</feature>
		</features>
	</configuration>
</execution>

Listing the available profiles in a server

  1. Start the server with -DosgiConsole system property.
    This will give the access to the OSGi console.
  2. Execute the command provlp.
    This will give the list of server profiles available in the run-time.

Starting a specific server profile

You can generally start the server with the server profile name given as the input parameter as shown below.

...