Skip to content

Commit dd8f35b

Browse files
committed
convert to polyglot maven build
1 parent 42a3755 commit dd8f35b

File tree

13 files changed

+47
-48
lines changed

13 files changed

+47
-48
lines changed

nature-of-code/xor/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
target
12
library
23
tmp
34
*.jar
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<extensions>
3+
<extension>
4+
<groupId>io.takari.polyglot</groupId>
5+
<artifactId>polyglot-ruby</artifactId>
6+
<version>0.1.19</version>
7+
</extension>
8+
</extensions>

nature-of-code/xor/JRakefile

Lines changed: 0 additions & 11 deletions
This file was deleted.

nature-of-code/xor/README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
Building the nn Library
22
===================
33

4-
You need `jruby` to run the included `JRakefile`, you also need the `rake-compiler` gem.
4+
Here we do a [polyglot maven][polyglot] build. But you could do a manual build quite easily if you wished. If you have recent mvn installed all you need to do is
55

6-
This is the way jruby-extensions used to get build before [polyglot maven][polyglot] (_which is deemed a bit too complicated here_).
6+
```bash
7+
mvn package
8+
```
79

8-
But you can start process with mri ruby, so cd this directory and rake to compile and run.
9-
10-
Or rake clean to remove library jar (useful if you want to re-compile) and its build.
11-
12-
[polyglot]:https://github.com/jruby/jruby-examples
10+
See also how to build jruby [extensions]:https://github.com/jruby/jruby-examples with polyglot maven

nature-of-code/xor/Rakefile

Lines changed: 0 additions & 29 deletions
This file was deleted.

nature-of-code/xor/pom.rb

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
project 'xor' do
2+
3+
model_version '4.0.0'
4+
id 'nn:xor:1.0-SNAPSHOT'
5+
packaging 'jar'
6+
7+
description 'neural net library for xor'
8+
9+
developer 'shiffman' do
10+
name 'DanShiffman'
11+
roles 'developer'
12+
end
13+
14+
properties( 'maven.compiler.source' => '1.8',
15+
'project.build.sourceEncoding' => 'UTF-8',
16+
'polyglot.dump.pom' => 'pom.xml',
17+
'xor.basedir' => '${project.basedir}',
18+
'maven.compiler.target' => '1.8' )
19+
20+
overrides do
21+
plugin( :jar, '2.3.2',
22+
'outputDirectory' => '${xor.basedir}/library/xor' )
23+
end
24+
25+
26+
build do
27+
default_goal 'package'
28+
source_directory 'src'
29+
final_name 'xor'
30+
end
31+
32+
end
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)