Skip to content

Commit 6c30746

Browse files
refactor: addressed warnings, added org.eclipse.kura:maven-enforcer-rules to ban plugins
Signed-off-by: Marcello Rinaldo Martina <martina.marcello.rinaldo@outlook.com>
1 parent c285666 commit 6c30746

2 files changed

Lines changed: 39 additions & 2 deletions

File tree

  • kura/tools/kura-addon-archetype/src/main/resources/archetype-resources/parent

kura/tools/kura-addon-archetype/src/main/resources/archetype-resources/parent/pom.xml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
<target>17</target>
7575
<showDeprecation>true</showDeprecation>
7676
<showWarnings>true</showWarnings>
77-
<requireJREPackageImports>true</requireJREPackageImports>
7877
</configuration>
7978
</plugin>
8079

@@ -177,6 +176,41 @@
177176
</executions>
178177
</plugin>
179178

179+
<plugin>
180+
<groupId>org.apache.maven.plugins</groupId>
181+
<artifactId>maven-enforcer-plugin</artifactId>
182+
<version>3.6.2</version>
183+
<dependencies>
184+
<dependency>
185+
<groupId>org.eclipse.kura</groupId>
186+
<artifactId>maven-enforcer-rules</artifactId>
187+
<version>1.0.0-SNAPSHOT</version>
188+
</dependency>
189+
</dependencies>
190+
<executions>
191+
<execution>
192+
<id>enforce</id>
193+
<configuration>
194+
<rules>
195+
<bannedPluginsAdvanced>
196+
<message>Please use copy-dependencies goal instead of copy</message>
197+
<bannedPlugins>
198+
<bannedPlugin>
199+
<groupId>org.apache.maven.plugins</groupId>
200+
<artifactId>maven-dependency-plugin</artifactId>
201+
<goal>copy</goal>
202+
</bannedPlugin>
203+
</bannedPlugins>
204+
</bannedPluginsAdvanced>
205+
</rules>
206+
</configuration>
207+
<goals>
208+
<goal>enforce</goal>
209+
</goals>
210+
</execution>
211+
</executions>
212+
</plugin>
213+
180214
<!-- This plugin's configuration is used to store Eclipse m2e settings only. It has
181215
no influence on the Maven build itself. -->
182216
<plugin>
@@ -258,6 +292,10 @@
258292
<flattenMode>oss</flattenMode>
259293
</configuration>
260294
</plugin>
295+
<plugin>
296+
<groupId>org.apache.maven.plugins</groupId>
297+
<artifactId>maven-enforcer-plugin</artifactId>
298+
</plugin>
261299
</plugins>
262300
</build>
263301

kura/tools/kura-addon-archetype/src/main/resources/archetype-resources/parent/tests/__package__.test/META-INF/MANIFEST.MF

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ Require-Bundle: org.junit,
1414
Import-Package: org.eclipse.kura;version="1.5.0",
1515
org.eclipse.kura.configuration;version="1.1.2",
1616
org.slf4j;version="1.7.25"
17-
Service-Component: OSGI-INF/*.xml

0 commit comments

Comments
 (0)