Help me please.
After I had run command from console in Idea:
git reset --hard HEAD~1
I had problem with dependency in my project.
I can succesfully run next for project from console in Idea:
mvn clean install
but when I'm trying to do Build->Build Project in Idea there is the Error:(3, 1) java: package com.xxxxx.xx.xxxxx does not exist. I tried to execute maven -> reimport whole project and only this module, but it cannot help.
Related
I'm trying tu buld projetct with DL4J .
I did the following steps from ths website : https://deeplearning4j.konduit.ai/getting-started/quickstart
When I do this command mvn clean install
I get the following error :
It looks like you modified something? Sorry if I'm not quite following what you did, but that error message indicates a missing pom.xml.
The specific steps you follow are:
Clone the repository
git clone https://github.com/eclipse/deeplearning4j-examples
cd in to the directory
cd deeplearning4j-examples/dl4j-examples
Run mvn clean install -DskipTests
mvn clean install -DskipTests
What I think could have happened here is you were in the root of the project. The deeplearning4j examples actually do not have a root pom.xml. We used to, but that took too long for people just getting started.
Of note here as well is another submodule in the project:
https://github.com/eclipse/deeplearning4j-examples/tree/master/mvn-project-template
This contains the default getting started project.
The dl4j-examples contain samples for different use cases. Please pay attention to that when looking at both.
Hopefully this helps!
I have an application that loads plugins on startup (daemon). In a subpackage (daemon/interfaces), I have a few interfaces that plugins for this program should use.
This means that the main program also gets imported by the plugin.
I am using Go modules (for both the main program and the plugin) to fix the versions, and I can see in go.mod that it is using the latest version of the main program for the plugin.
I can build them both fine, but when I load the plugin it gives me an error saying
panic: plugin.Open("plugins/my-plugin"): plugin was built with a different version of package daemon/interfaces
I am using Go 1.12.7 to build both of the packages.
I fixed this by adding a replace statement to my plugin go.mod file
module github.com/user/plugin
go 1.12
require (
github.com/user/daemon v1.1.1
)
replace github.com/user/daemon v1.1.1 => ../local/path/to/daemon/
It also helps when you are building the project from outside of the directory where the source code is in by using the full name of the project (go build github.com/user/project/)
There is a related Github issue on the Golang repository that you can find here
Apparently, the issue is still open. The issue opener presented the workaround, which I was able to use. Please look at the history lines below for details.
git clone https://github.com/zimnx/central.git
git clone https://github.com/zimnx/plugins.git
cd central/
go clean -modcache
git checkout v1.0.0
go install -a
cd ../plugins/
rm go.mod
go mod init github.com/zimnx/plugins
echo '' >> go.mod
echo 'replace github.com/zimnx/central => ../central' >> go.mod
go build -buildmode=plugin -o plugin.so
central plugin.so
Works for me. Mistery still... :) The output has been saved for the most curious.
I am trying to follow this example but I found one problem. I am trying to compile ODL controller but the files structure have changed compared to the previous versions and I don't know in what path I have to be to compile the controller.
I am following
git clone https://git.opendaylight.org/gerrit/p/controller.git
Check that the used Yang tools version is >= 0.5.8-SNAPSHOT.
But I have 0.8.0 (downloaded today in the same link).
And then I have to do this to compile the ODL controller:
cd controller/opendaylight/distribution/opendaylight
mvn clean install
But this path doesn exist on the version I have donwloaded.
¿In what directory I have to be to run the mvn clean install?
The ping example wiki is old and outdated. That was back when everything was in the controller project except for yangtools and before ODL was converted to use karaf. So the controller/opendaylight/distribution/opendaylight directory is long gone. So if you want to create and run the ping example, you would create a karaf feature and run the karaf distro in the controller project. You can follow what is done with the toaster sample and its associated wiki which is pretty up-to-date: https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL:Toaster_Step-By-Step.
just run 'mvn clean install' in the root dir (so, the "controller" dir).
also, to be safe, I'd delete your "repository" directory in your .m2
dir (usually, in ~/.m2/repository).
Finally, make sure your mvn .settings.xml file is correct. here's a
link for that.
I have recently forked and cloned a repositroy from GitHub that uses Gradle, but I am unable to execute any Gradle tasks.
It fails on:
def process = 'git rev-parse --short HEAD'.execute()
with:
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\Joseph\Desktop\Minecraft\ObsidianSuite\ForgeGradle\ForgeGradle\build.gradle' line: 286
* What went wrong:
A problem occurred evaluating root project 'ForgeGradle'.
> Cannot run program "git": CreateProcess error=2, The system cannot find the file specified
I am running Windows 10, and have Git working with MinGW. I have set the path variable to include (C:\Program Files\Git\cmd) such that I can run Git from command prompt. The Git command that is called by the build.gradle file executes fine if I run it from the command line, it is just not working when run through the Gradle wrapper.
Any help or advice would be much appreciated; I am able to answer any questions that might help work out what the issue is. Thanks.
EDIT: I normally use Git by running git-bash in the relevant folder rather than git from command prompt.
I have found a solution, it doesn't provide an answer to why it wasn't working originally, but gives a work around.
I followed this answer to install GitHub for Windows and changed the old Git path variable to the one the tutorial suggested. Although I don't want to use the GitHub software (I like doing everything via git-bash), at least Gradle is happy with it now.
Not sure if this is the same problem.
I am using Android studio here. When gradlew build is executed, def process = 'git rev-parse --short HEAD'.execute() returns empty, but there is no problem in local execution.
Solution:
The solution is: modify the jdk path used by gradlew, use java jdk. (Do not use the sdk that comes with android studio)
Screenshot:
enter image description here
Please, don't call executables from Java/Groovy/Gradle/etc. There are many java/groovy libraries to deal with Git repositories, including Gradle plugins
I'm trying to create a .bat file for automatic building of a multimodule maven project, the script is :
mvn clean install
cd ./webapp
mvn jetty:run-war
However, the first line seem to close the console window, so I never get to the last line. Thank you in advance.
call mvn clean install
cd ./webapp
call mvn jetty:run-war