How to import Primefaces's into Eclipse as source code

百般思念 提交于 2019-12-25 06:06:17

问题


Recently Primefaces moved from Google Code to GitHub, so theoretically it's possible to fork its repository, make changes and submit a pull requests. I'd tried but I'm stuck.

As I understand I should import Primefaces into Eclipse as a separate Java Project and define in my JSF project dependency to it rather then to primefaces.jar.

I have tried to download it from GitHub as a zip file and import as maven project into Eclipse but get error that it requires maven-jsf-plugin plugin.

Could not calculate build plan: Plugin org.primefaces:maven-jsf-plugin:1.3.2 or one of its dependencies could not be resolved: Failure to find org.primefaces:maven-jsf-plugin:jar:1.3.2 in http://maven.repository.redhat.com/techpreview/all/ was cached in the local repository, resolution will not be reattempted until the update interval of redhat-techpreview-all-repository has elapsed or updates are forced

Ok, I can import it manually and add dependency later, so I continued installation and downloaded a dependency but get a bunch of errors:

For example class DialogActionListener located at path src.main.java.org.primefaces.application but according to source code should be located at package org.primefaces.application;

In *.xml files there's an error The markup in the document following the root element must be well-formed.

I suspect that I'm on a wrong direction but can't find out the right direction.


回答1:


I've found your question and this solution when I was facing the same problem, I hope it helps someone else (It might be a little late for you): Adding the following snippet to the pom.xml solves the issue.

<pluginRepositories>
    <pluginRepository>
        <id>primeFaces_repository</id>
        <url>http://repository.primefaces.org/</url>
    </pluginRepository>
</pluginRepositories>



回答2:


The problem is well described in the PrimeFaces repository's Wiki:

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.

Build and Install maven-jsf-plugin

git clone https://github.com/primefaces/maven-jsf-plugin.git

cd to the maven-jsf-plugin directory

cd maven-jsf-plugin
mvn clean install


来源:https://stackoverflow.com/questions/30247933/how-to-import-primefacess-into-eclipse-as-source-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!