finos / rune-dsl

The project containing the Rune DSL grammar and default code generators
Apache License 2.0
27 stars 30 forks source link

Trouble building DSL - rosetta.jar:7.9.3 not found #724

Closed brianlynn2 closed 8 months ago

brianlynn2 commented 9 months ago

Hi -

I've cloned the latest version of rosetta-dsl and tried to run "mvn clean install".

I got the following error:

Failed to execute goal on project com.regnosys.rosetta: Could not resolve dependencies for project com.regnosys.rosetta:com.regnosys.rosetta:jar:0.0.0.master-SNAPSHOT: Could not find artifact com.regnosys.rosetta:com.regnosys.rosetta:jar:7.9.3 in ossrh (https://s01.oss.sonatype.org/content/repositories/snapshots/)

It seems like it might be a problem with my local cache, but blowing away my com.regnosys.rosetta cache and retrying didn't fix the problem. Any suggestions?

SimonCockx commented 9 months ago

Hi @brianlynn2

I'm not sure - this looks strange. Note that this is (almost) definitely a local issue, since the CI builds are working. You could maybe try with a clean Maven repository, e.g., mvn clean install -Dmaven.repo.local=<path to temporary directory>?

brianlynn2 commented 9 months ago

Hi @SimonCockx -

Yes, it does seem like it could be a local issue. However, I tried your suggestion and got the same result. (Just slower). I also tried renaming my .m2 folder to something else to force a cache reload (in case that might be different from your suggestion) but with the same results.

I'm wondering if it is some kind of permissions issue with accessing a repo, but it seems like the repos are open. Any other suggestions?

Any other suggestions? Could it be an issue with my environment, like mvn or java?

SimonCockx commented 9 months ago

I don't get the error message. It seems like the build of com.regnosys.rosetta:jar:0.0.0.master-SNAPSHOT is failing because it relies on com.regnosys.rosetta:jar:7.9.3, which does not make sense at all.

Are you doing a full mvn clean install of the parent module, or just of the com.regnosys.rosetta (rosetta-lang) module?

SimonCockx commented 9 months ago

You could try running a mvn dependency:tree to figure out where the faulty com.regnosys.rosetta:jar:7.9.3 dependency is coming from.

brianlynn2 commented 9 months ago

I get the error in both the rosetta-dsl root folder (I guess the parent project) and in the rosetta-lang subfolder. In rosetta-ide I get a different error about xtend sources not being available. Didn't try any others.

I did try mvn dependency:tree and found something interesting:

[WARNING] The POM for com.regnosys.rosetta:com.regnosys.rosetta:jar:7.9.3 is missing, no dependency information available

There is a pom.xml in both the root folder and the rosetta-lang folder.

Am I missing another project or folder?

SimonCockx commented 9 months ago

You aren't missing anything. Do you see occurences of com.regnosys.rosetta:jar:7.9.3 in any of the dependency trees?

That dependency is the culprit. It shouldn't exist. When building locally there should only be dependencies on com.regnosys.rosetta:jar:0.0.0.master-SNAPSHOT.

brianlynn2 commented 9 months ago

The only mention of 7.9.3 is in the following bit of the dependency tree:

[INFO] [INFO] -------------< com.regnosys.rosetta:com.regnosys.rosetta >-------------- [INFO] Building Rosetta DSL SDK 0.0.0.master-SNAPSHOT [4/9] [INFO] --------------------------------[ jar ]--------------------------------- [WARNING] The POM for com.regnosys.rosetta:com.regnosys.rosetta:jar:7.9.3 is missing, no dependency information available [INFO] [INFO] --- maven-dependency-plugin:3.6.1:tree (default-cli) @ com.regnosys.rosetta --- [INFO] com.regnosys.rosetta:com.regnosys.rosetta:jar:0.0.0.master-SNAPSHOT [INFO] +- com.regnosys.rosetta:com.regnosys.rosetta.lib:jar:0.0.0.master-SNAPSHOT:compile [INFO] | +- org.eclipse.xtend:org.eclipse.xtend.lib:jar:2.27.0:compile [INFO] | | - org.eclipse.xtend:org.eclipse.xtend.lib.macro:jar:2.27.0:compile [INFO] | +- com.google.inject:guice:jar:5.0.1:compile [INFO] | | +- javax.inject:javax.inject:jar:1:compile [INFO] | | +- aopalliance:aopalliance:jar:1.0:compile [INFO] | | - com.google.guava:guava:jar:30.1-jre:compile [INFO] | | +- com.google.guava:failureaccess:jar:1.0.1:compile [INFO] | | +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile [INFO] | | +- com.google.code.findbugs:jsr305:jar:3.0.2:compile [INFO] | | +- org.checkerframework:checker-qual:jar:3.5.0:compile [INFO] | | +- com.google.errorprone:error_prone_annotations:jar:2.3.4:compile [INFO] | | - com.google.j2objc:j2objc-annotations:jar:1.3:compile [INFO] | +- org.apache.commons:commons-lang3:jar:3.14.0:compile [INFO] | - com.fasterxml.jackson.core:jackson-databind:jar:2.16.0:compile [INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.16.0:compile [INFO] | - com.fasterxml.jackson.core:jackson-core:jar:2.16.0:compile [INFO] +- org.eclipse.emf:org.eclipse.emf.ecore:jar:2.20.0:compile [INFO] | - org.eclipse.emf:org.eclipse.emf.common:jar:2.17.0:compile [INFO] +- org.eclipse.xtext:org.eclipse.xtext:jar:2.27.0:compile [INFO] | +- org.eclipse.xtext:org.eclipse.xtext.util:jar:2.27.0:compile [INFO] | +- org.eclipse.platform:org.eclipse.equinox.common:jar:3.13.0:compile [INFO] | +- org.eclipse.platform:org.eclipse.osgi:jar:3.16.0:compile [INFO] | +- org.eclipse.emf:org.eclipse.emf.ecore.xmi:jar:2.16.0:compile [INFO] | - org.antlr:antlr-runtime:jar:3.2:compile [INFO] +- org.eclipse.xsemantics:org.eclipse.xsemantics.runtime:jar:1.22.0:compile [INFO] | - org.eclipse.xtext:org.eclipse.xtext.xbase.lib:jar:2.27.0:compile [INFO] +- org.eclipse.emf:org.eclipse.emf.ecore.xcore.lib:jar:1.6.0:compile [INFO] +- org.apache.commons:commons-text:jar:1.11.0:compile [INFO] +- com.regnosys.rosetta:com.regnosys.rosetta:jar:7.9.3:compile [INFO] +- org.junit.jupiter:junit-jupiter:jar:5.10.1:test [INFO] | +- org.junit.jupiter:junit-jupiter-api:jar:5.10.1:test [INFO] | | +- org.opentest4j:opentest4j:jar:1.2.0:test [INFO] | | +- org.junit.platform:junit-platform-commons:jar:1.10.1:test [INFO] | | - org.apiguardian:apiguardian-api:jar:1.1.2:test [INFO] | +- org.junit.jupiter:junit-jupiter-params:jar:5.10.1:test [INFO] | - org.junit.jupiter:junit-jupiter-engine:jar:5.10.1:test [INFO] | - org.junit.platform:junit-platform-engine:jar:1.10.1:test [INFO] +- ch.qos.logback:logback-classic:jar:1.4.14:test [INFO] | - org.slf4j:slf4j-api:jar:2.0.9:compile [INFO] +- ch.qos.logback:logback-core:jar:1.4.14:test [INFO] - org.slf4j:log4j-over-slf4j:jar:2.0.9:compile [INFO]

I've attached the full tree as an attached file depend.txt

brianlynn2 commented 9 months ago

I found a dependency on rosetta.jar:7.9.3 in pom.xml in rosetta-lang, at line 58. I commented it out and now it seems to build.

Thanks for the help!

SimonCockx commented 9 months ago

No trouble, glad you got it working.

Looking at the master branch, I see this at line 58: https://github.com/REGnosys/rosetta-dsl/blob/31c6cef285bc53dae8bb5ab38f68e934826c75e7/rosetta-lang/pom.xml#L58 which does not correspond with your comment that the rosetta.jar:7.9.3 dependency is present at that location.

Are you sure you did not modify this file after cloning this project? I'm trying to understand what happened.

brianlynn2 commented 8 months ago

Huh, that's strange. I have not edited any files in the project, at least not intentionally. I did originally clone the project some weeks ago, and I refreshed it several times, most recently in the last day or two. But I see that the pom file I have is slightly different from the one in version control, with the extra dependency (now commented out). So something happened that my version got out of sync. (Because I hadn't made any changes that I was aware of, it didn't occur to me to compare my local version to the version in git.)

Sorry for the confusion, and thanks for the help.

brianlynn2 commented 8 months ago

Issue resolved; closing.