3

I have a multi-module project that I'm trying to import in my Ubuntu 12.04 LTS's Eclipse Juno. (I already have done it successfully on Windows 7).

My project has six modules, the first four modules are successfully imported from the SVN Repository and built with Maven 3.0.5, but when I try to build the fifth called core, i receive the following error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1:war (default-war) on project core: Could not copy resource [/opt/workspace/core/target\preassembly]: File /opt/workspace/core/target\preassembly/scripts/Mask.js does not exist -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[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

As the error says, It looks like that Maven can't find the directory /opt/workspace/core/target\preassembly to copy the file /opt/workspace/core/target\preassembly/scripts/Mask.js.

But, this directory actually exists and the file Mask.js is in there. What looks strange to me is that backslash \ after target directory instead a common bar /. But I have no idea if this is a problem and how to solve it, I spent 2 days researching the Internet but unfortunately I've found nothing.

Here's my maven-war-plugin configuration section of parent project's pom.xml, where the backslashes appear

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>2.1</version>
                    <configuration>
                        <webResources>
                            <resource>
                                <directory>${project.build.directory}\preassembly</directory>
                            </resource>
                        </webResources>
                    </configuration>
                </plugin>

I've also checked the owner of the directories on Ubuntu, and everything refers to the same owner that worked on the first four modules.

As I said above, the same version of eclipse, svn and maven works great on Windows.

Anyone ever had this problem? Thank you very much.

4

1 回答 1

0

我正在研究 angular 8 并将代码更新为 angular 9,然后在构建过程中我遇到了同样的问题。对我来说,clean build 解决了这个问题。你可以尝试 clean build,希望这会有所帮助。

于 2020-02-27T07:11:47.700 回答