/
pom.xml
165 lines (163 loc) · 4.27 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<project>
<groupId>org.jruby</groupId>
<artifactId>executables</artifactId>
<version>1</version>
<modelVersion>4.0.0</modelVersion>
<dependencies>
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby</artifactId>
<version>@project.version@</version>
<type>pom</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2</version>
<configuration>
<executable>java</executable>
<environmentVariables>
<PATH>${basedir}</PATH>
<HOME>${basedir}</HOME>
<GEM_PATH>${basedir}</GEM_PATH>
<GEM_HOME>${basedir}</GEM_HOME>
</environmentVariables>
</configuration>
<executions>
<execution>
<id>gem list</id>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<arguments>
<argument>-classpath</argument>
<classpath/>
<argument>org.jruby.Main</argument>
<argument>-S</argument>
<argument>gem</argument>
<argument>list</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>rake executable</id>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<arguments>
<argument>-classpath</argument>
<classpath/>
<argument>org.jruby.Main</argument>
<argument>-S</argument>
<argument>rake</argument>
<argument>--version</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>rdoc executable</id>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<arguments>
<argument>-classpath</argument>
<classpath/>
<argument>org.jruby.Main</argument>
<argument>-S</argument>
<argument>rdoc</argument>
<argument>--version</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>count installed gems</id>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<arguments>
<argument>-classpath</argument>
<classpath/>
<argument>org.jruby.Main</argument>
<argument>-e</argument>
<argument>
require 'stringio'
require 'rubygems/commands/list_command'
require 'rubygems/user_interaction'
s = StringIO.new
l = Gem::Commands::ListCommand.new
l.ui= Gem::StreamUI.new( STDIN, s, STDERR, true )
l.execute
c = s.string.split( /\n/ ).count
puts 'gems count ' + c.to_s
</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>load default gems</id>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<!-- automatically creates the classpath using all project dependencies,
also adding the project build directory -->
<classpath/>
<argument>org.jruby.Main</argument>
<argument>-e</argument>
<!-- make sure openssl loads -->
<argument>
require 'jar-dependencies'
require 'openssl'
require 'krypt'
puts Gem.loaded_specs.keys.sort.join(',')
</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>there is org.objectweb.asm.ClassWriter</id>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<!-- automatically creates the classpath using all project dependencies,
also adding the project build directory -->
<classpath/>
<argument>org.jruby.Main</argument>
<argument>-e</argument>
<!-- make sure openssl loads -->
<argument>
begin
java_import "org.objectweb.asm.ClassWriter"
puts "there is org.objectweb.asm.ClassWriter on the classpath"
rescue NameError => e
raise "error there is NO org.objectweb.asm.ClassWriter on the classpath"
end
</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>