Skip to content

Commit 86078d8

Browse files
Fix classloading issue when more than one DB plugin is used in the same pipeline
1 parent 8979bfa commit 86078d8

File tree

21 files changed

+455
-38
lines changed

21 files changed

+455
-38
lines changed

aurora-mysql-plugin/pom.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,35 @@
9090
<groupId>io.cdap</groupId>
9191
<artifactId>cdap-maven-plugin</artifactId>
9292
</plugin>
93+
<plugin>
94+
<groupId>org.apache.felix</groupId>
95+
<artifactId>maven-bundle-plugin</artifactId>
96+
<version>5.1.2</version>
97+
<extensions>true</extensions>
98+
<configuration>
99+
<instructions>
100+
<_exportcontents>
101+
io.cdap.plugin.auroradb.mysql.*;
102+
io.cdap.plugin.db.batch.source.*;
103+
io.cdap.plugin.db.batch.sink.*;
104+
org.apache.commons.lang;
105+
org.apache.commons.logging.*;
106+
org.codehaus.jackson.*
107+
</_exportcontents>
108+
<Embed-Dependency>*;inline=false;scope=compile</Embed-Dependency>
109+
<Embed-Transitive>true</Embed-Transitive>
110+
<Embed-Directory>lib</Embed-Directory>
111+
</instructions>
112+
</configuration>
113+
<executions>
114+
<execution>
115+
<phase>package</phase>
116+
<goals>
117+
<goal>bundle</goal>
118+
</goals>
119+
</execution>
120+
</executions>
121+
</plugin>
93122
</plugins>
94123
</build>
95124
</project>

aurora-postgresql-plugin/pom.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,35 @@
9090
<groupId>io.cdap</groupId>
9191
<artifactId>cdap-maven-plugin</artifactId>
9292
</plugin>
93+
<plugin>
94+
<groupId>org.apache.felix</groupId>
95+
<artifactId>maven-bundle-plugin</artifactId>
96+
<version>5.1.2</version>
97+
<extensions>true</extensions>
98+
<configuration>
99+
<instructions>
100+
<_exportcontents>
101+
io.cdap.plugin.auroradb.postgres.*;
102+
io.cdap.plugin.db.batch.source.*;
103+
io.cdap.plugin.db.batch.sink.*;
104+
org.apache.commons.lang;
105+
org.apache.commons.logging.*;
106+
org.codehaus.jackson.*
107+
</_exportcontents>
108+
<Embed-Dependency>*;inline=false;scope=compile</Embed-Dependency>
109+
<Embed-Transitive>true</Embed-Transitive>
110+
<Embed-Directory>lib</Embed-Directory>
111+
</instructions>
112+
</configuration>
113+
<executions>
114+
<execution>
115+
<phase>package</phase>
116+
<goals>
117+
<goal>bundle</goal>
118+
</goals>
119+
</execution>
120+
</executions>
121+
</plugin>
93122
</plugins>
94123
</build>
95124
</project>

cloudsql-mysql-plugin/pom.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,35 @@
115115
<groupId>io.cdap</groupId>
116116
<artifactId>cdap-maven-plugin</artifactId>
117117
</plugin>
118+
<plugin>
119+
<groupId>org.apache.felix</groupId>
120+
<artifactId>maven-bundle-plugin</artifactId>
121+
<version>5.1.2</version>
122+
<extensions>true</extensions>
123+
<configuration>
124+
<instructions>
125+
<_exportcontents>
126+
io.cdap.plugin.cloudsql.mysql.*;
127+
io.cdap.plugin.db.batch.source.*;
128+
io.cdap.plugin.db.batch.sink.*;
129+
org.apache.commons.lang;
130+
org.apache.commons.logging.*;
131+
org.codehaus.jackson.*
132+
</_exportcontents>
133+
<Embed-Dependency>*;inline=false;scope=compile</Embed-Dependency>
134+
<Embed-Transitive>true</Embed-Transitive>
135+
<Embed-Directory>lib</Embed-Directory>
136+
</instructions>
137+
</configuration>
138+
<executions>
139+
<execution>
140+
<phase>package</phase>
141+
<goals>
142+
<goal>bundle</goal>
143+
</goals>
144+
</execution>
145+
</executions>
146+
</plugin>
118147
</plugins>
119148
</build>
120149
</project>

cloudsql-postgresql-plugin/pom.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,35 @@
125125
<groupId>io.cdap</groupId>
126126
<artifactId>cdap-maven-plugin</artifactId>
127127
</plugin>
128+
<plugin>
129+
<groupId>org.apache.felix</groupId>
130+
<artifactId>maven-bundle-plugin</artifactId>
131+
<version>5.1.2</version>
132+
<extensions>true</extensions>
133+
<configuration>
134+
<instructions>
135+
<_exportcontents>
136+
io.cdap.plugin.cloudsql.postgres.*;
137+
io.cdap.plugin.db.batch.source.*;
138+
io.cdap.plugin.db.batch.sink.*;
139+
org.apache.commons.lang;
140+
org.apache.commons.logging.*;
141+
org.codehaus.jackson.*
142+
</_exportcontents>
143+
<Embed-Dependency>*;inline=false;scope=compile</Embed-Dependency>
144+
<Embed-Transitive>true</Embed-Transitive>
145+
<Embed-Directory>lib</Embed-Directory>
146+
</instructions>
147+
</configuration>
148+
<executions>
149+
<execution>
150+
<phase>package</phase>
151+
<goals>
152+
<goal>bundle</goal>
153+
</goals>
154+
</execution>
155+
</executions>
156+
</plugin>
128157
</plugins>
129158
</build>
130159
</project>

db2-plugin/pom.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,35 @@
9090
<groupId>io.cdap</groupId>
9191
<artifactId>cdap-maven-plugin</artifactId>
9292
</plugin>
93+
<plugin>
94+
<groupId>org.apache.felix</groupId>
95+
<artifactId>maven-bundle-plugin</artifactId>
96+
<version>5.1.2</version>
97+
<extensions>true</extensions>
98+
<configuration>
99+
<instructions>
100+
<_exportcontents>
101+
io.cdap.plugin.db2.*
102+
io.cdap.plugin.db.batch.source.*;
103+
io.cdap.plugin.db.batch.sink.*;
104+
org.apache.commons.lang;
105+
org.apache.commons.logging.*;
106+
org.codehaus.jackson.*
107+
</_exportcontents>
108+
<Embed-Dependency>*;inline=false;scope=compile</Embed-Dependency>
109+
<Embed-Transitive>true</Embed-Transitive>
110+
<Embed-Directory>lib</Embed-Directory>
111+
</instructions>
112+
</configuration>
113+
<executions>
114+
<execution>
115+
<phase>package</phase>
116+
<goals>
117+
<goal>bundle</goal>
118+
</goals>
119+
</execution>
120+
</executions>
121+
</plugin>
93122
</plugins>
94123
</build>
95124
</project>

generic-database-plugin/pom.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,32 @@
8989
<groupId>io.cdap</groupId>
9090
<artifactId>cdap-maven-plugin</artifactId>
9191
</plugin>
92+
<plugin>
93+
<groupId>org.apache.felix</groupId>
94+
<artifactId>maven-bundle-plugin</artifactId>
95+
<version>5.1.2</version>
96+
<extensions>true</extensions>
97+
<configuration>
98+
<instructions>
99+
<_exportcontents>
100+
io.cdap.plugin.jdbc.*;
101+
io.cdap.plugin.db.batch.source.*;
102+
io.cdap.plugin.db.batch.sink.*;
103+
</_exportcontents>
104+
<Embed-Dependency>*;inline=false;scope=compile</Embed-Dependency>
105+
<Embed-Transitive>true</Embed-Transitive>
106+
<Embed-Directory>lib</Embed-Directory>
107+
</instructions>
108+
</configuration>
109+
<executions>
110+
<execution>
111+
<phase>package</phase>
112+
<goals>
113+
<goal>bundle</goal>
114+
</goals>
115+
</execution>
116+
</executions>
117+
</plugin>
92118
</plugins>
93119
</build>
94120
</project>

generic-db-argument-setter/pom.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,35 @@
8989
<groupId>io.cdap</groupId>
9090
<artifactId>cdap-maven-plugin</artifactId>
9191
</plugin>
92+
<plugin>
93+
<groupId>org.apache.felix</groupId>
94+
<artifactId>maven-bundle-plugin</artifactId>
95+
<version>5.1.2</version>
96+
<extensions>true</extensions>
97+
<configuration>
98+
<instructions>
99+
<_exportcontents>
100+
io.cdap.plugin.jdbc.*;
101+
io.cdap.plugin.db.batch.source.*;
102+
io.cdap.plugin.db.batch.sink.*;
103+
org.apache.commons.lang;
104+
org.apache.commons.logging.*;
105+
org.codehaus.jackson.*
106+
</_exportcontents>
107+
<Embed-Dependency>*;inline=false;scope=compile</Embed-Dependency>
108+
<Embed-Transitive>true</Embed-Transitive>
109+
<Embed-Directory>lib</Embed-Directory>
110+
</instructions>
111+
</configuration>
112+
<executions>
113+
<execution>
114+
<phase>package</phase>
115+
<goals>
116+
<goal>bundle</goal>
117+
</goals>
118+
</execution>
119+
</executions>
120+
</plugin>
92121
</plugins>
93122
</build>
94123
</project>

mariadb-plugin/pom.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,35 @@
9090
<groupId>io.cdap</groupId>
9191
<artifactId>cdap-maven-plugin</artifactId>
9292
</plugin>
93+
<plugin>
94+
<groupId>org.apache.felix</groupId>
95+
<artifactId>maven-bundle-plugin</artifactId>
96+
<version>5.1.2</version>
97+
<extensions>true</extensions>
98+
<configuration>
99+
<instructions>
100+
<_exportcontents>
101+
io.cdap.plugin.mariadb.*;
102+
io.cdap.plugin.db.batch.source.*;
103+
io.cdap.plugin.db.batch.sink.*;
104+
org.apache.commons.lang;
105+
org.apache.commons.logging.*;
106+
org.codehaus.jackson.*
107+
</_exportcontents>
108+
<Embed-Dependency>*;inline=false;scope=compile</Embed-Dependency>
109+
<Embed-Transitive>true</Embed-Transitive>
110+
<Embed-Directory>lib</Embed-Directory>
111+
</instructions>
112+
</configuration>
113+
<executions>
114+
<execution>
115+
<phase>package</phase>
116+
<goals>
117+
<goal>bundle</goal>
118+
</goals>
119+
</execution>
120+
</executions>
121+
</plugin>
93122
</plugins>
94123
</build>
95124
</project>

memsql-plugin/pom.xml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,31 @@
9090
<plugin>
9191
<groupId>org.apache.felix</groupId>
9292
<artifactId>maven-bundle-plugin</artifactId>
93+
<version>5.1.2</version>
94+
<extensions>true</extensions>
9395
<configuration>
9496
<instructions>
9597
<_exportcontents>
96-
io.cdap.plugin.*
98+
io.cdap.plugin.memsql.*;
99+
io.cdap.plugin.db.batch.source.*;
100+
io.cdap.plugin.db.batch.sink.*;
101+
org.apache.commons.lang;
102+
org.apache.commons.logging.*;
103+
org.codehaus.jackson.*
97104
</_exportcontents>
98105
<Embed-Dependency>*;inline=false;scope=compile</Embed-Dependency>
99106
<Embed-Transitive>true</Embed-Transitive>
100107
<Embed-Directory>lib</Embed-Directory>
101108
</instructions>
102109
</configuration>
110+
<executions>
111+
<execution>
112+
<phase>package</phase>
113+
<goals>
114+
<goal>bundle</goal>
115+
</goals>
116+
</execution>
117+
</executions>
103118
</plugin>
104119
<plugin>
105120
<groupId>io.cdap</groupId>

mssql-plugin/pom.xml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,20 +100,28 @@
100100
<plugin>
101101
<groupId>org.apache.felix</groupId>
102102
<artifactId>maven-bundle-plugin</artifactId>
103+
<version>5.1.2</version>
104+
<extensions>true</extensions>
103105
<configuration>
104106
<instructions>
105107
<_exportcontents>
106-
io.cdap.plugin.*;
107-
org.apache.commons.lang;
108-
org.apache.commons.logging.*;
109-
org.codehaus.jackson.*;
110-
com.microsoft.aad.*
108+
io.cdap.plugin.mssql.*;
109+
io.cdap.plugin.db.batch.source.*;
110+
io.cdap.plugin.db.batch.sink.*;
111111
</_exportcontents>
112112
<Embed-Dependency>*;inline=false;scope=compile</Embed-Dependency>
113113
<Embed-Transitive>true</Embed-Transitive>
114114
<Embed-Directory>lib</Embed-Directory>
115115
</instructions>
116116
</configuration>
117+
<executions>
118+
<execution>
119+
<phase>package</phase>
120+
<goals>
121+
<goal>bundle</goal>
122+
</goals>
123+
</execution>
124+
</executions>
117125
</plugin>
118126
<plugin>
119127
<groupId>io.cdap</groupId>

0 commit comments

Comments
 (0)