You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2017/12/20 09:29:06 UTC
[maven-ant-plugin] 06/14: [MANT-60] Generated "package" task for
EAR/WAR is missing transitive dependencies
This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to annotated tag maven-ant-plugin-2.3
in repository https://gitbox.apache.org/repos/asf/maven-ant-plugin.git
commit 8f0dfb1bd07eb0eb6eb9f3b3224d9fc0b8884d55
Author: Benjamin Bentmann <be...@apache.org>
AuthorDate: Sun Sep 6 16:02:28 2009 +0000
[MANT-60] Generated "package" task for EAR/WAR is missing transitive dependencies
git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-ant-plugin@811830 13f79535-47bb-0310-9956-ffa450edef68
---
src/it/webapp-it/pom.xml | 6 ++++++
src/it/webapp-it/verify.bsh | 2 ++
src/main/java/org/apache/maven/plugin/ant/AntBuildWriterUtil.java | 8 ++++----
3 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/it/webapp-it/pom.xml b/src/it/webapp-it/pom.xml
index 954b253..78c1ec3 100644
--- a/src/it/webapp-it/pom.xml
+++ b/src/it/webapp-it/pom.xml
@@ -42,6 +42,12 @@ under the License.
<version>3.8.2</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <!-- This one has a transitive dependency on plexus-utils:1.4.1 -->
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-model</artifactId>
+ <version>2.0.6</version>
+ </dependency>
</dependencies>
<properties>
diff --git a/src/it/webapp-it/verify.bsh b/src/it/webapp-it/verify.bsh
index b9dc041..3c65829 100644
--- a/src/it/webapp-it/verify.bsh
+++ b/src/it/webapp-it/verify.bsh
@@ -62,6 +62,8 @@ try
"WEB-INF/classes/test.properties",
"WEB-INF/classes/org/MyClass.class",
"WEB-INF/lib/log4j-1.2.14.jar",
+ "WEB-INF/lib/maven-model-2.0.6.jar",
+ "WEB-INF/lib/plexus-utils-1.4.1.jar",
};
for ( String entry : expected )
{
diff --git a/src/main/java/org/apache/maven/plugin/ant/AntBuildWriterUtil.java b/src/main/java/org/apache/maven/plugin/ant/AntBuildWriterUtil.java
index db0d72b..31c0942 100644
--- a/src/main/java/org/apache/maven/plugin/ant/AntBuildWriterUtil.java
+++ b/src/main/java/org/apache/maven/plugin/ant/AntBuildWriterUtil.java
@@ -1159,14 +1159,14 @@ public class AntBuildWriterUtil
writer.addAttribute( "dir", outputDir );
writer.endElement(); // mkdir
- if ( !project.getDependencyArtifacts().isEmpty() )
+ if ( project.getArtifacts() != null )
{
- for ( Iterator i = project.getDependencyArtifacts().iterator(); i.hasNext(); )
+ for ( Iterator i = project.getArtifacts().iterator(); i.hasNext(); )
{
Artifact artifact = (Artifact) i.next();
- if ( !artifact.getScope().equals( Artifact.SCOPE_PROVIDED )
- && !artifact.getScope().equals( Artifact.SCOPE_TEST ) )
+ if ( Artifact.SCOPE_COMPILE.equals( artifact.getScope() )
+ || Artifact.SCOPE_RUNTIME.equals( artifact.getScope() ) )
{
String path = artifactResolverWrapper.getLocalArtifactPath( artifact );
if ( !new File( path ).isAbsolute() )
--
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.