mirror of https://github.com/apache/archiva.git
[MRM-1524] downloading (optionnaly) remote index to display remote artifacts in search results : setup a default weekly schedule for download remote index
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1176035 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4fabcacf28
commit
ff06852acd
|
@ -403,16 +403,6 @@
|
|||
<!-- TODO: should be able to detect this from the repository (perhaps by metadata at the root) -->
|
||||
<defaultValue>default</defaultValue>
|
||||
</field>
|
||||
<field>
|
||||
<name>refreshCronExpression</name>
|
||||
<version>1.0.0+</version>
|
||||
<type>String</type>
|
||||
<description>
|
||||
When to run the refresh task.
|
||||
Default is every hour
|
||||
</description>
|
||||
<defaultValue>0 0 * * * ?</defaultValue>
|
||||
</field>
|
||||
<field>
|
||||
<name>indexDir</name>
|
||||
<version>1.0.0+</version>
|
||||
|
@ -493,6 +483,16 @@
|
|||
</description>
|
||||
<defaultValue>60</defaultValue>
|
||||
</field>
|
||||
<field>
|
||||
<name>refreshCronExpression</name>
|
||||
<version>1.4.0+</version>
|
||||
<type>String</type>
|
||||
<description>
|
||||
When to run the refresh task.
|
||||
Default is every sunday at 8H00.
|
||||
</description>
|
||||
<defaultValue>0 0 08 ? * SUN</defaultValue>
|
||||
</field>
|
||||
<field>
|
||||
<name>downloadRemoteIndex</name>
|
||||
<version>1.4.0+</version>
|
||||
|
@ -562,6 +562,16 @@
|
|||
<description>True if this repository should be scanned and processed.</description>
|
||||
<defaultValue>true</defaultValue>
|
||||
</field>
|
||||
<field>
|
||||
<name>refreshCronExpression</name>
|
||||
<version>1.0.0+</version>
|
||||
<type>String</type>
|
||||
<description>
|
||||
When to run the refresh task.
|
||||
Default is every hour
|
||||
</description>
|
||||
<defaultValue>0 0 * * * ?</defaultValue>
|
||||
</field>
|
||||
<field>
|
||||
<name>retentionCount</name>
|
||||
<version>1.0.0+</version>
|
||||
|
|
|
@ -34,10 +34,7 @@ public class AbstractRepository
|
|||
|
||||
private String layout = "default";
|
||||
|
||||
/**
|
||||
* default model value
|
||||
*/
|
||||
private String cronExpression = "0 0 * * * ?";
|
||||
|
||||
|
||||
private String indexDirectory;
|
||||
|
||||
|
@ -83,15 +80,7 @@ public class AbstractRepository
|
|||
this.layout = layout;
|
||||
}
|
||||
|
||||
public String getCronExpression()
|
||||
{
|
||||
return cronExpression;
|
||||
}
|
||||
|
||||
public void setCronExpression( String cronExpression )
|
||||
{
|
||||
this.cronExpression = cronExpression;
|
||||
}
|
||||
|
||||
public String getIndexDirectory()
|
||||
{
|
||||
|
@ -136,7 +125,6 @@ public class AbstractRepository
|
|||
sb.append( "{id='" ).append( id ).append( '\'' );
|
||||
sb.append( ", name='" ).append( name ).append( '\'' );
|
||||
sb.append( ", layout='" ).append( layout ).append( '\'' );
|
||||
sb.append( ", cronExpression='" ).append( cronExpression ).append( '\'' );
|
||||
sb.append( ", indexDirectory='" ).append( indexDirectory ).append( '\'' );
|
||||
sb.append( '}' );
|
||||
return sb.toString();
|
||||
|
|
|
@ -40,6 +40,11 @@ public class ManagedRepository
|
|||
|
||||
private boolean blockRedeployments = false;
|
||||
|
||||
/**
|
||||
* default model value hourly
|
||||
*/
|
||||
private String cronExpression = "0 0 * * * ?";
|
||||
|
||||
|
||||
/**
|
||||
* not need when creating the repo : only available when reading
|
||||
|
@ -91,6 +96,16 @@ public class ManagedRepository
|
|||
this.resetStats = resetStats;
|
||||
}
|
||||
|
||||
public String getCronExpression()
|
||||
{
|
||||
return cronExpression;
|
||||
}
|
||||
|
||||
public void setCronExpression( String cronExpression )
|
||||
{
|
||||
this.cronExpression = cronExpression;
|
||||
}
|
||||
|
||||
public String getLocation()
|
||||
{
|
||||
return this.location;
|
||||
|
@ -159,7 +174,6 @@ public class ManagedRepository
|
|||
}
|
||||
|
||||
|
||||
|
||||
public int getDaysOlder()
|
||||
{
|
||||
return daysOlder;
|
||||
|
@ -220,6 +234,7 @@ public class ManagedRepository
|
|||
sb.append( ", snapshots=" ).append( snapshots );
|
||||
sb.append( ", releases=" ).append( releases );
|
||||
sb.append( ", blockRedeployments=" ).append( blockRedeployments );
|
||||
sb.append( ", cronExpression='" ).append( cronExpression ).append( '\'' );
|
||||
sb.append( ", stagingRepository=" ).append( stagingRepository );
|
||||
sb.append( ", scanned=" ).append( scanned );
|
||||
sb.append( ", daysOlder=" ).append( daysOlder );
|
||||
|
|
|
@ -52,6 +52,11 @@ public class RemoteRepository
|
|||
|
||||
private String remoteDownloadNetworkProxyId;
|
||||
|
||||
/**
|
||||
* default model value daily : every sunday at 8H00
|
||||
*/
|
||||
private String cronExpression = "0 0 08 ? * SUN";
|
||||
|
||||
|
||||
public RemoteRepository()
|
||||
{
|
||||
|
@ -144,6 +149,16 @@ public class RemoteRepository
|
|||
this.remoteDownloadNetworkProxyId = remoteDownloadNetworkProxyId;
|
||||
}
|
||||
|
||||
public String getCronExpression()
|
||||
{
|
||||
return cronExpression;
|
||||
}
|
||||
|
||||
public void setCronExpression( String cronExpression )
|
||||
{
|
||||
this.cronExpression = cronExpression;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
|
@ -157,6 +172,7 @@ public class RemoteRepository
|
|||
sb.append( ", downloadRemoteIndex=" ).append( downloadRemoteIndex );
|
||||
sb.append( ", remoteIndexUrl='" ).append( remoteIndexUrl ).append( '\'' );
|
||||
sb.append( ", remoteDownloadNetworkProxyId='" ).append( remoteDownloadNetworkProxyId ).append( '\'' );
|
||||
sb.append( ", cronExpression='" ).append( cronExpression ).append( '\'' );
|
||||
sb.append( '}' );
|
||||
return sb.toString();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue