Skip to content

Commit

Permalink
[BACKLOG-38516]-code changes for moving Mail (step) from core to plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
SahithiKommagani6 committed Sep 20, 2023
1 parent 828468b commit 36db3b0
Show file tree
Hide file tree
Showing 27 changed files with 518 additions and 105 deletions.
13 changes: 13 additions & 0 deletions assemblies/plugins/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
<mqtt-streaming-plugin.version>${project.version}</mqtt-streaming-plugin.version>
<pentaho-s3-vfs-plugin.version>${project.version}</pentaho-s3-vfs-plugin.version>
<pdi-avro-format-plugin.version>${project.version}</pdi-avro-format-plugin.version>
<mail-plugin.version>${project.version}</mail-plugin.version>
<mail-validator-job-plugin.version>${project.version}</mail-validator-job-plugin.version>
<pentaho-metaverse.version>10.1.0.0-SNAPSHOT</pentaho-metaverse.version>
<pdi-xml-plugin.version>10.1.0.0-SNAPSHOT</pdi-xml-plugin.version>
Expand Down Expand Up @@ -799,6 +800,18 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.pentaho.di.plugins</groupId>
<artifactId>mail-plugins</artifactId>
<version>${mail-plugin.version}</version>
<type>zip</type>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.pentaho.di.plugins</groupId>
<artifactId>connected-to-repository-plugins</artifactId>
Expand Down
1 change: 0 additions & 1 deletion engine/src/main/resources/kettle-steps.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
<step id="RandomValue"> <description>i18n:org.pentaho.di.trans.step:BaseStep.TypeLongDesc.RandomValue</description> <classname>org.pentaho.di.trans.steps.randomvalue.RandomValueMeta</classname> <category>i18n:org.pentaho.di.trans.step:BaseStep.Category.Input</category> <tooltip>i18n:org.pentaho.di.trans.step:BaseStep.TypeTooltipDesc.RandomValue</tooltip> <iconfile>ui/images/RVA.svg</iconfile> <documentation_url>http://wiki.pentaho.com/display/EAI/Generate+Random+Value</documentation_url> <cases_url/> <forum_url/> </step>
<step id="GetSubFolders"> <description>i18n:org.pentaho.di.trans.step:BaseStep.TypeLongDesc.GetSubFolders</description> <classname>org.pentaho.di.trans.steps.getsubfolders.GetSubFoldersMeta</classname> <category>i18n:org.pentaho.di.trans.step:BaseStep.Category.Input</category> <tooltip>i18n:org.pentaho.di.trans.step:BaseStep.TypeTooltipDesc.GetSubFolders</tooltip> <iconfile>ui/images/LSF.svg</iconfile> <documentation_url>http://wiki.pentaho.com/display/EAI/Get+SubFolder+names</documentation_url> <cases_url/> <forum_url/> </step>
<step id="MailValidator"> <description>i18n:org.pentaho.di.trans.step:BaseStep.TypeLongDesc.MailValidator</description> <classname>org.pentaho.di.trans.steps.mailvalidator.MailValidatorMeta</classname> <category>i18n:org.pentaho.di.trans.step:BaseStep.Category.Validation</category> <tooltip>i18n:org.pentaho.di.trans.step:BaseStep.TypeTooltipDesc.MailValidator</tooltip> <iconfile>ui/images/MAV.svg</iconfile> <documentation_url>http://wiki.pentaho.com/display/EAI/Mail+Validator</documentation_url> <cases_url/> <forum_url/> </step>
<step id="Mail"> <description>i18n:org.pentaho.di.trans.step:BaseStep.TypeLongDesc.Mail</description> <classname>org.pentaho.di.trans.steps.mail.MailMeta</classname> <category>i18n:org.pentaho.di.trans.step:BaseStep.Category.Utility</category> <tooltip>i18n:org.pentaho.di.trans.step:BaseStep.TypeTooltipDesc.Mail</tooltip> <iconfile>ui/images/MAIL.svg</iconfile> <documentation_url>http://wiki.pentaho.com/display/EAI/Mail+%28step%29</documentation_url> <cases_url/> <forum_url/> </step>
<step id="ProcessFiles"> <description>i18n:org.pentaho.di.trans.step:BaseStep.TypeLongDesc.ProcessFiles</description> <classname>org.pentaho.di.trans.steps.processfiles.ProcessFilesMeta</classname> <category>i18n:org.pentaho.di.trans.step:BaseStep.Category.Utility</category> <tooltip>i18n:org.pentaho.di.trans.step:BaseStep.TypeTooltipDesc.ProcessFiles</tooltip> <iconfile>ui/images/PPF.svg</iconfile> <documentation_url>http://wiki.pentaho.com/display/EAI/Process+files</documentation_url> <cases_url/> <forum_url/> </step>
<step id="DetectLastRow"> <description>i18n:org.pentaho.di.trans.step:BaseStep.TypeLongDesc.DetectLastRow</description> <classname>org.pentaho.di.trans.steps.detectlastrow.DetectLastRowMeta</classname> <category>i18n:org.pentaho.di.trans.step:BaseStep.Category.Flow</category> <tooltip>i18n:org.pentaho.di.trans.step:BaseStep.TypeTooltipDesc.DetectLastRow</tooltip> <iconfile>ui/images/DLR.svg</iconfile> <documentation_url>http://wiki.pentaho.com/display/EAI/Identify+last+row+in+a+stream</documentation_url> <cases_url/> <forum_url/> </step>
<step id="DetectEmptyStream"> <description>i18n:org.pentaho.di.trans.step:BaseStep.TypeLongDesc.DetectEmptyStream</description> <classname>org.pentaho.di.trans.steps.detectemptystream.DetectEmptyStreamMeta</classname> <category>i18n:org.pentaho.di.trans.step:BaseStep.Category.Flow</category> <tooltip>i18n:org.pentaho.di.trans.step:BaseStep.TypeTooltipDesc.DetectEmptyStream</tooltip> <iconfile>ui/images/EMS.svg</iconfile> <documentation_url>http://wiki.pentaho.com/display/EAI/Detect+empty+stream</documentation_url> <cases_url/> <forum_url/> </step>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,8 @@ BaseStep.ColumnName.EndDate=end_date
BaseStep.Category.Bulk=Bulk loading
BaseStep.TypeLongDesc.XBaseInput=XBase input
BaseStep.status.Stopped=Stopped
BaseStep.TypeLongDesc.Mail=Mail
BaseStep.TypeLongDesc.AddConstants=Add constants
BaseStep.TypeLongDesc.WriteToLog=Write to log
BaseStep.TypeTooltipDesc.Mail=Send eMail.
BaseStep.TypeLongDesc.GPBulkLoader=Greenplum bulk loader
BaseStep.Log.StopPuttingARow=Stopped while putting a row on the buffer
BaseStepDialog.ErrorHandling.NrErrField.Label=Nr of errors fieldname
Expand Down
1 change: 1 addition & 0 deletions plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ __List of the current core plugins:__
* hl7
* json
* openerp
* mail
* mail-validator-job
* palo
* s3csvinput
Expand Down
55 changes: 55 additions & 0 deletions plugins/mail/assemblies/plugin/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>org.pentaho.di.plugins</groupId>
<artifactId>mail-assemblies</artifactId>
<version>10.1.0.0-SNAPSHOT</version>
</parent>

<artifactId>mail-plugins</artifactId>
<version>10.1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name> PDI Mail Plugins Distribution</name>
<description></description>

<dependencies>
<dependency>
<groupId>org.pentaho.di.plugins</groupId>
<artifactId>mail-plugins-impl</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.pentaho.di.plugins</groupId>
<artifactId>mail-plugins-ui</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>add-libs</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/assembly/lib</outputDirectory>
<includeScope>compile</includeScope>
<excludeArtifactIds>mail-plugins-impl,mail-plugins-ui</excludeArtifactIds>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
37 changes: 37 additions & 0 deletions plugins/mail/assemblies/plugin/src/assembly/assembly.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<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>mail-plugin</id>
<formats>
<format>zip</format>
</formats>
<baseDirectory>mail-plugins</baseDirectory>

<files>
<file>
<source>${project.basedir}/src/main/resources/version.xml</source>
<outputDirectory>.</outputDirectory>
<filtered>true</filtered>
</file>
</files>

<fileSets>
<!-- the staging dir -->
<fileSet>
<directory>${project.build.directory}/assembly</directory>
<outputDirectory>.</outputDirectory>
</fileSet>
</fileSets>

<dependencySets>
<dependencySet>
<outputDirectory>.</outputDirectory>
<includes>
<include>org.pentaho.di.plugins:mail-plugins-impl:jar</include>
<include>org.pentaho.di.plugins:mail-plugins-ui:jar</include>
</includes>
<useProjectArtifact>false</useProjectArtifact>
</dependencySet>
</dependencySets>
</assembly>


2 changes: 2 additions & 0 deletions plugins/mail/assemblies/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>${project.version}</version>
22 changes: 22 additions & 0 deletions plugins/mail/assemblies/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>org.pentaho.di.plugins</groupId>
<artifactId>mail</artifactId>
<version>10.1.0.0-SNAPSHOT</version>
</parent>

<artifactId>mail-assemblies</artifactId>
<version>10.1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name> PDI Mail Plugins Assemblies</name>

<modules>
<module>plugin</module>
</modules>
</project>
64 changes: 64 additions & 0 deletions plugins/mail/impl/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>org.pentaho.di.plugins</groupId>
<artifactId>mail</artifactId>
<version>10.1.0.0-SNAPSHOT</version>
</parent>

<artifactId>mail-plugins-impl</artifactId>
<name> PDI Mail Plugins Impl</name>

<dependencies>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-engine</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.healthmarketscience.jackcess</groupId>
<artifactId>jackcess</artifactId>
<scope>compile</scope>
</dependency>

<!-- Test dependencies -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-core</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-engine</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-reflect</artifactId>
<version>1.7.3</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* Pentaho Data Integration
*
* Copyright (C) 2002-2020 by Hitachi Vantara : http://www.pentaho.com
* Copyright (C) 2002-2023 by Hitachi Vantara : http://www.pentaho.com
*
*******************************************************************************
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* Pentaho Data Integration
*
* Copyright (C) 2002-2017 by Hitachi Vantara : http://www.pentaho.com
* Copyright (C) 2002-2023 by Hitachi Vantara : http://www.pentaho.com
*
*******************************************************************************
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* Pentaho Data Integration
*
* Copyright (C) 2002-2017 by Hitachi Vantara : http://www.pentaho.com
* Copyright (C) 2002-2023 by Hitachi Vantara : http://www.pentaho.com
*
*******************************************************************************
*
Expand Down Expand Up @@ -48,6 +48,7 @@
import org.pentaho.di.trans.step.StepMetaInterface;
import org.pentaho.metastore.api.IMetaStore;
import org.w3c.dom.Node;
import org.pentaho.di.core.annotations.Step;

/**
* Send mail step. based on Mail job entry
Expand All @@ -56,6 +57,12 @@
* @since 28-07-2008
*/

@Step( id = "Mail", name = "BaseStep.TypeLongDesc.Mail",
i18nPackageName = "org.pentaho.di.trans.step.mail",
description = "BaseStep.TypeTooltipDesc.Mail",
categoryDescription = "i18n:org.pentaho.di.trans.step:BaseStep.Category.Utility",
image = "ui/images/MAIL.svg",
documentationUrl = "http://wiki.pentaho.com/display/EAI/Mail+%28step%29" )
public class MailMeta extends BaseStepMeta implements StepMetaInterface {
private static Class<?> PKG = MailMeta.class; // for i18n purposes, needed by Translator2!!

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@


#Mon Jan 04 18:35:29 CET 2010
BaseStep.TypeLongDesc.Mail=Mail
BaseStep.TypeTooltipDesc.Mail=Send eMail.
MailDialog.ReplyToAddresses.Label=Reply to
Mail.Exception.CouldnotFindServerField=We can not find server field [{0}] in input stream\!
MailDialog.ZipFilename.Label=Zip filename
Expand Down
Loading

0 comments on commit 36db3b0

Please sign in to comment.