小编cri*_*nge的帖子

你如何开始知识转移?

您是否使用正式活动让人们在您的IT部门进行交谈?就像社交场合的月度聚会,内部维基/聊天空间,或者只是一个常规的"信息市场",其中包含一些关于员工为员工制作的技术或项目的演示文稿?您是邀请销售人员参加还是仅为程序员举办的闭幕活动?

你如何让人们参加这些活动?你允许他们把工作时间花在知识转移上吗?或者您是否将其理解为工作时间的一个组成部分?

我想知道如何监控知识转移本身的进展.您如何发现项目中关键的一人失败点?有几种方法可以避免它,例如人员交换或"fifo"尝试修复bug.

注意:好的,这是一个非常非常嘈杂的问题,我希望在几条评论之后修复它.抱歉,混合.

编辑:我个人的经验是,人们开始做出贡献的障碍很大.看起来他们不会花费(最少)额外的时间来编辑我们的wiki,或者花一小时在下午与开发人员讨论技术主题.这就像人们不喜欢我们的维基,我们的文档管理系统或会议.也许是因为它全部免费使用,而不是由管理层强制执行.但我不想强迫人们参与其中 - 但这是正确的方法吗?

一个例子:我们的wiki包含有关项目的页面,告诉谁在项目上工作以便在遇到问题时获得第一次联系.但除了同事和我之外没有人在创建这个页面......

knowledge-management

14
推荐指数
1
解决办法
4279
查看次数

我可以按字母顺序对Eclipse中的标签进行排序吗?

只是一个简单的问题:

我在Eclipse中使用了很多标签,我想知道是否有办法让它们按字母顺序排序.是否有我多年失踪的设置或我不知道的插件?

eclipse usability

14
推荐指数
2
解决办法
4209
查看次数

Apache Camel Endpoint注入直接路由"端点上没有可用的消费者"

我想使用Camel从ActiveMQ接收消息,然后根据消息内容(protobuf)向Twitter发送一条或多条消息.我编写了一个从路由中调用的bean,它使用注入将多个消息发送到"direct:xyz"端点.

但是,Camel在运行时抱怨:

2012-11-16 09:56:33,376 | WARN  | ication.twitter] | DirectProducer                   | 160 - org.apache.camel.camel-core - 2.10.2 | No consumers available on endpoint: Endpoint[direct://twitter] to process: Exchange[Message: hello world]
Run Code Online (Sandbox Code Playgroud)

如果我从bean内直接注入Twitter端点,它可以正常工作.但是,为了便于测试,简化配置等,我想将实际的Twitter配置分开,因此希望发送到单独的路由.

驼峰上下文配置如下: -

<camelContext id="NotificationTwitter"
    trace="false" xmlns="http://camel.apache.org/schema/blueprint">
    <dataFormats>
        <protobuf id="notificationProto" instanceClass="org.abc.schemas.protobuf.NotificationDef$NotificationMsg" />
    </dataFormats>

    <route id="TwitterPreparation">
        <from uri="activemq:notification.twitter" />
        <unmarshal ref="notificationProto" />
        <log logName="abc" loggingLevel="INFO"
            message="Twitter request received: ${body}" />
        <bean ref="NotificationTweeter" method="createTweets" />
    </route>

    <route id="Twitter">
        <from uri="direct:twitter" />
        <log logName="abc" loggingLevel="INFO"
            message="Tweeting: ${body}" />
        <to uri="twitter://timeline/user?consumerKey=itsasecret&amp;consumerSecret=itsasecret&amp;accessToken=itsasecret&amp;accessTokenSecret=itsasecret" />
    </route>
</camelContext>
Run Code Online (Sandbox Code Playgroud)

豆看起来像: - …

apache-camel endpoint blueprint

14
推荐指数
2
解决办法
3万
查看次数

运行嵌入在我的应用程序中的Apache DS

我正在尝试在我的应用程序中运行嵌入式ApacheDS.在阅读http://directory.apache.org/apacheds/1.5/41-embedding-apacheds-into-an-application.html后,我构建了这个:

public void startDirectoryService() throws Exception {
    service = new DefaultDirectoryService();
    service.getChangeLog().setEnabled( false );

    Partition apachePartition = addPartition("apache", "dc=apache,dc=org");
    addIndex(apachePartition, "objectClass", "ou", "uid");

    service.startup();

    // Inject the apache root entry if it does not already exist
    try
    {
        service.getAdminSession().lookup( apachePartition.getSuffixDn() );
    }
    catch ( LdapNameNotFoundException lnnfe )
    {
        LdapDN dnApache = new LdapDN( "dc=Apache,dc=Org" );
        ServerEntry entryApache = service.newEntry( dnApache );
        entryApache.add( "objectClass", "top", "domain", "extensibleObject" );
        entryApache.add( "dc", "Apache" );
        service.getAdminSession().add( entryApache );
    }
}
Run Code Online (Sandbox Code Playgroud)

但运行后我无法连接到服务器.什么是默认端口?或者我错过了什么?

这是解决方案: …

java apache ldap apacheds

12
推荐指数
3
解决办法
1万
查看次数

如何启用IBM Websphere Application Management Service?

我尝试使用IBM Websphere $AdminApp(和Ant任务)在远程服务器上安装/更新应用程序EAR.您可能也想阅读这个问题.

手动流程

我用这个命令行打开一个jython控制台:

$was61profile1\bin$> wsadmin.bat -lang jython -host MYHOST -port 32092
Run Code Online (Sandbox Code Playgroud)

之后我想列出所有应用程序:

wsadmin>AdminApp.list()
WASX7015E: Exception running command: "$AdminApp list"; exception information:
com.ibm.ws.scripting.ScriptingException: WASX7206W: The application management service is not running. Application management commands will not run.
Run Code Online (Sandbox Code Playgroud)

我认为这里的消息很明确:应用程序管理服务没有运行.

如何启用应用程序管理服务?

我确实搜索了可怕的,可怕的IBM网站上的文档.我还尝试单击Websphere管理页面上的配置选项.但我无法找到远离应用程序管理服务的任何东西.我现在用英语语言设置再次点击,但是如果有人能指出配置选项或文档,我会很感激.

websphere configuration admin

12
推荐指数
1
解决办法
1万
查看次数

在构建Eclipse项目时自动运行JUnit

我想在保存Eclipse项目时自动运行单元测试.每当我保存文件时,项目都会自动构建,所以我认为这应该可以通过某种方式实现.

我该怎么做?唯一的选择是获取ant脚本并更改项目构建以使用ant脚本与目标构建编译

更新我现在将尝试两种不同的方法:

  1. 为我执行ant目标测试的项目运行一个额外的构建器(无论如何我都有一个ant脚本)
  2. ct-eclipse,由Thorbjørn推荐

java eclipse junit

10
推荐指数
1
解决办法
4821
查看次数

PMD中最优先考虑的是哪个?

也许只是我,但我找不到PMD中最高优先级的信息:1还是5

由于http://pmd.sourceforge.net/running.html和命令行参数的提及,-minimumpriority我认为5是最高值,1是最低值.我对吗?

pmd

9
推荐指数
1
解决办法
5571
查看次数

Cobertura ant脚本缺少Log4J类

我试图让Cobertura在我的蚂蚁剧本中运行,但我在开始时就被卡住了.当我尝试插入cobertura taskdef时,我错过了Log4J库.

Ant属性和类路径

<property name="cobertura.dir" location="/full/path/to/cobertura-1.9.3" />
<path id="cobertura.classpath">
    <fileset dir="${cobertura.dir}">
        <include name="cobertura.jar" />
        <include name="lib/**/*.jar" />
    </fileset>
</path>
<taskdef classpathref="cobertura.classpath" resource="tasks.properties" />
Run Code Online (Sandbox Code Playgroud)

我的目标

<!-- ================================= 
      target: cobertura              
     ================================= -->
<target name="cobertura" depends="clean, init" description="Generates cobertura coverage reports">
    <cobertura-instrument todir="${dir.build.instrumented}">
        <fileset dir="${dir.build}">
            <include name="**/*.class" />
        </fileset>
    </cobertura-instrument>
</target>
Run Code Online (Sandbox Code Playgroud)

我想我做了Cobertura文档中描述的所有内容,但我得到了这个

Ant构建错误

BUILD FAILED
build.xml:95: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
Run Code Online (Sandbox Code Playgroud)

$ {cobertura.dir}里面有一个包含所有文件的lib目录.我将它从cobertura发行版ZIP直接解压缩到该目录中.

我错过了一步吗?到目前为止,我的配置出了什么问题?

java ant build-process code-coverage cobertura

8
推荐指数
1
解决办法
4822
查看次数

使用Ant将EAR部署到远程websphere应用程序服务器

我想在我们的持续集成服务器中自动将EAR文件构建部署到websphere应用程序服务器.我查找了Ant任务wsdeploy,但文档确实没有任何帮助.我把它添加到我的蚂蚁脚本中:

WSDeploy Ant任务

<classpath>
    <fileset dir="${dir.was.plugins}">
        <include name="**/*.jar" />
    </fileset>
</classpath>
<taskdef name="wsdeploy" classname="com.ibm.websphere.ant.tasks.WSDeploy" />
<target name="deploy">
    <wsdeploy inputFile="myearfile.ear"
              outputFile="myearfile_fordeployment.ear"
              classpath="${classpath}"
              debug="true"
              ignoreErrors="false"
              noValidate="false"
              trace="true" />
</target>
Run Code Online (Sandbox Code Playgroud)

我的问题

我不知道如何指定远程服务器地址,我很高兴获得一些指向教程的链接,或者可能是一个工作的Ant片段,用于将EAR部署到websphere服务器.

我们已经为portlet运行了一些SCP和SSHEXEC任务,他们正在调用XMLAccess接口来放置和启动portlet.我是否必须为EAR调整脚本,或者这是一种完全错误的方式来自动部署EAR文件?


更新2

我重写了我的ant脚本,现在不再有ClassNotFoundException了.仍有一个意外的行为:脚本想要使用我从未指定的配置文件...

致电Ant:

%WAS_HOME%\bin\ws_ant.bat -Duser.install.root="%WAS_HOME%\profiles\EXPECTEDPROFILE" -f buildall.xml "%1"
Run Code Online (Sandbox Code Playgroud)

我想运行所有这些EXPECTEDPROFILE,但是下面的错误消息表明还有另一个配置文件UNEXPECTEDPROFILE.

输出:

wasListApps:
  [wsadmin] WASX7023E: Fehler beim Erstellen der "SOAP"-Verbindung zu "MYHOST". Informationen zur Ausnahme: com.ibm.websphere.management.exception.ConnectorNotAvailableException: com.ibm.websphere.management.exception.ConnectorNotAvailableException: ADMC0016E: Das System kann keinen SOAP-Connector erstellen, um die Verbindung zum Host MYHOST an …
Run Code Online (Sandbox Code Playgroud)

ant deployment websphere

8
推荐指数
1
解决办法
3万
查看次数

在某些文件上禁止特定checkstyle规则的正确语法是什么?

我在我的java项目中使用Maven 3Checkstyle 2.9.1,我有一个常见的checkstyle配置,我们也在其他几个项目中使用它.为了避免将该配置文件复制和编辑到我自己的项目中,我使用了一个抑制文件来禁用某些包中的所有检查(生成的代码).

现在我想在所有文件中禁止特定规则.

这是我的抑制文件:

<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC "-//Puppy Crawl//DTD Suppressions 1.1//EN" "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
<suppressions>
    <suppress files="my[\\/]generated[\\/]code[\\/]package" checks="."/>
    <suppress files=".*\\.java$" checks="IndentationCheck"/>
    <suppress files=".*\\.java$" checks="LineLengthCheck"/>
    <suppress files=".*\\.java$" checks="ExplicitInitializationCheck"/>
    <suppress files=".*\\.java$" checks="MemberNameCheck"/>
</suppressions>
Run Code Online (Sandbox Code Playgroud)

这是我的POM:

...
<build>
    ...
    <plugins>
    ...
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <version>2.9.1</version>
            <configuration>
                <configLocation>${checkstyle.ruleset}</configLocation>
                <suppressionsLocation>${checkstyle.suppressions}</suppressionsLocation>
            </configuration>
        </plugin>
    </plugins>
</build>
Run Code Online (Sandbox Code Playgroud)

我正在打电话

mvn checkstyle:checkstyle
Run Code Online (Sandbox Code Playgroud)

生成报告,但被抑制的警告仍在那里.

我在这做错了什么?

java checkstyle

8
推荐指数
1
解决办法
1万
查看次数