Skip to content

Commit

Permalink
[PDI-19187] Remove MongoDB steps from OSGi/Karaf, and place it as a r…
Browse files Browse the repository at this point in the history
…egular /plugins plugin
  • Loading branch information
syamkumar-karri committed Aug 18, 2021
1 parent 763fe91 commit ec7b3df
Show file tree
Hide file tree
Showing 59 changed files with 357 additions and 318 deletions.
45 changes: 45 additions & 0 deletions assembly/plugin/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>pentaho</groupId>
<artifactId>pentaho-mongo-plugin-assemblies</artifactId>
<version>9.3.0.0-SNAPSHOT</version>
</parent>
<groupId>com.pentaho.di.plugins</groupId>
<artifactId>mongodb-plugin</artifactId>
<packaging>pom</packaging>

<name>Pentaho Mongo Plugin Distribution</name>

<dependencies>
<dependency>
<groupId>pentaho</groupId>
<artifactId>pentaho-mongodb-plugin</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>pentaho</groupId>
<artifactId>pentaho-mongo-utils</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>src/assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
</plugin>
</plugins>
</build>
</project>
36 changes: 36 additions & 0 deletions assembly/plugin/src/assembly/assembly.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
<id>pentaho-mongo-plugin-assembly</id>
<formats>
<format>zip</format>
</formats>
<baseDirectory>mongodb-plugins</baseDirectory>
<fileSets>
<fileSet>
<directory>src/main/resources</directory>
<outputDirectory>.</outputDirectory>
<filtered>true</filtered>
</fileSet>
</fileSets>
<dependencySets>
<dependencySet>
<scope>runtime</scope>
<outputDirectory>.</outputDirectory>
<useTransitiveDependencies>false</useTransitiveDependencies>
<useProjectArtifact>false</useProjectArtifact>
<includes>
<include>pentaho:pentaho-mongodb-plugin:jar</include>
</includes>
</dependencySet>
<dependencySet>
<scope>runtime</scope>
<useProjectArtifact>false</useProjectArtifact>
<useTransitiveDependencies>true</useTransitiveDependencies>
<outputDirectory>lib</outputDirectory>
<excludes>
<exclude>pentaho:pentaho-mongodb-plugin:*</exclude>
</excludes>
</dependencySet>
</dependencySets>
</assembly>
2 changes: 2 additions & 0 deletions assembly/plugin/src/main/resources/version.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<version branch='TRUNK'>${project.version}</version>
23 changes: 23 additions & 0 deletions assembly/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>pentaho</groupId>
<artifactId>pentaho-mongo-plugin-parent</artifactId>
<version>9.3.0.0-SNAPSHOT</version>
</parent>

<groupId>pentaho</groupId>
<artifactId>pentaho-mongo-plugin-assemblies</artifactId>
<packaging>pom</packaging>

<name>Pentaho Mongo Plugin Assembly Parent</name>

<modules>
<module>plugin</module>
</modules>

</project>
20 changes: 3 additions & 17 deletions README.md → pentaho-mongodb-plugin/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
Pentaho Big Data Plugin
Pentaho MongoDB Plugin
=======================

The Pentaho Big Data Plugin Project provides support for an ever-expanding Big Data community within the Pentaho ecosystem. It is a plugin for the Pentaho Kettle engine which can be used within Pentaho Data Integration (Kettle), Pentaho Reporting, and the Pentaho BI Platform.
The Pentaho MongoDB Plugin Project provides support for MongoDB support within the Pentaho ecosystem. It is a plugin for the Pentaho Kettle engine which can be used within Pentaho Data Integration (Kettle), Pentaho Reporting, and the Pentaho BI Platform.

Building
--------
The Pentaho Big Data Plugin is built with Apache maven and uses maven for dependency management. All you'll need to get started is to start maven 3.0.1 or newer version to build the project.

* git clone git://github.com/pentaho/big-data-plugin.git
* cd big-data-plugin
* mvn clean install


This will produce a plugin archive in target/pentaho-big-data-plugin-${project.revision}.tar.gz (and .zip). This archive can then be extracted into your Pentaho Data Integration plugin directory.

How to build
--------------

Pentaho Big Data Plugin uses the maven framework.
Pentaho MongoDB Plugin uses the maven framework.


#### Pre-requisites for building the project:
Expand Down Expand Up @@ -88,10 +78,6 @@ To get log as text file
$ mvn clean install test >log.txt
```

Further Reading
---------------
Additional documentation is available on the Community wiki: [Big Data Plugin for Java Developers](http://wiki.pentaho.com/display/BAD/Getting+Started+for+Java+Developers)

License
-------
Licensed under the Apache License, Version 2.0. See LICENSE.txt for more information.
Expand Down
121 changes: 121 additions & 0 deletions pentaho-mongodb-plugin/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>pentaho</groupId>
<artifactId>pentaho-mongo-plugin-parent</artifactId>
<version>9.3.0.0-SNAPSHOT</version>
</parent>

<groupId>pentaho</groupId>
<artifactId>pentaho-mongodb-plugin</artifactId>
<version>9.3.0.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Pentaho Enterprise Edition Project: ${project.artifactId}</name>
<description>a Pentaho closed source project</description>
<url>http://www.pentaho.com</url>

<licenses>
<license>
<name>Pentaho Proprietary License</name>
<url>http://www.pentaho.com</url>
<distribution>repo</distribution>
</license>
</licenses>


<scm>
<url>scm:git:git@github.com:pentaho/pentaho-mongodb-plugin.git</url>
</scm>

<properties>
<mockito.version>1.9.5</mockito.version>
<junit.version>4.11</junit.version>
<mongo-driver.version>3.10.2</mongo-driver.version>
</properties>

<dependencies>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-core</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-engine</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-engine</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-ui-swt</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>pentaho</groupId>
<artifactId>pentaho-mongo-utils</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>${mongo-driver.version}</version>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>3.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>java-hamcrest</artifactId>
<version>2.0.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-core</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
</dependencies>


</project>
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

package org.pentaho.di.trans.steps.mongodbinput;

import org.pentaho.mongo.wrapper.field.MongodbInputDiscoverFieldsImpl;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
Expand All @@ -27,18 +29,12 @@
* Created by bryan on 11/10/14.
*/
public class MongoDbInputDiscoverFieldsHolder {
private static MongoDbInputDiscoverFieldsHolder INSTANCE;
private static MongoDbInputDiscoverFieldsHolder INSTANCE = new MongoDbInputDiscoverFieldsHolder();
private final Map<Integer, List<MongoDbInputDiscoverFields>> mongoDbInputDiscoverFieldsMap;
private MongoDbInputDiscoverFields mongoDbInputDiscoverFields;
private MongoDbInputDiscoverFields mongoDbInputDiscoverFields = new MongodbInputDiscoverFieldsImpl();

public MongoDbInputDiscoverFieldsHolder() {
synchronized ( MongoDbInputDiscoverFieldsHolder.class ) {
if ( INSTANCE != null ) {
throw new IllegalStateException( "This object should only be constructed by the blueprint" );
}
mongoDbInputDiscoverFieldsMap = new HashMap<Integer, List<MongoDbInputDiscoverFields>>();
INSTANCE = this;
}
private MongoDbInputDiscoverFieldsHolder() {
mongoDbInputDiscoverFieldsMap = new HashMap<Integer, List<MongoDbInputDiscoverFields>>();
}

public static MongoDbInputDiscoverFieldsHolder getInstance() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public class MongoDbInputXulDialog extends BaseStepGenericXulDialog {
new RowCountToBooleanConvertor<MongoTag>();

public MongoDbInputXulDialog( Object parent, BaseStepMeta baseStepMeta, TransMeta transMeta, String stepname ) {
super( "org/pentaho/di/ui/trans/steps/mongodbinput/xul/mongodb_input.xul", parent, baseStepMeta, transMeta,
super("org/pentaho/di/ui/trans/steps/mongodbinput/xul/mongodb_input.xul", parent, baseStepMeta, transMeta,
stepname );
}

Expand Down
Loading

0 comments on commit ec7b3df

Please sign in to comment.