1

I am using Maven build tool and Team Foundation Server in my J2EE project. while I am doing the maven clean for the project, build success But when I am doing the maven install for the same project build is a success but in eclipse console, I am getting an error like

The item $/ProjConnect/Main/source/ProjWeb/target/test.war already exists

I am new to maven and Team Foundation Server.

Is this error regarding maven or Team Foundation Server? and Please help me to resolve this error.

Srinivas Gadilli
  • 342
  • 6
  • 25
  • Did you run the build through TFS such as using [Maven task](https://www.visualstudio.com/en-us/docs/build/steps/build/maven)? Or you just use TFS as a source control tool to store your code? – PatrickLu-MSFT May 30 '17 at 02:04

1 Answers1

0

The clean phase, per convention, is meant to make a build reproducible, i.e. it cleans up anything that was created by previous builds. In most cases it does that by calling clean:clean, which deletes the directory bound to ${project.build.directory} (usually called "target")

According to the error, the $/ProjConnect/Main/source/ProjWeb/target/test.war should generated by a previous build. Without clean option the file will not deleted during the build pipeline. More details please take a look at this question: How is "mvn clean install" different from "mvn install"?

PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62