diff options
author | Joakim Erdfelt <joakime@apache.org> | 2007-09-25 18:02:43 +0000 |
---|---|---|
committer | Joakim Erdfelt <joakime@apache.org> | 2007-09-25 18:02:43 +0000 |
commit | 3b339dd073c72103f7ed13eff1a986254916885e (patch) | |
tree | 82d8f14bf25d73c06dcc68ec7ae9fd7eda533ac2 /archiva-base | |
parent | 0222469bc6a02b317576de17d598aadda5d6c430 (diff) | |
download | archiva-3b339dd073c72103f7ed13eff1a986254916885e.tar.gz archiva-3b339dd073c72103f7ed13eff1a986254916885e.zip |
Cleaning up error message from ProjectModelToDatabaseConsumer on bad/unexpected models.
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@579332 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-base')
-rw-r--r-- | archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ProjectModelToDatabaseConsumer.java | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ProjectModelToDatabaseConsumer.java b/archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ProjectModelToDatabaseConsumer.java index ba4b6b5a8..08a212842 100644 --- a/archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ProjectModelToDatabaseConsumer.java +++ b/archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ProjectModelToDatabaseConsumer.java @@ -289,11 +289,14 @@ public class ProjectModelToDatabaseConsumer if ( !parts.artifactId.equalsIgnoreCase( model.getArtifactId() ) ) { - getLogger().warn( "Project Model " + model + " artifactId: " + model.getArtifactId() + - " does not match the pom file's artifactId: " + parts.artifactId ); - - addProblem( artifact, "Project Model " + model + " artifactId: " + model.getArtifactId() + - " does not match the pom file's artifactId: " + parts.artifactId ); + StringBuffer emsg = new StringBuffer(); + emsg.append( "File " ).append( artifactFile.getName() ); + emsg.append( " has an invalid project model <" ).append( model.toString() ).append( ">: " ); + emsg.append( "The model artifactId <" ).append( model.getArtifactId() ); + emsg.append( "> does not match the artifactId portion of the filename: " ).append( parts.artifactId ); + + getLogger().warn(emsg.toString() ); + addProblem( artifact, emsg.toString() ); return false; } @@ -301,11 +304,14 @@ public class ProjectModelToDatabaseConsumer if ( !parts.version.equalsIgnoreCase( model.getVersion() ) && !VersionUtil.getBaseVersion( parts.version ).equalsIgnoreCase( model.getVersion() ) ) { - getLogger().warn( "Project Model " + model + " version: " + model.getVersion() + - " does not match the pom file's version: " + parts.version ); - - addProblem( artifact, "Project Model " + model + " version: " + model.getVersion() + - " does not match the pom file's version: " + parts.version ); + StringBuffer emsg = new StringBuffer(); + emsg.append( "File " ).append( artifactFile.getName() ); + emsg.append( " has an invalid project model <" ).append( model.toString() ).append( ">: " ); + emsg.append( "The model version <" ).append( model.getVersion() ); + emsg.append( "> does not match the version portion of the filename: " ).append( parts.version ); + + getLogger().warn(emsg.toString() ); + addProblem( artifact, emsg.toString() ); return false; } |