Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
NEXUS-1819, testFrom103_1(), and schedules too
Browse files Browse the repository at this point in the history
git-svn-id: file:///opt/svn/repositories/sonatype.org/nexus/trunk/nexus@3691 2aa8b3fc-8ebb-4439-a84f-95066eaea8ab
  • Loading branch information
tstevens committed Mar 20, 2009
1 parent 3e6fad7 commit 7b99097
Show file tree
Hide file tree
Showing 4 changed files with 190 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public Object loadConfiguration( File file )
{
// a snippet from old TaskConnfigManager
XStream xstream = new XStream( new DomDriver() );

// alias the versioned class (they are frozen to 1.0.3 only!)
xstream.alias( "org.sonatype.nexus.configuration.model.CTaskConfiguration", CTaskConfiguration.class );
xstream.alias(
Expand All @@ -129,6 +129,7 @@ public Object loadConfiguration( File file )
xstream.alias( "org.sonatype.nexus.configuration.model.COnceSchedule", COnceSchedule.class );
xstream.alias( "org.sonatype.nexus.configuration.model.CRunNowSchedule", CRunNowSchedule.class );
xstream.alias( "org.sonatype.nexus.configuration.model.CSchedule", CSchedule.class );
xstream.alias( "org.sonatype.nexus.configuration.model.CProps", org.sonatype.nexus.configuration.model.v1_0_3.CProps.class );

tasksConfig = new CTaskConfiguration();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,14 @@ protected CScheduleConfig copyCScheduleConfig1_0_8(
schedule.setCronCommand( oldschedule.getCronCommand() );
schedule.setDaysOfMonth( oldschedule.getDaysOfMonth() );
schedule.setDaysOfWeek( oldschedule.getDaysOfWeek() );
schedule.setEndDate( oldschedule.getEndDate().getTime() );
schedule.setStartDate( oldschedule.getStartDate().getTime() );
if( oldschedule.getEndDate() != null )
{
schedule.setEndDate( oldschedule.getEndDate().getTime() );
}
if( oldschedule.getStartDate() != null )
{
schedule.setStartDate( oldschedule.getStartDate().getTime() );
}
schedule.setType( oldschedule.getType() );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ public void testFrom103_1()

assertEquals( Configuration.MODEL_VERSION, configuration.getVersion() );

assertEquals( 6 + 2, configuration.getRepositories().size() );
// 6 repos 3 groups
assertEquals( 6 + 3, configuration.getRepositories().size() );

assertEquals( 2, configuration.getRepositoryGrouping().getPathMappings().size() );

Expand Down
Original file line number Diff line number Diff line change
@@ -1,79 +1,235 @@
<?xml version="1.0" encoding="UTF-8"?>
<nexusConfiguration>
<version>1.0.8</version>
<version>1.4.0</version>
<security>
<enabled>true</enabled>
<anonymousAccessEnabled>true</anonymousAccessEnabled>
<anonymousUsername>anonymous</anonymousUsername>
<anonymousPassword>anonymous</anonymousPassword>
<realms>
<realm>XmlAuthenticatingRealm</realm>
<realm>XmlAuthorizingRealm</realm>
</realms>
</security>
<globalConnectionSettings />
<globalConnectionSettings>
<connectionTimeout>10000</connectionTimeout>
<retrievalRetryCount>3</retrievalRetryCount>
<queryString></queryString>
</globalConnectionSettings>
<restApi />
<httpProxy />
<httpProxy>
<port>8082</port>
<proxyPolicy>strict</proxyPolicy>
</httpProxy>
<routing>
<groups />
<resolveLinks>true</resolveLinks>
</routing>
<repositories>
<repository>
<id>central</id>
<name>Maven Central</name>
<artifactMaxAge>-1</artifactMaxAge>
<providerRole>org.sonatype.nexus.proxy.repository.Repository</providerRole>
<providerHint>maven2</providerHint>
<localStatus>inService</localStatus>
<notFoundCacheActive>true</notFoundCacheActive>
<notFoundCacheTTL>1440</notFoundCacheTTL>
<userManaged>true</userManaged>
<exposed>true</exposed>
<browseable>true</browseable>
<indexable>true</indexable>
<remoteStorage>
<url>http://repo1.maven.org/maven2/</url>
</remoteStorage>
<externalConfiguration>
<proxyMode>allow</proxyMode>
<artifactMaxAge>-1</artifactMaxAge>
<itemMaxAge>1440</itemMaxAge>
<cleanseRepositoryMetadata>false</cleanseRepositoryMetadata>
<downloadRemoteIndex>false</downloadRemoteIndex>
<checksumPolicy>warn</checksumPolicy>
<repositoryPolicy>release</repositoryPolicy>
</externalConfiguration>
</repository>
<repository>
<id>apache-snapshots</id>
<name>Apache Snapshots</name>
<repositoryPolicy>snapshot</repositoryPolicy>
<providerRole>org.sonatype.nexus.proxy.repository.Repository</providerRole>
<providerHint>maven2</providerHint>
<localStatus>inService</localStatus>
<notFoundCacheActive>true</notFoundCacheActive>
<notFoundCacheTTL>1440</notFoundCacheTTL>
<userManaged>true</userManaged>
<exposed>true</exposed>
<browseable>true</browseable>
<indexable>true</indexable>
<remoteStorage>
<url>http://people.apache.org/repo/m2-snapshot-repository</url>
</remoteStorage>
<externalConfiguration>
<proxyMode>allow</proxyMode>
<artifactMaxAge>1440</artifactMaxAge>
<itemMaxAge>1440</itemMaxAge>
<cleanseRepositoryMetadata>false</cleanseRepositoryMetadata>
<downloadRemoteIndex>false</downloadRemoteIndex>
<checksumPolicy>warn</checksumPolicy>
<repositoryPolicy>snapshot</repositoryPolicy>
</externalConfiguration>
</repository>
<repository>
<id>codehaus-snapshots</id>
<name>Codehaus Snapshots</name>
<repositoryPolicy>snapshot</repositoryPolicy>
<providerRole>org.sonatype.nexus.proxy.repository.Repository</providerRole>
<providerHint>maven2</providerHint>
<localStatus>inService</localStatus>
<notFoundCacheActive>true</notFoundCacheActive>
<notFoundCacheTTL>1440</notFoundCacheTTL>
<userManaged>true</userManaged>
<exposed>true</exposed>
<browseable>true</browseable>
<indexable>true</indexable>
<remoteStorage>
<url>http://snapshots.repository.codehaus.org/</url>
</remoteStorage>
<externalConfiguration>
<proxyMode>allow</proxyMode>
<artifactMaxAge>1440</artifactMaxAge>
<itemMaxAge>1440</itemMaxAge>
<cleanseRepositoryMetadata>false</cleanseRepositoryMetadata>
<downloadRemoteIndex>false</downloadRemoteIndex>
<checksumPolicy>warn</checksumPolicy>
<repositoryPolicy>snapshot</repositoryPolicy>
</externalConfiguration>
</repository>
<repository>
<id>releases</id>
<name>Releases</name>
<providerRole>org.sonatype.nexus.proxy.repository.Repository</providerRole>
<providerHint>maven2</providerHint>
<localStatus>inService</localStatus>
<notFoundCacheActive>true</notFoundCacheActive>
<notFoundCacheTTL>1440</notFoundCacheTTL>
<userManaged>true</userManaged>
<exposed>true</exposed>
<browseable>true</browseable>
<allowWrite>true</allowWrite>
<artifactMaxAge>-1</artifactMaxAge>
<indexable>true</indexable>
<externalConfiguration>
<proxyMode>allow</proxyMode>
<artifactMaxAge>-1</artifactMaxAge>
<itemMaxAge>1440</itemMaxAge>
<cleanseRepositoryMetadata>false</cleanseRepositoryMetadata>
<downloadRemoteIndex>false</downloadRemoteIndex>
<checksumPolicy>warn</checksumPolicy>
<repositoryPolicy>release</repositoryPolicy>
</externalConfiguration>
</repository>
<repository>
<id>snapshots</id>
<name>Snapshots</name>
<providerRole>org.sonatype.nexus.proxy.repository.Repository</providerRole>
<providerHint>maven2</providerHint>
<localStatus>inService</localStatus>
<notFoundCacheActive>true</notFoundCacheActive>
<notFoundCacheTTL>1440</notFoundCacheTTL>
<userManaged>true</userManaged>
<exposed>true</exposed>
<browseable>true</browseable>
<allowWrite>true</allowWrite>
<repositoryPolicy>snapshot</repositoryPolicy>
<indexable>true</indexable>
<externalConfiguration>
<proxyMode>allow</proxyMode>
<artifactMaxAge>1440</artifactMaxAge>
<itemMaxAge>1440</itemMaxAge>
<cleanseRepositoryMetadata>false</cleanseRepositoryMetadata>
<downloadRemoteIndex>false</downloadRemoteIndex>
<checksumPolicy>warn</checksumPolicy>
<repositoryPolicy>snapshot</repositoryPolicy>
</externalConfiguration>
</repository>
<repository>
<id>thirdparty</id>
<name>3rd party</name>
<providerRole>org.sonatype.nexus.proxy.repository.Repository</providerRole>
<providerHint>maven2</providerHint>
<localStatus>inService</localStatus>
<notFoundCacheActive>true</notFoundCacheActive>
<notFoundCacheTTL>1440</notFoundCacheTTL>
<userManaged>true</userManaged>
<exposed>true</exposed>
<browseable>true</browseable>
<allowWrite>true</allowWrite>
<artifactMaxAge>-1</artifactMaxAge>
<indexable>true</indexable>
<externalConfiguration>
<proxyMode>allow</proxyMode>
<artifactMaxAge>-1</artifactMaxAge>
<itemMaxAge>1440</itemMaxAge>
<cleanseRepositoryMetadata>false</cleanseRepositoryMetadata>
<downloadRemoteIndex>false</downloadRemoteIndex>
<checksumPolicy>warn</checksumPolicy>
<repositoryPolicy>release</repositoryPolicy>
</externalConfiguration>
</repository>
</repositories>
<repositoryShadows>
<repositoryShadow>
<repository>
<id>central-m1</id>
<name>Central M1 shadow</name>
<shadowOf>central</shadowOf>
<type>m2-m1-shadow</type>
</repositoryShadow>
</repositoryShadows>
<providerRole>org.sonatype.nexus.proxy.repository.ShadowRepository</providerRole>
<providerHint>m2-m1-shadow</providerHint>
<localStatus>inService</localStatus>
<notFoundCacheTTL>15</notFoundCacheTTL>
<userManaged>true</userManaged>
<exposed>true</exposed>
<browseable>true</browseable>
<externalConfiguration>
<masterRepositoryId>central</masterRepositoryId>
<syncAtStartup>false</syncAtStartup>
</externalConfiguration>
</repository>
<repository>
<id>public</id>
<providerRole>org.sonatype.nexus.proxy.repository.GroupRepository</providerRole>
<providerHint>maven2</providerHint>
<notFoundCacheActive>true</notFoundCacheActive>
<notFoundCacheTTL>15</notFoundCacheTTL>
<userManaged>true</userManaged>
<exposed>true</exposed>
<browseable>true</browseable>
<externalConfiguration>
<mergeMetadata>true</mergeMetadata>
<memberRepositories>
<memberRepository>releases</memberRepository>
<memberRepository>snapshots</memberRepository>
<memberRepository>thirdparty</memberRepository>
<memberRepository>central</memberRepository>
</memberRepositories>
</externalConfiguration>
</repository>
<repository>
<id>public-snapshots</id>
<providerRole>org.sonatype.nexus.proxy.repository.GroupRepository</providerRole>
<providerHint>maven2</providerHint>
<notFoundCacheActive>true</notFoundCacheActive>
<notFoundCacheTTL>15</notFoundCacheTTL>
<userManaged>true</userManaged>
<exposed>true</exposed>
<browseable>true</browseable>
<externalConfiguration>
<mergeMetadata>true</mergeMetadata>
<memberRepositories>
<memberRepository>apache-snapshots</memberRepository>
<memberRepository>codehaus-snapshots</memberRepository>
</memberRepositories>
</externalConfiguration>
</repository>
</repositories>
<repositoryGrouping>
<pathMappings>
<pathMapping>
<id>inhouse-stuff</id>
<groupId>*</groupId>
<routePattern>.*/(com|org)/somecompany/.*</routePattern>
<routeType>inclusive</routeType>
<routePatterns>
<routePattern>.*/(com|org)/somecompany/.*</routePattern>
</routePatterns>
<repositories>
<repository>snapshots</repository>
<repository>releases</repository>
Expand All @@ -82,34 +238,16 @@
<pathMapping>
<id>apache-stuff</id>
<groupId>*</groupId>
<routePattern>.*/org/some-oss/.*</routePattern>
<routeType>exclusive</routeType>
<routePatterns>
<routePattern>.*/org/some-oss/.*</routePattern>
</routePatterns>
<repositories>
<repository>releases</repository>
<repository>snapshots</repository>
</repositories>
</pathMapping>
</pathMappings>
<repositoryGroups>
<repositoryGroup>
<groupId>public</groupId>
<type>maven2</type>
<repositories>
<repository>releases</repository>
<repository>snapshots</repository>
<repository>thirdparty</repository>
<repository>central</repository>
</repositories>
</repositoryGroup>
<repositoryGroup>
<groupId>public-snapshots</groupId>
<type>maven2</type>
<repositories>
<repository>apache-snapshots</repository>
<repository>codehaus-snapshots</repository>
</repositories>
</repositoryGroup>
</repositoryGroups>
</repositoryGrouping>
<repositoryTargets>
<repositoryTarget>
Expand Down Expand Up @@ -216,7 +354,7 @@
</task>
</tasks>
<smtpConfiguration>
<host>smtp-host</host>
<hostname>smtp-host</hostname>
<port>25</port>
<username>smtp-username</username>
<password>smtp-password</password>
Expand Down

0 comments on commit 7b99097

Please sign in to comment.