microsoft / azuredevopslabs

Learn how you can plan smartly, collaborate better, and ship faster with a set of modern development services with Azure DevOps.
https://www.azuredevopslabs.com
MIT License
826 stars 920 forks source link

POM file Error in Managing Open-source security and license with WhiteSource lab #547

Closed Test-bip closed 3 years ago

Test-bip commented 3 years ago

I got the below-mentioned error in Maven Tasks in the Build Pipeline. Can’t understand this issue, I think the source code needs to update, please suggest. Do I have to update my POM File for this Project?

[ERROR] Plugin org.apache.tomcat.maven:tomcat7-maven-plugin:2.3-SNAPSHOT or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.tomcat.maven:tomcat7-maven-plugin:jar:2.3-SNAPSHOT: Could not transfer artifact org.apache.tomcat.maven:tomcat7-maven-plugin:pom:2.3-SNAPSHOT from/to maven-default-http-blocker (https://0.0.0.0/): Blocked mirror for repositories: [apache.snapshots (https://repository.apache.or…, default, releases+snapshots)] -> [Help 1]

Whitesource_error

vnextcoder commented 3 years ago

I also had this issue and I discovered that pom.xml and webgoat-container/pom.xml both have a dependency that is unresolved in the internal Azure DevOps Maven Repository. Moreover, the Maven Repository URL in the pom.xml is http based as below: -

             <id>apache.snapshots</id>
+            <url>https://repository.apache.org/snapshots/</url>
-            <url>http://repository.apache.org/snapshots/</url>

It is just that Azure DevOps denies any http://0.0.0.0 connectivity to Maven repositories so that's why the error.

I ended up updated my both Pom.xml files regarding the above problems to fix the Build issue and I was able to generate a nice WhiteSource bolt Report out of this.

whitesource report

Test-bip commented 3 years ago

Thanks, it worked now

sriramdasbalaji commented 3 years ago

Thank you @vnextcoder for the fix. We will update in the template source code.

Thanks