File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
jruby-gradle-jar-plugin/src
main/groovy/com/github/jrubygradle/jar
test/groovy/com/github/jrubygradle/jar Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -213,9 +213,7 @@ class JRubyJar extends Jar {
213
213
exclude ' META-INF/maven/**/pom.xml'
214
214
}
215
215
216
- manifest = project. manifest {
217
- attributes ' Main-Class' : mainClass
218
- }
216
+ manifest. attributes ' Main-Class' : mainClass
219
217
}
220
218
221
219
if (scriptName != Type . RUNNABLE && scriptName != Type . LIBRARY ) {
Original file line number Diff line number Diff line change @@ -126,6 +126,18 @@ class JRubyJarPluginSpec extends Specification {
126
126
jarTask. manifest. attributes. ' Main-Class' == ' org.scooby.doo.snackMain'
127
127
}
128
128
129
+ def " Adding a main class and additional manifest attributes" () {
130
+ when : " Setting a main class"
131
+ project. configure(jarTask) {
132
+ mainClass ' org.scooby.doo.snackMain'
133
+ manifest. attributes(' Class-Path' : ' gangway.jar zoinks.jar' )
134
+ }
135
+ jarTask. applyConfig()
136
+
137
+ then : " Then the Main-Class attribute does not erase other attributes"
138
+ jarTask. manifest. attributes. ' Class-Path' == ' gangway.jar zoinks.jar'
139
+ }
140
+
129
141
def " Setting up a java project" () {
130
142
given : " All jar, java plugins have been applied"
131
143
project = setupProject()
You can’t perform that action at this time.
0 commit comments