Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit aea2d1e

Browse files
authored
Update to work with 3.14.0-04 (#80)
💥
1 parent 8ce7beb commit aea2d1e

File tree

4 files changed

+25
-21
lines changed

4 files changed

+25
-21
lines changed

Dockerfile

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
ARG NEXUS_VERSION=3.13.0
1+
ARG NEXUS_VERSION=3.14.0
22

33
FROM maven:3-jdk-8-alpine AS build
4-
ARG NEXUS_VERSION=3.13.0
5-
ARG NEXUS_BUILD=01
4+
ARG NEXUS_VERSION=3.14.0
5+
ARG NEXUS_BUILD=04
66

77
COPY . /nexus-repository-apt/
8-
RUN cd /nexus-repository-apt/; sed -i "s/3.13.0-01/${NEXUS_VERSION}-${NEXUS_BUILD}/g" pom.xml; \
8+
RUN cd /nexus-repository-apt/; sed -i "s/3.14.0-04/${NEXUS_VERSION}-${NEXUS_BUILD}/g" pom.xml; \
99
mvn;
1010

1111
FROM sonatype/nexus3:$NEXUS_VERSION
12-
ARG NEXUS_VERSION=3.13.0
13-
ARG NEXUS_BUILD=01
12+
ARG NEXUS_VERSION=3.14.0
13+
ARG NEXUS_BUILD=04
1414
# Will not seem to work in sed without some magick
15-
ARG APT_VERSION=1.0.8
16-
ARG COMP_VERSION=1.16.1
15+
ARG APT_VERSION=1.0.9
16+
ARG COMP_VERSION=1.18
1717
ARG XZ_VERSION=1.8
1818
ARG APT_TARGET=/opt/sonatype/nexus/system/net/staticsnow/nexus-repository-apt/${APT_VERSION}/
1919
USER root

README.md

+9-8
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Compatibility Matrix:
1010
| v1.0.5 | 3.9.0 |
1111
| v1.0.7 | 3.11.0 |
1212
| v1.0.8 | 3.13.0 |
13+
| v1.0.9 | 3.14.0 |
1314

1415
### Build
1516
* Clone the project:
@@ -23,11 +24,11 @@ Compatibility Matrix:
2324
```
2425
### Build with docker and create an image based on nexus repository 3
2526

26-
``` docker build -t nexus-repository-apt:3.13.0 .```
27+
``` docker build -t nexus-repository-apt:3.14.0 .```
2728

2829
### Run a docker container from that image
2930

30-
``` docker run -d -p 8081:8081 --name nexus-repo nexus-repository-apt:3.13.0 ```
31+
``` docker run -d -p 8081:8081 --name nexus-repo nexus-repository-apt:3.14.0 ```
3132

3233
For further information like how to persist volumes check out [the GitHub Repo for the official Nexus Repository 3 Docker image](https://github.com/sonatype/docker-nexus3).
3334

@@ -45,19 +46,19 @@ The application will now be available from your browser at http://localhost:8081
4546
./nexus stop
4647
```
4748

48-
* Copy the bundle into `<nexus_dir>/system/net/staticsnow/nexus-repository-apt/1.0.8/nexus-repository-apt-1.0.8.jar`
49+
* Copy the bundle into `<nexus_dir>/system/net/staticsnow/nexus-repository-apt/1.0.9/nexus-repository-apt-1.0.9.jar`
4950
* Make the following additions marked with + to `<nexus_dir>/system/org/sonatype/nexus/assemblies/nexus-core-feature/3.x.y/nexus-core-feature-3.x.y-features.xml`
5051
```
51-
<feature prerequisite="false" dependency="false">nexus-repository-maven</feature>
52-
+ <feature prerequisite="false" dependency="false">nexus-repository-apt</feature>
52+
<feature version="x.y.z" prerequisite="false" dependency="false">nexus-repository-maven</feature>
53+
+ <feature version="1.0.9" prerequisite="false" dependency="false">nexus-repository-apt</feature>
5354
</feature>
5455
```
5556
And
5657
```
57-
+ <feature name="nexus-repository-apt" description="net.staticsnow:nexus-repository-apt" version="1.0.8">
58+
+ <feature name="nexus-repository-apt" description="net.staticsnow:nexus-repository-apt" version="1.0.9">
5859
+ <details>net.staticsnow:nexus-repository-apt</details>
59-
+ <bundle>mvn:net.staticsnow/nexus-repository-apt/1.0.8</bundle>
60-
+     <bundle>mvn:org.apache.commons/commons-compress/1.16.1</bundle>
60+
+ <bundle>mvn:net.staticsnow/nexus-repository-apt/1.0.9</bundle>
61+
+     <bundle>mvn:org.apache.commons/commons-compress/1.18</bundle>
6162
+ <bundle>mvn:org.tukaani/xz/1.8</bundle>
6263
+ </feature>
6364
</features>

pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
<parent>
66
<groupId>org.sonatype.nexus.plugins</groupId>
77
<artifactId>nexus-plugins</artifactId>
8-
<version>3.13.0-01</version>
8+
<version>3.14.0-04</version>
99
</parent>
1010
<groupId>net.staticsnow</groupId>
1111
<artifactId>nexus-repository-apt</artifactId>
1212
<name>${project.groupId}:${project.artifactId}</name>
13-
<version>1.0.8</version>
13+
<version>1.0.9</version>
1414
<packaging>bundle</packaging>
1515

1616
<dependencies>

src/main/java/net/staticsnow/nexus/repository/apt/internal/hosted/AptHostedComponentMaintenanceFacet.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515

1616
import java.io.IOException;
1717
import java.io.UncheckedIOException;
18+
import java.util.Collections;
19+
import java.util.Set;
1820

1921
import javax.inject.Named;
2022

@@ -36,14 +38,14 @@ public class AptHostedComponentMaintenanceFacet
3638
{
3739
@Transactional(retryOn = ONeedRetryException.class)
3840
@Override
39-
protected void deleteAssetTx(EntityId assetId, boolean deleteBlobs) {
41+
protected Set<String> deleteAssetTx(EntityId assetId, boolean deleteBlobs) {
4042
StorageTx tx = UnitOfWork.currentTx();
4143
Asset asset = tx.findAsset(assetId, tx.findBucket(getRepository()));
4244
if (asset == null) {
43-
return;
45+
return Collections.emptySet();
4446
}
4547
String assetKind = asset.formatAttributes().get(P_ASSET_KIND, String.class);
46-
super.deleteAssetTx(assetId, deleteBlobs);
48+
Set<String> result = super.deleteAssetTx(assetId, deleteBlobs);
4749
if ("DEB".equals(assetKind)) {
4850
try {
4951
getRepository().facet(AptHostedFacet.class)
@@ -56,5 +58,6 @@ protected void deleteAssetTx(EntityId assetId, boolean deleteBlobs) {
5658
throw new RuntimeException(e);
5759
}
5860
}
61+
return result;
5962
}
6063
}

0 commit comments

Comments
 (0)