How can I compile a primefaces source? - jsf-2

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.

Related

How to use GitVersion.Msbuild version 5.10.3 and GitVersion.Msbuild version 5.10.2 in the same solution

I have a solution that has two class libraries lets say A.csproj and B.csproj. Library A is in .NET Framework 4.8 and library B is in .netstandard2.0. A is using GitVersion.Msbuild 5.10.3 and if I try to use the same package version for library B then the build fails in the azure pipeline. But if I use GitVersion.Msbuild 5.10.2 (or any other lower version) for library B, then the build gets successfully run in the azure pipeline.
I am using below import statements in the csproj files.
For .NET Framework:
<Import Project="..\common\packages\GitVersion.MsBuild.5.10.3\build\GitVersion.MsBuild.props" Condition="Exists('..\common\packages\GitVersion.MsBuild.5.10.3\build\GitVersion.MsBuild.props')" />
For .netstandard2.0:
<Import Project="..\common\packages\GitVersion.MsBuild.5.10.2\build\GitVersion.MsBuild.props" Condition="Exists('..\common\packages\GitVersion.MsBuild.5.10.2\build\GitVersion.MsBuild.props')"/>
While restoring the packages only GitVersion.MsBuild.5.10.3 folder is created locally for .NET Framework library but GitVersion.MsBuild.5.10.2 is not getting created locally for .netstandard2.0 library. If this folder gets created then the solution will get build in both local and azure pipeline.
So in summary I want to use two different versions of GitVersion.Msbuild:- version 5.10.3 for .NET Framework and version 5.10.2 for .netstandard2.0 libaries. I want GitVersion.MsBuild.5.10.2 package folder also to be created inside ..\common\packages.
P.S.: Both the libraries are present in the same solution.
I have tried manually adding the GitVersion.MsBuild.5.10.2 folder in ..\common\packages but that is not the right way and if I remove it, while restoring the nuget packages doesn't get created for .netstandard libraries. Even I tried using the dotnet restore command from the command line that also did not create the package folder.
It should not require you to install multiple version of the same package and also having .NET Framework 4.8 and .netstandard2.0 projects should not create any problem. You have to build and restore the .netstandard libraries separately in the azure pipeline. In the yml file just add the below task:
- task: DotNetCoreCLI#2
displayName: 'Restore netstandard libraries'
inputs:
command: 'restore'
projects: '**/*.csproj'
nugetConfigPath: '$(ProjectName)\$(NugetConfigPath)'
env:
ARTIFACTORY__API_KEY: $(ARTIFACTORY__API_KEY)

How to build the Java wrapper for OpenCV 3.0?

I am using OpenCV 3.0 in my Java application through the opencv-300.jar and opencv_java300.dll. They come with the standard installation. But some extra modules are not in the standard installation. So I build an OpenCV 3.0 with the opencv-contrib repo.
But the build generates about 40 binaries. How can I generate something like opencv-300.jar and opencv_java300.dll for Java adoption? Do I need to turn to SWIG or something?
We can build OpenCV + extra modules with VS2013.
Extra modules can be downloaded from: https://github.com/Itseez/opencv_contrib/releases
Run "cmake-gui.exe" in VS2013 command prompt.
Click the "Configure" button.
Select VS2013 as the generation templaet.
Modify the config entries as necessary.
Click "Generate" to generate the VS2013 project files.
Open the generated project files and build.
Ref:
(*) http://answers.opencv.org/question/66571/how-to-build-the-java-wrapper-for-opencv-30/
http://answers.opencv.org/question/66630/javalangunsatisfiedlinkerror-when-using-binaries-built-from-source/
https://stackoverflow.com/questions/31508130/keypoints-was-cleared-after-descriptoerextractor

Build Eclipse Feature Project using ANT

I am new to Plugin development and hence facing this issue.
I have 2 plugin projects and both the projects are part of a feature project. I want to set up an ANT build which could build the feature project and publish it to an URL or File system.
Here is the scenario:
Plugin Project A isDependentOn -> Plugin Project B.
For both these project, I wrote build files which builds them properly.
Now I created a Feature project and included both these plugins into it. However I am not able to correctly write the ANT build file or may be I am not sure of the complete process.
Any help would be greatly appreciated.
Thanks in advance. Cheers !!!
Its better use Maven with Tycho to build eclipse features and plugins in headless mode.
Refer the link Eclipse Tycho and Using Tycho

How to add project dependency (classes from another module/folder) in Grails?

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

How to build project dependencies from source jar-s with maven

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.

Resources