Skip to content

Commit 03b856a

Browse files
committed
Added deployment
1 parent bb8d8b1 commit 03b856a

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

.github/workflows/maven-deploy.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Maven Deploy
2+
on: [push]
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v2
8+
- name: Set up JDK 1.8
9+
uses: actions/setup-java@v1
10+
with:
11+
java-version: 1.8
12+
- name: Build
13+
run: mvn -B package --file pom.xml
14+
- name: Deploy to JavaWebStack Repository
15+
run: mvn deploy -s build/settings.xml
16+
env:
17+
DEPLOYMENT_USERNAME: ${{ secrets.DEPLOYMENT_USERNAME }}
18+
DEPLOYMENT_PASSWORD: ${{ secrets.DEPLOYMENT_PASSWORD }}

build/settings.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
4+
https://maven.apache.org/xsd/settings-1.0.0.xsd"
5+
>
6+
<servers>
7+
<server>
8+
<id>javawebstack-snapshots</id>
9+
<username>${env.DEPLOYMENT_USERNAME}</username>
10+
<password>${env.DEPLOYMENT_PASSWORD}</password>
11+
</server>
12+
<server>
13+
<id>javawebstack-releases</id>
14+
<username>${env.DEPLOYMENT_USERNAME}</username>
15+
<password>${env.DEPLOYMENT_PASSWORD}</password>
16+
</server>
17+
</servers>
18+
</settings>

src/main/java/org/javawebstack/framework/bind/ModelBindParamTransformer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class ModelBindParamTransformer extends DefaultRouteParamTransformer {
1414

1515
public ModelBindParamTransformer(){
1616
super();
17-
this.transformer = (exchange, repo, fieldName, source) -> repo.accessible(accessorAttribName == null ? null : exchange.attrib(accessorAttribName)).where(fieldName, source).get();
17+
this.transformer = (exchange, repo, fieldName, source) -> repo.accessible(accessorAttribName == null ? null : exchange.attrib(accessorAttribName)).where(fieldName, source).first();
1818
for(Class<? extends Model> model : ORM.getModels()){
1919
ModelBind[] binds = model.getDeclaredAnnotationsByType(ModelBind.class);
2020
if(binds.length == 0)

0 commit comments

Comments
 (0)