403 Forbidden when trying to install arcgis-java dependency with maven - java

I have followed the guide in https://developers.arcgis.com/java/latest/guide/get-the-sdk.htm but somehow I got this 404 forbidden error when trying to run mvn install to install the dependencies of my project (there's ArcGIS, and it's the core problem).
$ mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< redacted >-----------------------
[INFO] Building <redacted> 1.1
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from arcgis: https://esri.bintray.com/arcgis/com/esri/arcgisruntime/arcgis-java/100.8.0/arcgis-java-100.8.0.pom
Downloading from arcgis: https://esri.bintray.com/arcgis/com/esri/arcgisruntime/arcgis-java-jnilibs/100.8.0/arcgis-java-jnilibs-100.8.0.pom
Downloading from arcgis: https://esri.bintray.com/arcgis/com/esri/arcgisruntime/arcgis-java-resources/100.8.0/arcgis-java-resources-100.8.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.135 s
[INFO] Finished at: 2021-01-11T14:38:29+07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project <redacted>: Could not resolve dependencies for project <redacted>:jar:1.1: Failed to collect dependencies at com.esri.arcgisruntime:arcgis-java:jar:100.8.0: Failed to read artifact descriptor for com.esri.arcgisruntime:arcgis-java:jar:100.8.0: Could not transfer artifact com.esri.arcgisruntime:arcgis-java:pom:100.8.0 from/to arcgis (https://esri.bintray.com/arcgis): Authorization failed for https://esri.bintray.com/arcgis/com/esri/arcgisruntime/arcgis-java/100.8.0/arcgis-java-100.8.0.pom 403 Forbidden -> [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/DependencyResolutionException
When I tried to open the URL https://esri.bintray.com/arcgis/com/esri/arcgisruntime/arcgis-java/100.8.0/arcgis-java-100.8.0.pom in my browser, I also got that 404 forbidden error. I think the link is broken somehow?

I solved this by replacing the ArcGIS repo's URL from
https://esri.bintray.com/arcgis
to
https://esri.jfrog.io/artifactory/arcgis
in my project's pom.xml.
That repo URL (the latter) is used in ArcGIS Android installation guide, but somehow, the argis-java's documentation doesn't include this and instead include the former one which is broken (returns 404 forbidden error)
EDIT:
I just found an announcement about this issue, my bad, I didn't see this at the first time. So yes, they moved their repository from the former one to the latter. https://www.esri.com/arcgis-blog/products/developers/announcements/announcement-to-developers-using-arcgis-runtime-sdks-for-android-and-java/

Related

sam build is unable to locate the pom.xml file

I have a Maven Project which has a module 'AddUser'. This module is basically a sam application.
When trying to run the command 'sam build' from the project root path. I am getting the below error:-
in-iftekhar-04eb:UserPlanning iftekhar.khan$ sam build
2019-07-14 16:55:00 Building resource 'AddUserFunction'
2019-07-14 16:55:00 Running JavaMavenWorkflow:CopySource
2019-07-14 16:55:00 Running JavaMavenWorkflow:MavenBuild
Build Failed
Error: JavaMavenWorkflow:MavenBuild - Maven Failed: [INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.054 s
[INFO] Finished at: 2019-07-14T16:55:01+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/private/var/folders/f8/jgg9tzq97q39c_c2z1sn4blm0000gn/T/tmprn_uvw70). Please verify you invoked Maven from the correct directory. -> [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/MissingProjectException
The Complete Code can be found here - https://github.com/training-session-101/UserPlanning
Can anyone who has faced similar issue help me in this!
Thanks!
I had this problem. First I ran mvn clean install, then I changed the SAM template so that it didn't point to the jar but to the location of the pom.xml file, like so:
CodeUri: .
and then ran sam build.

Cant find desired archetype when creating new Maven project

I am trying to create a new Maven project in the terminal, using the following command:
mvn archetype:generate -DgroupId=com.my.domain -DartifactId=myproject -DarchetypeArtifactId=wildfly-javaee7-webapp-archetype -DinteractiveMode=false
So I am trying to use the Wildfly archetype wildfly-javaee7-webapp-archetype.
I am getting the following error...
[INFO] Generating project in Batch mode
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/archetypes/wildfly-javaee7-webapp-archetype/1.0/wildfly-javaee7-webapp-archetype-1.0.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.860 s
[INFO] Finished at: 2016-03-31T14:35:27+02:00
[INFO] Final Memory: 16M/188M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:generate (default-cli) on project standalone-pom: The desired archetype does not exist (org.apache.maven.archetypes:wildfly-javaee7-webapp-archetype:1.0) -> [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/MojoFailureException
... which means, that Maven is trying to download the archetype at https://repo.maven.apache.org which is not correct, because the archetype is provided by http://mvnrepository.com/artifact/org.wildfly.archetype.
How can I change the source or how can I add additional sources? Or am I missing something different?
You need to define the archetypeGroupId, otherwise, it will default to groupId of Maven default archetypes. Also, you need to define the archetypeVersion.
In this case, you need to have archetypeGroupId=org.wildfly.archetype and archetypeVersion=8.2.0.Final (for example).
Thus, you should have:
mvn archetype:generate -DgroupId=com.my.domain -DartifactId=myproject -DarchetypeGroupId=org.wildfly.archetype -DarchetypeArtifactId=wildfly-javaee7-webapp-archetype -DarchetypeVersion=8.2.0.Final -DinteractiveMode=false
As a side-note, repo.maven.apache.org and mvnrepository.com both are Maven Central and contain the same artifacts.
If anybody else is having problems following the accepted answer try to decrement the version to -DarchetypeVersion=8.1.0.Final

mvn appfuse:full-source not working because of subversion

I am new for maven. I have appfuse maven project and it is embedded. I wanted to make it as full-source, but it gave me following error:
Failed to execute goal org.appfuse.plugins:appfuse-maven-plugin:3.0.0:full-source (default-cli) on project OOS: svn: PROPFIND request failed on '/svn/appfuse~svn/tags/APPFUSE_3.0.0/data/common/src'
I have searched solution for this and found this information and applied that solution given in the site: adding
<trunk>https://svn.java.net/svn/appfuse~svn/</trunk>
inside of appfuse configuration tag. After adding this line to my pom.xml file, i have tried to run mvn appfuse:full-source, but it gave me the same error.
full stack is here:
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.mycompany:OOS:war:1.0-SNAPSHOT
[WARNING] 'dependencies.dependency.exclusions.exclusion.artifactId' for org.springmodules:spring-modules-validation:jar with value '*' does not match a valid id pattern. # line 363, column 33
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building AppFuse Spring MVC Application 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- appfuse-maven-plugin:3.0.0:full-source (default-cli) # OOS ---
[INFO] [AppFuse] Installing source from data-common module...
[ERROR] 175002 : svn: PROPFIND request failed on '/svn/appfuse~svn/tags/APPFUSE_3.0.0/data/common/src'
[ERROR] 175002 : svn: svn.java.net: Name or service not known
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.743s
[INFO] Finished at: Fri Oct 10 15:53:55 UZT 2014
[INFO] Final Memory: 10M/144M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.appfuse.plugins:appfuse-maven-plugin:3.0.0:full-source (default-cli) on project OOS: svn: PROPFIND request failed on '/svn/appfuse~svn/tags/APPFUSE_3.0.0/data/common/src'
[ERROR] svn: svn.java.net: Name or service not known
[ERROR] -> [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
I have deleted whole repository directory in my .m2 folder, but did not help.
I wanted to check the link https://svn.java.net/svn/appfuse~svn/ but it asked username/password for entering. I think, this also can be a cause. I am using Ubuntu and tried to install subversion form Software center, but was no use: still the same problem.
I hope someone have faced this type of issue and will share.
Finally, I have figured it out. The problem was with mysql db. I was using default configurations in my project's pom.xml and by default it uses mysql dbms. It has connected with db and created all tables in mysql, but hasn't started the project. but, when i have changed db profile to postgresql, it has worked like a charm. I haven't understand why, but the appfuse maven project has some conflicts with mysql dbms.

jenkins Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.3.2:prepare (default-cli)

[INFO] Verifying that there are no local modifications...
[INFO] ignoring changes on: **/pom.xml.backup, **/release.properties, **/pom.xml.branch, **/pom.xml.next, **/pom.xml.releaseBackup, **/pom.xml.tag
[INFO] Executing: /bin/sh -c cd /opt/Jenkins/ic/jenkins/jobs/util/workspace && git status
[INFO] Working directory: /opt/Jenkins/ic/jenkins/jobs/util/workspace
[INFO] Checking dependencies and plugins for snapshots ...
[INFO] Transforming 'my_proyect'...
[INFO] Not generating release POMs
[INFO] Executing goals 'clean verify'...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:23.375s
[INFO] Finished at: Wed Jan 22 15:21:16 ECT 2014
[JENKINS] Archiving /opt/Jenkins/ic/jenkins/jobs/util/workspace/pom.xml to xx.xxx.xxxx/my_proyect/1.0.2-SNAPSHOT/my_proyect-1.0.2-SNAPSHOT.pom
[INFO] Final Memory: 16M/246M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.3.2:prepare (default-cli) on project my_proyect: Could not create temporary file for release settings.xml: Permission denied -> [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
channel stopped
Finished: FAILURE
I need help.
When built a snapshot does not give me problems, but if I want to generate a release I get the above log.
I have the jenkins 1.548
maven 3.1.1
nexus 2.7.0-0
Jenkins + maven-release-plugin + settings.xml = painful
Check the following locations for any mention or overrides of settings.xml file:
Jenkins
instance-level config
general Maven section
Maven release plugin section
job-level config
general Maven section
Maven release plugin section
pom.xml file
maven-release-plugin section
profiles section
In addition, things can get fussy depending on how you're running the job in Jenkins:
freestyle job with Maven goals
Maven job using regular "Build" button with "release:prepare" goals
Maven build using "Run Maven Release" button
Try experimenting with different job types.

what's the matter about appfuse,please

when run the command:mvn jetty:run in the web directory,it's the error message:
[WARNING] The POM for com.mycompany:core:jar:1.0-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.015s
[INFO] Finished at: Mon Sep 05 23:31:23 CST 2011
[INFO] Final Memory: 5M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project web: Could not resolve dependencies for project com.mycompany:web:war:1.0-SNAPSHOT: Failure to find com.myco
mpany:core:jar:1.0-SNAPSHOT in http://oss.sonatype.org/content/repositories/appfuse-snapshots was cached in the local repository, resolution will not
be reattempted until the update interval of appfuse-snapshots has elapsed or updates are forced -> [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/DependencyResolutionException
It looks like you have appfuse multi-module web project and you are building the web module without having built/installed the core module.
Quoting the instruction from appfuse quickstart, highlighting relevant portion in bold.
To view your application run mvn jetty:run from your project's
directory (for a modular project, you'll need to run mvn jetty:run
from your project's web directory (after installing the core module)).
You need to run mvn install from the project's root directory also!
In your situation, you definitely need to mvn install from your core directory. If this does not help, then run the same command from root directory. The problem is that one of Your modules needs to be installed and only after that the error you are encountering will be removed.

Categories