You want to reformat json file ... why not using jq in exec-maven-plugin ? Arnaud
Le dim. 8 nov. 2020 à 19:14, David Hoffer <dhoff...@gmail.com> a écrit : > Yeah I was trying to use com.google.code.maven-replacer-plugin but I don't > think that can replace with the variable content found in what is to be > removed. > > I'm not familiar with Ant ReplaceRegExp can anyone suggest how to do the > replacement? > > -Dave > > On Sun, Nov 8, 2020 at 10:19 AM Bernd Eckenfels <e...@zusammenkunft.net> > wrote: > > > You can use the antrun plugin to run a ant search and replace, or you an > > call a jruby or groovy script. Or is the exec plugin to run a java class. > > The resources plugin can replace placeholders, but that does not sound > like > > the right tool for your case. > > > > Gruss > > Bernd > > -- > > http://bernd.eckenfels.net > > ________________________________ > > Von: David Hoffer <dhoff...@gmail.com> > > Gesendet: Sunday, November 8, 2020 6:00:41 PM > > An: Maven Users List <users@maven.apache.org> > > Betreff: Maven plugin to replace text in file > > > > Hi, > > > > I need to process a file during the build to replace constructs like > this: > > > > "allOf": [ > > { > > "$ref": "#/definitions/Eligibility" > > } > > ], > > > > to be: > > > > "$ref": "#/definitions/Eligibility", > > > > Where the $ref can point to anything. How can I do this sort of writing > > custom code? > > > > -Dave > > >