Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Commit

Permalink
Merge pull request #46 from spideruci/buildfix fixes issue #44
Browse files Browse the repository at this point in the history
Buildfix for mvn compile -P static
  • Loading branch information
kajdreef authored Jun 4, 2018
2 parents 0a30d71 + 89bc480 commit cfd3ea0
Show file tree
Hide file tree
Showing 24 changed files with 3,259 additions and 5 deletions.
29 changes: 29 additions & 0 deletions blinky-config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,35 @@
</plugin>

</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<versionRange>[2.2-beta-5,)</versionRange>
<goals>
<goal>single</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute></execute>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

</project>
42 changes: 42 additions & 0 deletions blinky-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,48 @@
</plugin>

</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<versionRange>[3.0.0,)</versionRange>
<goals>
<goal>clean</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<versionRange>[1.5.0,)</versionRange>
<goals>
<goal>java</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute></execute>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

<dependencies>
Expand Down
6 changes: 3 additions & 3 deletions blinky-statik/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
</properties>
<dependencies>
<dependency>
<groupId>org.spideruci.analysis.statik.controlflow</groupId>
<artifactId>jump</artifactId>
<version>1.0-SNAPSHOT</version>
<groupId>org.spideruci.analysis.util</groupId>
<artifactId>blinky-util</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>

<dependency>
Expand Down
4 changes: 2 additions & 2 deletions blinky-util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
package org.spideruci.analysis.statik.controlflow;

import java.util.ArrayList;
import java.util.Collection;
import java.util.function.Consumer;

/**
* A collection that is designed to only add Node elements to a list
* return such a list upon adding all desired Nodes.
* @author vpalepu
*
* @param <T>
*/
public class Accumulator<T> {

private ArrayList<Node<T>> accumulated;

/**
* Creates an Accumulator instance.
* @return
*/
public static <A> Accumulator<A> create() {
return new Accumulator<A>();
}

private Accumulator() {
accumulated = new ArrayList<>();
}

/**
* Retrieves the current list of Nodes accumulated so far.
* @return
*/
public ArrayList<Node<T>> period() {
return new ArrayList<Node<T>>(accumulated);
}

public ArrayList<Node<T>> andAlso(Node<T> node) {
accumulated.add(node);
return new ArrayList<>(accumulated);
}

public Accumulator<T> and(Node<T> node) {
this.accumulated.add(node);
return this;
}

public Accumulator<T> with(Node<T>[] nodes) {
for(Node<T> node : nodes) {
and(node);
}
return this;
}

public Accumulator<T> with(Collection<Node<T>> nodes) {
for(Node<T> node : nodes) {
and(node);
}
return this;
}

public void forEach(Consumer<Node<T>> c) {
accumulated.forEach(c);
}

}
Loading

0 comments on commit cfd3ea0

Please sign in to comment.