我已经使用插件管理为jenkins安装了MSBuild插件.它已成功安装,我可以在作业配置页面中看到MSBuild的选项.
但是,遗憾的是我无法在Jenkins配置页面中看到MSBuild部分.我需要在该部分中提供MSBuild.exe的路径.
知道为什么吗?
提前致谢!
我有一个具有以下包结构的项目
src/main/proj
    -com.company.package
        -appName
            -morepackages
        -appVersion2
            -morepackages
sonar-runner.properties
sonarBuild.sh
sonar-runner-project2.properties
sonarBuildProject2.sh
按照目前的情况,使用默认属性文件,我可以运行声纳报告,它将生成整个项目的评论
sonar.projectKey=KEY
sonar.projectName=PROJNAME
sonar.projectVersion=1.0
sonar.host.url=someurl
#Path for sonar sources
sonar.sources=src/main/java
#Path for libraries
sonar.libraries=target/lib/*.jar
#Path for binaries
sonar.binaries=target/classes
#--------Default database
sonar.jdbc.url=someurl
sonar.jdbc.driver=com.mysql.jdbc.Driver
#----- Global database settings
sonar.jdbc.username=sonar
sonar.jdbc.password=sonar
#----- Default directory layout
sonar.java.source=1.6
sonar.java.target=1.6
sonar.sourceEncoding=UTF-8
理想情况下,我想将两个报告分开,所以我有一个用于原始包,一个用于appVersion2包.现在 - 如上所述,我为每个人创建了一个单独的属性文件.我应该只指向sonar.sources要分析的每个作业的相应包,还是有更好的方法在一个属性文件中执行此操作?
谢谢
编辑
我的多模块尝试属性文件如下所示
sonar.projectKey=rootkey
sonar.projectName=rootname
sonar.projectVersion=1.0
sonar.host.url=rooturl
sonar.sources=src/main/java/
sonar.libraries=target/lib/*.jar
sonar.modules=module1,module2
sonar.sourceEncoding=UTF-8
#----- Global database settings
sonar.jdbc.username=user
sonar.jdbc.password=pass
sonar.java.source=1.7
sonar.java.target=1.7
#--------Default database
sonar.jdbc.url=url
sonar.jdbc.driver=com.mysql.jdbc.Driver
module1.sonar.projectName=proja
module2.sonar.projectName=projb
module1.sonar.projectKey=projakey
module2.sonar.projectKey=projbkey
#Path for …我正在尝试创建一个RCP应用程序,其中,我想绑定一个bean的变量来查看.bean的代码#
public class SaveFileBean implements PropertyChangeListener {
private String text;
private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(
        this);
@Override
public void propertyChange(PropertyChangeEvent arg0) {
    propertyChangeSupport.firePropertyChange("text", null, text);
}
public void addPropertyChangeListener(String propertyName,
        PropertyChangeListener listener) {
    propertyChangeSupport.addPropertyChangeListener(propertyName, listener);
}
public void removePropertyChangeListener(PropertyChangeListener listener) {
    propertyChangeSupport.removePropertyChangeListener(listener);
}
public String getText() {
    return text;
}
}
VIew的代码
public class NewView extends ViewPart {
private DataBindingContext m_bindingContext;
public static final String ID = "com.app.Editor.newView";
SaveFileBean bean = new SaveFileBean();
private StyledText text;
public NewView() { …我的maven项目中有一个字符串,当我在本地机器上运行时,我有
String name = title.get(i).text().replace("é", "e");
后来我将变量保存name到文件中
但是当我导出到.jar并在我的服务器上运行它时,我看到é不是e,但是当我在本地机器上运行时,我看到"e"这就是我想要的.
怎么了?
我正在尝试获取其他时区的当前时间。我为此使用了此代码:
GregorianCalendar calender = new         
GregorianCalendar(TimeZone.getTimeZone("Asia/Bangkok"));
    System.out.println(calender.getTime());
但是,当我运行这段代码时,这段代码提供了 CET 中的当前时间,因为我本地机器中的时间是 CET 中的。我很迷惑。那么为什么在构造函数中有提供 TimeZone 的范围呢?
我的代码是:
vector<int> permutation(N); 
vector<int> used(N,0);
void try(int which, int what) {
  // try taking the number "what" as the "which"-th element
  permutation[which] = what;
  used[what] = 1;
  if (which == N-1)
    outputPermutation();
  else
   // try all possibilities for the next element
  for (int next=0; next<N; next++)
    if (!used[next])
    try(which+1, next);
  used[what] = 0;
} 
int main() {
  // try all possibilities for the first element
  for (int first=0; first<N; first++)
    try(0,first);
}
我从一些网站上学习复杂性,在那里我遇到了这段代码.根据我的理解,以下行迭代N次.所以复杂度是O(N).
for (int first=0; first<N; first++)
接下来我正在考虑递归调用.
for …我需要使用批处理文件将值设置为环境变量.我为此编写了脚本:
@echo off
set value="Hello world"
setx -M srijani "%srijani%;%value%"
它给出了错误:
ERROR: Invalid syntax. Default option is not allowed more than '2' time(s).
Type "SETX /?" for usage.
我用Google搜索,发现在使用空格时我们需要在双引号内写.
set value="Hello world"
但是,这也行不通.
注意:我在Windows 7上.
我正在尝试使用 PowerShell 5.0 创建外部网络驱动器。我需要这些驱动器显示在我的电脑中。为此,我正在使用此跟随命令。
New-PSDrive -Name "X" -PSProvider FileSystem -Root "\\192.168.0.1\hde_path" -Persist
这个命令有什么问题吗?因为根据我的理解,如果我使用-Persist它应该显示在我的电脑窗口中。
使用后,映射的驱动器 X: 没有显示在我的电脑中。
提前致谢!
我已经看过几次有关此问题的答案,我也尝试过。
我试图在我的项目中使用grooy-all和groovy-maven-plugin,并且pom.xml中的依赖项是:
          <plugin>
                <groupId>org.codehaus.gmaven</groupId>
                <artifactId>groovy-all</artifactId>
                <version>2.5.2</version>
                <executions>
                    <execution>
                        <id>Kryst-reports-flex</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>execute</goal>
                        </goals>
                        <configuration>
                            <scriptpath>
                                <element>src/main/resources</element>
                            </scriptpath>
                            <source>ReportsAssembly.buildFlex(ant, project) 
                        </source>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.gmaven</groupId>
                <artifactId>groovy-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>Kryst-reports-flex</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>execute</goal>
                        </goals>
                        <configuration>
                            <scriptpath>
                                <element>src/main/resources</element>
                            </scriptpath>
                            <source>ReportsAssembly.buildFlex(ant, project) 
                        </source>
                        </configuration>
                    </execution>
                </executions>
                 <dependencies>
                    <dependency>
                      <groupId>org.codehaus.groovy</groupId>
                      <artifactId>groovy-all</artifactId>
                      <version>2.5.2</version>
                    </dependency>
                  </dependencies>
            </plugin>
尝试在此项目上执行mvn软件包或mvn安装时出现错误。错误是:
Failure to find org.codehaus.gmaven:groovy-all:jar:2.5.2 in http://myrepo:9090/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of Z-nexus-public has elapsed or updates …我对Jenkins和Job DSL插件很陌生。经过一些研究,我发现了如何使用DSL创建作业,现在我正尝试使用DSL删除作业。我知道使用以下代码禁用作业:
//create new job
//freeStyleJob("MyJob1", closure = null);
job("MyJob1"){
  disabled(true);
}
运行正常。但是,我找不到在詹金斯删除其他工作的任何方法。
请帮忙!
谢谢!
java ×5
jenkins ×2
algorithm ×1
batch-file ×1
big-o ×1
command-line ×1
eclipse-rcp ×1
maven ×1
msbuild ×1
mvn-repo ×1
powershell ×1
rcp ×1
recursion ×1
replace ×1
sonarqube ×1
string ×1
windows-7 ×1