meharaj
meharaj

Reputation: 21

MAVEN: This project has been banned from the build due to previous failures

I am trying to add Oracle JDBC driver in Maven local repository using following command

mvn install:install-file -Dfile=C:\Users\Meharaj Fareedy\Downloads\ojdbc6.jar -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar

But getting . This project has been banned from the build due to previous failures.

Upvotes: 1

Views: 16019

Answers (4)

MTK
MTK

Reputation: 81

If you have used wrong formatted options in Options field in maven task of pipeline or passed optional arguments through Command Prompt for executing maven task. Then you will get above error. You need to check the correct syntax for the options you are passing to maven as per maven version.

NOTE: Different maven version have slightly different syntax. Please look below highlighted fields in screenshots.

ADO PIPELINE: enter image description here

THROUGH CMD: enter image description here

Upvotes: 0

Darshan Dalwadi
Darshan Dalwadi

Reputation: 1192

Please fix the previous failures means project is depends on the other module or other something which has errors.

You may get the idea by running command one by one don't mix two or more together to execute.

You will get your solution.

Upvotes: 0

Afgan
Afgan

Reputation: 1070

Remove space from your "Meharaj Fareedy" directory Or pass path in quotes like -

without space

mvn install:install-file -Dfile=C:\Users\MeharajFareedy\Downloads\ojdbc6.jar -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar

With quotes

mvn install:install-file -Dfile="C:\Users\MeharajFareedy\Downloads\ojdbc6.jar" -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar

Then it would work

Upvotes: 2

Essex Boy
Essex Boy

Reputation: 7950

Use a quotes for the filename

mvn install:install-file -Dfile="C:\Users\Meharaj Fareedy\Downloads\ojdbc6.jar" -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar

Upvotes: 0

Related Questions