Skip to content

Commit

Permalink
Add missing Javascript to Karaf bundle
Browse files Browse the repository at this point in the history
- adjust output folder in webpack config
- add Maven wrapper to encapsulate version from Github worflow and devcontainer
- update Node package versions to match nexus-coreui-plugin
- set Maven parent to latest Nexus release
- add extra Maven repository for missing plugin dependencies
- adjust linting in file .classpath
- use Java 17 in devcontainer as well
- update plugin version in Github workflows
  • Loading branch information
ChriFo committed Dec 12, 2024
1 parent 863572d commit 33de304
Show file tree
Hide file tree
Showing 12 changed files with 1,047 additions and 90 deletions.
44 changes: 21 additions & 23 deletions .classpath
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" />
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER" />
<classpathentry including="**/*.java" kind="src" path="src/main/java" />
<classpathentry including="**/*Test.java" kind="src" output="target/test-classes/"
path="src/test/java">
<attributes>
<attribute name="test" value="true" />
</attributes>
</classpathentry>
<classpathentry kind="src" path="target/generated-sources/annotations">
<attributes>
<attribute name="optional" value="true" />
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes/"
path="target/generated-test-sources/test-annotations">
<attributes>
<attribute name="optional" value="true" />
<attribute name="test" value="true" />
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes" />
</classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry including="**/*.java" kind="src" path="src/main/java"/>
<classpathentry including="**/*Test.java" kind="src" output="target/test-classes/" path="src/test/java">
<attributes>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="target/generated-sources/annotations">
<attributes>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes/" path="target/generated-test-sources/test-annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
9 changes: 2 additions & 7 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
{
"name": "Java",
"image": "mcr.microsoft.com/devcontainers/java",
"initializeCommand": "docker pull mcr.microsoft.com/devcontainers/java",
"image": "mcr.microsoft.com/devcontainers/java:17",
"initializeCommand": "docker pull mcr.microsoft.com/devcontainers/java:17",
"features": {
"ghcr.io/devcontainers/features/git-lfs:1": {},
"ghcr.io/devcontainers/features/java:1": {
"version": "none",
"installMaven": "true",
"installGradle": "false"
},
"ghcr.io/devcontainers/features/node:1": {}
},
"customizations": {
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: ${{ env.JDK_VERSION }}
distribution: "temurin"
cache: maven

- name: Build with Maven
run: |
mvn --batch-mode clean package -DskipTests -PbuildKar
./mvnw --batch-mode clean package -DskipTests -PbuildKar
mv $(ls target/nexus-oauth2-proxy-plugin-*-bundle.kar) target/nexus-oauth2-proxy-plugin.kar
- name: Release
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
name: Run Javascript tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODEJS_VERSION }}

Expand All @@ -34,14 +34,14 @@ jobs:
name: Run Java tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: ${{ env.JDK_VERSION }}
distribution: "temurin"
cache: maven

- name: Run Maven tests
run: mvn clean test
run: ./mvnw clean test
19 changes: 19 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
wrapperVersion=3.3.2
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

mvn -PbuildKar clean package
./mvnw -PbuildKar clean package
Loading

0 comments on commit 33de304

Please sign in to comment.