xdev-software / find-and-replace-maven-plugin

A maven plugin for replacing content in files, filenames and directories.
Apache License 2.0
4 stars 0 forks source link
find-and-replace maven plugin

Latest version Build Quality Gate Status Plugin docs

find-and-replace-maven-plugin

A maven plugin for replacing content in files, filenames and directories.

[!NOTE] This is a fork of floverfelt/find-and-replace-maven-plugin with some additional functionality.

Usage

A short usage guide is available in the plugin docs.

Example: Replace underscores with hyphen

<plugin>
   <groupId>software.xdev</groupId>
   <artifactId>find-and-replace-maven-plugin</artifactId>
   <executions>
      <execution>
         <id>replace-underscore-with-hyphen</id>
         <phase>process-sources</phase>
         <goals>
            <goal>file-contents</goal>
         </goals>
         <configuration>
            <baseDir>testing/</baseDir>
            <fileMask>test.txt</fileMask>
            <findRegex>_</findRegex>
            <replaceValue>-</replaceValue>
         </configuration>
      </execution>
   </executions>
</plugin>
Replace contents of auto-generated files (OpenAPI generator) ```xml software.xdev find-and-replace-maven-plugin remove-unused-import-com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider process-sources file-contents ${generatedDirRelative}/software/xdev/${componentName}/client/ ApiClient.java ^import com\.fasterxml\.jackson\.jaxrs\.json\.JacksonJsonProvider;(\r?\n) false remove-generated-annotation process-sources file-contents ${generatedDirRelative}/software/xdev/${componentName}/ true .java ^@jakarta\.annotation\.Generated.*(\r?\n) false false remove-serialVersionUID process-sources file-contents ${generatedDirRelative}/software/xdev/${componentName}/ true .java ^.*serialVersionUID.*(\r?\n)(\s*\r?\n)? false false ```

Installation

Installation guide for the latest release

Support

If you need support as soon as possible and you can't wait for any pull request, feel free to use our support.

Contributing

See the contributing guide for detailed instructions on how to get started with our project.

Dependencies and Licenses

View the license of the current project or the summary including all dependencies