3

Unable to compile as it throws an compilation error

Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (fixProperties) on project flin-web-core: An Ant BuildException has occurred: Nothing to replace expression with. around Ant part ...... @ 4:42

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-antrun-plugin</artifactId>
    <executions>
        <execution>
            <id>fixProperties</id>
            <phase>generate-sources</phase>
            <goals>
                <goal>run</goal>
            </goals>
            <configuration>
                <tasks>
                    <replaceregexp byline="true" flags="g">
                        <regexp pattern="([^'])'([^'])" />
                        <substitution expression="\1''\2" />
                        <fileset dir="${project.build.directory}/generated-sources"> 
                            <include name="ApplicationResources_*.properties" /> 
                        </fileset>
                    </replaceregexp>
                </tasks>
            </configuration>
        </execution>
    </executions>
</plugin>

StackTrace

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (fixProperties) on project flin-web-core: An Ant BuildException has occured: C:\petprojects\system\system\trunk\flin-web-core\target\generated-sources does not exist. around Ant part ...... @ 4:42 in C:\petprojects\system\system\trunk\flin-web-core\target\antrun\build-main.xml at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216) at org.apache.maven.cli.MavenCli.main(MavenCli.java:160) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: org.apache.maven.plugin.MojoExecutionException: An Ant BuildException has occured: C:\petprojects\system\system\trunk\flin-web-core\target\generated-sources does not exist. around Ant part ...... @ 4:42 in C:\petprojects\system\system\trunk\flin-web-core\target\antrun\build-main.xml at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:342) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) ... 19 more Caused by: C:\petprojects\system\system\trunk\glin-web-core\target\antrun\build-main.xml:4: C:\petprojects\system\system\trunk\glin-web-core\target\generated-sources does not exist. at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:484) at org.apache.tools.ant.types.FileSet.iterator(FileSet.java:69) at org.apache.tools.ant.types.resources.Union.getAllResources(Union.java:148) at org.apache.tools.ant.types.resources.Union.getCollection(Union.java:108) at org.apache.tools.ant.types.resources.BaseResourceCollectionContainer.cacheCollection(BaseResourceCollectionContainer.java:263) at org.apache.tools.ant.types.resources.BaseResourceCollectionContainer.iterator(BaseResourceCollectionContainer.java:142) at org.apache.tools.ant.taskdefs.optional.ReplaceRegExp.execute(ReplaceRegExp.java:548) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:435) at org.apache.tools.ant.Target.performTasks(Target.java:456) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393) at org.apache.tools.ant.Project.executeTarget(Project.java:1364) at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:313) ... 21 more [ERROR] [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn -rf :flin-web-core

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
Sri Chin
  • 31
  • 1
  • 4

0 Answers0