You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ian Rowlands <Ia...@sro.vic.gov.au> on 2007/12/20 22:46:41 UTC

Trying to work out where a snapshot caching problem is

Hi,

I'm having a problem with Maven caching and snapshots. I am using
Artifactory as a repository cache, which everybody is configured to use. If
a release version is needed, everything is fetched into the users' local
repository as expected. However the same is not happening with snapshots. I
know the snapshots are there - I can see them, and if I do a manual copy
out of Artifactory and place them in the local repository everything is
fine.

I'm not sure whether the problem is my Maven configuration, or an
Artifactory configuration. Are there any diagnostics I can turn on to
determine where the problem is? I've included the relevant bits of the
(customised) settings.xml which everybody is using. This happens with Maven
2.0.7 and 2.0.8.

Thanks,

Ian


<settings>
  <servers>
    <server>
      <id>artifactory.releases</id>
      <username>admin</username>
      <password>password</password>
    </server>
    <server>
      <id>artifactory.snapshots</id>
      <username>admin</username>
      <password>password</password>
    </server>
  </servers>
  <mirrors>
    <mirror>
      <id>artifactory</id>
      <mirrorOf>*</mirrorOf>
      <url>http://ebizci/artifactory/all/</url>
      <name>Artifactory</name>
    </mirror>
  </mirrors>
  <profiles>
    <!-- Default profile, which should always be set -->
    <profile>
      <id>default</id>
      <!-- Need this repository until the dashboard plugin becomes ready
for release -->
      <pluginRepositories>
        <pluginRepository>
          <id>Codehaus Snapshots</id>
          <url> http://snapshots.repository.codehaus.org/</url>
        </pluginRepository>
        <pluginRepository>
          <id>Codehaus Snapshots</id>
          <url> http://snapshots.repository.codehaus.org/</url>
        </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>
  <!-- activeProfiles
   | List of profiles that are active for all builds.
   |-->
  <activeProfiles>
    <activeProfile>default</activeProfile>
  </activeProfiles>
</settings>





Disclaimer: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from your computer.
Privacy: If you are responding to this email or providing personal information to the SRO for the purposes of one of the Acts it administers, such information  is used only for the purpose for which it was collected (administration of SRO legislation ) and is protected by the Information Privacy Act 2000 and secrecy provisions contained in legislation administered by SRO. It is not disclosed otherwise than in accordance with the law. If you would like a copy of the SRO Privacy Policy please refer to SRO website (www.sro.vic.gov.au) or contact SRO on 9628 0556 and request a copy.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Trying to work out where a snapshot caching problem is

Posted by "Gargan, Stephen" <sg...@qualcomm.com>.
This is due to the snapshot update policy. By default maven will only
update once a day you need to update the snapshot policy to 'always' or
a more appropriate interval.

Add this to the snapshot repo definition

<snapshotPolicy>always</snapshotPolicy>  

Try this and see if it works for you.

Rgds,

ste
-----Original Message-----
From: Ian Rowlands [mailto:Ian.Rowlands@sro.vic.gov.au] 
Sent: Thursday, December 20, 2007 1:47 PM
To: undisclosed-recipients
Subject: Trying to work out where a snapshot caching problem is


Hi,

I'm having a problem with Maven caching and snapshots. I am using
Artifactory as a repository cache, which everybody is configured to use.
If
a release version is needed, everything is fetched into the users' local
repository as expected. However the same is not happening with
snapshots. I
know the snapshots are there - I can see them, and if I do a manual copy
out of Artifactory and place them in the local repository everything is
fine.

I'm not sure whether the problem is my Maven configuration, or an
Artifactory configuration. Are there any diagnostics I can turn on to
determine where the problem is? I've included the relevant bits of the
(customised) settings.xml which everybody is using. This happens with
Maven
2.0.7 and 2.0.8.

Thanks,

Ian


<settings>
  <servers>
    <server>
      <id>artifactory.releases</id>
      <username>admin</username>
      <password>password</password>
    </server>
    <server>
      <id>artifactory.snapshots</id>
      <username>admin</username>
      <password>password</password>
    </server>
  </servers>
  <mirrors>
    <mirror>
      <id>artifactory</id>
      <mirrorOf>*</mirrorOf>
      <url>http://ebizci/artifactory/all/</url>
      <name>Artifactory</name>
    </mirror>
  </mirrors>
  <profiles>
    <!-- Default profile, which should always be set -->
    <profile>
      <id>default</id>
      <!-- Need this repository until the dashboard plugin becomes ready
for release -->
      <pluginRepositories>
        <pluginRepository>
          <id>Codehaus Snapshots</id>
          <url> http://snapshots.repository.codehaus.org/</url>
        </pluginRepository>
        <pluginRepository>
          <id>Codehaus Snapshots</id>
          <url> http://snapshots.repository.codehaus.org/</url>
        </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>
  <!-- activeProfiles
   | List of profiles that are active for all builds.
   |-->
  <activeProfiles>
    <activeProfile>default</activeProfile>
  </activeProfiles>
</settings>





Disclaimer: The information transmitted is intended only for the person
or entity to which it is addressed and may contain confidential and/or
privileged material. Any review, retransmission, dissemination or other
use of, or taking of any action in reliance upon, this information by
persons or entities other than the intended recipient is prohibited. If
you received this in error, please contact the sender and delete the
material from your computer.
Privacy: If you are responding to this email or providing personal
information to the SRO for the purposes of one of the Acts it
administers, such information  is used only for the purpose for which it
was collected (administration of SRO legislation ) and is protected by
the Information Privacy Act 2000 and secrecy provisions contained in
legislation administered by SRO. It is not disclosed otherwise than in
accordance with the law. If you would like a copy of the SRO Privacy
Policy please refer to SRO website (www.sro.vic.gov.au) or contact SRO
on 9628 0556 and request a copy.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Trying to work out where a snapshot caching problem is

Posted by hirowla <Ia...@sro.vic.gov.au>.
The problem has been solved - thanks for your help. I assumed that the
"mirror" would pick up the snapshots - obviously that is not the case. So I
set it in the settings.xml file, and now everything works as expected.

Thanks,

Ian



William Ferguson wrote:
> 
> Ian, it sounds like you have not configured Maven with the address of
> the snapshot repositories.
> 
> I suspect you have just setup a mirror to point to the main repository
> in Artifactory (in which you are caching Apache, Codehaus etc). Its
> generally a good idea to keep release and snapshot artifacts separate in
> any case
> 
> Don't forget to list the pluginRepository too.
> And don't foget to activate the profile, either in settings.xml
> (typical) or on the command line.
> 
> Try adding something like the following to your settings.xml
> 
> <profile>
> 	<id>default-repositories</id>
> 	<repositories>
> 		<repository>
> 			<id>snapshot</id>
> 			<name>SNAPSHOT Repository</name>
> 	
> <url>http://hubpc65:8080/artifactory/snapshot</url>
> 			<releases>
> 				<enabled>false</enabled>
> 			</releases>
> 			<snapshots>
> 				<enabled>true</enabled>
> 			</snapshots>
> 		</repository>
> 	</repositories>
> 	<pluginRepositories>
> 		<pluginRepository>
> 			<id>snapshot</id>
> 			<name>SNAPSHOT Repository</name>
> 	
> <url>http://hubpc65:8080/artifactory/snapshot</url>
> 			<releases>
> 				<enabled>false</enabled>
> 			</releases>
> 			<snapshots>
> 				<enabled>true</enabled>
> 				<updatePolicy>always</updatePolicy>
> 			</snapshots>
> 		</pluginRepository>
> 	</pluginRepositories>
> </profile>
> 
> 
> William
> 
>  
> 
>> -----Original Message-----
>> From: Ian Rowlands [mailto:Ian.Rowlands@sro.vic.gov.au] 
>> Sent: Friday, 21 December 2007 7:47 AM
>> To: undisclosed-recipients
>> Subject: [***POSSIBLE SPAM***] - Trying to work out where a 
>> snapshot caching problem is - Sender is forged (SPF Fail)
>> 
>> 
>> Hi,
>> 
>> I'm having a problem with Maven caching and snapshots. I am 
>> using Artifactory as a repository cache, which everybody is 
>> configured to use. If a release version is needed, everything 
>> is fetched into the users' local repository as expected. 
>> However the same is not happening with snapshots. I know the 
>> snapshots are there - I can see them, and if I do a manual 
>> copy out of Artifactory and place them in the local 
>> repository everything is fine.
>> 
>> I'm not sure whether the problem is my Maven configuration, 
>> or an Artifactory configuration. Are there any diagnostics I 
>> can turn on to determine where the problem is? I've included 
>> the relevant bits of the
>> (customised) settings.xml which everybody is using. This 
>> happens with Maven
>> 2.0.7 and 2.0.8.
>> 
>> Thanks,
>> 
>> Ian
>> 
>> 
>> <settings>
>>   <servers>
>>     <server>
>>       <id>artifactory.releases</id>
>>       <username>admin</username>
>>       <password>password</password>
>>     </server>
>>     <server>
>>       <id>artifactory.snapshots</id>
>>       <username>admin</username>
>>       <password>password</password>
>>     </server>
>>   </servers>
>>   <mirrors>
>>     <mirror>
>>       <id>artifactory</id>
>>       <mirrorOf>*</mirrorOf>
>>       <url>http://ebizci/artifactory/all/</url>
>>       <name>Artifactory</name>
>>     </mirror>
>>   </mirrors>
>>   <profiles>
>>     <!-- Default profile, which should always be set -->
>>     <profile>
>>       <id>default</id>
>>       <!-- Need this repository until the dashboard plugin 
>> becomes ready for release -->
>>       <pluginRepositories>
>>         <pluginRepository>
>>           <id>Codehaus Snapshots</id>
>>           <url> http://snapshots.repository.codehaus.org/</url>
>>         </pluginRepository>
>>         <pluginRepository>
>>           <id>Codehaus Snapshots</id>
>>           <url> http://snapshots.repository.codehaus.org/</url>
>>         </pluginRepository>
>>       </pluginRepositories>
>>     </profile>
>>   </profiles>
>>   <!-- activeProfiles
>>    | List of profiles that are active for all builds.
>>    |-->
>>   <activeProfiles>
>>     <activeProfile>default</activeProfile>
>>   </activeProfiles>
>> </settings>
>> 
>> 
>> 
>> 
>> 
>> Disclaimer: The information transmitted is intended only for 
>> the person or entity to which it is addressed and may contain 
>> confidential and/or privileged material. Any review, 
>> retransmission, dissemination or other use of, or taking of 
>> any action in reliance upon, this information by persons or 
>> entities other than the intended recipient is prohibited. If 
>> you received this in error, please contact the sender and 
>> delete the material from your computer.
>> Privacy: If you are responding to this email or providing 
>> personal information to the SRO for the purposes of one of 
>> the Acts it administers, such information  is used only for 
>> the purpose for which it was collected (administration of SRO 
>> legislation ) and is protected by the Information Privacy Act 
>> 2000 and secrecy provisions contained in legislation 
>> administered by SRO. It is not disclosed otherwise than in 
>> accordance with the law. If you would like a copy of the SRO 
>> Privacy Policy please refer to SRO website 
>> (www.sro.vic.gov.au) or contact SRO on 9628 0556 and request a copy.
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Trying-to-work-out-where-a-snapshot-caching-problem-is-tp14445868s177p14449188.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Trying to work out where a snapshot caching problem is

Posted by William Ferguson <Wi...@yarris.com>.
Ian, it sounds like you have not configured Maven with the address of
the snapshot repositories.

I suspect you have just setup a mirror to point to the main repository
in Artifactory (in which you are caching Apache, Codehaus etc). Its
generally a good idea to keep release and snapshot artifacts separate in
any case

Don't forget to list the pluginRepository too.
And don't foget to activate the profile, either in settings.xml
(typical) or on the command line.

Try adding something like the following to your settings.xml

<profile>
	<id>default-repositories</id>
	<repositories>
		<repository>
			<id>snapshot</id>
			<name>SNAPSHOT Repository</name>
	
<url>http://hubpc65:8080/artifactory/snapshot</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
	</repositories>
	<pluginRepositories>
		<pluginRepository>
			<id>snapshot</id>
			<name>SNAPSHOT Repository</name>
	
<url>http://hubpc65:8080/artifactory/snapshot</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
				<updatePolicy>always</updatePolicy>
			</snapshots>
		</pluginRepository>
	</pluginRepositories>
</profile>


William

 

> -----Original Message-----
> From: Ian Rowlands [mailto:Ian.Rowlands@sro.vic.gov.au] 
> Sent: Friday, 21 December 2007 7:47 AM
> To: undisclosed-recipients
> Subject: [***POSSIBLE SPAM***] - Trying to work out where a 
> snapshot caching problem is - Sender is forged (SPF Fail)
> 
> 
> Hi,
> 
> I'm having a problem with Maven caching and snapshots. I am 
> using Artifactory as a repository cache, which everybody is 
> configured to use. If a release version is needed, everything 
> is fetched into the users' local repository as expected. 
> However the same is not happening with snapshots. I know the 
> snapshots are there - I can see them, and if I do a manual 
> copy out of Artifactory and place them in the local 
> repository everything is fine.
> 
> I'm not sure whether the problem is my Maven configuration, 
> or an Artifactory configuration. Are there any diagnostics I 
> can turn on to determine where the problem is? I've included 
> the relevant bits of the
> (customised) settings.xml which everybody is using. This 
> happens with Maven
> 2.0.7 and 2.0.8.
> 
> Thanks,
> 
> Ian
> 
> 
> <settings>
>   <servers>
>     <server>
>       <id>artifactory.releases</id>
>       <username>admin</username>
>       <password>password</password>
>     </server>
>     <server>
>       <id>artifactory.snapshots</id>
>       <username>admin</username>
>       <password>password</password>
>     </server>
>   </servers>
>   <mirrors>
>     <mirror>
>       <id>artifactory</id>
>       <mirrorOf>*</mirrorOf>
>       <url>http://ebizci/artifactory/all/</url>
>       <name>Artifactory</name>
>     </mirror>
>   </mirrors>
>   <profiles>
>     <!-- Default profile, which should always be set -->
>     <profile>
>       <id>default</id>
>       <!-- Need this repository until the dashboard plugin 
> becomes ready for release -->
>       <pluginRepositories>
>         <pluginRepository>
>           <id>Codehaus Snapshots</id>
>           <url> http://snapshots.repository.codehaus.org/</url>
>         </pluginRepository>
>         <pluginRepository>
>           <id>Codehaus Snapshots</id>
>           <url> http://snapshots.repository.codehaus.org/</url>
>         </pluginRepository>
>       </pluginRepositories>
>     </profile>
>   </profiles>
>   <!-- activeProfiles
>    | List of profiles that are active for all builds.
>    |-->
>   <activeProfiles>
>     <activeProfile>default</activeProfile>
>   </activeProfiles>
> </settings>
> 
> 
> 
> 
> 
> Disclaimer: The information transmitted is intended only for 
> the person or entity to which it is addressed and may contain 
> confidential and/or privileged material. Any review, 
> retransmission, dissemination or other use of, or taking of 
> any action in reliance upon, this information by persons or 
> entities other than the intended recipient is prohibited. If 
> you received this in error, please contact the sender and 
> delete the material from your computer.
> Privacy: If you are responding to this email or providing 
> personal information to the SRO for the purposes of one of 
> the Acts it administers, such information  is used only for 
> the purpose for which it was collected (administration of SRO 
> legislation ) and is protected by the Information Privacy Act 
> 2000 and secrecy provisions contained in legislation 
> administered by SRO. It is not disclosed otherwise than in 
> accordance with the law. If you would like a copy of the SRO 
> Privacy Policy please refer to SRO website 
> (www.sro.vic.gov.au) or contact SRO on 9628 0556 and request a copy.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org