Skip to content

Commit b53befe

Browse files
committed
[NEW] added nexus
1 parent 9ef92f6 commit b53befe

File tree

13 files changed

+2728
-3
lines changed

13 files changed

+2728
-3
lines changed

.github/workflows/ci-cd.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ jobs:
2828

2929
- name: Set up Docker Buildx
3030
uses: docker/setup-buildx-action@v3
31-
31+
32+
- name: Replace Nexus Credentials in settings.xml
33+
run: |
34+
sed -i "s|\${env.NEXUS_USER}|${{ secrets.NEXUS_USER }}|g" settings.xml
35+
sed -i "s|\${env.NEXUS_PASSWORD}|${{ secrets.NEXUS_PASSWORD }}|g" settings.xml
36+
3237
- name: Log in to the Container registry
3338
uses: docker/login-action@v3
3439
with:

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
FROM maven:3.9.5-eclipse-temurin-17-alpine AS builder
22
WORKDIR /app
3+
COPY settings.xml /root/.m2/settings.xml
34
COPY pom.xml .
45
RUN mvn dependency:go-offline -B
56
COPY src ./src

HELP.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@ The following guides illustrate how to use some features concretely:
2020
Due to Maven's design, elements are inherited from the parent POM to the project POM.
2121
While most of the inheritance is fine, it also inherits unwanted elements like `<license>` and `<developers>` from the parent.
2222
To prevent this, the project POM contains empty overrides for these elements.
23-
If you manually switch to a different parent and actually want the inheritance, you need to remove those overrides.
24-
23+
If you manually switch to a different parent and actually want the inheritance, you need to remove those overrides.

pom.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,33 @@
6565
</dependency>
6666
</dependencies>
6767

68+
<repositories>
69+
<repository>
70+
<id>nexus</id>
71+
<url>https://nexus.helm.uz/repository/maven-public/</url>
72+
<releases>
73+
<enabled>true</enabled>
74+
</releases>
75+
<snapshots>
76+
<enabled>true</enabled>
77+
</snapshots>
78+
</repository>
79+
</repositories>
80+
81+
<pluginRepositories>
82+
<pluginRepository>
83+
<id>nexus</id>
84+
<url>https://nexus.helm.uz/repository/maven-public/</url>
85+
<releases>
86+
<enabled>true</enabled>
87+
</releases>
88+
<snapshots>
89+
<enabled>true</enabled>
90+
</snapshots>
91+
</pluginRepository>
92+
</pluginRepositories>
93+
94+
6895
<build>
6996
<plugins>
7097
<plugin>

settings.xml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd">
4+
5+
<servers>
6+
<server>
7+
<id>nexus</id>
8+
<username>${env.NEXUS_USER}</username>
9+
<password>${env.NEXUS_PASSWORD}</password>
10+
</server>
11+
</servers>
12+
13+
<mirrors>
14+
<mirror>
15+
<id>nexus</id>
16+
<mirrorOf>*</mirrorOf>
17+
<url>https://nexus.helm.uz/repository/maven-public/</url>
18+
<layout>default</layout>
19+
</mirror>
20+
</mirrors>
21+
22+
<profiles>
23+
<profile>
24+
<id>nexus</id>
25+
<repositories>
26+
<repository>
27+
<id>nexus</id>
28+
<url>https://nexus.helm.uz/repository/maven-public/</url>
29+
<releases>
30+
<enabled>true</enabled>
31+
</releases>
32+
<snapshots>
33+
<enabled>true</enabled>
34+
</snapshots>
35+
</repository>
36+
</repositories>
37+
</profile>
38+
</profiles>
39+
40+
<activeProfiles>
41+
<activeProfile>nexus</activeProfile>
42+
</activeProfiles>
43+
</settings>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
spring.application.name=waifulist
2+
# DATABASE
3+
spring.datasource.url=${DEV_DATABASE_URL}
4+
spring.datasource.username=${DEV_DATABASE_USERNAME}
5+
spring.datasource.password=${DEV_DATABASE_PASSWORD}
6+
spring.jpa.hibernate.ddl-auto=update
7+
spring.jpa.show-sql=true
8+
9+
logging.level.org.springframework.web=DEBUG
10+
logging.level.org.springdoc=DEBUG
11+
management.endpoints.web.exposure.include=health,info
12+
management.endpoint.health.show-details=always
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
spring.application.name=waifulist
2+
# DATABASE
3+
spring.datasource.url=${PROD_DATABASE_URL}
4+
spring.datasource.username=${PROD_DATABASE_USERNAME}
5+
spring.datasource.password=${PROD_DATABASE_PASSWORD}
6+
spring.jpa.hibernate.ddl-auto=update
7+
spring.jpa.show-sql=true
8+
9+
logging.level.org.springframework.web=DEBUG
10+
logging.level.org.springdoc=DEBUG
11+
management.endpoints.web.exposure.include=health,info
12+
management.endpoint.health.show-details=always
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
zawkin/me/asuna/entity/WaifuEntity$WaifuEntityBuilder.class
2+
zawkin/me/asuna/service/WaifuService.class
3+
zawkin/me/asuna/WaifulistApplication.class
4+
zawkin/me/asuna/config/SwaggerConfig.class
5+
zawkin/me/asuna/repository/WaifuRepository.class
6+
zawkin/me/asuna/controller/WaifuController.class
7+
zawkin/me/asuna/entity/WaifuEntity.class
8+
zawkin/me/asuna/dto/WaifuDTO.class
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/home/ismoilovdev/Desktop/Project/waifulist/src/main/java/zawkin/me/asuna/WaifulistApplication.java
2+
/home/ismoilovdev/Desktop/Project/waifulist/src/main/java/zawkin/me/asuna/config/SwaggerConfig.java
3+
/home/ismoilovdev/Desktop/Project/waifulist/src/main/java/zawkin/me/asuna/controller/WaifuController.java
4+
/home/ismoilovdev/Desktop/Project/waifulist/src/main/java/zawkin/me/asuna/dto/WaifuDTO.java
5+
/home/ismoilovdev/Desktop/Project/waifulist/src/main/java/zawkin/me/asuna/entity/WaifuEntity.java
6+
/home/ismoilovdev/Desktop/Project/waifulist/src/main/java/zawkin/me/asuna/repository/WaifuRepository.java
7+
/home/ismoilovdev/Desktop/Project/waifulist/src/main/java/zawkin/me/asuna/service/WaifuService.java
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
zawkin/me/asuna/WaifulistApplicationTests.class

0 commit comments

Comments
 (0)