Skip to content

Commit 2ea5d59

Browse files
committed
Back off Maven template run and build from Rake
There's a lot of chicken-and-egg issues with trying to have Maven do all the steps for the Java artifact builds right now, so back off and require that templates (and WASM) are generated before the Maven builds of the relevant modules.
1 parent 1983383 commit 2ea5d59

File tree

2 files changed

+2
-65
lines changed

2 files changed

+2
-65
lines changed

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ elsif RUBY_ENGINE == "jruby"
4343
# This compiles java to make sure any templating changes produces valid code.
4444
Rake::JavaExtensionTask.new(:compile) do |ext|
4545
ext.name = "prism"
46-
ext.ext_dir = "java"
46+
ext.ext_dir = "java/api"
4747
ext.lib_dir = "tmp"
4848
ext.release = "21"
4949
ext.gem_spec = Gem::Specification.load("prism.gemspec")

java/api/pom.xml

Lines changed: 1 addition & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -9,84 +9,21 @@
99
</parent>
1010

1111
<artifactId>prism-parser-api</artifactId>
12-
<name>Java Prism API</name>
12+
<name>Java Prism</name>
1313
<description>Java API for the Prism Ruby language parser</description>
1414
<url>https://github.com/ruby/prism</url>
1515

16-
<repositories>
17-
<repository>
18-
<id>mavengems</id>
19-
<url>mavengem:https://rubygems.org</url>
20-
</repository>
21-
</repositories>
22-
2316
<dependencies>
2417
<dependency>
2518
<groupId>org.ruby-lang</groupId>
2619
<artifactId>prism-parser-native</artifactId>
2720
<version>0.0.2-SNAPSHOT</version>
2821
<scope>provided</scope>
2922
</dependency>
30-
<dependency>
31-
<groupId>rubygems</groupId>
32-
<artifactId>rake</artifactId>
33-
<version>13.0.3</version>
34-
<type>gem</type>
35-
</dependency>
36-
<dependency>
37-
<groupId>rubygems</groupId>
38-
<artifactId>rake-compiler</artifactId>
39-
<version>1.3.1</version>
40-
<type>gem</type>
41-
</dependency>
4223
</dependencies>
4324

4425
<build>
45-
<extensions>
46-
<extension>
47-
<groupId>org.jruby.maven</groupId>
48-
<artifactId>mavengem-wagon</artifactId>
49-
<version>2.0.2</version>
50-
</extension>
51-
</extensions>
5226
<plugins>
53-
<plugin>
54-
<groupId>org.codehaus.mojo</groupId>
55-
<artifactId>build-helper-maven-plugin</artifactId>
56-
<version>3.6.1</version>
57-
<executions>
58-
<execution>
59-
<id>add-source</id>
60-
<phase>generate-sources</phase>
61-
<goals>
62-
<goal>add-source</goal>
63-
</goals>
64-
<configuration>
65-
<sources>
66-
<source>target/generated-sources/java</source>
67-
</sources>
68-
</configuration>
69-
</execution>
70-
</executions>
71-
</plugin>
72-
<plugin>
73-
<groupId>org.jruby.maven</groupId>
74-
<artifactId>rake-maven-plugin</artifactId>
75-
<version>3.0.6</version>
76-
<executions>
77-
<execution>
78-
<id>generate templated Java sources</id>
79-
<phase>generate-sources</phase>
80-
<goals>
81-
<goal>rake</goal>
82-
</goals>
83-
<configuration>
84-
<launchDirectory>${project.basedir}/../..</launchDirectory>
85-
<rakeArgs>PRISM_EXCLUDE_PRETTYPRINT=1 PRISM_SERIALIZE_ONLY_SEMANTICS_FIELDS=1 templates</rakeArgs>
86-
</configuration>
87-
</execution>
88-
</executions>
89-
</plugin>
9027
<plugin>
9128
<groupId>org.codehaus.mojo</groupId>
9229
<artifactId>templating-maven-plugin</artifactId>

0 commit comments

Comments
 (0)