Skip to content

Commit a4063bb

Browse files
authored
Merge pull request #21 from microsphere-projects/main
Release 0.0.6
2 parents eb7f4b1 + 9377241 commit a4063bb

File tree

175 files changed

+7303
-3416
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

175 files changed

+7303
-3416
lines changed

.github/workflows/maven.yml renamed to .github/workflows/maven-build.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# separate terms of service, privacy policy, and support
77
# documentation.
88

9-
name: Java CI with Maven
9+
name: Maven Build
1010

1111
on:
1212
push:
@@ -19,10 +19,11 @@ jobs:
1919
runs-on: ubuntu-latest
2020
strategy:
2121
matrix:
22-
java: [ '8' ]
22+
java: [ '8', '11' , '17' , '21' ]
2323
steps:
24-
- uses: actions/checkout@v4
25-
- name: Java ${{ matrix.Java }}
24+
- name: Checkout Source
25+
uses: actions/checkout@v4
26+
- name: Setup JDK ${{ matrix.Java }}
2627
uses: actions/setup-java@v4
2728
with:
2829
distribution: 'temurin'
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Maven Publish
10+
11+
on:
12+
push:
13+
branches: [ 'release' ]
14+
workflow_dispatch:
15+
inputs:
16+
revision:
17+
description: 'The version to release'
18+
required: true
19+
default: '0.0.1-SNAPSHOT'
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
if: ${{ inputs.revision }}
25+
steps:
26+
- name: Checkout Source
27+
uses: actions/checkout@v4
28+
29+
- name: Setup Maven Central Repository
30+
uses: actions/setup-java@v4
31+
with:
32+
java-version: '11'
33+
distribution: 'temurin'
34+
server-id: ossrh
35+
server-username: MAVEN_USERNAME
36+
server-password: MAVEN_PASSWORD
37+
cache: maven
38+
39+
- name: Publish package
40+
run: mvn --batch-mode --update-snapshots -Drevision=${{ inputs.revision }} -Prelease clean deploy
41+
env:
42+
MAVEN_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }}
43+
MAVEN_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }}
44+
MAVEN_GPG_KEY: ${{ secrets.OSS_SIGNING_KEY }}
45+
MAVEN_GPG_PASSPHRASE : ${{ secrets.OSS_SIGNING_PASSWORD }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# microsphere-framework
2-
The common feautres used in the other microsphere sub-projects
2+
The common features used in the other microsphere sub-projects

microsphere-annotation-processor/pom.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@
2727
<version>${revision}</version>
2828
</dependency>
2929

30-
<!-- Third-Party Dependencies -->
31-
<dependency>
32-
<groupId>org.slf4j</groupId>
33-
<artifactId>slf4j-api</artifactId>
34-
<optional>true</optional>
35-
</dependency>
36-
3730
<!-- Testing -->
3831
<dependency>
3932
<groupId>org.junit.jupiter</groupId>

microsphere-annotation-processor/src/main/java/io/microsphere/annotation/processor/util/LoggerUtils.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818

1919

2020

21-
import org.slf4j.Logger;
22-
import org.slf4j.LoggerFactory;
21+
22+
import io.microsphere.logging.Logger;
23+
import io.microsphere.logging.LoggerFactory;
2324

2425
import static java.lang.String.format;
2526

microsphere-annotation-processor/src/test/java/io/microsphere/annotation/processor/util/FieldUtilsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public void testGetDeclaredFields() {
8787
}
8888

8989
@Test
90-
public void testGetAllDeclaredFields() {
90+
public void testFindAllDeclaredFields() {
9191
TypeElement type = getType(Model.class);
9292

9393
List<VariableElement> fields = getAllDeclaredFields(type);

microsphere-annotation-processor/src/test/java/io/microsphere/annotation/processor/util/MethodUtilsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public void testDeclaredMethods() {
6666
assertEquals(12, methods.size());
6767

6868
methods = getAllDeclaredMethods(type);
69-
assertEquals(34, methods.size());
69+
assertTrue(methods.size() >= 33);
7070

7171
assertTrue(getAllDeclaredMethods((TypeElement) null).isEmpty());
7272
assertTrue(getAllDeclaredMethods((TypeMirror) null).isEmpty());

microsphere-java-core/pom.xml

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,38 +20,28 @@
2020

2121
<dependencies>
2222

23-
<!-- Java Common Annotations -->
24-
<dependency>
25-
<groupId>javax.annotation</groupId>
26-
<artifactId>javax.annotation-api</artifactId>
27-
<optional>true</optional>
28-
</dependency>
29-
3023
<!-- Java API Dependencies -->
3124
<dependency>
3225
<groupId>com.google.code.findbugs</groupId>
3326
<artifactId>jsr305</artifactId>
3427
<optional>true</optional>
3528
</dependency>
3629

37-
<!-- Apache Commons Dependencies -->
38-
<dependency>
39-
<groupId>org.apache.commons</groupId>
40-
<artifactId>commons-lang3</artifactId>
41-
</dependency>
42-
43-
<dependency>
44-
<groupId>commons-io</groupId>
45-
<artifactId>commons-io</artifactId>
46-
</dependency>
47-
4830
<!-- Third-Party Dependencies -->
31+
<!-- SLF4j -->
4932
<dependency>
5033
<groupId>org.slf4j</groupId>
5134
<artifactId>slf4j-api</artifactId>
5235
<optional>true</optional>
5336
</dependency>
5437

38+
<!-- Apache Commons Logging -->
39+
<dependency>
40+
<groupId>commons-logging</groupId>
41+
<artifactId>commons-logging</artifactId>
42+
<optional>true</optional>
43+
</dependency>
44+
5545
<!-- Testing -->
5646
<dependency>
5747
<groupId>org.junit.jupiter</groupId>
@@ -78,6 +68,14 @@
7868
<scope>test</scope>
7969
</dependency>
8070

71+
<!-- Java Common Annotations -->
72+
<dependency>
73+
<groupId>javax.annotation</groupId>
74+
<artifactId>javax.annotation-api</artifactId>
75+
<scope>test</scope>
76+
</dependency>
77+
78+
<!-- Spring -->
8179
<dependency>
8280
<groupId>org.springframework</groupId>
8381
<artifactId>spring-core</artifactId>
@@ -112,6 +110,20 @@
112110
<artifactId>javax.annotation-api</artifactId>
113111
</dependency>
114112
</dependencies>
113+
<build>
114+
<plugins>
115+
<plugin>
116+
<groupId>org.apache.maven.plugins</groupId>
117+
<artifactId>maven-surefire-plugin</artifactId>
118+
<configuration>
119+
<argLine>
120+
--illegal-access=permit
121+
--add-opens java.base/java.lang.invoke=ALL-UNNAMED
122+
</argLine>
123+
</configuration>
124+
</plugin>
125+
</plugins>
126+
</build>
115127
</profile>
116128
</profiles>
117129

microsphere-java-core/src/main/java/io/microsphere/beans/BeanProperty.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,11 @@ public int hashCode() {
9292

9393
@Override
9494
public String toString() {
95-
final StringBuilder sb = new StringBuilder("BeanProperty{");
96-
sb.append("name='").append(name).append('\'');
97-
sb.append(", value=").append(value);
98-
sb.append(", declaringClass=").append(declaringClass);
99-
sb.append(", descriptor=").append(descriptor);
100-
sb.append('}');
101-
return sb.toString();
95+
String sb = "BeanProperty{" + "name='" + name + '\'' +
96+
", value=" + value +
97+
", declaringClass=" + declaringClass +
98+
", descriptor=" + descriptor +
99+
'}';
100+
return sb;
102101
}
103102
}

microsphere-java-core/src/main/java/io/microsphere/classloading/AbstractArtifactResolver.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package io.microsphere.classloading;
22

3-
import org.slf4j.Logger;
4-
import org.slf4j.LoggerFactory;
3+
import io.microsphere.logging.Logger;
54

65
import java.io.File;
76
import java.io.IOException;
@@ -11,6 +10,7 @@
1110
import java.util.LinkedHashSet;
1211
import java.util.Set;
1312

13+
import static io.microsphere.logging.LoggerFactory.getLogger;
1414
import static io.microsphere.net.URLUtils.resolveArchiveFile;
1515

1616
/**
@@ -21,7 +21,7 @@
2121
*/
2222
public abstract class AbstractArtifactResolver implements ArtifactResolver {
2323

24-
protected final Logger logger = LoggerFactory.getLogger(getClass());
24+
protected final Logger logger = getLogger(getClass());
2525

2626
private int priority;
2727

0 commit comments

Comments
 (0)