diff options
author | Olivier Lamy <olamy@apache.org> | 2011-09-13 17:31:51 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2011-09-13 17:31:51 +0000 |
commit | 0ce164d10683057d1223632fbe360c55063ec450 (patch) | |
tree | 76eda918a9b2d0404071029328d7f1a244bf895f /archiva-modules | |
parent | 3d29a9d3f408a018c7dde25ab2a2edf766c370c4 (diff) | |
download | archiva-0ce164d10683057d1223632fbe360c55063ec450.tar.gz archiva-0ce164d10683057d1223632fbe360c55063ec450.zip |
fix compilation
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1170263 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
3 files changed, 51 insertions, 25 deletions
diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java index 86f22a2cd..1ff81bfbb 100644 --- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java +++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java @@ -391,6 +391,7 @@ public class NexusRepositorySearch hit.setContext( artifactInfo.context ); hit.setGoals( artifactInfo.goals ); hit.setPrefix( artifactInfo.prefix ); + hit.setPackaging( artifactInfo.packaging ); // sure ?? hit.setUrl( artifactInfo.remoteUrl ); } diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchResultHit.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchResultHit.java index 5eaf33d38..f397db864 100644 --- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchResultHit.java +++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/SearchResultHit.java @@ -23,7 +23,7 @@ import java.util.ArrayList; import java.util.List; /** - * SearchResultHit + * SearchResultHit * * @version $Id: SearchResultHit.java 740552 2009-02-04 01:09:17Z oching $ */ @@ -40,81 +40,93 @@ public class SearchResultHit // Advanced hit, reference to artifactId. private String artifactId; - + private String repositoryId = ""; private List<String> versions = new ArrayList<String>(); - + + private String packaging; + /** * Plugin goal prefix (only if packaging is "maven-plugin") */ - public String prefix; + private String prefix; /** * Plugin goals (only if packaging is "maven-plugin") */ - public List<String> goals; - + private List<String> goals; + /** * contains osgi metadata Bundle-Version if available + * * @since 1.4 */ - public String bundleVersion; + private String bundleVersion; /** * contains osgi metadata Bundle-SymbolicName if available + * * @since 1.4 */ - public String bundleSymbolicName; + private String bundleSymbolicName; /** * contains osgi metadata Export-Package if available + * * @since 1.4 */ - public String bundleExportPackage; + private String bundleExportPackage; /** * contains osgi metadata Export-Service if available + * * @since 1.4 */ - public String bundleExportService; + private String bundleExportService; /** * contains osgi metadata Bundle-Description if available + * * @since 1.4 */ - public String bundleDescription; + private String bundleDescription; /** * contains osgi metadata Bundle-Name if available + * * @since 1.4 */ - public String bundleName; + private String bundleName; /** * contains osgi metadata Bundle-License if available + * * @since 1.4 */ - public String bundleLicense; + private String bundleLicense; /** * contains osgi metadata Bundle-DocURL if available + * * @since 1.4 */ - public String bundleDocUrl; + private String bundleDocUrl; /** * contains osgi metadata Import-Package if available + * * @since 1.4 */ - public String bundleImportPackage; + private String bundleImportPackage; /** * contains osgi metadata Require-Bundle if available + * * @since 1.4 */ - public String bundleRequireBundle; - + private String bundleRequireBundle; + public String getContext() { @@ -166,7 +178,7 @@ public class SearchResultHit return versions; } - public void setVersions(List<String> versions) + public void setVersions( List<String> versions ) { this.versions = versions; } @@ -180,7 +192,7 @@ public class SearchResultHit { this.repositoryId = repositoryId; } - + public void addVersion( String version ) { versions.add( version ); @@ -306,6 +318,21 @@ public class SearchResultHit this.bundleRequireBundle = bundleRequireBundle; } + public String getPackaging() + { + return packaging; + } + + public void setPackaging( String packaging ) + { + this.packaging = packaging; + } + + public String getType() + { + return getPackaging(); + } + @Override public String toString() { @@ -317,6 +344,7 @@ public class SearchResultHit sb.append( ", artifactId='" ).append( artifactId ).append( '\'' ); sb.append( ", repositoryId='" ).append( repositoryId ).append( '\'' ); sb.append( ", versions=" ).append( versions ); + sb.append( ", packaging='" ).append( packaging ).append( '\'' ); sb.append( ", prefix='" ).append( prefix ).append( '\'' ); sb.append( ", goals=" ).append( goals ); sb.append( ", bundleVersion='" ).append( bundleVersion ).append( '\'' ); @@ -334,5 +362,4 @@ public class SearchResultHit } - } diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java index 837563bf5..fd9dfc8b5 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java @@ -230,11 +230,9 @@ public class SearchAction for ( SearchResultHit hit : results.getHits() ) { - final String version = hit.getVersion(); - if ( version != null ) - { - hit.setVersion( VersionUtil.getBaseVersion( version ) ); - } + // fix version ? + //hit.setVersion( VersionUtil.getBaseVersion( version ) ); + } return SUCCESS; |