Skip to content

Commit 843beda

Browse files
authored
Add missing dependencies (#175)
* Add missing dependencies * remove unused dependency * fix: Update DescriptorGenerator to handle null values gracefully * update as comments * fix check style * update workflows dependencies
1 parent eed1771 commit 843beda

File tree

10 files changed

+57
-32
lines changed

10 files changed

+57
-32
lines changed

.github/generate-email.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ stderr() {
2828

2929
fail_for_invalid_args() {
3030
stderr "Invalid arguments!"
31-
stderr "Expected arguments: <vote|announce> <version> <commitId>"
31+
stderr "Expected arguments: <vote|announce> <version> <commitId> <nexusUrl>"
3232
exit 1
3333
}
3434

3535
# Check arguments
36-
[ $# -ne 3 ] && fail_for_invalid_args
36+
[ $# -ne 4 ] && fail_for_invalid_args
3737

3838
# Constants
3939
PROJECT_NAME="Apache Log4j Tools"
@@ -43,6 +43,7 @@ PROJECT_STAGING_SITE="${PROJECT_SITE/apache.org/staged.apache.org}"
4343
PROJECT_REPO="https://github.com/apache/logging-log4j-tools"
4444
PROJECT_VERSION="$2"
4545
COMMIT_ID="$3"
46+
NEXUS_URL="$4"
4647
PROJECT_DIST_URL="https://dist.apache.org/repos/dist/dev/logging/$PROJECT_ID/$PROJECT_VERSION"
4748

4849
# Check release notes file
@@ -71,7 +72,7 @@ Website: $PROJECT_STAGING_SITE-$PROJECT_VERSION
7172
GitHub: $PROJECT_REPO
7273
Commit: $COMMIT_ID
7374
Distribution: $PROJECT_DIST_URL
74-
Nexus: https://repository.apache.org/content/repositories/orgapachelogging-<FIXME>
75+
Nexus: $NEXUS_URL
7576
Signing key: 0x077e8893a6dcc33dd4a4d5b256e73ba9a0b592d0
7677
Review kit: https://s.apache.org/logging-parent-release-review-kit
7778

.github/workflows/build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ jobs:
3838

3939
build:
4040
if: github.actor != 'dependabot[bot]'
41-
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@rel/11.3.0
41+
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@rel/12.1.0
4242
with:
4343
site-enabled: true
4444

4545
deploy-snapshot:
4646
needs: build
4747
if: github.repository == 'apache/logging-log4j-tools' && github.ref_name == 'main'
48-
uses: apache/logging-parent/.github/workflows/deploy-snapshot-reusable.yaml@rel/12.0.0
48+
uses: apache/logging-parent/.github/workflows/deploy-snapshot-reusable.yaml@rel/12.1.0
4949
# Secrets for deployments
5050
secrets:
5151
NEXUS_USERNAME: ${{ secrets.NEXUS_USER }}
@@ -54,7 +54,7 @@ jobs:
5454
deploy-release:
5555
needs: build
5656
if: github.repository == 'apache/logging-log4j-tools' && startsWith(github.ref_name, 'release/')
57-
uses: apache/logging-parent/.github/workflows/deploy-release-reusable.yaml@rel/11.3.0
57+
uses: apache/logging-parent/.github/workflows/deploy-release-reusable.yaml@rel/12.1.0
5858
# Secrets for deployments
5959
secrets:
6060
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}

.github/workflows/deploy-site.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333

3434
deploy-site-stg:
3535
if: github.repository == 'apache/logging-log4j-tools' && github.ref_name == 'main'
36-
uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@rel/11.3.0
36+
uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@rel/12.1.0
3737
# Secrets for committing the generated site
3838
secrets:
3939
GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
@@ -51,7 +51,7 @@ jobs:
5151

5252
deploy-site-pro:
5353
if: github.repository == 'apache/logging-log4j-tools' && github.ref_name == 'main-site-pro'
54-
uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@rel/11.3.0
54+
uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@rel/12.1.0
5555
# Secrets for committing the generated site
5656
secrets:
5757
GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
@@ -81,7 +81,7 @@ jobs:
8181
8282
deploy-site-rel:
8383
needs: export-version
84-
uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@rel/11.3.0
84+
uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@rel/12.1.0
8585
# Secrets for committing the generated site
8686
secrets:
8787
GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}

.github/workflows/merge-dependabot.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ jobs:
3030

3131
build:
3232
if: github.repository == 'apache/logging-log4j-tools' && github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]'
33-
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@rel/11.3.0
33+
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@rel/12.1.0
3434

3535
merge-dependabot:
3636
needs: build
37-
uses: apache/logging-parent/.github/workflows/merge-dependabot-reusable.yaml@rel/11.3.0
37+
uses: apache/logging-parent/.github/workflows/merge-dependabot-reusable.yaml@rel/12.1.0
3838
permissions:
3939
contents: write # to push changelog commits
4040
pull-requests: write # to close the PR

log4j-changelog-maven-plugin/pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,6 @@
5757
<artifactId>maven-plugin-api</artifactId>
5858
</dependency>
5959

60-
<dependency>
61-
<groupId>org.osgi</groupId>
62-
<artifactId>osgi.annotation</artifactId>
63-
<scope>provided</scope>
64-
</dependency>
65-
6660
</dependencies>
6761

6862
<build>

log4j-changelog/pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@
3030

3131
<dependencies>
3232

33-
<dependency>
34-
<groupId>org.osgi</groupId>
35-
<artifactId>osgi.annotation</artifactId>
36-
<scope>provided</scope>
37-
</dependency>
38-
3933
<dependency>
4034
<groupId>com.github.spotbugs</groupId>
4135
<artifactId>spotbugs-annotations</artifactId>

log4j-docgen/src/main/java/org/apache/logging/log4j/docgen/processor/AsciiDocData.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ public StructuralNode pushChildNode(final Function<? super StructuralNode, ? ext
182182
newParagraph(child);
183183

184184
currentNode.append(child);
185-
return currentNode = child;
185+
currentNode = child;
186+
return currentNode;
186187
}
187188

188189
public StructuralNode popNode() {

log4j-docgen/src/main/java/org/apache/logging/log4j/docgen/processor/DescriptorGenerator.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -607,15 +607,15 @@ public TypeMirror visitVariable(final VariableElement element, final Void unused
607607
final TypeMirror returnType = element.getReturnType();
608608
final List<? extends VariableElement> parameters = element.getParameters();
609609
switch (parameters.size()) {
610-
// A getter
610+
// A getter
611611
case 0:
612612
return returnType;
613-
// A setter
613+
// A setter
614614
case 1:
615615
return parameters.get(0).asType();
616-
// Invalid property
616+
// Invalid property
617617
default:
618-
return super.visitExecutable(element, unused);
618+
return super.visitExecutable(element, null);
619619
}
620620
}
621621
},
@@ -640,7 +640,7 @@ public String visitExecutable(final ExecutableElement e, final Void unused) {
640640
+ name.toString().substring(prefixLen + 1);
641641
}
642642
}
643-
return super.visitExecutable(e, unused);
643+
return super.visitExecutable(e, null);
644644
}
645645
},
646646
null);
@@ -667,7 +667,7 @@ public TypeElement visitDeclared(final DeclaredType t, final Void unused) {
667667
@Override
668668
public @Nullable TypeElement visitTypeVariable(final TypeVariable t, final Void unused) {
669669
// If the return type is a variable, try the upper bound
670-
return t.getUpperBound().accept(this, unused);
670+
return t.getUpperBound().accept(this, null);
671671
}
672672
},
673673
null);
@@ -779,7 +779,7 @@ public String visitNoType(final NoType t, final Void unused) {
779779
}
780780
}
781781
}
782-
return super.visitDeclared(t, unused);
782+
return super.visitDeclared(t, null);
783783
}
784784

785785
private @Nullable DeclaredType findCollectionSupertype(final TypeMirror type) {

log4j-tools-parent/pom.xml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,17 @@
3939
<!-- Dependency versions -->
4040
<asciidoctorj.version>3.0.0-alpha.2</asciidoctorj.version>
4141
<assertj.version>3.27.3</assertj.version>
42+
<bnd.annotation.version>7.1.0</bnd.annotation.version>
4243
<commons-io.version>2.18.0</commons-io.version>
4344
<commons-lang3.version>3.17.0</commons-lang3.version>
4445
<freemarker.version>2.3.34</freemarker.version>
4546
<jakarta.inject.version>1.0.5</jakarta.inject.version>
47+
<jspecify.version>1.0.0</jspecify.version>
4648
<junit.version>5.12.0</junit.version>
4749
<modello.version>2.1.2</modello.version>
50+
<osgi.annotation.bundle.version>2.0.0</osgi.annotation.bundle.version>
51+
<osgi.annotation.versioning.version>1.1.2</osgi.annotation.versioning.version>
52+
<spotbugs-annotations.version>4.9.3</spotbugs-annotations.version>
4853
<xmlunit.version>2.10.0</xmlunit.version>
4954

5055
<!-- Maven plugin versions -->
@@ -96,6 +101,12 @@
96101
<version>${assertj.version}</version>
97102
</dependency>
98103

104+
<dependency>
105+
<groupId>biz.aQute.bnd</groupId>
106+
<artifactId>biz.aQute.bnd.annotation</artifactId>
107+
<version>${bnd.annotation.version}</version>
108+
</dependency>
109+
99110
<dependency>
100111
<groupId>commons-io</groupId>
101112
<artifactId>commons-io</artifactId>
@@ -120,6 +131,12 @@
120131
<version>${jakarta.inject.version}</version>
121132
</dependency>
122133

134+
<dependency>
135+
<groupId>org.jspecify</groupId>
136+
<artifactId>jspecify</artifactId>
137+
<version>${jspecify.version}</version>
138+
</dependency>
139+
123140
<dependency>
124141
<groupId>org.apache.maven.plugin-tools</groupId>
125142
<artifactId>maven-plugin-annotations</artifactId>
@@ -140,6 +157,24 @@
140157
<version>${xmlunit.version}</version>
141158
</dependency>
142159

160+
<dependency>
161+
<groupId>org.osgi</groupId>
162+
<artifactId>org.osgi.annotation.bundle</artifactId>
163+
<version>${osgi.annotation.bundle.version}</version>
164+
</dependency>
165+
166+
<dependency>
167+
<groupId>org.osgi</groupId>
168+
<artifactId>org.osgi.annotation.versioning</artifactId>
169+
<version>${osgi.annotation.versioning.version}</version>
170+
</dependency>
171+
172+
<dependency>
173+
<groupId>com.github.spotbugs</groupId>
174+
<artifactId>spotbugs-annotations</artifactId>
175+
<version>${spotbugs-annotations.version}</version>
176+
</dependency>
177+
143178
</dependencies>
144179
</dependencyManagement>
145180

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<parent>
3232
<groupId>org.apache.logging</groupId>
3333
<artifactId>logging-parent</artifactId>
34-
<version>11.0.0</version>
34+
<version>12.1.0</version>
3535
</parent>
3636

3737
<groupId>org.apache.logging.log4j</groupId>

0 commit comments

Comments
 (0)