I have two dependencies that I need, they both created a module called U256 with different addresses. is there a way to fix this dependency conflict?
Unable to resolve package dependency 'U256': Conflicting dependencies found: package 'U256' conflicts with 'U256'"
The address system of aptos module is based on {address}::{module_name}::{struct_name}.
Here U256 you mentioned here is just for {struct_name}.
I think you have some misunderstanding on importing correct dependency.
Related
I am trying to build maven package and get a error:
Missing requirement: org.talend.designer.codegen 8.8.8.qualifier requires 'osgi.bundle; org.talend.repository 0.0.0' but it could not be found
But OK, org.talend.repository is another package in the parent directory.
But all my maven compilations was failed on "osgi.bundle" dependency.
Where can I get this dependency and how can I install it.
i've encountered a weird dependency convergency error while maven-enforcer-plugin is complaining about dependency convergency error on my direct dependency.
For example:
A -- B:1.0
|
-- C:1.0
|
-- B:1.1
A is my project and i specify B:1.0 as A's direct dependency in A's pom file. However, A also depends on C:1.0, which has a transitive dependency on B:1.1. Now maven is complaining about convergency error on B:1.0 and B:1.1.
In my understanding, once i specified a direct dependency in the master pom, we will stick to the version all the way for our project?
In this example, it should be B:1.0 that will be used by the project.
Am i understanding it incorrectly?
Thanks
To resolve convergence Errors, put the chosen dependency version into <dependencyManagement>.
A direct dependency will not resolve this kind of error.
I have two Maven Modules loaded in the same IntelliJ project. One module has a dependency on the other one. If I change the version of it, then my second module can't resolve the dependency anymore, except I explicitly run a mvn install first.
Can IntelliJ not resolve Maven dependencies from source modules when modules are loaded within the same project?
Sorry, I'm stupid, with correctly group and artifact ids .... works much better !
I need to use a java class from project A in Project B. I believe I wrote the package and import successfully but I still get a message when compiling (./gradlew clean build) saying:
java:3: `error: package x.x.x.x.x.common.api.filter does not exist`
Next, I tried to create a module dependency within IntelliJ, by importing the new package as a Module and rewriting the package and import statement to reflect the imported package (module dependency) but I am still seeing the same error.
java:3: error: package x.x.x.x.x.common.api.filter does not exist
Would this be an issue with the build.gradle file? Or my setting up of the module dependency?
How can I resolve?
The problem is with build.gradle configuration and is not related to the IDE.
You should define the dependencies between the projects as described in Gradle documentation.
Another possible solution is Composite Builds.
If I have all types of modules in my project (application, automatic and unnamed) how exactly Maven will work with them?
Can I enforce Maven to treat some jars as automatic modules whereas other modules to stay in classpath. How to gradually migrate to module system with Maven?
Maven just manages your dependencies (jars). It doesn't care if dependencies are java modules or not.
The only way how Maven can help is if you launch your application through Maven (ex. mvn spring-boot:run) then you can add some JVM parameters like --add-modules.
If you are wondering about automatic and unnamed modules it's all depends how you launch your application, there are two ways how you can do that:
Launch your application from module code:
Since a module must require all of its dependencies and those can only be fulfilled by other named modules (i.e. not JARs on the class path) all dependencies of a modular JAR must be placed on the module path. Yes, even non-modular JARs, which will then get turned into automatic modules.
The interesting thing is that automatic modules can read the unnamed module, so their dependencies can go on the class path.
Launch your application from non module code:
and because non-modular code does not express any dependencies, it will not resolve modules from the module path.
So if non-modular code depends on artifacts on the module path, you need to add them manually with the --add-modules option.
For example if you want to use ServiceLoader.load(Foo.class); and you compile your application from non-modular code you'll have to add provider module of the Foo class explicity to module graph with --add-modules.
Note from The State of the Module System:
If a package is defined in both a named module and the unnamed module then the package in the unnamed module is ignored.