You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2021/09/29 14:05:33 UTC

[maven-dependency-plugin] branch MDEP-752 updated (4deb7e7 -> ccfacdb)

This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a change to branch MDEP-752
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git.


    omit 4deb7e7  [MDEP-752] Add ignoredPackagings options for analyze
     add 6a9ada8  Bump mockito-core from 2.28.2 to 3.12.4
     add 2dc1c7a  Adjust CI setup
     add 3ed0f50  Bump maven-dependency-tree from 3.0.1 to 3.1.0
     new ccfacdb  [MDEP-752] Add ignoredPackagings options for analyze

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (4deb7e7)
            \
             N -- N -- N   refs/heads/MDEP-752 (ccfacdb)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/maven.yml                         | 21 +++++----------------
 pom.xml                                             |  4 ++--
 .../maven/plugins/dependency/tree/TreeMojo.java     |  2 +-
 3 files changed, 8 insertions(+), 19 deletions(-)

[maven-dependency-plugin] 01/01: [MDEP-752] Add ignoredPackagings options for analyze

Posted by sl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch MDEP-752
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git

commit ccfacdb2d1ee341d151bae3b237b19e0773a8cbb
Author: Slawomir Jaranowski <s....@gmail.com>
AuthorDate: Sun Sep 12 17:09:17 2021 +0200

    [MDEP-752] Add ignoredPackagings options for analyze
    
    By default pom and ear packaging are ignored from analyzing.
---
 .../ear/pom.xml                                    | 42 +++++++++++++++
 .../ejb/pom.xml                                    | 35 ++++++++++++
 .../ejb/src/main/java/Main.java                    | 23 ++++++++
 .../invoker.properties                             | 18 +++++++
 .../pom.xml                                        | 62 ++++++++++++++++++++++
 .../verify.groovy                                  | 29 ++++++++++
 .../ear/pom.xml                                    | 42 +++++++++++++++
 .../ejb/pom.xml                                    | 35 ++++++++++++
 .../ejb/src/main/java/Main.java                    | 23 ++++++++
 .../invoker.properties                             | 18 +++++++
 .../pom.xml                                        | 44 +++++++++++++++
 .../verify.groovy                                  | 28 ++++++++++
 .../dependency/analyze/AbstractAnalyzeMojo.java    | 13 +++--
 13 files changed, 409 insertions(+), 3 deletions(-)

diff --git a/src/it/projects/mdep-752-analyze-ignored-packaging-custom/ear/pom.xml b/src/it/projects/mdep-752-analyze-ignored-packaging-custom/ear/pom.xml
new file mode 100644
index 0000000..ea80642
--- /dev/null
+++ b/src/it/projects/mdep-752-analyze-ignored-packaging-custom/ear/pom.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<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>org.apache.maven.its.dependency</groupId>
+    <artifactId>mdep-752-analyze-ignored-packaging-defaults</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>mdep-752-ear</artifactId>
+  <packaging>ear</packaging>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.its.dependency</groupId>
+      <artifactId>mdep-752-ejb</artifactId>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/src/it/projects/mdep-752-analyze-ignored-packaging-custom/ejb/pom.xml b/src/it/projects/mdep-752-analyze-ignored-packaging-custom/ejb/pom.xml
new file mode 100644
index 0000000..546cbba
--- /dev/null
+++ b/src/it/projects/mdep-752-analyze-ignored-packaging-custom/ejb/pom.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<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>org.apache.maven.its.dependency</groupId>
+    <artifactId>mdep-752-analyze-ignored-packaging-defaults</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>mdep-752-ejb</artifactId>
+  <packaging>ejb</packaging>
+
+</project>
diff --git a/src/it/projects/mdep-752-analyze-ignored-packaging-custom/ejb/src/main/java/Main.java b/src/it/projects/mdep-752-analyze-ignored-packaging-custom/ejb/src/main/java/Main.java
new file mode 100644
index 0000000..5e405ff
--- /dev/null
+++ b/src/it/projects/mdep-752-analyze-ignored-packaging-custom/ejb/src/main/java/Main.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+public class Main
+{
+}
diff --git a/src/it/projects/mdep-752-analyze-ignored-packaging-custom/invoker.properties b/src/it/projects/mdep-752-analyze-ignored-packaging-custom/invoker.properties
new file mode 100644
index 0000000..0eca1be
--- /dev/null
+++ b/src/it/projects/mdep-752-analyze-ignored-packaging-custom/invoker.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+invoker.goals = ${project.groupId}:${project.artifactId}:${project.version}:analyze
diff --git a/src/it/projects/mdep-752-analyze-ignored-packaging-custom/pom.xml b/src/it/projects/mdep-752-analyze-ignored-packaging-custom/pom.xml
new file mode 100644
index 0000000..6ef4da9
--- /dev/null
+++ b/src/it/projects/mdep-752-analyze-ignored-packaging-custom/pom.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<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>
+
+  <groupId>org.apache.maven.its.dependency</groupId>
+  <artifactId>mdep-752-analyze-ignored-packaging-defaults</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <description>
+    Test dependency:analyze with default ignored packaging
+  </description>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <modules>
+    <module>ear</module>
+    <module>ejb</module>
+  </modules>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <artifactId>maven-dependency-plugin</artifactId>
+          <configuration>
+            <failOnWarning>true</failOnWarning>
+            <ignoredPackagings>
+              <ignoredPackaging>pom</ignoredPackaging>
+              <ignoredPackaging>ear</ignoredPackaging>
+              <ignoredPackaging>ejb</ignoredPackaging>
+            </ignoredPackagings>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+
+</project>
diff --git a/src/it/projects/mdep-752-analyze-ignored-packaging-custom/verify.groovy b/src/it/projects/mdep-752-analyze-ignored-packaging-custom/verify.groovy
new file mode 100644
index 0000000..fc6fb25
--- /dev/null
+++ b/src/it/projects/mdep-752-analyze-ignored-packaging-custom/verify.groovy
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+File file = new File( basedir, "build.log" );
+assert file.exists();
+
+String buildLog = file.getText( "UTF-8" );
+assert buildLog.contains( 'ignoredPackagings = [pom, ear, ejb]' );
+assert buildLog.contains( '[INFO] Skipping pom project' );
+assert buildLog.contains( '[INFO] Skipping ear project' );
+assert buildLog.contains( '[INFO] Skipping ejb project' );
+
+return true;
diff --git a/src/it/projects/mdep-752-analyze-ignored-packaging-defaults/ear/pom.xml b/src/it/projects/mdep-752-analyze-ignored-packaging-defaults/ear/pom.xml
new file mode 100644
index 0000000..ea80642
--- /dev/null
+++ b/src/it/projects/mdep-752-analyze-ignored-packaging-defaults/ear/pom.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<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>org.apache.maven.its.dependency</groupId>
+    <artifactId>mdep-752-analyze-ignored-packaging-defaults</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>mdep-752-ear</artifactId>
+  <packaging>ear</packaging>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.its.dependency</groupId>
+      <artifactId>mdep-752-ejb</artifactId>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/src/it/projects/mdep-752-analyze-ignored-packaging-defaults/ejb/pom.xml b/src/it/projects/mdep-752-analyze-ignored-packaging-defaults/ejb/pom.xml
new file mode 100644
index 0000000..546cbba
--- /dev/null
+++ b/src/it/projects/mdep-752-analyze-ignored-packaging-defaults/ejb/pom.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<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>org.apache.maven.its.dependency</groupId>
+    <artifactId>mdep-752-analyze-ignored-packaging-defaults</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>mdep-752-ejb</artifactId>
+  <packaging>ejb</packaging>
+
+</project>
diff --git a/src/it/projects/mdep-752-analyze-ignored-packaging-defaults/ejb/src/main/java/Main.java b/src/it/projects/mdep-752-analyze-ignored-packaging-defaults/ejb/src/main/java/Main.java
new file mode 100644
index 0000000..5e405ff
--- /dev/null
+++ b/src/it/projects/mdep-752-analyze-ignored-packaging-defaults/ejb/src/main/java/Main.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+public class Main
+{
+}
diff --git a/src/it/projects/mdep-752-analyze-ignored-packaging-defaults/invoker.properties b/src/it/projects/mdep-752-analyze-ignored-packaging-defaults/invoker.properties
new file mode 100644
index 0000000..0eca1be
--- /dev/null
+++ b/src/it/projects/mdep-752-analyze-ignored-packaging-defaults/invoker.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+invoker.goals = ${project.groupId}:${project.artifactId}:${project.version}:analyze
diff --git a/src/it/projects/mdep-752-analyze-ignored-packaging-defaults/pom.xml b/src/it/projects/mdep-752-analyze-ignored-packaging-defaults/pom.xml
new file mode 100644
index 0000000..c11b388
--- /dev/null
+++ b/src/it/projects/mdep-752-analyze-ignored-packaging-defaults/pom.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<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>
+
+  <groupId>org.apache.maven.its.dependency</groupId>
+  <artifactId>mdep-752-analyze-ignored-packaging-defaults</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <description>
+    Test dependency:analyze with default ignored packaging
+  </description>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <modules>
+    <module>ear</module>
+    <module>ejb</module>
+  </modules>
+
+</project>
diff --git a/src/it/projects/mdep-752-analyze-ignored-packaging-defaults/verify.groovy b/src/it/projects/mdep-752-analyze-ignored-packaging-defaults/verify.groovy
new file mode 100644
index 0000000..8c8ba1e
--- /dev/null
+++ b/src/it/projects/mdep-752-analyze-ignored-packaging-defaults/verify.groovy
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+File file = new File( basedir, "build.log" );
+assert file.exists();
+
+String buildLog = file.getText( "UTF-8" );
+assert buildLog.contains( 'ignoredPackagings = [pom, ear]' );
+assert buildLog.contains( '[INFO] Skipping pom project' );
+assert buildLog.contains( '[INFO] Skipping ear project' );
+
+return true;
diff --git a/src/main/java/org/apache/maven/plugins/dependency/analyze/AbstractAnalyzeMojo.java b/src/main/java/org/apache/maven/plugins/dependency/analyze/AbstractAnalyzeMojo.java
index 6ab8073..a347041 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/analyze/AbstractAnalyzeMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/analyze/AbstractAnalyzeMojo.java
@@ -222,6 +222,14 @@ public abstract class AbstractAnalyzeMojo
     @Parameter
     private final String[] ignoredUnusedDeclaredDependencies = new String[0];
 
+    /**
+     * List of project packaging that will be ignored.
+     *
+     * @since 3.2.1
+     */
+    @Parameter( defaultValue = "pom,ear" )
+    private List<String> ignoredPackagings = new ArrayList<>();
+
     // Mojo methods -----------------------------------------------------------
 
     /*
@@ -237,9 +245,9 @@ public abstract class AbstractAnalyzeMojo
             return;
         }
 
-        if ( "pom".equals( project.getPackaging() ) )
+        if ( ignoredPackagings.contains( project.getPackaging() ) )
         {
-            getLog().info( "Skipping pom project" );
+            getLog().info( "Skipping " + project.getPackaging() + " project" );
             return;
         }
 
@@ -521,7 +529,6 @@ public abstract class AbstractAnalyzeMojo
     }
 
     private List<Artifact> filterDependencies( Set<Artifact> artifacts, String[] excludes )
-        throws MojoExecutionException
     {
         ArtifactFilter filter = new StrictPatternExcludesArtifactFilter( Arrays.asList( excludes ) );
         List<Artifact> result = new ArrayList<>();