Skip to content

Commit

Permalink
Poms' cleansing (common / standard structure, artifacts & versions
Browse files Browse the repository at this point in the history
updates, special profiles for c++ & c#, integration tests successful on
bugs/examples/grammars)

Signed-off-by: mmazas <mmazas@ITEM-S104678.emea.msad.sopra>
  • Loading branch information
mmazas authored and mmazas committed Jul 19, 2024
1 parent b039174 commit 8f5e873
Show file tree
Hide file tree
Showing 35 changed files with 343 additions and 685 deletions.
56 changes: 45 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,35 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven
#
# Copyright (c) 2020-2024, Sreeni Viswanadha <sreeni@viswanadha.net>.
# Copyright (c) 2024, Marc Mazas <mazas.marc@gmail.com>.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the names of of the copyright holders nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
#
name: Java CI with Maven on javacc-8-cpp

on:
push:
Expand All @@ -18,19 +46,25 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v2

- uses: actions/checkout@v4

- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'adopt'

distribution: 'temurin'
java-version: '11'
cache: 'maven'

- name: Cache Maven packages
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Build with Maven
run: mvn -B clean verify --file pom.xml
# - name: Build package on javacc-8-cpp
# run: mvn -B -e package

- name: Run install on javacc-8-cpp
run: mvn -B -e install
6 changes: 5 additions & 1 deletion bugs/bug001/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,19 @@ THE POSSIBILITY OF SUCH DAMAGE.
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.javacc.generator.cpp</groupId>
<artifactId>bugs</artifactId>
<version>1.0.0</version>
<version>1.1.0-SNAPSHOT</version>
</parent>

<groupId>org.javacc.generator.cpp.bugs</groupId>
<artifactId>bug001</artifactId>
<packaging>nar</packaging>

<name>JavaCC C++ code generator / bug001</name>

<build>
<plugins>

Expand Down
6 changes: 5 additions & 1 deletion bugs/bug002/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,19 @@ THE POSSIBILITY OF SUCH DAMAGE.
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.javacc.generator.cpp</groupId>
<artifactId>bugs</artifactId>
<version>1.0.0</version>
<version>1.1.0-SNAPSHOT</version>
</parent>

<groupId>org.javacc.generator.cpp.bugs</groupId>
<artifactId>bug002</artifactId>
<packaging>nar</packaging>

<name>JavaCC C++ code generator / bug002</name>

<build>
<plugins>

Expand Down
3 changes: 2 additions & 1 deletion bugs/invoker.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# A comma or space separated list of goals/phases to execute, may
# specify an empty list to execute the default goal of the IT project.
# Environment variables used by maven plugins can be added here
invoker.goals = clean install
invoker.goals = clean install
#invoker.debug = true
11 changes: 6 additions & 5 deletions bugs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,19 @@ THE POSSIBILITY OF SUCH DAMAGE.

<parent>
<groupId>org.javacc.generator.cpp</groupId>
<version>1.0.0</version>
<relativePath>../it</relativePath>
<artifactId>it</artifactId>
<version>1.1.0-SNAPSHOT</version>
<relativePath>../it</relativePath>
</parent>

<name>JavaCC C++ examples</name>
<description>JavaCC C++ examples</description>
<groupId>org.javacc.generator.cpp</groupId>
<artifactId>bugs</artifactId>
<packaging>pom</packaging>

<name>JavaCC C++ code generator / bugs</name>

<modules>
<module>bug001</module>
<module>bug002</module>
</modules>

</project>
11 changes: 9 additions & 2 deletions examples/CORBA-IDL/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,22 @@ THE POSSIBILITY OF SUCH DAMAGE.
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.javacc.generator.cpp</groupId>
<artifactId>examples</artifactId>
<version>1.0.0</version>
<version>1.1.0-SNAPSHOT</version>
</parent>

<groupId>org.javacc.generator.cpp.examples</groupId>
<artifactId>corba-idl</artifactId>
<name>JavaCC examples C++ CORBA-IDL</name>
<packaging>nar</packaging>

<name>JavaCC C++ code generator / CORBA-IDL</name>

<build>
<plugins>

<plugin>
<groupId>com.github.maven-nar</groupId>
<artifactId>nar-maven-plugin</artifactId>
Expand All @@ -62,6 +67,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
</libraries>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
Expand Down Expand Up @@ -91,6 +97,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
</execution>
</executions>
</plugin>

</plugins>
</build>
</project>
7 changes: 5 additions & 2 deletions examples/Interpreter/AST/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,17 @@ THE POSSIBILITY OF SUCH DAMAGE.
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.javacc.generator.cpp.examples</groupId>
<artifactId>interpreter</artifactId>
<version>1.0.0</version>
<version>1.1.0-SNAPSHOT</version>
</parent>

<groupId>org.javacc.generator.cpp.examples.interpreter</groupId>
<artifactId>AST</artifactId>
<name>JavaCC examples C++ Interpreter AST</name>
<packaging>nar</packaging>

<name>JavaCC C++ code generator / Interpreter / AST</name>

</project>
23 changes: 15 additions & 8 deletions examples/Interpreter/VST/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,22 @@ THE POSSIBILITY OF SUCH DAMAGE.
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.javacc.generator.cpp.examples</groupId>
<artifactId>interpreter</artifactId>
<version>1.0.0</version>
<version>1.1.0-SNAPSHOT</version>
</parent>

<groupId>org.javacc.generator.cpp.examples.interpreter</groupId>
<artifactId>VST</artifactId>
<packaging>nar</packaging>
<name>JavaCC examples C++ Interpreter VST</name>

<name>JavaCC C++ code generator / Interpreter / VST</name>

<build>
<plugins>

<plugin>
<groupId>com.github.maven-nar</groupId>
<artifactId>nar-maven-plugin</artifactId>
Expand All @@ -59,17 +64,18 @@ THE POSSIBILITY OF SUCH DAMAGE.
<arg>${project.basedir}/spl/calc/calc.err</arg>
</args>
<!--
<args>
<arg>${project.basedir}/spl/odd/odd.spl</arg>
<arg>${project.basedir}/spl/odd/odd.in</arg>
<arg>${project.basedir}/spl/odd/odd.out</arg>
<arg>${project.basedir}/spl/odd/odd.err</arg>
</args>
<args>
<arg>${project.basedir}/spl/odd/odd.spl</arg>
<arg>${project.basedir}/spl/odd/odd.in</arg>
<arg>${project.basedir}/spl/odd/odd.out</arg>
<arg>${project.basedir}/spl/odd/odd.err</arg>
</args>
-->
</library>
</libraries>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
Expand Down Expand Up @@ -100,6 +106,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
</execution>
</executions>
</plugin>

</plugins>
</build>
</project>
8 changes: 6 additions & 2 deletions examples/Interpreter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,19 @@ THE POSSIBILITY OF SUCH DAMAGE.
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.javacc.generator.cpp</groupId>
<artifactId>examples</artifactId>
<version>1.0.0</version>
<version>1.1.0-SNAPSHOT</version>
</parent>
<name>JavaCC examples C++ Interpreter</name>

<groupId>org.javacc.generator.cpp.examples</groupId>
<artifactId>interpreter</artifactId>
<packaging>pom</packaging>

<name>JavaCC C++ code generator / Interpreter</name>

<modules>
<module>AST</module>
<module>VST</module>
Expand Down
14 changes: 10 additions & 4 deletions examples/JJTreeExamples/eg1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,22 @@ THE POSSIBILITY OF SUCH DAMAGE.
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.javacc.generator.cpp.examples</groupId>
<artifactId>jjtree</artifactId>
<version>1.0.0</version>
<artifactId>jjtreeexamples</artifactId>
<version>1.1.0-SNAPSHOT</version>
</parent>
<groupId>org.javacc.generator.cpp.examples.jjtree</groupId>

<groupId>org.javacc.generator.cpp.examples.jjtreeexamples</groupId>
<artifactId>eg1</artifactId>
<packaging>nar</packaging>
<name>JavaCC examples C++ JJTreeExamples EG1</name>

<name>JavaCC C++ code generator / JJTree / eg1</name>

<build>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
Expand Down Expand Up @@ -72,6 +77,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
</execution>
</executions>
</plugin>

</plugins>
</build>
</project>
15 changes: 11 additions & 4 deletions examples/JJTreeExamples/eg2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,22 @@ THE POSSIBILITY OF SUCH DAMAGE.
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.javacc.generator.cpp.examples</groupId>
<artifactId>jjtree</artifactId>
<version>1.0.0</version>
<artifactId>jjtreeexamples</artifactId>
<version>1.1.0-SNAPSHOT</version>
</parent>
<groupId>org.javacc.generator.cpp.examples.jjtree</groupId>

<groupId>org.javacc.generator.cpp.examples.jjtreeexamples</groupId>
<artifactId>eg2</artifactId>
<packaging>nar</packaging>
<name>JavaCC examples C++ JJTree EG2</name>

<name>JavaCC C++ code generator / JJTree / eg2</name>

<build>
<plugins>

<plugin>
<groupId>org.javacc.plugin</groupId>
<artifactId>javacc-maven-plugin</artifactId>
Expand All @@ -61,6 +66,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
</execution>
</executions>
</plugin>

<plugin>
<groupId>com.github.maven-nar</groupId>
<artifactId>nar-maven-plugin</artifactId>
Expand Down Expand Up @@ -108,6 +114,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
</execution>
</executions>
</plugin>

</plugins>
</build>
</project>
Loading

0 comments on commit 8f5e873

Please sign in to comment.