@@ -52,12 +52,6 @@ In Maven, you can use the [os-maven-plugin](https://github.com/trustin/os-maven-
52
52
53
53
``` xml
54
54
<project >
55
- <properties >
56
- <!-- Configure the os-maven-plugin extension to expand the classifier on -->
57
- <!-- Fedora-"like" systems. -->
58
- <os .detection.classifierWithLikes>fedora</os .detection.classifierWithLikes>
59
- </properties >
60
-
61
55
<dependencies >
62
56
<dependency >
63
57
<groupId >io.netty</groupId >
@@ -76,6 +70,31 @@ In Maven, you can use the [os-maven-plugin](https://github.com/trustin/os-maven-
76
70
<version >1.4.0.Final</version >
77
71
</extension >
78
72
</extensions >
73
+ <plugins >
74
+ <!-- Use Ant to configure the appropriate "tcnative.classifier" property -->
75
+ <plugin >
76
+ <groupId >org.apache.maven.plugins</groupId >
77
+ <artifactId >maven-antrun-plugin</artifactId >
78
+ <executions >
79
+ <execution >
80
+ <phase >initialize</phase >
81
+ <configuration >
82
+ <exportAntProperties >true</exportAntProperties >
83
+ <target >
84
+ <condition property =" tcnative.classifier"
85
+ value =" ${os.detected.classifier}-fedora"
86
+ else =" ${os.detected.classifier}" >
87
+ <isset property =" os.detected.release.fedora" />
88
+ </condition >
89
+ </target >
90
+ </configuration >
91
+ <goals >
92
+ <goal >run</goal >
93
+ </goals >
94
+ </execution >
95
+ </executions >
96
+ </plugin >
97
+ </plugins >
79
98
</build >
80
99
</project >
81
100
```
@@ -97,11 +116,15 @@ buildscript {
97
116
// Use the osdetector-gradle-plugin
98
117
apply plugin: "com.google.osdetector"
99
118
100
- // Configure a special classifier on Fedora-"like" systems.
101
- osdetector.classifierWithLikes = ['fedora']
119
+ def tcnative_classifier = osdetector.classifier;
120
+ // Fedora variants use a different soname for OpenSSL than other linux distributions
121
+ // (see http://netty.io/wiki/forked-tomcat-native.html).
122
+ if (osdetector.os == "linux" && osdetector.release.isLike("fedora")) {
123
+ tcnative_classifier += "_fedora";
124
+ }
102
125
103
126
dependencies {
104
- compile 'io.netty:netty-tcnative:1.1.33.Fork7:' + osdetector.classifier
127
+ compile 'io.netty:netty-tcnative:1.1.33.Fork7:' + tcnative_classifier
105
128
}
106
129
```
107
130
0 commit comments