1
votes

Some of my nexus maven artifacts disappear from repository after 1-5 days. Cannot reproduce that yet.

How can that happen?

Maven settings.xml:

<settings>
<mirrors>
    <mirror>
        <id>nexus</id>
        <mirrorOf>*,!codehaus.snapshots,!snapshots</mirrorOf>
        <url>http://192.168.2.252:8080/nexus/content/groups/public</url>
    </mirror>
    <mirror>
        <id>nexus-snapshots</id>
        <mirrorOf>codehaus.snapshots,snapshots</mirrorOf>
        <url>http://192.168.2.252:8080/nexus/content/groups/public-snapshots</url>
    </mirror>
</mirrors>
<profiles>
    <profile>
        <id>nexus</id>
        <!--Enable snapshots for the built in central repo to direct -->
        <!--all requests to nexus via the mirror -->
        <repositories>
            <repository>
                <id>central</id>
                <url>http://central</url>
                <releases>
                    <enabled>true</enabled>
                    <updatePolicy>always</updatePolicy>
                </releases>
                <snapshots>
                    <enabled>true</enabled>
                    <updatePolicy>always</updatePolicy>
                </snapshots>
            </repository>
        </repositories>
        <pluginRepositories>
            <pluginRepository>
                <id>central</id>
                <url>http://central</url>
                <releases>
                    <enabled>true</enabled>
                    <updatePolicy>always</updatePolicy>
                </releases>
                <snapshots>
                    <enabled>true</enabled>
                    <updatePolicy>always</updatePolicy>
                </snapshots>
            </pluginRepository>
        </pluginRepositories>
    </profile>
</profiles>
<activeProfiles>
    <!--make the profile active all the time -->
    <activeProfile>nexus</activeProfile>
</activeProfiles>

Artifacts downloaded from public and public snapshots groups.

1
do you have configured any scheduled tasks in nexus? To repair or re-index the repositories?wemu
No. Scheduled tasks tab empty if viewed by anonymous user and security is disabled, anonymous is admin.Vyacheslav
are these artifacts snapshots? do they disappear from nexus only or also from the file system?wemu
Yes. These artifactes are snapshots, and Snapshots are in public repositories group. Posting settings.xmlVyacheslav
I cannot reproduce now, but i think from filesystem too.Vyacheslav

1 Answers

2
votes

Snapshot releases in public repositories are most likely being purged. You'll have no control over this.

snapshot revisions are designed to be temporary in nature.