diff options
author | Brett Porter <brett@apache.org> | 2006-06-07 08:33:00 +0000 |
---|---|---|
committer | Brett Porter <brett@apache.org> | 2006-06-07 08:33:00 +0000 |
commit | f1f69f4c8a47675f3a3549d973e3462a76aff8e6 (patch) | |
tree | ca7026bbfc092cc049175e60449fbbea4eef36d6 /maven-repository-converter | |
parent | 85d48bdf93f28be5e2d442caf0c426f9ca436bab (diff) | |
download | archiva-f1f69f4c8a47675f3a3549d973e3462a76aff8e6.tar.gz archiva-f1f69f4c8a47675f3a3549d973e3462a76aff8e6.zip |
be more specific with i18n keys
git-svn-id: https://svn.apache.org/repos/asf/maven/repository-manager/trunk@412325 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'maven-repository-converter')
2 files changed, 18 insertions, 11 deletions
diff --git a/maven-repository-converter/src/main/java/org/apache/maven/repository/converter/DefaultRepositoryConverter.java b/maven-repository-converter/src/main/java/org/apache/maven/repository/converter/DefaultRepositoryConverter.java index 5f74a6504..d06f9bfdd 100644 --- a/maven-repository-converter/src/main/java/org/apache/maven/repository/converter/DefaultRepositoryConverter.java +++ b/maven-repository-converter/src/main/java/org/apache/maven/repository/converter/DefaultRepositoryConverter.java @@ -264,33 +264,41 @@ public class DefaultRepositoryConverter private boolean validateMetadata( Metadata metadata, RepositoryMetadata repositoryMetadata, Artifact artifact, ArtifactReporter reporter ) { - String key = "failure.incorrect."; - + String groupIdKey; + String artifactIdKey = null; + String snapshotKey = null; + String versionKey = null; + String versionsKey = null; if ( repositoryMetadata.storedInGroupDirectory() ) { - key += "groupMetadata."; + groupIdKey = "failure.incorrect.groupMetadata.groupId"; } else if ( repositoryMetadata.storedInArtifactVersionDirectory() ) { - key += "snapshotMetadata."; + groupIdKey = "failure.incorrect.snapshotMetadata.groupId"; + artifactIdKey = "failure.incorrect.snapshotMetadata.artifactId"; + versionKey = "failure.incorrect.snapshotMetadata.version"; + snapshotKey = "failure.incorrect.snapshotMetadata.snapshot"; } else { - key += "artifactMetadata."; + groupIdKey = "failure.incorrect.artifactMetadata.groupId"; + artifactIdKey = "failure.incorrect.artifactMetadata.artifactId"; + versionsKey = "failure.incorrect.artifactMetadata.versions"; } boolean result = true; if ( !metadata.getGroupId().equals( artifact.getGroupId() ) ) { - reporter.addFailure( artifact, getI18NString( key + "groupId" ) ); + reporter.addFailure( artifact, getI18NString( groupIdKey ) ); result = false; } if ( !repositoryMetadata.storedInGroupDirectory() ) { if ( !metadata.getArtifactId().equals( artifact.getArtifactId() ) ) { - reporter.addFailure( artifact, getI18NString( key + "artifactId" ) ); + reporter.addFailure( artifact, getI18NString( artifactIdKey ) ); result = false; } if ( !repositoryMetadata.storedInArtifactVersionDirectory() ) @@ -313,7 +321,7 @@ public class DefaultRepositoryConverter if ( !foundVersion ) { - reporter.addFailure( artifact, getI18NString( key + "versions" ) ); + reporter.addFailure( artifact, getI18NString( versionsKey ) ); result = false; } } @@ -322,7 +330,7 @@ public class DefaultRepositoryConverter // snapshot metadata if ( !artifact.getBaseVersion().equals( metadata.getVersion() ) ) { - reporter.addFailure( artifact, getI18NString( key + "version" ) ); + reporter.addFailure( artifact, getI18NString( versionKey ) ); result = false; } @@ -345,7 +353,7 @@ public class DefaultRepositoryConverter if ( !correct ) { - reporter.addFailure( artifact, getI18NString( key + "snapshot" ) ); + reporter.addFailure( artifact, getI18NString( snapshotKey ) ); result = false; } } diff --git a/maven-repository-converter/src/main/resources/org/apache/maven/repository/converter/DefaultRepositoryConverter.properties b/maven-repository-converter/src/main/resources/org/apache/maven/repository/converter/DefaultRepositoryConverter.properties index 88e4d1f30..f6089c1f5 100644 --- a/maven-repository-converter/src/main/resources/org/apache/maven/repository/converter/DefaultRepositoryConverter.properties +++ b/maven-repository-converter/src/main/resources/org/apache/maven/repository/converter/DefaultRepositoryConverter.properties @@ -23,7 +23,6 @@ warning.missing.pom=The artifact had no POM in the source repository. exception.repositories.match=Source and target repositories are identical. -# TODO! update definitions failure.incorrect.groupMetadata.groupId=The group ID in the source group metadata is incorrect. failure.incorrect.artifactMetadata.artifactId=The artifact ID in the source artifact metadata is incorrect. |