Skip to content

Commit

Permalink
[#18] Added Automatic-Module-Name to jars
Browse files Browse the repository at this point in the history
  • Loading branch information
vbmacher committed Dec 21, 2023
1 parent 61dec82 commit 1db5ab0
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 97 deletions.
29 changes: 19 additions & 10 deletions cup-maven-plugin/pom.xml
Expand Up @@ -5,7 +5,7 @@
<groupId>com.github.vbmacher</groupId>
<artifactId>cup-maven-plugin</artifactId>
<packaging>maven-plugin</packaging>
<version>11b-20160615-2</version>
<version>11b-20160615-3</version>

<name>Java CUP Maven Plugin</name>
<description>Maven plug-in for executing Java CUP library</description>
Expand Down Expand Up @@ -101,7 +101,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<version>3.1.0</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand All @@ -119,7 +119,7 @@
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
Expand All @@ -137,14 +137,14 @@
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-http</artifactId>
<version>3.5.2</version>
<version>3.5.3</version>
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<version>3.12.0</version>
<configuration>
<source>${compiler.source}</source>
<target>${compiler.target}</target>
Expand All @@ -154,21 +154,30 @@
</build>

<dependencies>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.10.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>3.8.6</version>
<version>3.9.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<type>jar</type>
<version>3.8.5</version>
<version>3.9.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.2.1</version>
<artifactId>maven-core</artifactId>
<version>3.9.6</version>
<scope>provided</scope>
</dependency>

<dependency>
Expand All @@ -181,7 +190,7 @@
<dependency>
<groupId>com.github.vbmacher</groupId>
<artifactId>java-cup</artifactId>
<version>11b-20160615-2</version>
<version>11b-20160615-3</version>
</dependency>
</dependencies>

Expand Down
Expand Up @@ -21,6 +21,9 @@

import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;

import java.io.File;
Expand All @@ -29,211 +32,163 @@

/**
* Goal which generates java files from cup files.
*
* @goal generate
* @requiresProject true
* @phase generate-sources
*/
@SuppressWarnings("unused")
@Mojo(name = "generate", defaultPhase = LifecyclePhase.GENERATE_SOURCES)
public class GoalGenerate extends AbstractMojo implements CupParameters {
public static final String DEFAULT_CUP_DIR = "src/main/cup";

/**
* A flag whether to output the symbol constant code as an interface rather
* than as a class.
*
* @parameter default-value="true"
* @editable
*/
@Parameter(defaultValue = "true")
private boolean symbolsInterface;

/**
* Grammar definition to run the cup parser generator on.
* <p/>
* By default, a `parser.cup` file in <code>src/main/cup</code> will be
* processed.
*
* @parameter
* @editable
*/
@Parameter
private File cupDefinition;

/**
* Parser class name.
*
* @parameter default-value="parser"
* @editable
*/
@Parameter(defaultValue = "parser")
private String className;

/**
* Symbol class name.
*
* @parameter default-value="sym"
* @editable
*/
@Parameter(defaultValue = "sym")
private String symbolsName;

/**
* Name of the directory into which cup should generate the parser.
*
* @parameter property="${project.build.directory}/generated-sources/cup"
* @editable
*/
@Parameter(defaultValue = "${project.build.directory}/generated-sources/cup")
private File outputDirectory;

/**
* @parameter property="project"
* @required
* Maven project
*/
@Parameter(property = "project", readonly = true, required = true)
private MavenProject project;

/**
* Package name.
*
* @parameter
* @editable
*/
@Parameter
private String packageName;

/**
* Produce a human readable dump of the symbols and grammar.
*
* @parameter default-value="false"
* @editable
* Produce a human-readable dump of the symbols and grammar.
*/
@Parameter(defaultValue = "false")
private boolean dumpGrammar;

/**
* Produce a dump of parse state machine
*
* @parameter default-value="false"
* @editable
*/
@Parameter(defaultValue = "false")
private boolean dumpStates;

/**
* Produce a dump of the parse tables
*
* @parameter default-value="false"
* @editable
*/
@Parameter(defaultValue = "false")
private boolean dumpTables;

/**
* Print time usage summary
*
* @parameter default-value="false"
* @editable
*/
@Parameter(defaultValue = "false")
private boolean time;

/**
* Print messages to indicate progress of the system
*
* @parameter default-value="false"
* @editable
*/
@Parameter(defaultValue = "false")
private boolean progress;

/**
* Don't refer to java_cup.runtime.Scanner
*
* @parameter default-value="false"
* @editable
*/
@Parameter(defaultValue = "false")
private boolean noScanner;

/**
* Don't propagate the left and right token position values
*
* @parameter default-value="false"
* @editable
*/
@Parameter(defaultValue = "false")
private boolean noPositions;

/**
* Don't print the usual summary of parse states, etc.
*
* @parameter default-value="true"
* @editable
*/
@Parameter(defaultValue = "true")
private boolean noSummary;

/**
* Don't warn about useless productions, etc.
*
* @parameter default-value="false"
* @editable
*/
@Parameter(defaultValue = "false")
private boolean noWarn;

/**
* Compact tables by defaulting to most frequent reduce
*
* @parameter default-value="false"
* @editable
*/
@Parameter(defaultValue = "false")
private boolean compactRed;

/**
* Number of conflicts expected/allowed
*
* @parameter default-value="0"
* @editable
*/
@Parameter(defaultValue = "0")
private int expectedConflicts;

/**
* Put non terminals in symbol constant class
*
* @parameter default-value="false"
* @editable
* Put non-terminals in symbol constant class
*/
@Parameter(defaultValue = "false")
private boolean nontermsToSymbols;

/**
* Specify type arguments for parser class
*
* @parameter
* @editable
*/
@Parameter
private String typeArgs;

/**
* The granularity in milliseconds of the last modification date for testing
* whether a source needs regeneration.
*
* @parameter property="lastModGranularityMs"
* @editable
*/
@Parameter(property = "lastModGranularityMs")
private int staleMillis;

/**
* Makes CUP generate xleft/xright handles for accessing Location objects for symbol start/end inside actions.
*
* @parameter default-value="false"
* @editable
*/
@Parameter(defaultValue = "false")
private boolean locations;

/**
* Makes CUP generate generic actions that produce XMLElement-objects for any symbol, that is labeled by the CUP spec author.
*
* @parameter default-value="false"
* @editable
*/
@Parameter(defaultValue = "false")
private boolean xmlActions;

/**
* This option goes one step further then `<xmlActions/>` by producing the full parse tree as XMLElement-tree.
*
* @parameter default-value="false"
* @editable
*/
@Parameter(defaultValue = "false")
private boolean genericLabels;

/**
* Executer the "generate" goal.
* Executes the "generate" goal.
*
* @throws MojoExecutionException if any error occurs during parser generation
*/
Expand Down
Binary file modified java-cup-runtime/java-cup-11b-runtime.jar
Binary file not shown.
8 changes: 4 additions & 4 deletions java-cup-runtime/pom.xml
Expand Up @@ -6,7 +6,7 @@

<groupId>com.github.vbmacher</groupId>
<artifactId>java-cup-runtime</artifactId>
<version>11b-20160615-2</version>
<version>11b-20160615-3</version>
<packaging>jar</packaging>

<name>Java CUP Runtime Maven Package</name>
Expand Down Expand Up @@ -54,7 +54,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<version>3.1.0</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand All @@ -72,7 +72,7 @@
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
Expand All @@ -99,7 +99,7 @@
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-http</artifactId>
<version>3.5.2</version>
<version>3.5.3</version>
</extension>
</extensions>

Expand Down
Binary file modified java-cup/java-cup-11b.jar
Binary file not shown.

0 comments on commit 1db5ab0

Please sign in to comment.