summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web
diff options
context:
space:
mode:
authorMaria Odea B. Ching <oching@apache.org>2009-09-17 07:48:55 +0000
committerMaria Odea B. Ching <oching@apache.org>2009-09-17 07:48:55 +0000
commit40e247c7e41c0550a4a69ebac7f3d70d4fc46d89 (patch)
tree6b754decec3a73fcac360ea1fd3f454a7f2f4086 /archiva-modules/archiva-web
parent8604c2f38943ad3dd469f58162c15eeec92dd2ae (diff)
downloadarchiva-40e247c7e41c0550a4a69ebac7f3d70d4fc46d89.tar.gz
archiva-40e247c7e41c0550a4a69ebac7f3d70d4fc46d89.zip
[MRM-1056] Option to force scanning of an artifact/repository regardless of file dates
o add checkbox for processing all artifacts beside Scan Repository Now button in repositories page o scan all artifacts if flag is set o added unit tests git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@816084 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web')
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/UploadAction.java2
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/SchedulerAction.java16
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositories.jsp27
-rw-r--r--archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResource.java2
-rw-r--r--archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImpl.java2
5 files changed, 31 insertions, 18 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/UploadAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/UploadAction.java
index e64a46d0c..9c538c837 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/UploadAction.java
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/UploadAction.java
@@ -617,7 +617,7 @@ public class UploadAction
private void queueRepositoryTask( String repositoryId, File localFile )
{
- RepositoryTask task = TaskCreator.createRepositoryTask( repositoryId, localFile.getName(), localFile, true );
+ RepositoryTask task = TaskCreator.createRepositoryTask( repositoryId, localFile.getName(), localFile, true, true );
try
{
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/SchedulerAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/SchedulerAction.java
index 25a9bb510..711a553cf 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/SchedulerAction.java
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/SchedulerAction.java
@@ -50,7 +50,9 @@ public class SchedulerAction
private ArchivaTaskScheduler taskScheduler;
private String repoid;
-
+
+ private boolean scanAll;
+
public String scanRepository()
{
if ( StringUtils.isBlank( repoid ) )
@@ -59,7 +61,7 @@ public class SchedulerAction
return SUCCESS;
}
- RepositoryTask task = TaskCreator.createRepositoryTask( repoid, "" );
+ RepositoryTask task = TaskCreator.createRepositoryTask( repoid, "", scanAll );
boolean scheduleTask = false;
@@ -181,4 +183,14 @@ public class SchedulerAction
{
this.repoid = repoid;
}
+
+ public boolean getScanAll()
+ {
+ return scanAll;
+ }
+
+ public void setScanAll( boolean scanAll )
+ {
+ this.scanAll = scanAll;
+ }
}
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositories.jsp b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositories.jsp
index e73cc3711..22d56a94b 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositories.jsp
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositories.jsp
@@ -198,20 +198,21 @@
Actions
</th>
<td>
- <table>
- <tr>
- <td>
- <redback:ifAuthorized permission="archiva-run-indexer">
- <s:form action="indexRepository" theme="simple">
- <s:hidden name="repoid" value="%{#attr.repository.id}"/>
- <s:submit value="Scan Repository Now"/>
- </s:form>
- </redback:ifAuthorized>
- </td>
- </tr>
- </table>
+ <redback:ifAuthorized permission="archiva-run-indexer">
+ <s:form action="indexRepository" theme="simple">
+ <s:hidden name="repoid" value="%{#attr.repository.id}"/>
+ <table>
+ <tr>
+ <td><s:checkbox name="scanAll" value="scanAll"/>Process All Artifacts</td>
+ </tr>
+ <tr>
+ <td><s:submit value="Scan Repository Now"/></td>
+ </tr>
+ </table>
+ </s:form>
+ </redback:ifAuthorized>
</td>
- </tr>
+ </tr>
<tr>
<th>Stats</th>
<td>
diff --git a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResource.java b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResource.java
index c0b5ec496..493d17d71 100644
--- a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResource.java
+++ b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResource.java
@@ -645,7 +645,7 @@ public class ArchivaDavResource
private void queueRepositoryTask( File localFile )
{
- RepositoryTask task = TaskCreator.createRepositoryTask( repository.getId(), localFile.getName(), localFile, false );
+ RepositoryTask task = TaskCreator.createRepositoryTask( repository.getId(), localFile.getName(), localFile, false, true );
try
{
diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImpl.java b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImpl.java
index 623b32475..3279c79c7 100644
--- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImpl.java
+++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImpl.java
@@ -313,7 +313,7 @@ public class AdministrationServiceImpl
}
}
- RepositoryTask task = TaskCreator.createRepositoryTask( repoId, "" );
+ RepositoryTask task = TaskCreator.createRepositoryTask( repoId, "", false );
taskScheduler.queueRepositoryTask( task );