Skip to content

Commit f446a9d

Browse files
reflected on PR's comments
1 parent 7e20300 commit f446a9d

21 files changed

+696
-286
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
.beamer
44
# Package Files #
55
*.jar
6+
!src/test/resources/test_build_dir/artifact-1.0.0.jar
67
*.war
78
*.ear
89

README.md

+143-143
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,25 @@ The generated file will be placed in the `${project.build}` directory.
4444

4545
```
4646
<plugin>
47-
<groupId>com.liveramp.cdap.plugin</groupId>
47+
<groupId>co.cask</groupId>
4848
<version>1.1.3</version>
4949
<artifactId>cdap-maven-plugin</artifactId>
5050
<configuration>
5151
<cdapArtifacts>
52-
<parent>system:cdap-data-pipeline[4.0.0,9.0.0-SNAPSHOT)</parent>
53-
<parent>system:cdap-data-streams[4.0.0,9.0.0-SNAPSHOT)</parent>
52+
<parent>system:cdap-data-pipeline[4.0.0,9.0.0-SNAPSHOT)</parent>
53+
<parent>system:cdap-data-streams[4.0.0,9.0.0-SNAPSHOT)</parent>
5454
</cdapArtifacts>
55-
</configuration>
56-
<executions>
57-
<execution>
55+
</configuration>
56+
<executions>
57+
<execution>
5858
<id>create-artifact-config</id>
5959
<phase>prepare-package</phase>
6060
<goals>
6161
<goal>create-plugin-json</goal>
6262
</goals>
63-
</execution>
64-
</executions>
65-
</plugin>
63+
</execution>
64+
</executions>
65+
</plugin>
6666
```
6767

6868
#### Output
@@ -135,75 +135,75 @@ Including both `create-plugin-json` and `create-plugin-spec-json` goals
135135

136136
```
137137
<plugin>
138-
<groupId>com.liveramp.cdap.plugin</groupId>
139-
<version>1.1.3</version>
140-
<artifactId>cdap-maven-plugin</artifactId>
141-
<configuration>
142-
<cdapArtifacts>
143-
<parent>system:cdap-data-pipeline[6.0.0-SNAPSHOT,9.0.0-SNAPSHOT)</parent>
144-
<parent>system:cdap-data-streams[6.0.0-SNAPSHOT,9.0.0-SNAPSHOT)</parent>
145-
</cdapArtifacts>
146-
<author>LiveRamp</author>
147-
<org>LiveRamp</org>
148-
<description>optional plugin description</description>
149-
<categories>
150-
<category>cat1</category>
151-
<category>cat2</category>
152-
</categories>
153-
<additionalActionArguments>
154-
<argument>
155-
<key>jar</key>
156-
<value>${project.artifactId}-${project.version}.jar</value>
157-
</argument>
158-
</additionalActionArguments>
159-
<scope>user</scope>
160-
</configuration>
161-
<executions>
162-
<execution>
163-
<id>create-artifact-config</id>
164-
<phase>prepare-package</phase>
165-
<goals>
166-
<goal>create-plugin-json</goal>
167-
<goal>create-plugin-spec-json</goal>
168-
</goals>
169-
</execution>
170-
</executions>
138+
<groupId>co.cask</groupId>
139+
<version>1.1.3</version>
140+
<artifactId>cdap-maven-plugin</artifactId>
141+
<configuration>
142+
<cdapArtifacts>
143+
<parent>system:cdap-data-pipeline[6.0.0-SNAPSHOT,9.0.0-SNAPSHOT)</parent>
144+
<parent>system:cdap-data-streams[6.0.0-SNAPSHOT,9.0.0-SNAPSHOT)</parent>
145+
</cdapArtifacts>
146+
<author>LiveRamp</author>
147+
<org>LiveRamp</org>
148+
<description>optional plugin description</description>
149+
<categories>
150+
<category>cat1</category>
151+
<category>cat2</category>
152+
</categories>
153+
<additionalActionArguments>
154+
<argument>
155+
<key>jar</key>
156+
<value>${project.artifactId}-${project.version}.jar</value>
157+
</argument>
158+
</additionalActionArguments>
159+
<scope>user</scope>
160+
</configuration>
161+
<executions>
162+
<execution>
163+
<id>create-artifact-config</id>
164+
<phase>prepare-package</phase>
165+
<goals>
166+
<goal>create-plugin-json</goal>
167+
<goal>create-plugin-spec-json</goal>
168+
</goals>
169+
</execution>
170+
</executions>
171171
</plugin>
172172
```
173173

174174
Including only `create-plugin-spec-json` goal
175175

176176
```
177-
<plugins>
178-
<plugin>
179-
<groupId>com.liveramp.cdap.plugin</groupId>
180-
<artifactId>cdap-maven-plugin</artifactId>
181-
<version>1.1.3</version>
182-
<configuration>
183-
<cdapArtifacts>
184-
<parent>system:cdap-data-pipeline[6.0.0-SNAPSHOT,9.0.0-SNAPSHOT)</parent>
185-
<parent>system:cdap-data-streams[6.0.0-SNAPSHOT,9.0.0-SNAPSHOT)</parent>
186-
</cdapArtifacts>
187-
<categories>
188-
<param>cat1</param>
189-
</categories>
190-
<actionType>create_pipeline_draft</actionType>
191-
<isPipeline>true</isPipeline>
192-
</configuration>
193-
<executions>
194-
<execution>
195-
<id>create-artifact-config</id>
196-
<phase>prepare-package</phase>
197-
<goals>
198-
<goal>create-plugin-spec-json</goal>
199-
</goals>
200-
</execution>
201-
</executions>
202-
</plugin>
203-
</plugins>
204-
</build>
205-
206-
</project>
177+
<plugins>
178+
<plugin>
179+
<groupId>co.cask</groupId>
180+
<artifactId>cdap-maven-plugin</artifactId>
181+
<version>1.1.3</version>
182+
<configuration>
183+
<cdapArtifacts>
184+
<parent>system:cdap-data-pipeline[6.0.0-SNAPSHOT,9.0.0-SNAPSHOT)</parent>
185+
<parent>system:cdap-data-streams[6.0.0-SNAPSHOT,9.0.0-SNAPSHOT)</parent>
186+
</cdapArtifacts>
187+
<categories>
188+
<param>cat1</param>
189+
</categories>
190+
<actionType>create_pipeline_draft</actionType>
191+
<isPipeline>true</isPipeline>
192+
</configuration>
193+
<executions>
194+
<execution>
195+
<id>create-artifact-config</id>
196+
<phase>prepare-package</phase>
197+
<goals>
198+
<goal>create-plugin-spec-json</goal>
199+
</goals>
200+
</execution>
201+
</executions>
202+
</plugin>
203+
</plugins>
204+
</build>
205+
206+
</project>
207207
```
208208

209209
#### Output
@@ -213,7 +213,7 @@ Including only `create-plugin-spec-json` goal
213213
[INFO] CDAP Plugin JSON
214214
[INFO] ------------------------------------------------------------------------
215215
[INFO] Project : Adhoc SQL Plugin
216-
[INFO] Group ID : com.liveramp.cdap.plugin
216+
[INFO] Group ID : co.cask
217217
[INFO] Artifact ID : adhoc_sql
218218
[INFO] Version : 0.1.0
219219
[INFO] Base Directory : /Users/user1/code/cdap-plugins/lsh/misc/adhoc_sql
@@ -276,27 +276,27 @@ To simplify the `relativeOutputDir` value the `directory-maven-plugin` should be
276276

277277
**Example of `directory-maven-plugin` plugin configuration to have in parent pom.xml**
278278
```
279-
<plugin>
280-
<groupId>org.commonjava.maven.plugins</groupId>
281-
<artifactId>directory-maven-plugin</artifactId>
282-
<version>0.3.1</version>
283-
<executions>
284-
<execution>
285-
<id>directories</id>
286-
<goals>
287-
<goal>directory-of</goal>
288-
</goals>
289-
<phase>initialize</phase>
290-
<configuration>
291-
<property>parent_module.basedir</property>
292-
<project>
293-
<groupId>com.org.groupId</groupId>
294-
<artifactId>artifactId</artifactId>
295-
</project>
296-
</configuration>
297-
</execution>
298-
</executions>
299-
</plugin>
279+
<plugin>
280+
<groupId>org.commonjava.maven.plugins</groupId>
281+
<artifactId>directory-maven-plugin</artifactId>
282+
<version>0.3.1</version>
283+
<executions>
284+
<execution>
285+
<id>directories</id>
286+
<goals>
287+
<goal>directory-of</goal>
288+
</goals>
289+
<phase>initialize</phase>
290+
<configuration>
291+
<property>parent_module.basedir</property>
292+
<project>
293+
<groupId>com.org.groupId</groupId>
294+
<artifactId>artifactId</artifactId>
295+
</project>
296+
</configuration>
297+
</execution>
298+
</executions>
299+
</plugin>
300300
```
301301

302302
Using this simplifies `relativeOutputDir` value to `${parent_module.basedir}/packages`.<br>
@@ -308,58 +308,58 @@ The goal must be run after any pre-package goals specified. In order to do this
308308
to be applied.
309309

310310
```
311-
<execution>
312-
<goals>
313-
<goal>package-artifacts-for-hub</goal>
314-
</goals>
315-
<id>move-artifacts</id>
316-
<phase>package</phase>
317-
</execution>
311+
<execution>
312+
<goals>
313+
<goal>package-artifacts-for-hub</goal>
314+
</goals>
315+
<id>move-artifacts</id>
316+
<phase>package</phase>
317+
</execution>
318318
```
319319

320320
#### Example POM
321321

322322
```
323-
<plugin>
324-
<groupId>com.liveramp.cdap.plugin</groupId>
325-
<version>1.1.3</version>
326-
<artifactId>cdap-maven-plugin</artifactId>
327-
<configuration>
328-
<cdapArtifacts>
329-
<parent>system:cdap-data-pipeline[6.1.0-SNAPSHOT,7.0.0-SNAPSHOT)</parent>
330-
<parent>system:cdap-data-streams[6.1.0-SNAPSHOT,7.0.0-SNAPSHOT)</parent>
331-
</cdapArtifacts>
332-
<additionalActionArguments>
333-
<argument>
334-
<key>jar</key>
335-
<value>${project.artifactId}-${project.version}.jar</value>
336-
</argument>
337-
</additionalActionArguments>
338-
<scope>user</scope>
339-
<author>LiveRamp</author>
340-
<org>LiveRamp</org>
341-
<description>optional plugin description</description>
342-
<!-- Using directory maven plugin -->
343-
<relativeOutputDir>${parent_module.basedir}/packages</relativeOutputDir>
344-
</configuration>
345-
<executions>
346-
<execution>
347-
<goals>
348-
<goal>create-plugin-json</goal>
349-
<goal>create-plugin-spec-json</goal>
350-
</goals>
351-
<id>create-artifact-config</id>
352-
<phase>prepare-package</phase>
353-
</execution>
354-
<execution>
355-
<goals>
356-
<goal>package-artifacts-for-hub</goal>
357-
</goals>
358-
<id>move-artifacts</id>
359-
<phase>package</phase>
360-
</execution>
361-
</executions>
362-
</plugin>
323+
<plugin>
324+
<groupId>co.cask</groupId>
325+
<version>1.1.3</version>
326+
<artifactId>cdap-maven-plugin</artifactId>
327+
<configuration>
328+
<cdapArtifacts>
329+
<parent>system:cdap-data-pipeline[6.1.0-SNAPSHOT,7.0.0-SNAPSHOT)</parent>
330+
<parent>system:cdap-data-streams[6.1.0-SNAPSHOT,7.0.0-SNAPSHOT)</parent>
331+
</cdapArtifacts>
332+
<additionalActionArguments>
333+
<argument>
334+
<key>jar</key>
335+
<value>${project.artifactId}-${project.version}.jar</value>
336+
</argument>
337+
</additionalActionArguments>
338+
<scope>user</scope>
339+
<author>LiveRamp</author>
340+
<org>LiveRamp</org>
341+
<description>optional plugin description</description>
342+
<!-- Using directory maven plugin -->
343+
<relativeOutputDir>${parent_module.basedir}/packages</relativeOutputDir>
344+
</configuration>
345+
<executions>
346+
<execution>
347+
<goals>
348+
<goal>create-plugin-json</goal>
349+
<goal>create-plugin-spec-json</goal>
350+
</goals>
351+
<id>create-artifact-config</id>
352+
<phase>prepare-package</phase>
353+
</execution>
354+
<execution>
355+
<goals>
356+
<goal>package-artifacts-for-hub</goal>
357+
</goals>
358+
<id>move-artifacts</id>
359+
<phase>package</phase>
360+
</execution>
361+
</executions>
362+
</plugin>
363363
```
364364

365365
#### Output
@@ -418,7 +418,7 @@ If the path is not correct you will see a
418418
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
419419
420420
<name>Test Exported Pipeline</name>
421-
<groupId>com.liveramp.cdap.plugin</groupId>
421+
<groupId>co.cask</groupId>
422422
<artifactId>test_exported_pipeline</artifactId>
423423
<version>1.0.0</version>
424424
<modelVersion>4.0.0</modelVersion>
@@ -432,7 +432,7 @@ If the path is not correct you will see a
432432
<build>
433433
<plugins>
434434
<plugin>
435-
<groupId>com.liveramp.cdap.plugin</groupId>
435+
<groupId>co.cask</groupId>
436436
<version>1.1.3</version>
437437
<artifactId>cdap-maven-plugin</artifactId>
438438
<configuration>

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@
241241
<plugin>
242242
<groupId>org.apache.maven.plugins</groupId>
243243
<artifactId>maven-plugin-plugin</artifactId>
244-
<version>3.6.0</version>
244+
<version>3.6.4</version>
245245
<configuration>
246246
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
247247
</configuration>

0 commit comments

Comments
 (0)