我尝试了一些东西,但仍然存在这个问题.我正在使用Eclipse Kepler.我在导入maven项目时遇到以下错误
无法安装JavaServer Faces 2.2:尚未满足一个或多个约束
JavaServer Faces 2.2需要动态Web模块2.5或更高版本
1)我尝试使用Java Server Faces 1.2中的Maven Java EE配置标记中提到的一些东西,但没有运气.2)我也进入.settings并修改了org.eclipse.wst.common.project.facet.core.xml并修改了jst.web以指向2.5或3.0版本; 但我得到一些其他错误.
我试图让煎茶GXT例子行家/ Eclipse构建工作的基础上http://neiliscoding.blogspot.ie/2012/05/how-to-setup-examples-for-use-in-gxt-3.html和让这个javaserver在eclipse中遇到问题.这是我的pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<!-- POM file generated with GWT webAppCreator -->
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>xx</artifactId>
<groupId>ss</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>guis</artifactId>
<packaging>war</packaging>
<name>GWT Maven Archetype</name>
<properties>
<!-- Convenience property to set the GWT version -->
<gwtVersion>2.5.1</gwtVersion>
<!-- GWT needs at least java 1.5 -->
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.google.gwt.inject</groupId>
<artifactId>gin</artifactId>
<version>2.1.2</version>
</dependency>
<dependency>
<groupId>javax</groupId> …Run Code Online (Sandbox Code Playgroud) 我是maven的新手,花了大约3天时间使用汇编插件生成zip文件,参考http://www.petrikainulainen.net/programming/tips-and-tricks/creating-a-runnable-binary-distribution-with- maven-assembly-plugin /我的项目是多模块的,所以我也提到使用Maven程序集插件管理多模块依赖项
我还有几个效率低下的问题.下面是assembly.xml(我从第一个链接继承)
<assembly>
<id>bin</id>
<!-- Generates a zip package containing the needed files -->
<formats>
<format>zip</format>
</formats>
<!-- Adds dependencies to zip package under lib directory -->
<dependencySets>
<dependencySet>
<!-- Project artifact is not copied under library directory since it is
added to the root directory of the zip package. -->
<useProjectArtifact>false</useProjectArtifact>
<outputDirectory>lib</outputDirectory>
<unpack>false</unpack>
</dependencySet>
</dependencySets>
<moduleSets>
<moduleSet>
<!-- Enable access to all projects in the current multimodule build! <useAllReactorProjects>true</useAllReactorProjects> -->
<!-- Now, select which …Run Code Online (Sandbox Code Playgroud) 我试图在eclipse/kepler(java)中使用logback-beagle.据我所知,目前不支持,如下所列(?).
http://marketplace.eclipse.org/content/logback-beagle#.Uv1cGPldWK8
我仍然继续安装插件,不要在windows-preferences下看到它.是否有替代方法可以获得类似的功能(颜色编码和从日食中的slf4j/log4j的日志输出导航)或者我可以为eclipse(?)制作beagle插件.我不明白为什么eclipse想要在市场上拥有它,但在安装后没有出现在首选项中
在R环境中使用钻石包/数据集的简单方法是什么?我是新手使用RStudio(3.0)
> install.packages("diamonds")
Warning in install.packages :
package ‘diamonds’ is not available (for R version 3.0.0)
Warning in install.packages :
package ‘diamonds’ is not available (for R version 3.0.0)
Run Code Online (Sandbox Code Playgroud)
我不想下载和重建R,如以下线程中所述, 无法使用install.packages安装R-forge软件包
我正在尝试将drools6.0用于现有的代码库(它是eclipse下的maven项目).我以前没有必要学习流口水或者maven(尽管它们是我之前项目的一部分),足以说我迷失了我想做的事情.根据我的理解(谷歌搜索),java类文件被绑定到基于包名称(?)的规则.这会解决编译时问题.但我在运行时看到空指针异常.为了让drools适应我现有的代码库:I 1)创建了helloworld drools项目,成功运行它2)将java文件复制到我现有的包中,3)在Eclipse中使用正确的包创建规则文件:FIle-> New-> other - >规则资源; 3)通过右键单击项目并将configure-> convert转换为drools项目,将现有项目转换为drools包
这一切都处理编译问题,但我得到以下运行时错误
[main] ERROR org.drools.compiler.kie.builder.impl.KieContainerImpl - Unknown KieSession name: ksession-rules
java.lang.NullPointerException
at main.java.com.harmonia.cbm.afloat.dataaquisition.dql.DroolsTest.main(DroolsTest.java:23)
Run Code Online (Sandbox Code Playgroud)
这是因为从kcontainer返回的ksession为null,并在最后一行抛出空指针异常
KieServices ks = KieServices.Factory.get();
KieContainer kContainer = ks.getKieClasspathContainer();
KieSession kSession = kContainer.newKieSession("ksession-rules");
// above line is returning null
Message message = new Message();
message.setMessage("Hello World");
message.setStatus(Message.HELLO);
kSession.insert(message);
Run Code Online (Sandbox Code Playgroud)
已经花了一天多的时间试图找出流氓是如何工作的,以及如何解决上述问题.Pl建议
1)我采取正确的方法将现有项目转换为drools项目.我想要我的代码库的所有现有功能; 但是希望为将来的增强添加基于规则的方法.遇到以下链接,但不清楚是否有助于我的情况 http://drools.46999.n3.nabble.com/Retrofitting-a-project-with-JBoss-Rules-td48656.html
2)任何有用的drools教程,以便更好地理解3行(除了java文档)
KieServices ks = KieServices.Factory.get();
KieContainer kContainer = ks.getKieClasspathContainer();
KieSession kSession = kContainer.newKieSession("ksession-rules");
Run Code Online (Sandbox Code Playgroud)
3)解决空指针异常的任何提示(假设我采用正确的方法将现有项目转换为drools项目)
更新 @David:感谢您的详细帖子.我意识到将现有项目转换为maven项目虽然有效,但由于保留了现有的目录结构/命名(很可能与maven默认创建的不同),因此对我没有吸引力.我发布了替代解决方案,我认为这个问题与类路径问题有关http://drools.46999.n3.nabble.com/Null-pointer-exception-when-adding-drools-to-existing-project-td4027944.html #a4028011