Skip to content

Commit caa2451

Browse files
committed
Initial simple sync implementation
1 parent ad61cec commit caa2451

Some content is hidden

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

57 files changed

+2894
-1
lines changed

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*
2+
!target/*-runner
3+
!target/*-runner.jar
4+
!target/lib/*
5+
!target/quarkus-app/*

.gitignore

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#Maven
2+
target/
3+
pom.xml.tag
4+
pom.xml.releaseBackup
5+
pom.xml.versionsBackup
6+
release.properties
7+
.flattened-pom.xml
8+
9+
# Eclipse
10+
.project
11+
.classpath
12+
.settings/
13+
bin/
14+
15+
# IntelliJ
16+
.idea
17+
*.ipr
18+
*.iml
19+
*.iws
20+
21+
# NetBeans
22+
nb-configuration.xml
23+
24+
# Visual Studio Code
25+
.vscode
26+
.factorypath
27+
28+
# OSX
29+
.DS_Store
30+
31+
# Vim
32+
*.swp
33+
*.swo
34+
35+
# patch
36+
*.orig
37+
*.rej
38+
39+
# Local environment
40+
.env
41+
42+
# Plugin directory
43+
/.quarkus/cli/plugins/
44+
# TLS Certificates
45+
.certs/

.mvn/wrapper/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
maven-wrapper.jar
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import java.io.IOException;
21+
import java.io.InputStream;
22+
import java.net.Authenticator;
23+
import java.net.PasswordAuthentication;
24+
import java.net.URL;
25+
import java.nio.file.Files;
26+
import java.nio.file.Path;
27+
import java.nio.file.Paths;
28+
import java.nio.file.StandardCopyOption;
29+
30+
public final class MavenWrapperDownloader {
31+
private static final String WRAPPER_VERSION = "3.2.0";
32+
33+
private static final boolean VERBOSE = Boolean.parseBoolean( System.getenv( "MVNW_VERBOSE" ) );
34+
35+
public static void main(String[] args) {
36+
log( "Apache Maven Wrapper Downloader " + WRAPPER_VERSION );
37+
38+
if ( args.length != 2 ) {
39+
System.err.println( " - ERROR wrapperUrl or wrapperJarPath parameter missing" );
40+
System.exit( 1 );
41+
}
42+
43+
try {
44+
log( " - Downloader started" );
45+
final URL wrapperUrl = new URL( args[0] );
46+
final String jarPath = args[1].replace( "..", "" ); // Sanitize path
47+
final Path wrapperJarPath = Paths.get( jarPath ).toAbsolutePath().normalize();
48+
downloadFileFromURL( wrapperUrl, wrapperJarPath );
49+
log( "Done" );
50+
}
51+
catch (IOException e) {
52+
System.err.println( "- Error downloading: " + e.getMessage() );
53+
if ( VERBOSE ) {
54+
e.printStackTrace();
55+
}
56+
System.exit( 1 );
57+
}
58+
}
59+
60+
private static void downloadFileFromURL(URL wrapperUrl, Path wrapperJarPath)
61+
throws IOException {
62+
log( " - Downloading to: " + wrapperJarPath );
63+
if ( System.getenv( "MVNW_USERNAME" ) != null && System.getenv( "MVNW_PASSWORD" ) != null ) {
64+
final String username = System.getenv( "MVNW_USERNAME" );
65+
final char[] password = System.getenv( "MVNW_PASSWORD" ).toCharArray();
66+
Authenticator.setDefault( new Authenticator() {
67+
@Override
68+
protected PasswordAuthentication getPasswordAuthentication() {
69+
return new PasswordAuthentication( username, password );
70+
}
71+
} );
72+
}
73+
try ( InputStream inStream = wrapperUrl.openStream() ) {
74+
Files.copy( inStream, wrapperJarPath, StandardCopyOption.REPLACE_EXISTING );
75+
}
76+
log( " - Downloader complete" );
77+
}
78+
79+
private static void log(String msg) {
80+
if ( VERBOSE ) {
81+
System.out.println( msg );
82+
}
83+
}
84+
85+
}

.mvn/wrapper/maven-wrapper.properties

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.8/apache-maven-3.9.8-bin.zip
18+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar

README.md

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,68 @@
1-
# hibernate-jira-sync
1+
# hibernate-jira-sync
2+
3+
This project uses Quarkus, the Supersonic Subatomic Java Framework.
4+
5+
If you want to learn more about Quarkus, please visit its website: <https://quarkus.io/>.
6+
7+
## Running the application in dev mode
8+
9+
You can run your application in dev mode that enables live coding using:
10+
11+
```shell script
12+
./mvnw compile quarkus:dev
13+
```
14+
15+
> **_NOTE:_** Quarkus now ships with a Dev UI, which is available in dev mode only at <http://localhost:8080/q/dev/>.
16+
17+
## Packaging and running the application
18+
19+
The application can be packaged using:
20+
21+
```shell script
22+
./mvnw package
23+
```
24+
25+
It produces the `quarkus-run.jar` file in the `target/quarkus-app/` directory.
26+
Be aware that it’s not an _über-jar_ as the dependencies are copied into the `target/quarkus-app/lib/` directory.
27+
28+
The application is now runnable using `java -jar target/quarkus-app/quarkus-run.jar`.
29+
30+
If you want to build an _über-jar_, execute the following command:
31+
32+
```shell script
33+
./mvnw package -Dquarkus.package.jar.type=uber-jar
34+
```
35+
36+
The application, packaged as an _über-jar_, is now runnable using `java -jar target/*-runner.jar`.
37+
38+
## Creating a native executable
39+
40+
You can create a native executable using:
41+
42+
```shell script
43+
./mvnw package -Dnative
44+
```
45+
46+
Or, if you don't have GraalVM installed, you can run the native executable build in a container using:
47+
48+
```shell script
49+
./mvnw package -Dnative -Dquarkus.native.container-build=true
50+
```
51+
52+
You can then execute your native executable with: `./target/hibernate-jira-sync-1.0-SNAPSHOT-runner`
53+
54+
If you want to learn more about building native executables, please consult <https://quarkus.io/guides/maven-tooling>.
55+
56+
## Related Guides
57+
58+
- REST ([guide](https://quarkus.io/guides/rest)): A Jakarta REST implementation utilizing build time processing and
59+
Vert.x. This extension is not compatible with the quarkus-resteasy extension, or any of the extensions that depend on
60+
it.
61+
62+
## Provided Code
63+
64+
### REST
65+
66+
Easily start your REST Web Services
67+
68+
[Related guide section...](https://quarkus.io/guides/getting-started-reactive#reactive-jax-rs-resources)

0 commit comments

Comments
 (0)