warbler 2.1.1 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/Gemfile +6 -1
- data/README.rdoc +37 -38
- data/Rakefile +16 -20
- data/ext/pom.xml +59 -0
- data/ext/{JarMain.java → src/main/java/warbler/JarMain.java} +15 -42
- data/ext/{WarMain.java → src/main/java/warbler/WarMain.java} +23 -20
- data/ext/{WarblerJar.java → src/main/java/warbler/WarblerJar.java} +23 -45
- data/lib/warbler/config.rb +4 -2
- data/lib/warbler/jar.rb +11 -2
- data/lib/warbler/templates/bundler.erb +0 -3
- data/lib/warbler/templates/jar.erb +4 -2
- data/lib/warbler/templates/war.erb +3 -1
- data/lib/warbler/traits/bundler.rb +75 -42
- data/lib/warbler/traits/jar.rb +4 -7
- data/lib/warbler/traits/war.rb +5 -7
- data/lib/warbler/version.rb +1 -1
- data/lib/warbler/web_server.rb +3 -1
- data/lib/warbler/zip_support.rb +3 -0
- data/lib/warbler_jar.jar +0 -0
- data/mvnw +295 -0
- data/mvnw.cmd +189 -0
- data/pom.xml +139 -0
- data/warble.rb +5 -5
- data/warbler.gemspec +1 -9
- metadata +12 -86
- data/Mavenfile +0 -49
- data/ext/WarblerJarService.java +0 -18
data/mvnw.cmd
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
<# : batch portion
|
|
2
|
+
@REM ----------------------------------------------------------------------------
|
|
3
|
+
@REM Licensed to the Apache Software Foundation (ASF) under one
|
|
4
|
+
@REM or more contributor license agreements. See the NOTICE file
|
|
5
|
+
@REM distributed with this work for additional information
|
|
6
|
+
@REM regarding copyright ownership. The ASF licenses this file
|
|
7
|
+
@REM to you under the Apache License, Version 2.0 (the
|
|
8
|
+
@REM "License"); you may not use this file except in compliance
|
|
9
|
+
@REM with the License. You may obtain a copy of the License at
|
|
10
|
+
@REM
|
|
11
|
+
@REM http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
@REM
|
|
13
|
+
@REM Unless required by applicable law or agreed to in writing,
|
|
14
|
+
@REM software distributed under the License is distributed on an
|
|
15
|
+
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
16
|
+
@REM KIND, either express or implied. See the License for the
|
|
17
|
+
@REM specific language governing permissions and limitations
|
|
18
|
+
@REM under the License.
|
|
19
|
+
@REM ----------------------------------------------------------------------------
|
|
20
|
+
|
|
21
|
+
@REM ----------------------------------------------------------------------------
|
|
22
|
+
@REM Apache Maven Wrapper startup batch script, version 3.3.4
|
|
23
|
+
@REM
|
|
24
|
+
@REM Optional ENV vars
|
|
25
|
+
@REM MVNW_REPOURL - repo url base for downloading maven distribution
|
|
26
|
+
@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven
|
|
27
|
+
@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output
|
|
28
|
+
@REM ----------------------------------------------------------------------------
|
|
29
|
+
|
|
30
|
+
@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0)
|
|
31
|
+
@SET __MVNW_CMD__=
|
|
32
|
+
@SET __MVNW_ERROR__=
|
|
33
|
+
@SET __MVNW_PSMODULEP_SAVE=%PSModulePath%
|
|
34
|
+
@SET PSModulePath=
|
|
35
|
+
@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @(
|
|
36
|
+
IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B)
|
|
37
|
+
)
|
|
38
|
+
@SET PSModulePath=%__MVNW_PSMODULEP_SAVE%
|
|
39
|
+
@SET __MVNW_PSMODULEP_SAVE=
|
|
40
|
+
@SET __MVNW_ARG0_NAME__=
|
|
41
|
+
@SET MVNW_USERNAME=
|
|
42
|
+
@SET MVNW_PASSWORD=
|
|
43
|
+
@IF NOT "%__MVNW_CMD__%"=="" ("%__MVNW_CMD__%" %*)
|
|
44
|
+
@echo Cannot start maven from wrapper >&2 && exit /b 1
|
|
45
|
+
@GOTO :EOF
|
|
46
|
+
: end batch / begin powershell #>
|
|
47
|
+
|
|
48
|
+
$ErrorActionPreference = "Stop"
|
|
49
|
+
if ($env:MVNW_VERBOSE -eq "true") {
|
|
50
|
+
$VerbosePreference = "Continue"
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties
|
|
54
|
+
$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl
|
|
55
|
+
if (!$distributionUrl) {
|
|
56
|
+
Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties"
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) {
|
|
60
|
+
"maven-mvnd-*" {
|
|
61
|
+
$USE_MVND = $true
|
|
62
|
+
$distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip"
|
|
63
|
+
$MVN_CMD = "mvnd.cmd"
|
|
64
|
+
break
|
|
65
|
+
}
|
|
66
|
+
default {
|
|
67
|
+
$USE_MVND = $false
|
|
68
|
+
$MVN_CMD = $script -replace '^mvnw','mvn'
|
|
69
|
+
break
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
# apply MVNW_REPOURL and calculate MAVEN_HOME
|
|
74
|
+
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash>
|
|
75
|
+
if ($env:MVNW_REPOURL) {
|
|
76
|
+
$MVNW_REPO_PATTERN = if ($USE_MVND -eq $False) { "/org/apache/maven/" } else { "/maven/mvnd/" }
|
|
77
|
+
$distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace "^.*$MVNW_REPO_PATTERN",'')"
|
|
78
|
+
}
|
|
79
|
+
$distributionUrlName = $distributionUrl -replace '^.*/',''
|
|
80
|
+
$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$',''
|
|
81
|
+
|
|
82
|
+
$MAVEN_M2_PATH = "$HOME/.m2"
|
|
83
|
+
if ($env:MAVEN_USER_HOME) {
|
|
84
|
+
$MAVEN_M2_PATH = "$env:MAVEN_USER_HOME"
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (-not (Test-Path -Path $MAVEN_M2_PATH)) {
|
|
88
|
+
New-Item -Path $MAVEN_M2_PATH -ItemType Directory | Out-Null
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
$MAVEN_WRAPPER_DISTS = $null
|
|
92
|
+
if ((Get-Item $MAVEN_M2_PATH).Target[0] -eq $null) {
|
|
93
|
+
$MAVEN_WRAPPER_DISTS = "$MAVEN_M2_PATH/wrapper/dists"
|
|
94
|
+
} else {
|
|
95
|
+
$MAVEN_WRAPPER_DISTS = (Get-Item $MAVEN_M2_PATH).Target[0] + "/wrapper/dists"
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
$MAVEN_HOME_PARENT = "$MAVEN_WRAPPER_DISTS/$distributionUrlNameMain"
|
|
99
|
+
$MAVEN_HOME_NAME = ([System.Security.Cryptography.SHA256]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join ''
|
|
100
|
+
$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME"
|
|
101
|
+
|
|
102
|
+
if (Test-Path -Path "$MAVEN_HOME" -PathType Container) {
|
|
103
|
+
Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME"
|
|
104
|
+
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"
|
|
105
|
+
exit $?
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) {
|
|
109
|
+
Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl"
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
# prepare tmp dir
|
|
113
|
+
$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile
|
|
114
|
+
$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir"
|
|
115
|
+
$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null
|
|
116
|
+
trap {
|
|
117
|
+
if ($TMP_DOWNLOAD_DIR.Exists) {
|
|
118
|
+
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }
|
|
119
|
+
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" }
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null
|
|
124
|
+
|
|
125
|
+
# Download and Install Apache Maven
|
|
126
|
+
Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..."
|
|
127
|
+
Write-Verbose "Downloading from: $distributionUrl"
|
|
128
|
+
Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName"
|
|
129
|
+
|
|
130
|
+
$webclient = New-Object System.Net.WebClient
|
|
131
|
+
if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) {
|
|
132
|
+
$webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD)
|
|
133
|
+
}
|
|
134
|
+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
|
135
|
+
$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null
|
|
136
|
+
|
|
137
|
+
# If specified, validate the SHA-256 sum of the Maven distribution zip file
|
|
138
|
+
$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum
|
|
139
|
+
if ($distributionSha256Sum) {
|
|
140
|
+
if ($USE_MVND) {
|
|
141
|
+
Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties."
|
|
142
|
+
}
|
|
143
|
+
Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash
|
|
144
|
+
if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) {
|
|
145
|
+
Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property."
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
# unzip and move
|
|
150
|
+
Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null
|
|
151
|
+
|
|
152
|
+
# Find the actual extracted directory name (handles snapshots where filename != directory name)
|
|
153
|
+
$actualDistributionDir = ""
|
|
154
|
+
|
|
155
|
+
# First try the expected directory name (for regular distributions)
|
|
156
|
+
$expectedPath = Join-Path "$TMP_DOWNLOAD_DIR" "$distributionUrlNameMain"
|
|
157
|
+
$expectedMvnPath = Join-Path "$expectedPath" "bin/$MVN_CMD"
|
|
158
|
+
if ((Test-Path -Path $expectedPath -PathType Container) -and (Test-Path -Path $expectedMvnPath -PathType Leaf)) {
|
|
159
|
+
$actualDistributionDir = $distributionUrlNameMain
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
# If not found, search for any directory with the Maven executable (for snapshots)
|
|
163
|
+
if (!$actualDistributionDir) {
|
|
164
|
+
Get-ChildItem -Path "$TMP_DOWNLOAD_DIR" -Directory | ForEach-Object {
|
|
165
|
+
$testPath = Join-Path $_.FullName "bin/$MVN_CMD"
|
|
166
|
+
if (Test-Path -Path $testPath -PathType Leaf) {
|
|
167
|
+
$actualDistributionDir = $_.Name
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
if (!$actualDistributionDir) {
|
|
173
|
+
Write-Error "Could not find Maven distribution directory in extracted archive"
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
Write-Verbose "Found extracted Maven distribution directory: $actualDistributionDir"
|
|
177
|
+
Rename-Item -Path "$TMP_DOWNLOAD_DIR/$actualDistributionDir" -NewName $MAVEN_HOME_NAME | Out-Null
|
|
178
|
+
try {
|
|
179
|
+
Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null
|
|
180
|
+
} catch {
|
|
181
|
+
if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) {
|
|
182
|
+
Write-Error "fail to move MAVEN_HOME"
|
|
183
|
+
}
|
|
184
|
+
} finally {
|
|
185
|
+
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }
|
|
186
|
+
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" }
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"
|
data/pom.xml
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
2
|
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
3
|
+
<modelVersion>4.0.0</modelVersion>
|
|
4
|
+
|
|
5
|
+
<groupId>org.jruby.warbler</groupId>
|
|
6
|
+
<artifactId>warbler</artifactId>
|
|
7
|
+
<version>${revision}</version>
|
|
8
|
+
<packaging>pom</packaging>
|
|
9
|
+
|
|
10
|
+
<modules>
|
|
11
|
+
<module>ext</module>
|
|
12
|
+
</modules>
|
|
13
|
+
|
|
14
|
+
<properties>
|
|
15
|
+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
16
|
+
<maven.compiler.release>8</maven.compiler.release>
|
|
17
|
+
|
|
18
|
+
<!-- Defaults, overridden by the Rakefile to match the running JRuby and Warbler::VERSION -->
|
|
19
|
+
<revision>2.1.3</revision>
|
|
20
|
+
<jruby.version>9.4.16.1</jruby.version>
|
|
21
|
+
<!-- jruby-rack series to test against: 1.2, 1.3 or 2.0 (expanded to a `~> x.y.0` gem requirement) -->
|
|
22
|
+
<jruby-rack.version>2.0</jruby-rack.version>
|
|
23
|
+
</properties>
|
|
24
|
+
|
|
25
|
+
<build>
|
|
26
|
+
<pluginManagement>
|
|
27
|
+
<plugins>
|
|
28
|
+
<plugin>
|
|
29
|
+
<groupId>org.apache.maven.plugins</groupId>
|
|
30
|
+
<artifactId>maven-enforcer-plugin</artifactId>
|
|
31
|
+
<version>3.7.0</version>
|
|
32
|
+
</plugin>
|
|
33
|
+
<plugin>
|
|
34
|
+
<groupId>org.apache.maven.plugins</groupId>
|
|
35
|
+
<artifactId>maven-clean-plugin</artifactId>
|
|
36
|
+
<version>3.5.0</version>
|
|
37
|
+
</plugin>
|
|
38
|
+
<plugin>
|
|
39
|
+
<groupId>org.apache.maven.plugins</groupId>
|
|
40
|
+
<artifactId>maven-resources-plugin</artifactId>
|
|
41
|
+
<version>3.5.0</version>
|
|
42
|
+
</plugin>
|
|
43
|
+
<plugin>
|
|
44
|
+
<groupId>org.apache.maven.plugins</groupId>
|
|
45
|
+
<artifactId>maven-compiler-plugin</artifactId>
|
|
46
|
+
<version>3.16.0</version>
|
|
47
|
+
</plugin>
|
|
48
|
+
<plugin>
|
|
49
|
+
<groupId>org.apache.maven.plugins</groupId>
|
|
50
|
+
<artifactId>maven-surefire-plugin</artifactId>
|
|
51
|
+
<version>3.6.1</version>
|
|
52
|
+
</plugin>
|
|
53
|
+
<plugin>
|
|
54
|
+
<groupId>org.apache.maven.plugins</groupId>
|
|
55
|
+
<artifactId>maven-failsafe-plugin</artifactId>
|
|
56
|
+
<version>3.6.1</version>
|
|
57
|
+
</plugin>
|
|
58
|
+
<plugin>
|
|
59
|
+
<groupId>org.apache.maven.plugins</groupId>
|
|
60
|
+
<artifactId>maven-jar-plugin</artifactId>
|
|
61
|
+
<version>3.5.1</version>
|
|
62
|
+
</plugin>
|
|
63
|
+
<plugin>
|
|
64
|
+
<groupId>org.apache.maven.plugins</groupId>
|
|
65
|
+
<artifactId>maven-install-plugin</artifactId>
|
|
66
|
+
<version>3.2.0</version>
|
|
67
|
+
</plugin>
|
|
68
|
+
<plugin>
|
|
69
|
+
<groupId>org.apache.maven.plugins</groupId>
|
|
70
|
+
<artifactId>maven-invoker-plugin</artifactId>
|
|
71
|
+
<version>3.10.1</version>
|
|
72
|
+
</plugin>
|
|
73
|
+
<plugin>
|
|
74
|
+
<groupId>org.jruby.maven</groupId>
|
|
75
|
+
<artifactId>jruby-maven-plugin</artifactId>
|
|
76
|
+
<version>3.0.6</version>
|
|
77
|
+
</plugin>
|
|
78
|
+
<plugin>
|
|
79
|
+
<groupId>org.codehaus.mojo</groupId>
|
|
80
|
+
<artifactId>exec-maven-plugin</artifactId>
|
|
81
|
+
<version>3.8.0</version>
|
|
82
|
+
</plugin>
|
|
83
|
+
</plugins>
|
|
84
|
+
</pluginManagement>
|
|
85
|
+
<plugins>
|
|
86
|
+
<plugin>
|
|
87
|
+
<groupId>org.apache.maven.plugins</groupId>
|
|
88
|
+
<artifactId>maven-enforcer-plugin</artifactId>
|
|
89
|
+
<executions>
|
|
90
|
+
<execution>
|
|
91
|
+
<id>enforce-maven</id>
|
|
92
|
+
<goals>
|
|
93
|
+
<goal>enforce</goal>
|
|
94
|
+
</goals>
|
|
95
|
+
<configuration>
|
|
96
|
+
<rules>
|
|
97
|
+
<requireMavenVersion>
|
|
98
|
+
<version>3.7.0</version>
|
|
99
|
+
</requireMavenVersion>
|
|
100
|
+
</rules>
|
|
101
|
+
</configuration>
|
|
102
|
+
</execution>
|
|
103
|
+
</executions>
|
|
104
|
+
</plugin>
|
|
105
|
+
<plugin>
|
|
106
|
+
<groupId>org.apache.maven.plugins</groupId>
|
|
107
|
+
<artifactId>maven-invoker-plugin</artifactId>
|
|
108
|
+
<inherited>false</inherited>
|
|
109
|
+
<executions>
|
|
110
|
+
<execution>
|
|
111
|
+
<id>integration-test</id>
|
|
112
|
+
<goals>
|
|
113
|
+
<goal>run</goal>
|
|
114
|
+
</goals>
|
|
115
|
+
<configuration>
|
|
116
|
+
<projectsDirectory>integration</projectsDirectory>
|
|
117
|
+
<pomIncludes>
|
|
118
|
+
<pomInclude>*/pom.xml</pomInclude>
|
|
119
|
+
</pomIncludes>
|
|
120
|
+
<pomExcludes/>
|
|
121
|
+
<streamLogs>true</streamLogs>
|
|
122
|
+
<goals>
|
|
123
|
+
<goal>verify</goal>
|
|
124
|
+
</goals>
|
|
125
|
+
<!-- only runtime axis values need forwarding into the forked builds;
|
|
126
|
+
everything static is inherited via the parent chain -->
|
|
127
|
+
<properties>
|
|
128
|
+
<revision>${revision}</revision>
|
|
129
|
+
<jruby.version>${jruby.version}</jruby.version>
|
|
130
|
+
<jruby-rack.version>${jruby-rack.version}</jruby-rack.version>
|
|
131
|
+
<style.color>always</style.color>
|
|
132
|
+
</properties>
|
|
133
|
+
</configuration>
|
|
134
|
+
</execution>
|
|
135
|
+
</executions>
|
|
136
|
+
</plugin>
|
|
137
|
+
</plugins>
|
|
138
|
+
</build>
|
|
139
|
+
</project>
|
data/warble.rb
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
# Configure a new Warbler application assembly
|
|
22
22
|
Warbler::Config.new(forced_traits: defined?(forced_traits) ? forced_traits : nil) do |config|
|
|
23
23
|
# Features: additional options controlling how the jar is built.
|
|
24
|
-
# Currently the following features are supported:
|
|
24
|
+
# Currently, the following features are supported:
|
|
25
25
|
# - *gemjar*: package the gem repository in a jar file in WEB-INF/lib
|
|
26
26
|
# - *executable*: embed a web server and make the war executable
|
|
27
27
|
# - *runnable*: allows to run bin scripts e.g. `java -jar my.war -S rake -T`
|
|
@@ -101,7 +101,7 @@ Warbler::Config.new(forced_traits: defined?(forced_traits) ? forced_traits : nil
|
|
|
101
101
|
# File extension for the archive. Defaults to either 'jar' or 'war'.
|
|
102
102
|
# config.jar_extension = "jar"
|
|
103
103
|
|
|
104
|
-
#
|
|
104
|
+
# Destination for the created archive. Defaults to project's root directory.
|
|
105
105
|
# config.autodeploy_dir = "dist/"
|
|
106
106
|
|
|
107
107
|
# Name of the MANIFEST.MF template for the war file. Defaults to a simple
|
|
@@ -120,9 +120,9 @@ Warbler::Config.new(forced_traits: defined?(forced_traits) ? forced_traits : nil
|
|
|
120
120
|
# When set it specify the bytecode version for compiled class files
|
|
121
121
|
# config.bytecode_version = "1.8"
|
|
122
122
|
|
|
123
|
-
# When set to true, Warbler will override the value of ENV['GEM_HOME'] even it
|
|
124
|
-
#
|
|
125
|
-
#
|
|
123
|
+
# When set to true, Warbler will override the value of ENV['GEM_HOME'] even it has already been set.
|
|
124
|
+
# When set to false it will use any existing value of GEM_HOME if it is set. It's usually a bad idea to disable this;
|
|
125
|
+
# your built application will not be self-contained/isolated from the wider RubyGems environment of the machine.
|
|
126
126
|
# config.override_gem_home = true
|
|
127
127
|
|
|
128
128
|
# Specify executable
|
data/warbler.gemspec
CHANGED
|
@@ -33,15 +33,7 @@ bundle up all of your application files for deployment to a Java environment.}
|
|
|
33
33
|
gem.add_runtime_dependency 'rake', ['~> 13.0', '>= 13.0.3']
|
|
34
34
|
gem.add_runtime_dependency 'rexml', '~> 3.0'
|
|
35
35
|
gem.add_runtime_dependency 'jruby-jars', ['>= 9.4', '< 10.2']
|
|
36
|
-
gem.add_runtime_dependency 'jruby-rack', ['>= 1.2.7', '< 1
|
|
36
|
+
gem.add_runtime_dependency 'jruby-rack', ['>= 1.2.7', '< 2.1']
|
|
37
37
|
gem.add_runtime_dependency 'rubyzip', ['>= 2.1.0', '< 4']
|
|
38
38
|
gem.add_runtime_dependency 'ostruct', '~> 0.6.2'
|
|
39
|
-
|
|
40
|
-
gem.add_development_dependency 'rspec', '~> 3.0'
|
|
41
|
-
gem.add_development_dependency 'drb', ['~> 2.2', '>= 2.2.3']
|
|
42
|
-
gem.add_development_dependency 'ruby-maven', '~> 3.9'
|
|
43
|
-
gem.add_development_dependency 'bigdecimal' # Needed workaround for maven-tools > vertus > axiom-types lack of explicit bigdecimal dependency for JRuby 10
|
|
44
|
-
|
|
45
|
-
# JBundler is unsupported on JRuby 10.1
|
|
46
|
-
gem.add_development_dependency 'jbundler', '~> 0.9.5' if RUBY_VERSION.to_f < 4.0
|
|
47
39
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: warbler
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1.
|
|
4
|
+
version: 2.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nick Sieger
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 2026-12-05 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: rake
|
|
@@ -72,7 +72,7 @@ dependencies:
|
|
|
72
72
|
version: 1.2.7
|
|
73
73
|
- - "<"
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: '1
|
|
75
|
+
version: '2.1'
|
|
76
76
|
type: :runtime
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -82,7 +82,7 @@ dependencies:
|
|
|
82
82
|
version: 1.2.7
|
|
83
83
|
- - "<"
|
|
84
84
|
- !ruby/object:Gem::Version
|
|
85
|
-
version: '1
|
|
85
|
+
version: '2.1'
|
|
86
86
|
- !ruby/object:Gem::Dependency
|
|
87
87
|
name: rubyzip
|
|
88
88
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -117,82 +117,6 @@ dependencies:
|
|
|
117
117
|
- - "~>"
|
|
118
118
|
- !ruby/object:Gem::Version
|
|
119
119
|
version: 0.6.2
|
|
120
|
-
- !ruby/object:Gem::Dependency
|
|
121
|
-
name: rspec
|
|
122
|
-
requirement: !ruby/object:Gem::Requirement
|
|
123
|
-
requirements:
|
|
124
|
-
- - "~>"
|
|
125
|
-
- !ruby/object:Gem::Version
|
|
126
|
-
version: '3.0'
|
|
127
|
-
type: :development
|
|
128
|
-
prerelease: false
|
|
129
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
130
|
-
requirements:
|
|
131
|
-
- - "~>"
|
|
132
|
-
- !ruby/object:Gem::Version
|
|
133
|
-
version: '3.0'
|
|
134
|
-
- !ruby/object:Gem::Dependency
|
|
135
|
-
name: drb
|
|
136
|
-
requirement: !ruby/object:Gem::Requirement
|
|
137
|
-
requirements:
|
|
138
|
-
- - "~>"
|
|
139
|
-
- !ruby/object:Gem::Version
|
|
140
|
-
version: '2.2'
|
|
141
|
-
- - ">="
|
|
142
|
-
- !ruby/object:Gem::Version
|
|
143
|
-
version: 2.2.3
|
|
144
|
-
type: :development
|
|
145
|
-
prerelease: false
|
|
146
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
147
|
-
requirements:
|
|
148
|
-
- - "~>"
|
|
149
|
-
- !ruby/object:Gem::Version
|
|
150
|
-
version: '2.2'
|
|
151
|
-
- - ">="
|
|
152
|
-
- !ruby/object:Gem::Version
|
|
153
|
-
version: 2.2.3
|
|
154
|
-
- !ruby/object:Gem::Dependency
|
|
155
|
-
name: ruby-maven
|
|
156
|
-
requirement: !ruby/object:Gem::Requirement
|
|
157
|
-
requirements:
|
|
158
|
-
- - "~>"
|
|
159
|
-
- !ruby/object:Gem::Version
|
|
160
|
-
version: '3.9'
|
|
161
|
-
type: :development
|
|
162
|
-
prerelease: false
|
|
163
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
164
|
-
requirements:
|
|
165
|
-
- - "~>"
|
|
166
|
-
- !ruby/object:Gem::Version
|
|
167
|
-
version: '3.9'
|
|
168
|
-
- !ruby/object:Gem::Dependency
|
|
169
|
-
name: bigdecimal
|
|
170
|
-
requirement: !ruby/object:Gem::Requirement
|
|
171
|
-
requirements:
|
|
172
|
-
- - ">="
|
|
173
|
-
- !ruby/object:Gem::Version
|
|
174
|
-
version: '0'
|
|
175
|
-
type: :development
|
|
176
|
-
prerelease: false
|
|
177
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
178
|
-
requirements:
|
|
179
|
-
- - ">="
|
|
180
|
-
- !ruby/object:Gem::Version
|
|
181
|
-
version: '0'
|
|
182
|
-
- !ruby/object:Gem::Dependency
|
|
183
|
-
name: jbundler
|
|
184
|
-
requirement: !ruby/object:Gem::Requirement
|
|
185
|
-
requirements:
|
|
186
|
-
- - "~>"
|
|
187
|
-
- !ruby/object:Gem::Version
|
|
188
|
-
version: 0.9.5
|
|
189
|
-
type: :development
|
|
190
|
-
prerelease: false
|
|
191
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
192
|
-
requirements:
|
|
193
|
-
- - "~>"
|
|
194
|
-
- !ruby/object:Gem::Version
|
|
195
|
-
version: 0.9.5
|
|
196
120
|
description: |-
|
|
197
121
|
Warbler is a gem to make a Java jar or war file out of any Ruby,
|
|
198
122
|
Rails, or Rack application. Warbler provides a minimal, flexible, Ruby-like way to
|
|
@@ -206,14 +130,13 @@ files:
|
|
|
206
130
|
- CHANGELOG.md
|
|
207
131
|
- Gemfile
|
|
208
132
|
- LICENSE.txt
|
|
209
|
-
- Mavenfile
|
|
210
133
|
- README.rdoc
|
|
211
134
|
- Rakefile
|
|
212
135
|
- bin/warble
|
|
213
|
-
- ext/
|
|
214
|
-
- ext/
|
|
215
|
-
- ext/
|
|
216
|
-
- ext/
|
|
136
|
+
- ext/pom.xml
|
|
137
|
+
- ext/src/main/java/warbler/JarMain.java
|
|
138
|
+
- ext/src/main/java/warbler/WarMain.java
|
|
139
|
+
- ext/src/main/java/warbler/WarblerJar.java
|
|
217
140
|
- lib/warbler.rb
|
|
218
141
|
- lib/warbler/application.rb
|
|
219
142
|
- lib/warbler/bundler_helper.rb
|
|
@@ -246,6 +169,9 @@ files:
|
|
|
246
169
|
- lib/warbler/web_server.rb
|
|
247
170
|
- lib/warbler/zip_support.rb
|
|
248
171
|
- lib/warbler_jar.jar
|
|
172
|
+
- mvnw
|
|
173
|
+
- mvnw.cmd
|
|
174
|
+
- pom.xml
|
|
249
175
|
- warble.rb
|
|
250
176
|
- warbler.gemspec
|
|
251
177
|
- web.xml.erb
|
|
@@ -272,7 +198,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
272
198
|
- !ruby/object:Gem::Version
|
|
273
199
|
version: '0'
|
|
274
200
|
requirements: []
|
|
275
|
-
rubygems_version: 3.
|
|
201
|
+
rubygems_version: 3.6.3
|
|
276
202
|
specification_version: 4
|
|
277
203
|
summary: Warbler chirpily constructs .war files of your Rails applications.
|
|
278
204
|
test_files: []
|
data/Mavenfile
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
#-*- mode: ruby -*-
|
|
2
|
-
warn "ruby-maven is running fixed JRuby version #{JRUBY_VERSION}"
|
|
3
|
-
|
|
4
|
-
# tell the gem setup for maven where the java sources are
|
|
5
|
-
# and how to name the jar file (default path for the jar: ./lib )
|
|
6
|
-
gemspec( :jar => 'warbler_jar.jar',
|
|
7
|
-
:source => 'ext' )
|
|
8
|
-
|
|
9
|
-
properties(
|
|
10
|
-
'project.build.sourceEncoding' => 'UTF-8',
|
|
11
|
-
'mavengem.wagon.version' => '2.0.3',
|
|
12
|
-
'jruby.plugins.version' => '3.0.6',
|
|
13
|
-
'jetty.version' => '9.4.58.v20250814',
|
|
14
|
-
)
|
|
15
|
-
|
|
16
|
-
# dependencies needed for compilation
|
|
17
|
-
scope :provided do
|
|
18
|
-
jar 'org.jruby:jruby', '${jruby.version}'
|
|
19
|
-
jar 'org.eclipse.jetty:jetty-webapp', '${jetty.version}'
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
plugin :clean, '3.5.0'
|
|
23
|
-
plugin :compiler, '3.15.0', :release => '8'
|
|
24
|
-
plugin :resources, '3.5.0'
|
|
25
|
-
plugin :jar, '3.5.0' do
|
|
26
|
-
execute_goals(:phase => 'none') # Avoid a duplicate execution with that defined by the :gemspec directive
|
|
27
|
-
end
|
|
28
|
-
plugin :install, '3.1.4'
|
|
29
|
-
|
|
30
|
-
gem 'bundler', '${bundler.version}'
|
|
31
|
-
gem 'jruby-jars', '${jruby.version}'
|
|
32
|
-
|
|
33
|
-
plugin :invoker, '3.10.1' do
|
|
34
|
-
execute_goals( :install, :run,
|
|
35
|
-
:id => 'integration-test',
|
|
36
|
-
:properties => {
|
|
37
|
-
'warbler.version' => '${project.version}',
|
|
38
|
-
'jruby.version' => '${jruby.version}',
|
|
39
|
-
'jetty.version' => '${jetty.version}',
|
|
40
|
-
'bundler.version' => '${bundler.version}',
|
|
41
|
-
'jruby.plugins.version' => '${jruby.plugins.version}',
|
|
42
|
-
'style.color' => 'always',
|
|
43
|
-
},
|
|
44
|
-
:goals => ['verify'],
|
|
45
|
-
:projectsDirectory => 'integration',
|
|
46
|
-
:pomIncludes => [ '*/pom.xml' ],
|
|
47
|
-
:pomExcludes => [],
|
|
48
|
-
:streamLogs => true )
|
|
49
|
-
end
|
data/ext/WarblerJarService.java
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2010-2012 Engine Yard, Inc.
|
|
3
|
-
* Copyright (c) 2007-2009 Sun Microsystems, Inc.
|
|
4
|
-
* This source code is available under the MIT license.
|
|
5
|
-
* See the file LICENSE.txt for details.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import java.io.IOException;
|
|
9
|
-
import org.jruby.Ruby;
|
|
10
|
-
import org.jruby.runtime.load.BasicLibraryService;
|
|
11
|
-
|
|
12
|
-
public class WarblerJarService implements BasicLibraryService {
|
|
13
|
-
public boolean basicLoad(final Ruby runtime) throws IOException {
|
|
14
|
-
WarblerJar.create(runtime);
|
|
15
|
-
return true;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|