Commit 4758ebbf authored by Arnaud Saval's avatar Arnaud Saval
Browse files

WEBLAB-820 update project building and dependency

use stable camel-weblab 2.0.2


git-svn-id: svn://svn.forge.objectweb.org/svnroot/weblab/trunk/WebLabApplications/bundle@3777 a803c184-d8de-4a0e-a52b-d3eef88212b6
parent e20c908f
......@@ -10,68 +10,68 @@
<fileSets>
<fileSet>
<directory>data</directory>
<directory>../data</directory>
<outputDirectory>data</outputDirectory>
</fileSet>
<fileSet>
<directory>conf/tomcat/conf</directory>
<directory>../conf/tomcat/conf</directory>
<outputDirectory>${tomcat.path}/conf</outputDirectory>
</fileSet>
<fileSet>
<!-- add solr configuration in WebLab Bundle conf dir -->
<directory>conf/solr</directory>
<directory>../conf/solr</directory>
<outputDirectory>conf/solr</outputDirectory>
</fileSet>
<fileSet>
<!-- add weblab-client/filter configuration in WebLab Bundle conf dir -->
<directory>conf/exposed-configuration</directory>
<directory>../conf/exposed-configuration</directory>
<outputDirectory>conf/exposed-configuration</outputDirectory>
</fileSet>
<fileSet>
<!-- Add Fuseki configuration in Weblab Bundle conf dir -->
<directory>conf/fuseki</directory>
<directory>../conf/fuseki</directory>
<outputDirectory>conf/fuseki</outputDirectory>
</fileSet>
<!-- Put Commons libraries into Tomcat -->
<fileSet>
<directory>libraries/services/target/services-libs</directory>
<directory>../libraries/services/target/services-libs</directory>
<outputDirectory>${tomcat.path}/lib/</outputDirectory>
</fileSet>
<!-- Put Commons libraries into Liferay -->
<fileSet>
<directory>libraries/portlets/target/portlets-libs</directory>
<directory>../libraries/portlets/target/portlets-libs</directory>
<outputDirectory>${liferay.tomcat.path}/lib/ext</outputDirectory>
</fileSet>
<!-- Copy content manager libs into tika service libs directory -->
<fileSet>
<directory>libraries/content/target/content-libs</directory>
<directory>../libraries/content/target/content-libs</directory>
<outputDirectory>${tomcat.path}/webapps/tika-normaliser/WEB-INF/lib</outputDirectory>
</fileSet>
<fileSet>
<!-- copy jbi samples and cxf sample -->
<directory>conf/samples</directory>
<directory>../conf/samples</directory>
<outputDirectory>conf/samples</outputDirectory>
</fileSet>
<fileSet>
<!-- copy configured cxf for simple-file-repository -->
<directory>conf/services</directory>
<directory>../conf/services</directory>
<outputDirectory>conf/services</outputDirectory>
</fileSet>
<fileSet>
<!-- karaf scripts for windows -->
<directory>scripts/karaf</directory>
<directory>../scripts/karaf</directory>
<outputDirectory>${karaf.path}/bin</outputDirectory>
</fileSet>
</fileSets>
<files>
<file>
<source>scripts/weblab.sh</source>
<source>../scripts/weblab.sh</source>
<outputDirectory>.</outputDirectory>
<filtered>true</filtered>
<fileMode>0755</fileMode>
</file>
<file>
<source>scripts/weblab.bat</source>
<source>../scripts/weblab.bat</source>
<outputDirectory>.</outputDirectory>
<filtered>true</filtered>
<fileMode>0755</fileMode>
......@@ -83,27 +83,27 @@
</file>
<file>
<!-- WebLab configuration -->
<source>conf/configuration.xml</source>
<source>../conf/configuration.xml</source>
<outputDirectory>conf</outputDirectory>
</file>
<file>
<!-- Content manager file -->
<source>conf/contentManager.properties</source>
<source>../conf/contentManager.properties</source>
<outputDirectory>conf</outputDirectory>
</file>
<file>
<!-- Service registry -->
<source>conf/camelBeans.xml</source>
<source>../conf/camelBeans.xml</source>
<outputDirectory>conf</outputDirectory>
</file>
<file>
<!-- Copy WebLab Launcher -->
<source>libraries/weblab-launcher/target/weblab-launcher-${project.version}-jar-with-dependencies.jar</source>
<source>../libraries/weblab-launcher/target/weblab-launcher-${project.version}-jar-with-dependencies.jar</source>
<destName>weblab-launcher.jar</destName>
</file>
<file>
<!-- Support inter pages events in portal-ext.properties -->
<source>conf/liferay/portal-ext.properties</source>
<source>../conf/liferay/portal-ext.properties</source>
<outputDirectory>${liferay.path}</outputDirectory>
</file>
<file>
......@@ -113,7 +113,7 @@
</file>
<file>
<!-- Add LGPL license -->
<source>LICENCE</source>
<source>../LICENCE</source>
</file>
</files>
<dependencySets>
......@@ -125,7 +125,6 @@
<include>com.liferay:liferay-portal-tomcat:zip</include>
<include>org.ow2.weblab.osgi:karaf-weblab:tar.gz</include>
<include>org.apache.jena:jena-fuseki:zip</include>
</includes>
<outputFileNameMapping>${artifact.artifactId}</outputFileNameMapping>
<unpack>true</unpack>
......
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.ow2.weblab.bundle</groupId>
<artifactId>bundle</artifactId>
<version>2.0.2</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>distribution</artifactId>
<packaging>pom</packaging>
<name>WebLab bundle assembly.</name>
<description>WebLab bundle application.</description>
<dependencies>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat</artifactId>
<version>${tomcat.version}</version>
<type>zip</type>
</dependency>
<dependency>
<groupId>com.liferay</groupId>
<artifactId>liferay-portal-tomcat</artifactId>
<version>${liferay.version}</version>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.ow2.weblab.osgi</groupId>
<artifactId>karaf-weblab</artifactId>
<version>${version}</version>
<type>tar.gz</type>
</dependency>
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-fuseki</artifactId>
<version>${fuseki.version}</version>
<classifier>distribution</classifier>
<type>zip</type>
</dependency>
<!-- Services -->
<dependency>
<groupId>org.ow2.weblab.webservices</groupId>
<artifactId>simple-file-repository</artifactId>
<version>${service.simple-file-repository.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.ow2.weblab.webservices</groupId>
<artifactId>tika-normaliser</artifactId>
<version>${service.tika-normaliser.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.ow2.weblab.webservices</groupId>
<artifactId>simple-gazetteer</artifactId>
<version>${service.simple-gazetteer.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.ow2.weblab.webservices</groupId>
<artifactId>ngramj-language-extraction</artifactId>
<version>${service.ngramj-language-extraction.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.ow2.weblab.webservices</groupId>
<artifactId>gate-extraction</artifactId>
<version>${service.gate-extraction.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.ow2.weblab.webservices</groupId>
<artifactId>solr-engine</artifactId>
<version>${service.solr-engine.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr</artifactId>
<version>${service.solr.version}</version>
<type>war</type>
</dependency>
<!-- Portlets -->
<dependency>
<groupId>org.ow2.weblab.portlets</groupId>
<artifactId>result-portlet</artifactId>
<version>${portlet.result-portlet.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.ow2.weblab.portlets</groupId>
<artifactId>search-portlet</artifactId>
<version>${portlet.search-portlet.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.ow2.weblab.portlets</groupId>
<artifactId>document-viewer-portlet</artifactId>
<version>${portlet.document-viewer-portlet.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.ow2.weblab.portlets</groupId>
<artifactId>weblab-metaview</artifactId>
<version>${portlet.metadata-portlet.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.ow2.weblab.portlets</groupId>
<artifactId>facet-portlet</artifactId>
<version>${portlet.facet-portlet.version}</version>
<type>war</type>
</dependency>
<!-- Common libraries to copy into Liferay -->
<dependency>
<groupId>org.ow2.weblab.portlets</groupId>
<artifactId>weblab-portlet</artifactId>
<version>${weblab.weblab-portlet.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>${jstl.version}</version>
<type>jar</type>
</dependency>
<!-- Libs for solr see: http://wiki.apache.org/solr/SolrLogging -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf.version}</version>
</dependency>
<!-- Liferay WebLab Team -->
<dependency>
<groupId>org.ow2.weblab.portlets</groupId>
<artifactId>weblab-theme</artifactId>
<version>2.0.0</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.ow2.weblab.portlets</groupId>
<artifactId>weblab-application-management-portlet</artifactId>
<version>2.0.0</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.ow2.weblab.portlets</groupId>
<artifactId>weblab-application-installer-portlet</artifactId>
<version>2.0.2</version>
<type>war</type>
</dependency>
<!-- Launcher server manager support -->
<dependency>
<groupId>org.ow2.weblab.bundle.servers</groupId>
<artifactId>karaf-manager</artifactId>
<version>${version}</version>
<classifier>libs</classifier>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.ow2.weblab.bundle.servers</groupId>
<artifactId>fuseki-manager</artifactId>
<version>${version}</version>
<classifier>libs</classifier>
<type>zip</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven.assembly-plugin.version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<archiverConfig>
<encoding>UTF-8</encoding>
</archiverConfig>
</configuration>
</execution>
</executions>
<configuration>
<descriptor>assembly.xml</descriptor>
<finalName>WebLab-Bundle-Karaf-${maven.build.timestamp}</finalName>
<encoding>UTF-8</encoding>
<outputDirectory>../target</outputDirectory>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-archiver</artifactId>
<version>2.4.4</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-component-api</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
......@@ -5,9 +5,9 @@
<parent>
<groupId>org.ow2.weblab.bundle</groupId>
<artifactId>versions</artifactId>
<version>2.0.2-SNAPSHOT</version>
<relativePath>../../versions/pom.xml</relativePath>
<artifactId>bundle</artifactId>
<version>2.0.2</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>org.ow2.weblab.osgi</groupId>
......
......@@ -19,8 +19,8 @@
-->
<features name="weblab-chains">
<feature name="weblab-camel-chains" version="${weblab.version}" resolver="(obr)">
<bundle>mvn:org.ow2.weblab.osgi/weblab-camel-chains/${weblab.version}</bundle>
<feature name="weblab-camel-chains" version="${weblab.bundle.version}" resolver="(obr)">
<bundle>mvn:org.ow2.weblab.osgi/weblab-camel-chains/${weblab.bundle.version}</bundle>
<feature dependency="true">camel-weblab</feature>
</feature>
</features>
......
......@@ -6,9 +6,9 @@
<parent>
<groupId>org.ow2.weblab.bundle</groupId>
<artifactId>versions</artifactId>
<version>2.0.2-SNAPSHOT</version>
<relativePath>../../versions/pom.xml</relativePath>
<artifactId>bundle</artifactId>
<version>2.0.2</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>org.ow2.weblab.osgi</groupId>
......
......@@ -14,7 +14,7 @@
<!-- <prop key="fuseki.http.port">3030</prop> -->
<prop key="tomcat.path">apache-tomcat-7.0.54</prop>
<prop key="liferay.path">liferay-portal-6.1.2-ce-ga3/tomcat-7.0.40</prop>
<prop key="karaf.path">karaf-weblab-2.0.2-SNAPSHOT</prop>
<prop key="karaf.path">karaf-weblab-2.0.2</prop>
<prop key="fuseki.path">jena-fuseki-1.0.1</prop>
<prop key="files.to.index">${weblab.data}toIndex</prop>
......@@ -136,6 +136,7 @@
<property name="home" value="${weblab.home}${karaf.path}" />
<property name="binDirectory" value="${weblab.home}${karaf.path}/bin" />
<property name="port" value="${karaf.http.port}" />
<property name="jmxName" value="karaf-weblab" />
<property name="jmxUser" value="weblab" />
<property name="jmxPassword" value="weblab" />
<property name="jmxPort" value="1099" />
......
......@@ -5,9 +5,9 @@
<parent>
<groupId>org.ow2.weblab.bundle</groupId>
<artifactId>versions</artifactId>
<version>2.0.2-SNAPSHOT</version>
<relativePath>../versions/pom.xml</relativePath>
<artifactId>bundle</artifactId>
<version>2.0.2</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.ow2.weblab.osgi</groupId>
......@@ -77,15 +77,13 @@
<descriptor>mvn:org.apache.activemq/activemq-karaf/${activemq.version}/xml/features</descriptor>
<descriptor>mvn:org.apache.camel.karaf/apache-camel/${camel.version}/xml/features</descriptor>
<descriptor>mvn:io.hawt/hawtio-karaf/${hawtio.version}/xml/features</descriptor>
<descriptor>mvn:org.ow2.weblab.engine/camel-weblab-karaf/${weblab.version}/xml/features</descriptor>
<descriptor>mvn:org.ow2.weblab.osgi/weblab-camel-chains-karaf/${weblab.version}/xml/features</descriptor>
<descriptor>mvn:org.ow2.weblab.engine/camel-weblab-karaf/${weblab.bundle.version}/xml/features</descriptor>
<descriptor>mvn:org.ow2.weblab.osgi/weblab-camel-chains-karaf/${weblab.bundle.version}/xml/features</descriptor>
</descriptors>
<features>
<feature>cxf</feature>
<feature>obr</feature>
<feature>config</feature>
<!-- <feature>activemq</feature>
<feature>activemq-karaf</feature> -->
<feature>activemq-broker</feature>
<feature>camel</feature>
<feature>camel-cxf</feature>
......
......@@ -2,7 +2,7 @@
#
# Comma separated list of features repositories to register by default
#
featuresRepositories=mvn:org.apache.karaf.assemblies.features/standard/${karaf.version}/xml/features,mvn:org.apache.activemq/activemq-karaf/${activemq.version}/xml/features,mvn:org.apache.camel.karaf/apache-camel/${camel.version}/xml/features,mvn:io.hawt/hawtio-karaf/${hawtio.version}/xml/features,mvn:org.ow2.weblab.osgi/weblab-camel-chains-karaf/${weblab.version}/xml/features,mvn:org.ow2.weblab.engine/camel-weblab-karaf/${weblab.version}/xml/features
featuresRepositories=mvn:org.apache.karaf.assemblies.features/standard/${karaf.version}/xml/features,mvn:org.apache.activemq/activemq-karaf/${activemq.version}/xml/features,mvn:org.apache.camel.karaf/apache-camel/${camel.version}/xml/features,mvn:io.hawt/hawtio-karaf/${hawtio.version}/xml/features,mvn:org.ow2.weblab.osgi/weblab-camel-chains-karaf/${weblab.bundle.version}/xml/features,mvn:org.ow2.weblab.engine/camel-weblab-karaf/${weblab.bundle.version}/xml/features
#
# Comma separated list of features to install at startup
......
......@@ -3,9 +3,9 @@
<parent>
<groupId>org.ow2.weblab.bundle</groupId>
<artifactId>versions</artifactId>
<version>2.0.2-SNAPSHOT</version>
<relativePath>../../versions/pom.xml</relativePath>
<artifactId>bundle</artifactId>
<version>2.0.2</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>content-libs</artifactId>
......
......@@ -3,9 +3,9 @@
<parent>
<groupId>org.ow2.weblab.bundle</groupId>
<artifactId>versions</artifactId>
<version>2.0.2-SNAPSHOT</version>
<relativePath>../../versions/pom.xml</relativePath>
<artifactId>bundle</artifactId>
<version>2.0.2</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>portlets-custom</artifactId>
......
......@@ -3,9 +3,9 @@
<parent>
<groupId>org.ow2.weblab.bundle</groupId>
<artifactId>versions</artifactId>
<version>2.0.2-SNAPSHOT</version>
<relativePath>../../../versions/pom.xml</relativePath>
<artifactId>bundle</artifactId>
<version>2.0.2</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<groupId>org.ow2.weblab.bundle.servers</groupId>
......@@ -19,7 +19,7 @@
<dependency>
<groupId>org.ow2.weblab.bundle</groupId>
<artifactId>weblab-launcher</artifactId>
<version>${weblab.version}</version>
<version>${version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
......
......@@ -3,9 +3,9 @@
<parent>
<groupId>org.ow2.weblab.bundle</groupId>
<artifactId>versions</artifactId>
<version>2.0.2-SNAPSHOT</version>
<relativePath>../../../versions/pom.xml</relativePath>
<artifactId>bundle</artifactId>
<version>2.0.2</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<groupId>org.ow2.weblab.bundle.servers</groupId>
......@@ -19,7 +19,7 @@
<dependency>
<groupId>org.ow2.weblab.bundle</groupId>
<artifactId>weblab-launcher</artifactId>
<version>${weblab.version}</version>
<version>${version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
......
......@@ -3,9 +3,9 @@
<parent>
<groupId>org.ow2.weblab.bundle</groupId>
<artifactId>versions</artifactId>
<version>2.0.2-SNAPSHOT</version>
<relativePath>../../../versions/pom.xml</relativePath>
<artifactId>bundle</artifactId>
<version>2.0.2</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<groupId>org.ow2.weblab.bundle.servers</groupId>
......@@ -19,7 +19,7 @@
<dependency>
<groupId>org.ow2.weblab.bundle</groupId>
<artifactId>weblab-launcher</artifactId>
<version>${weblab.version}</version>
<version>${version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
......
......@@ -3,9 +3,9 @@
<parent>
<groupId>org.ow2.weblab.bundle</groupId>
<artifactId>versions</artifactId>
<version>2.0.2-SNAPSHOT</version>
<relativePath>../../../versions/pom.xml</relativePath>
<artifactId>bundle</artifactId>
<version>2.0.2</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<groupId>org.ow2.weblab.bundle.servers</groupId>
......@@ -16,16 +16,16 @@
<name>WebLab manager for Karaf OSGi plateform.</name>
<dependencies>
<dependency>
<groupId>org.ow2.weblab.bundle</groupId>
<artifactId>weblab-launcher</artifactId>
<version>${weblab.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.ow2.weblab.bundle</groupId>
<artifactId>weblab-launcher</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
......
......@@ -48,10 +48,18 @@ public class Karaf extends Bus{
private String jmxUser = "karaf";
private String jmxPassword = "karaf";
private String jmxHost = "localhost";
private String jmxName = "karaf-weblab";
public Karaf() {}
public String getJmxName() {
return jmxName;
}
public void setJmxName(String jmxName) {
this.jmxName = jmxName;
}
public String getJmxUser() {
return jmxUser;
}
......@@ -173,7 +181,7 @@ public class Karaf extends Bus{
@Override
public MBeanServerConnection getMBeanServerConnection() {
return ProcessUtils.createJMXclient(this.jmxHost,this.getJmxPort(),this.jmxUser,this.jmxPassword,"karaf-root", 2000, false, logger);
return ProcessUtils.createJMXclient(this.jmxHost,this.getJmxPort(),this.jmxUser,this.jmxPassword,this.getJmxName(), 2000, false, logger);
}
public String getStartScript(){
......@@ -204,7 +212,7 @@ public class Karaf extends Bus{
* @throws IOException
*/
protected MBeanServerConnection connect() throws IOException{
JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://"+jmxHost+":"+getJmxPort()+"/jmxrmi");
JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://"+this.getJmxHost()+":"+this.getJmxPort()+"/"+this.getJmxName());
Hashtable env = new Hashtable();