I converted a Java project to maven project. But there are still maven dependencies not in the build path. There maven dependencies do not show up in the lib path.
Once you have converted your project to maven (i.e) you have to do the following in eclipse:
Right Click on your and select Maven --> Update Project
This will rebuild your eclipse and all dependencies that is defined in that project pom.xml will be added to your build path under Maven Dependencies.
In general all your dependencies will be downloaded to .m2 folder in your system. This will generally be inside your home directory unless you change it in the settings.xml.
Related
I prefer the IntelliJ project format for a Kotlin/JVM project. I.e. the dependencies and other project information is kept in files within the .idea directory:
Using IntelliJ IDEA I run tests and create an uber-JAR artifact for deployment.
Questions:
How can I build and test a IntelliJ Kotlin/JVM project on Jenkins? Is there a plug-in available that can handle the IntelliJ project format?
Or do I have to duplicate the project's information in a gradle file?
is anyone knows how to change the jre libraries on java dynamic web project(I am using Eclipse and Maven)? The case is this, when I first created the project on Eclipse Oxygen package M5 the default jre was 1.6, I changed the Java Build Path(libraries) into 1.7/1.8, however upon updating the project it always returns to 1.6 and there is a red mark on the project folder. I already tried deleting the project and import it as Existing Maven Project and then update and clean but still nothing happens. This happens whenever I am creating a project without XML based configuration. I installed JDK 1.8.0 update 111, 121, and 131 and Apache Tomcat V7(XAMPP). On my brother's laptop everything works fine.
By the way, I also tried to replace .m2 folder of my laptop by copying .m2 folder from my brother's laptop.
Any help is much appreciated.
I assume you are using m2e, the Maven integration for Eclipse, which offers the import as Existing Maven Project option. m2e takes the version for the JRE System Library container from the configuration of the maven-compiler-plugin; this ensures that Eclipse and mvn behave consistently. Try changing the <source> and <target> configuration options of the maven-compiler-plugin, maybe followed by a Maven > Update Project to make sure m2e has sync’ed the changes to the pom.xml with the Eclipse buildpath.
I mistakenly added some jars to Grails dependencies using Java build path dialogue of GGTS.
Now I want to remove them.
But the build path dialogue offers no chance to do so.
Just remove the project from eclipse, delete .project and .classpath files. regenerate eclipse files using command grails integrate-with --eclipse and import the project again and you classpath should be good.
Is there a way for me to add dependencies from other folders/projects(non-grails, but definitely java projects) into my grails project? I've tried searching but didn't really get much of an answer. :(
You can use every possible library which is in a maven repository. So transform your java project to a maven or gradle project. Install your builded jar to maven repo and then you can add dependency in grails-app/conf/BuildConfig.groovy.
dependencies {
compile "your.group:your.artifact:1.0"
}
You have to get the code into your project somehow.
These are the options:
JAR
Package your module as a jar file and copy this to your project's lib/ directory.
source code
Copy the source code for your module into src/java/
Maven Artifact
Package your module as a maven artifact, and specify it in the dependencies closure of grails-app/conf/BuildConfig.groovy.
Read more in the grails documentation at http://grails.org/doc/latest/guide/conf.html#configurationsAndDependencies
I have a project, which is building with maven 3. While building project maven downloads a lot of dependencies (jars). I want to build all this dependencies from source-jars, which I get from maven repository with maven dependency plugin.
But this source jars doesn't contain any pom or other things for building. How I can build them with maven??
You can't. You need to get the source from the project's source repository. The source-jars are just for helping developers debug dependencies.