无法执行目标org.apache.maven.plugins:maven-antrun-plugin:1.8:run(fixProperties)

时间:2016-04-10 19:01:20

标签: maven maven-3 maven-plugin maven-antrun-plugin

无法编译,因为它会抛出编译错误

无法执行目标org.apache.maven.plugins:maven-antrun-plugin:1.8:在项目flin-web-core上运行(fixProperties):发生了Ant BuildException:无法替换表达式。 围绕蚂蚁部分...... @ 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>

栈跟踪

  

org.apache.maven.lifecycle.LifecycleExecutionException:失败   执行目标org.apache.maven.plugins:maven-antrun-plugin:1.8:运行   项目flin-web-core上的(fixProperties):Ant BuildException具有   发生:   C:\ petprojects \ SYSTEM \ SYSTEM \树干\ FLIN-web的芯\目标\产生来源   不存在。围绕蚂蚁部分...... @ 4:42 in   C:\ petprojects \ SYSTEM \ SYSTEM \干线\ FLIN-Web的核心\目标\ antrun \集结的main.xml           在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)           在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)           在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)           在org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)           在org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)           在org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)           在org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)           在org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)           在org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)           在org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)           在org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)           在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)           在java.lang.reflect.Method.invoke(Method.java:597)           在org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)           在org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)           在org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)           在org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)   引起:org.apache.maven.plugin.MojoExecutionException:一个Ant   发生了BuildException:   C:\ petprojects \ SYSTEM \ SYSTEM \树干\ FLIN-web的芯\目标\产生来源   不存在。围绕蚂蚁部分...... @ 4:42 in   C:\ petprojects \ SYSTEM \ SYSTEM \干线\ FLIN-Web的核心\目标\ antrun \集结的main.xml           在org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:342)           在org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)           在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)           ... 19更多引起:C:\ petprojects \ system \ system \ trunk \ glin-web-core \ target \ antrun \ build-main.xml:4:   C:\ petprojects \ SYSTEM \ SYSTEM \树干\ GLIN-web的芯\目标\产生来源   不存在。           at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:484)           在org.apache.tools.ant.types.FileSet.iterator(FileSet.java:69)           在org.apache.tools.ant.types.resources.Union.getAllResources(Union.java:148)           在org.apache.tools.ant.types.resources.Union.getCollection(Union.java:108)           at org.apache.tools.ant.types.resources.BaseResourceCollectionContainer.cacheCollection(BaseResourceCollectionContainer.java:263)           在org.apache.tools.ant.types.resources.BaseResourceCollectionContainer.iterator(BaseResourceCollectionContainer.java:142)           在org.apache.tools.ant.taskdefs.optional.ReplaceRegExp.execute(ReplaceRegExp.java:548)           在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)           在java.lang.reflect.Method.invoke(Method.java:597)           在org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)           at org.apache.tools.ant.Task.perform(Task.java:348)           在org.apache.tools.ant.Target.execute(Target.java:435)           在org.apache.tools.ant.Target.performTasks(Target.java:456)           在org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)           在org.apache.tools.ant.Project.executeTarget(Project.java:1364)           在org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:313)           ... 21更多[错误] [错误] [错误]有关错误和可能的解决方案的更多信息,请阅读以下文章:   [错误] [帮助1]   http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException   [错误] [错误]纠正问题后,您可以恢复   使用命令[ERROR] mvn -rf:flin-web-core

进行构建

0 个答案:

没有答案
相关问题