Skip to content

Commit d4d2aa8

Browse files
authored
Add parameter to generate jar with or without dependencies
We generate 2 jars, one with dependencies to deploy it on Github and without dependency to deploy on maven central.
1 parent addce75 commit d4d2aa8

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The search is done only in the document and chapter. The bricks are ignored.
1111

1212
## edc Version
1313

14-
Current release is compatible with edc v3.2+
14+
Current release is compatible with edc v3.2+ and it's built with Java 11
1515

1616
## How can I get the latest release?
1717

@@ -22,13 +22,13 @@ You can pull it from the central Maven repositories:
2222
<dependency>
2323
<groupId>fr.techad</groupId>
2424
<artifactId>edc-httpd</artifactId>
25-
<version>2.0.0</version>
25+
<version>2.0.1</version>
2626
</dependency>
2727
```
2828

2929
### Gradle
3030
```groovy
31-
implementation 'fr.techad:edc-httpd:2.0.0'
31+
implementation 'fr.techad:edc-httpd:2.0.1'
3232
```
3333
## How can I create and run a docker image?
3434
You have just to use this two commands in the repository, -v parameter is optional for the second command

build.gradle

+15-7
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@ plugins {
44
id 'signing'
55
}
66
group 'fr.techad'
7-
version '2.0.0'
7+
version '2.0.1'
88
sourceCompatibility = 1.8
9+
ext.withDependencies=project.hasProperty('withDependencies')
910
//Used to be able to add dependencies to jar
11+
if(withDependencies){
1012
configurations.implementation.setCanBeResolved(true)
1113
configurations.api.setCanBeResolved(true)
14+
}
15+
1216

1317

1418
java {
@@ -40,12 +44,16 @@ dependencies {
4044
jar {
4145
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
4246
manifest {
43-
attributes(
47+
if(withDependencies){
48+
attributes(
4449
'Main-Class': 'fr.techad.edc.httpd.EdcWebServer'
45-
)
50+
)
51+
}
4652
}
4753
from {
48-
configurations.implementation.collect { it.isDirectory() ? it : zipTree(it) }
54+
if(withDependencies){
55+
configurations.implementation.collect { it.isDirectory() ? it : zipTree(it) }
56+
}
4957
}
5058
}
5159
//Execute Junit tests
@@ -89,9 +97,9 @@ publishing {
8997
}
9098
}
9199
scm {
92-
connection = 'scm:git:git://github.com/tech-advantage/edc-httpd-java.git'
93-
developerConnection = 'scm:git:ssh://github.com/tech-advantage/edc-httpd-java.git'
94-
url = 'https://github.com/tech-advantage/edc-httpd-java'
100+
connection = 'scm:git:git://github.com/tech-advantage/edc-httpd.git'
101+
developerConnection = 'scm:git:ssh://github.com/tech-advantage/edc-httpd.git'
102+
url = 'https://github.com/tech-advantage/edc-httpd'
95103
}
96104
}
97105
}

0 commit comments

Comments
 (0)