Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 10 additions & 48 deletions scijava-legacy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -249,59 +249,23 @@
</executions>
</plugin>
<plugin>
<groupId>com.alexecollins.maven.plugin</groupId>
<artifactId>script-maven-plugin</artifactId>
<version>1.0.0</version>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>union-metadata-indices</id>
<id>union-op-yaml</id>
<phase>process-test-classes</phase>
<goals>
<goal>execute</goal>
<goal>run</goal>
</goals>
<configuration>
<language>ruby</language>
<script>
# Append the source plugin annotations to the test plugin annotations
require 'set'

# Handle windows paths
basedir = '${project.basedir}'.gsub /\\+/, '\\\\'

# Reads plugin metadata into a set of strings, one per plugin declaration.
def read_plugins(path)
delim = 'UNIQUE-SEQUENCE-THAT-NO-PLUGIN-WILL-EVER-USE'
return File.exist?(path) ? File.read(path).sub('}{', '}' + delim + '{').split(delim).to_set : Set.new()
end

# Read in main and test scope plugin annotations.
['ops.yaml'].each do |pluginsPath|
mainPluginsPath = "#{basedir}/target/classes/#{pluginsPath}"
testPluginsPath = "#{basedir}/target/test-classes/#{pluginsPath}"
mainPlugins = read_plugins(mainPluginsPath)
testPlugins = read_plugins(testPluginsPath)

# Write out unioned plugin annotations to test scope plugin annotations.
# Without this, the test scope code does not know of the main scope plugins.
allPlugins = mainPlugins.union(testPlugins)
unless allPlugins.empty?()
require 'fileutils'
FileUtils.mkdir_p File.dirname(testPluginsPath)
File.write(testPluginsPath, allPlugins.to_a.join(''))
end
end
</script>
<target>
<concat destfile="${project.basedir}/target/test-classes/ops.yaml" append="true">
<fileset file="${project.basedir}/target/classes/ops.yaml" />
</concat>
</target>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby-complete</artifactId>
<version>9.2.11.1</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
Expand Down Expand Up @@ -336,11 +300,9 @@
-->
<pluginExecution>
<pluginExecutionFilter>
<groupId>com.alexecollins.maven.plugin</groupId>
<artifactId>script-maven-plugin</artifactId>
<versionRange>${script-maven-plugin.version}</versionRange>
<artifactId>maven-antrun-plugin</artifactId>
<goals>
<goal>execute</goal>
<goal>run</goal>
</goals>
</pluginExecutionFilter>
<action>
Expand Down
58 changes: 10 additions & 48 deletions scijava-ops-benchmarks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -259,59 +259,23 @@
</executions>
</plugin>
<plugin>
<groupId>com.alexecollins.maven.plugin</groupId>
<artifactId>script-maven-plugin</artifactId>
<version>1.0.0</version>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>union-metadata-indices</id>
<id>union-op-yaml</id>
<phase>process-test-classes</phase>
<goals>
<goal>execute</goal>
<goal>run</goal>
</goals>
<configuration>
<language>ruby</language>
<script>
# Append the source plugin annotations to the test plugin annotations
require 'set'

# Handle windows paths
basedir = '${project.basedir}'.gsub /\\+/, '\\\\'

# Reads plugin metadata into a set of strings, one per plugin declaration.
def read_plugins(path)
delim = 'UNIQUE-SEQUENCE-THAT-NO-PLUGIN-WILL-EVER-USE'
return File.exist?(path) ? File.read(path).sub('}{', '}' + delim + '{').split(delim).to_set : Set.new()
end

# Read in main and test scope plugin annotations.
['ops.yaml'].each do |pluginsPath|
mainPluginsPath = "#{basedir}/target/classes/#{pluginsPath}"
testPluginsPath = "#{basedir}/target/test-classes/#{pluginsPath}"
mainPlugins = read_plugins(mainPluginsPath)
testPlugins = read_plugins(testPluginsPath)

# Write out unioned plugin annotations to test scope plugin annotations.
# Without this, the test scope code does not know of the main scope plugins.
allPlugins = mainPlugins.union(testPlugins)
unless allPlugins.empty?()
require 'fileutils'
FileUtils.mkdir_p File.dirname(testPluginsPath)
File.write(testPluginsPath, allPlugins.to_a.join(''))
end
end
</script>
<target>
<concat destfile="${project.basedir}/target/test-classes/ops.yaml" append="true">
<fileset file="${project.basedir}/target/classes/ops.yaml" />
</concat>
</target>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby-complete</artifactId>
<version>9.2.11.1</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
Expand Down Expand Up @@ -346,11 +310,9 @@
-->
<pluginExecution>
<pluginExecutionFilter>
<groupId>com.alexecollins.maven.plugin</groupId>
<artifactId>script-maven-plugin</artifactId>
<versionRange>${script-maven-plugin.version}</versionRange>
<artifactId>maven-antrun-plugin</artifactId>
<goals>
<goal>execute</goal>
<goal>run</goal>
</goals>
</pluginExecutionFilter>
<action>
Expand Down
58 changes: 10 additions & 48 deletions scijava-ops-engine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -293,59 +293,23 @@
</executions>
</plugin>
<plugin>
<groupId>com.alexecollins.maven.plugin</groupId>
<artifactId>script-maven-plugin</artifactId>
<version>1.0.0</version>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>union-metadata-indices</id>
<id>union-op-yaml</id>
<phase>process-test-classes</phase>
<goals>
<goal>execute</goal>
<goal>run</goal>
</goals>
<configuration>
<language>ruby</language>
<script>
# Append the source plugin annotations to the test plugin annotations
require 'set'

# Handle windows paths
basedir = '${project.basedir}'.gsub /\\+/, '\\\\'

# Reads plugin metadata into a set of strings, one per plugin declaration.
def read_plugins(path)
delim = 'UNIQUE-SEQUENCE-THAT-NO-PLUGIN-WILL-EVER-USE'
return File.exist?(path) ? File.read(path).sub('}{', '}' + delim + '{').split(delim).to_set : Set.new()
end

# Read in main and test scope plugin annotations.
['ops.yaml'].each do |pluginsPath|
mainPluginsPath = "#{basedir}/target/classes/#{pluginsPath}"
testPluginsPath = "#{basedir}/target/test-classes/#{pluginsPath}"
mainPlugins = read_plugins(mainPluginsPath)
testPlugins = read_plugins(testPluginsPath)

# Write out unioned plugin annotations to test scope plugin annotations.
# Without this, the test scope code does not know of the main scope plugins.
allPlugins = mainPlugins.union(testPlugins)
unless allPlugins.empty?()
require 'fileutils'
FileUtils.mkdir_p File.dirname(testPluginsPath)
File.write(testPluginsPath, allPlugins.to_a.join(''))
end
end
</script>
<target>
<concat destfile="${project.basedir}/target/test-classes/ops.yaml" append="true">
<fileset file="${project.basedir}/target/classes/ops.yaml" />
</concat>
</target>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby-complete</artifactId>
<version>9.2.11.1</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
Expand Down Expand Up @@ -380,11 +344,9 @@
-->
<pluginExecution>
<pluginExecutionFilter>
<groupId>com.alexecollins.maven.plugin</groupId>
<artifactId>script-maven-plugin</artifactId>
<versionRange>${script-maven-plugin.version}</versionRange>
<artifactId>maven-antrun-plugin</artifactId>
<goals>
<goal>execute</goal>
<goal>run</goal>
</goals>
</pluginExecutionFilter>
<action>
Expand Down
58 changes: 10 additions & 48 deletions scijava-ops-flim/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -284,59 +284,23 @@
</executions>
</plugin>
<plugin>
<groupId>com.alexecollins.maven.plugin</groupId>
<artifactId>script-maven-plugin</artifactId>
<version>1.0.0</version>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>union-metadata-indices</id>
<id>union-op-yaml</id>
<phase>process-test-classes</phase>
<goals>
<goal>execute</goal>
<goal>run</goal>
</goals>
<configuration>
<language>ruby</language>
<script>
# Append the source plugin annotations to the test plugin annotations
require 'set'

# Handle windows paths
basedir = '${project.basedir}'.gsub /\\+/, '\\\\'

# Reads plugin metadata into a set of strings, one per plugin declaration.
def read_plugins(path)
delim = 'UNIQUE-SEQUENCE-THAT-NO-PLUGIN-WILL-EVER-USE'
return File.exist?(path) ? File.read(path).sub('}{', '}' + delim + '{').split(delim).to_set : Set.new()
end

# Read in main and test scope plugin annotations.
['ops.yaml'].each do |pluginsPath|
mainPluginsPath = "#{basedir}/target/classes/#{pluginsPath}"
testPluginsPath = "#{basedir}/target/test-classes/#{pluginsPath}"
mainPlugins = read_plugins(mainPluginsPath)
testPlugins = read_plugins(testPluginsPath)

# Write out unioned plugin annotations to test scope plugin annotations.
# Without this, the test scope code does not know of the main scope plugins.
allPlugins = mainPlugins.union(testPlugins)
unless allPlugins.empty?()
require 'fileutils'
FileUtils.mkdir_p File.dirname(testPluginsPath)
File.write(testPluginsPath, allPlugins.to_a.join(''))
end
end
</script>
<target>
<concat destfile="${project.basedir}/target/test-classes/ops.yaml" append="true">
<fileset file="${project.basedir}/target/classes/ops.yaml" />
</concat>
</target>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby-complete</artifactId>
<version>9.2.11.1</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
Expand Down Expand Up @@ -371,11 +335,9 @@
-->
<pluginExecution>
<pluginExecutionFilter>
<groupId>com.alexecollins.maven.plugin</groupId>
<artifactId>script-maven-plugin</artifactId>
<versionRange>${script-maven-plugin.version}</versionRange>
<artifactId>maven-antrun-plugin</artifactId>
<goals>
<goal>execute</goal>
<goal>run</goal>
</goals>
</pluginExecutionFilter>
<action>
Expand Down
Loading