Hi Shane,
Author: sisbell
Date: Sun Nov 16 22:23:46 2008
New Revision: 718176
URL: http://svn.apache.org/viewvc?rev=718176&view=rev
Log:
Configured build extension listener to only fire on poms within the build.
[...]
Modified:
maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/builder/PomClassicDomainModel.java
URL:
http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/builder/PomClassicDomainModel.java?rev=718176&r1=718175&r2=718176&view=diff
==============================================================================
---
maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/builder/PomClassicDomainModel.java
(original)
+++
maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/builder/PomClassicDomainModel.java
Sun Nov 16 22:23:46 2008
@@ -143,7 +143,7 @@
public boolean isPomInBuild()
{
- return projectDirectory != null;
+ return projectDirectory != null && new File(projectDirectory,
"pom.xml").exists();
}
Will that work in all cases? For instance, there is the concept of a
release-pom.xml and furthermore users are free to specify POMs with
arbitrary names via the command line switch "-f". So hard-coding
"pom.xml" seems to be insufficient.
Benjamin
P.S.: When checking for the existence of normal files like POMs,
java.io.File.isFile() is preferable, i.e. to ignore directories.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]