Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow local JavaRosa to be used with one change #5755

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

seadowg
Copy link
Member

@seadowg seadowg commented Oct 2, 2023

Allows JavaRosa to be debugged again now that we have multiple modules relying on it.

@seadowg seadowg marked this pull request as ready for review October 2, 2023 08:22
@grzesiek2010
Copy link
Member

grzesiek2010 commented Oct 2, 2023

Does it really work for you? First of all I had to fix deprecated gradle features getodk/javarosa#732 to run ./gradlew installLocal

but still when I try to build apk in Collect I get:

> Could not resolve all files for configuration ':metadata:debugCompileClasspath'.
   > Could not resolve org.getodk:javarosa:local.
     Required by:
         project :metadata
      > Could not resolve org.getodk:javarosa:local.
         > Could not get resource 'https://api.mapbox.com/downloads/v2/releases/maven/org/getodk/javarosa/local/javarosa-local.pom'.
            > Could not GET 'https://api.mapbox.com/downloads/v2/releases/maven/org/getodk/javarosa/local/javarosa-local.pom'. Received status code 401 from server: Unauthorized

[EDIT] I didn't have MAPBOX_DOWNLOADS_TOKEN set in secrets.properties but this should not be required.

Still after adding the token I get errors:

Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find org.getodk:javarosa:local.

  - file:/home/user/collect/.local-m2/org/getodk/javarosa/local/javarosa-local.pom
  - file:/home/user/collect/.local-m2/org/getodk/javarosa/local/javarosa-local.jar
  - https://dl.google.com/dl/android/maven2/org/getodk/javarosa/local/javarosa-local.pom
  - file:/home/user/.m2/repository/org/getodk/javarosa/local/javarosa-local.pom
  - https://repo.maven.apache.org/maven2/org/getodk/javarosa/local/javarosa-local.pom
  - https://oss.sonatype.org/content/groups/public/org/getodk/javarosa/local/javarosa-local.pom
  - https://jitpack.io/org/getodk/javarosa/local/javarosa-local.pom
  - https://staging.dev.medicmobile.org/_couch/maven-repo/org/getodk/javarosa/local/javarosa-local.jar
  - https://api.mapbox.com/downloads/v2/releases/maven/org/getodk/javarosa/local/javarosa-local.pom
Required by:
    project :collect_app
    project :collect_app > project :metadata

@seadowg
Copy link
Member Author

seadowg commented Oct 3, 2023

Does it really work for you? First of all I had to fix deprecated gradle features getodk/javarosa#732 to run ./gradlew installLocal

Yeah it does. I was able to just use JavaRosa master as well to do a installLocal. It looks from getodk/javarosa#732 like installLocal is still failing for you though, so I guess it would make sense for the JavaRosa JAR not to be in your local maven repo (file:/home/user/.m2/).

@grzesiek2010
Copy link
Member

installLocal is still failing for you though, so I guess it would make sense for the JavaRosa JAR not to be in your local maven repo (file:/home/user/.m2/).

I forced installLocal to work by removing maven-javadoc-plugin then it works well and I think the lack of that plugging shouldn't cause problems like those above right?

@grzesiek2010
Copy link
Member

Ok I tracked down the problem.
I used sudo ./gradlew installLocal becasue otherwise I got permission errors and files ended up in /root/.m2/... not is /home/user/.m2/.... I solved that by adding user permissions to the whole javarosa folder and not using sudo.

The problem with mapbox token also disappeared so maybe it was somehow connected...

@grzesiek2010 grzesiek2010 merged commit a6d5f84 into getodk:master Oct 3, 2023
6 checks passed
@seadowg seadowg deleted the fix-javarosa-debug branch October 3, 2023 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants