小编stu*_*f22的帖子

Maven无法识别我的用户个人资料,并在另一个位置查找.m2

我从另一个人那里继承了一台机器,而且maven认为我是一个不同的用户.这就是我:

C:\> echo %USERPROFILE%
C:\Users\awesomeuser
Run Code Online (Sandbox Code Playgroud)

虽然maven认为我是管理员,但无法在那里创建.m2文件夹.

[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from c:\apps\tools\apache-maven-3.1.0\bin\..\conf\settings.xml
[DEBUG] Reading user settings from C:\Users\Administrator\.m2\settings.xml
[DEBUG] Using local repository at C:\Users\Administrator\.m2\repository
[ERROR] Could not create local repository at C:\Users\Administrator\.m2\repository -> [Help 1]
org.apache.maven.repository.LocalRepositoryNotAccessibleException: Could not create local repository at C:\Users\Administrator\.m2\repository
Run Code Online (Sandbox Code Playgroud)

任何想法如何让maven认识我是伟大的用户而不是管理员?

java maven-3 maven

5
推荐指数
1
解决办法
3350
查看次数

OSGi/blueprint中的服务引用无法正常工作

我目前有两个OSGi捆绑包(bundle1bundle2)都通过EBA中的蓝图暴露服务.在bundle2blueprint.xml我想引用来自服务bundle1注射入编译服务(下面的代码),作为编译服务将被用于调用票务.然而,这会导致超时异常(也在下面).似乎BuildService从未在OSGi中注册.我怎么做这样的工作?

blueprint.xml用于bundle1:

<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:bptx="http://aries.apache.org/xmlns/transactions/v1.0.0">

    <bean id="TicketServiceBean" class="com.example.b2.impl.TicketServiceImpl">
        <bptx:transaction value="Required" method="*" />
    </bean>

        <service ranking="0" id="TicketService" interface="com.example.b2.service.TicketService" ref="TicketServiceBean">
        <service-properties>
            <entry key="service.exported.interfaces" value="*" />
        </service-properties>
    </service>  

</blueprint>
Run Code Online (Sandbox Code Playgroud)

blueprint.xml 对于 bundle2

<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">

    <bean 
        id="BuildServiceImplBean"
        class="com.example.b1.impl.BuildServiceImpl" 
        activation="eager" >
        <property name="ticketService" ref="TicketServiceRef" />
    </bean>  


    <service    
        id="BuildService" 
        ref="BuildServiceImplBean"
        interface="com.example.b1.service.BuildService"
        activation="eager"> 

        <service-properties>
            <entry key="service.exported.interfaces" value="*" />
        </service-properties>

    </service>



    <reference 
        id="TicketServiceRef" 
        interface="com.example.b2.service.TicketService" 
        availability="mandatory"
        activation="eager" /> …
Run Code Online (Sandbox Code Playgroud)

java osgi blueprint

4
推荐指数
1
解决办法
9041
查看次数

禁用GWT中的后退按钮

有没有办法在GWT中禁用浏览器中的Back按钮(基本上清除History令牌堆栈)?一旦我浏览到我的应用程序中的某个页面,我想确保用户不能使用后退按钮返回,但只能使用页面上的链接来浏览网站.

javascript java gwt

2
推荐指数
1
解决办法
7337
查看次数

从ColdFusion应用程序调用Windows可执行文件(.exe)

我没有使用ColdFusion的经验,但是我想知道是否可以从ColdFusion应用程序调用windows .exe文件(假设应用程序和.exe在同一台机器上运行),然后使用来自.exe传递给ColdFusion应用程序中的另一个方法(或者为了简单起见,只在警报窗口中显示响应).

coldfusion executable exe

2
推荐指数
1
解决办法
2333
查看次数

使用正则表达式否定一行中的单词

给定此表达式匹配包含minOccurs的行

<xs:element[^>]+?\sminOccurs\s*=[^>]+>

和本文:

<xs:element name="shipto">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="name" type="xs:string"/>
      <xs:element name="address" type="xs:string"/>
      <xs:element name="city" minOccurs="1" type="xs:string"/>
      <xs:element name="country" minOccurs="1" type="xs:string"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>
Run Code Online (Sandbox Code Playgroud)

如何将xs:包含minOccurs的元素行更改为xs:不包含minOccurs的元素行.

预期的输出是这样的:

<xs:element name="name" type="xs:string"/>
<xs:element name="address" type="xs:string"/>
Run Code Online (Sandbox Code Playgroud)

regex xml xpath grep xsd

2
推荐指数
1
解决办法
151
查看次数

Jenkins构建促销:如何获得我想要推广的构建的构建ID?

看来,当使用Promoted Builds Plugin在Jenkins中进行构建升级时,它会生成一个新的BUILD_ID环境变量.有没有办法或插件可以让您访问正在尝试推广的构建的当前BUILD_ID?

基本上,我需要的功能是:导航到Jenkins中的构建,能够启动一个ant或gradle脚本来提升已经构建的工件,该工件在我当前所在的构建下存档.

hudson jenkins jenkins-plugins

2
推荐指数
1
解决办法
7016
查看次数