Go - use of internal package [...] not allowed - windows

I tried to clone and build the project from the stellar bridge-server github repository. After quite a lot of steps I am facing following errors:
[ERROR] github.com\stellar\go\services\bridge\internal\handlers\main.go:8:2: use of internal package github.com/stellar/go/services/bridge/internal/db not allowed
[ERROR] github.com\stellar\go\services\bridge\internal\handlers\main.go:9:2: use of internal package github.com/stellar/go/services/bridge/internal/listener not allowed
[ERROR] github.com\stellar\go\services\bridge\internal\handlers\main.go:10:2: use of internal package github.com/stellar/go/services/bridge/internal/submitter not allowed
( ... many more issues of same format ... )
I imported the dependencies and different packages but when I try to compile and install it I get this errors. I moved some folders to their upper folder to have a same directory as in repo wished but the errors are still the same.
I'm pretty confused and do not understand this problem. I'm totaly new in packaging directory system.
What is the problem here and what should I do?
Thank you for your help.

Related

NuGet hash validation failed NU1403

I have a solution and it working on other developer's laptops, but on one by some reason during build, I see the next error:
Error NU1403 Package content hash validation failed for
Lucene.Net.Contrib.3.0.3. The package is different than the last
restore.
build is failed by this reason.
at packeges folder I see correct Lucene.Net.Contrib.3.0.3 , what could be a reson for it and how to fix ?
clean up the global packaged folder fixed this issue.
path is %userprofile%.nuget\packages

Jenkins Travis-CI build fails in cli module (shade fails)

I am running a custom Jenkins 2.263.4 build on Travis-CI. We need a fix with relative pathes that never made it into the Jenkins core...well for us it is mandatory.
Based on release 2.263.4 I applied the fix in core/SecretRewriter.java and core/VirtualFile.java and also changed the version name to give it branding. This worked very well in the past releases. But the last update we did was one year ago.
Now I am running into the error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.2.1:shade (default) on project cli: Error creating shaded jar: duplicate entry: META-INF/services/io.jenkins.cli.shaded.org.apache.sshd.common.io.IoServiceFactoryFactory -> [Help 1]
I am not able to understand it at all.
Travis-CI is here: https://travis-ci.com/github/DanielWeber/jenkins
GitHub: https://github.com/DanielWeber/jenkins
I was not able to find this exact problem from somewhere else. I tried a bit with the shade config to set
<minimizeJar>false</minimizeJar>
and similar small things, but didn't really help.
My change is so small, I don't really understand what's happening.
If nothing helps, I might consider doing changes step by step then, rather than just merging the releae to our for, but hope someone sees the problem.
The issue is that the build is being execute two times based on the mvn install followed by mvn package which is defined in travis.yml file. This causes the issue.

How to download dependencies using Bazel?

I am new to Bazel. I need to download external dependency jar files using Bazel. Where to configure to download external jar files. I tried to add jar files in BUILD and WORKSPACE files , but not working.
Workspace file
maven_server(name="myserver",url="https://mvnrepository.com/artifact/org.apache.flink/flink-java")
maven_jar(name="flink-java",artifact="org.apache.flink:filnk-java:jar:1.2.0",server="myserver")
bind(name="flink-java",actual="#flink-java//jar")
Build file
java_binary(
name="read_files",
srcs = glob(["ReadFiles.java"]),
main_class="com.ibm.cdo.gts.contracts.pipeline.preprocess.ReadFiles",
deps=["//external:flink-java"],
)
The logical mistake you have there is that the workspace name (flink-java) is illegal see here and here. What is needed is to change the - to _ in maven_jar and of course the reference in the bind.
maven_jar(name="flink_java",artifact="org.apache.flink:flink-java:jar:1.2.0")
bind(name="flink-java",actual="#flink_java//jar")
Two more mistakes you had in the above were:
In the artifact coordinates you wrote filnk-java when you needed flink-java
The mvnrepository URL you used doesn't seem to be legal. I tried a few variants but couldn't get it to work. Additionally from the site they seem to link downloads to Maven Central itself so I'm not sure they server the jars. Having said that since Bazel fallbacks to Maven Central I just omitted the maven_server and the build passes. If you need help with the maven_server part and you need to use a private Maven repository please double check the URL first.
PS: It would have really helped if you added to your question the Bazel outputs since I needed to create my own workspace to know what were the problems you encountered.

unable to build dcm4chee-arc-cdi

I'm trying to build dcm4chee-arc-cdi with code cloned from github: https://github.com/dcm4che/dcm4chee-arc-cdi
However when issuing the build command as described at the README.md
mvn install -D db=psql I get the following error:
[ERROR] Failed to execute goal on project dcm4chee-arc-conf: Could
not resolve dependencies for project
org.dcm4che.dcm4chee-arc:dcm4chee-arc-conf:jar:4.5.0-SNAPSHOT: The
following artifacts could not be resolved:
org.dcm4che:dcm4che-conf-api:jar:3.3.8-SNAPSHOT,
org.dcm4che:dcm4che-conf-dicom:jar:3.3.8-SNAPSHOT,
org.dcm4che:dcm4che-imageio:jar:3.3.8-SNAPSHOT,
org.dcm4che:dcm4che-net-hl7:jar:3.3.8-SNAPSHOT,
org.dcm4che:dcm4che-conf-api-hl7:jar:3.3.8-SNAPSHOT,
org.dcm4che:dcm4che-soundex:jar:3.3.8-SNAPSHOT,
org.dcm4che.dcm4chee-storage:dcm4chee-storage-service:jar:2.1.0-SNAPSHOT:
Failure to find org.dcm4che:dcm4che-conf-api:jar:3.3.8-SNAPSHOT in
http://www.dcm4che.org/maven2 was cached in the local repository
Does anybody have a suggestion on how to overcome this?
thanks
It seems that some other projects needed to be built before dcm4chee-arc-cdi.
Those were:
The dcm4che 3 library ( https://github.com:dcm4che/dcm4che )
The configuration layer ( https://github.com/dcm4che/dcm4chee-conf )
The storage layer ( https://github.com/dcm4che/dcm4chee-storage2 )
The monitoring framework ( https://github.com/dcm4che/dcm4chee-monitoring )
Seems the release repository (http://www.dcm4che.org/maven2/) is not holding the expected versions.
Take dcm4che-conf-api-hl7 for example. Its declared version (3.3.8-SNAPSHOT) does not exist in http://www.dcm4che.org/maven2/org/dcm4che/dcm4che-conf-api-hl7/
I guess the others are similar errors.
I suggest you contact one of the project's contributors like Umberto Cappellini
For a temp solution, you can edit the main pom.xml and replace the missing versions with actual versions you find in the repository I mentioned above.
I hope this helps.

Tycho missing plugin when building an update site

When I build my project by tycho-maven-plugin, I encounter the following message:
[ERROR] Cannot resolve project dependencies:
[ERROR] Software being installed: foo-updatesite raw:0.2.0.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):0.2.0-SNAPSHOT
[ERROR] Missing requirement for filter properties ~= $0: foo-feature.feature.group 0.2.0.qualifier requires 'foo-plugin 0.0.0' but it could not be found
[ERROR] Cannot satisfy dependency: foo-updatesite raw:0.2.0.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):0.2.0-SNAPSHOT depends on: foo-feature.feature.group [0.2.0,0.2.1)
This error occurs when building an update site. Plugin and feature are build normally. I build the update site from PDE without issues.
The project structure is common: there is a parent project with pom packaging and three modules: plugin, feature and updatesite. Of course, I invoke mvn clean package from the parent project.
What can be the reason for this error? How can I debug it?
UPD: I tried many things: removed "grandparent" pom, removed SNAPSHOT/qualifier, played with configuration. However, I found the solution: I switched to tycho 0.19 instead of 0.21. So I suppose there is a bug in tycho 0.21.
The error message
Missing requirement for filter properties ~= $0
indicates that you have defined an environment filter when you include the plugin foo-plugin in the feature.xml. However this does not explain the dependency resolution error you are seeing. The only way I can reproduce the error message is by adding an Eclipse-PlatformFilter header in the manifest of the plugin using a value which doesn't match environments configuration in the POM.
I had the same error message:
Missing requirement for filter properties ~= $0: foo-feature.feature.group 0.2.0.qualifier requires 'foo-plugin 0.0.0' but it could not be found
For some reason this error (also) means, that foo-plugin is present... twice.
So in your case, open the "Content" tab of the "Target Editor" and make sure that foo-plugin is not present in two distinct versions. I common way this could happen is if two features contain the same bundle.

Resources