grep-maven-plugin-parent

parent project for the maven grep plugin

License

License

Categories

Categories

Maven Build Tools Net
GroupId

GroupId

net.radai
ArtifactId

ArtifactId

grep-maven-plugin-parent
Last Version

Last Version

1.1
Release Date

Release Date

Type

Type

pom
Description

Description

grep-maven-plugin-parent
parent project for the maven grep plugin
Project URL

Project URL

https://github.com/radai-rosenblatt/grep-maven-plugin
Source Code Management

Source Code Management

https://github.com/radai-rosenblatt/grep-maven-plugin

Download grep-maven-plugin-parent

How to add to project

<!-- https://jarcasting.com/artifacts/net.radai/grep-maven-plugin-parent/ -->
<dependency>
    <groupId>net.radai</groupId>
    <artifactId>grep-maven-plugin-parent</artifactId>
    <version>1.1</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/net.radai/grep-maven-plugin-parent/
implementation 'net.radai:grep-maven-plugin-parent:1.1'
// https://jarcasting.com/artifacts/net.radai/grep-maven-plugin-parent/
implementation ("net.radai:grep-maven-plugin-parent:1.1")
'net.radai:grep-maven-plugin-parent:pom:1.1'
<dependency org="net.radai" name="grep-maven-plugin-parent" rev="1.1">
  <artifact name="grep-maven-plugin-parent" type="pom" />
</dependency>
@Grapes(
@Grab(group='net.radai', module='grep-maven-plugin-parent', version='1.1')
)
libraryDependencies += "net.radai" % "grep-maven-plugin-parent" % "1.1"
[net.radai/grep-maven-plugin-parent "1.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

  • grep-maven-plugin

grep-maven-plugin

a maven plugin that greps through files and prints the results

usage example:


<build>
    <plugins>
        <plugin>
            <groupId>net.radai</groupId>
            <artifactId>grep-maven-plugin</artifactId>
            <version>1.0-SNAPSHOT</version>
            <executions>
                <execution>
                    <goals>
                        <goal>grep</goal>
                    </goals>
                    <phase>test</phase>
                    <configuration>
                        <greps>
                            <grep>
                                <file>src/main/resources/file.txt</file>
                                <grepPattern>prop1</grepPattern>
                            </grep>
                            <grep>
                                <file>src/main/resources/archive.zip/directory/file.txt</file>
                                <grepPattern>prop1</grepPattern>
                                <outputPattern>found in file ${fileName} at line ${lineNumber} : ${line}</outputPattern>
                            </grep>
                        </greps>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

failing the build if a pattern if found/not-found:


<grep>
    <failIfFound>true</failIfFound>
    ...or...
    <failIfNotFound>true</failIfNotFound>
</grep>

to use this you will need to add the Sonatype OSS repository to your maven project:


<pluginRepositories>
   <pluginRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/groups/public</url>
   </pluginRepository>
</pluginRepositories>

Versions

Version
1.1
1.0