简体   繁体   中英

What the timeout for maven snapshots in eclipse?

I have web application that I run on tomcat embedded in eclipse. It works ok, but when I try next day - it needs clean install/build/refresh all dependencies. If I will not this - eclipse will not copy some dependencies. Each day I waste many time for this. Does exists way that possible work in Eclipse without do each day many rebuilds/refreshes, update dependencies/ project configuration etc.? Or at least - what snapshot timeout? Thanks.

I am not sure I understand your question, but if you do not want your SNAPSHOT dependencies to be updated too frequently, you can configure this using updatePolicy parameter in settings.xml suitably. For instance never will never update the snapshots.

From the settings reference ,

updatePolicy: This element specifies how often updates should attempt to occur. Maven will compare the local POM's timestamp (stored in a repository's maven-metadata file) to the remote. The choices are: always, daily (default), interval:X (where X is an integer in minutes) or never.

<repositories>
    <repository>
      <id>my-snapshots</id>
      <name>Snapshot Repository</name>
      <releases>
        <enabled>false</enabled>
        <updatePolicy>always</updatePolicy>
        <checksumPolicy>warn</checksumPolicy>
      </releases>
      <snapshots>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
        <checksumPolicy>fail</checksumPolicy>
      </snapshots>
      <url>http://url/to/my/snapshot/repository</url>
    </repository>
  </repositories>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM