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.
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?
In Grails 3 project we are using some dependencies as below. For the plugin or dependencies which has version it downloads as per version specification from remote repository. We assumed it is downloading the latest dependency available when we did not mention version, but when we checked the hibernate dependency it is downloading '4.3.10.6' version in the project whereas remote repository has latest version. So how does grails or gradle download dependencies without version?
compile "org.grails.plugins:hibernate"
compile "org.grails.plugins:cache"
compile "org.hibernate:hibernate-ehcache"
compile "org.grails.plugins:scaffolding"
compile "org.webjars:bootstrap:3.3.5"
compile "org.webjars:bootstrap-tagsinput:0.5"
Note : We don't have any errors or issues with this in our project
If no version is specified, Gradle will use transitive dependency management, starting with the Gradle version number, and the packages that that Gradle version depends on. If transitive dependency management doesn't care. Then Gradle will search through the hierarchy of repositories and flat files and flat trees and dependent projects and take the latest version.
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.
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
In the download section of primefaces there are 3 links:
binary
bundle
sources
I use primefaces 3.4.2 and would like to recompile one java class to fulfill my needs.
I downloaded the sources. Now I would like to recompile this class, but I don't know how to achieve that. How can I compile a primefaces source?
From primefaces site:
http://code.google.com/p/primefaces/wiki/BuildingFromSource
PrimeFaces uses maven as the build tool. There's a custom maven plugin to generate jsf artifacts. To begin you might need to check out and build PrimeFaces maven-jsf-plugin in case the version used is not available in Prime Repository.
svn checkout http://primefaces.googlecode.com/svn/maven/trunk/maven-jsf-plugin/ build
cd to the build and do a maven install
cd build
mvn install
Next thing to do is to build PrimeFaces itself, checkout the code with;
svn checkout http://primefaces.googlecode.com/svn/primefaces/trunk
cd to the primefaces folder and run maven build.
cd primefaces
mvn install
Component Development
PrimeFaces JSF plugin generates the necessary artifacts including component sources, faces-config.xml, and facelets taglib. Component developers only need to implement the Renderer classes of the components. Component metadata files are defined under src/main/resources-maven-jsf folder.
Checkout sources from repo. It is maven project, so build it with maven.