小编Dav*_*e A的帖子

Jenkins/Maven因"无法在反应堆中找到所选项目"错误而建立死亡

我在Cloudbees构建服务上使用Jenkins,并且有一个多模块Maven项目.最近,我们从父pom中删除了一个项目,但是,当我们使用以下选项在Jenkins中运行构建时...

clean install -e -P qa -P cloudbees -DskipITs
Run Code Online (Sandbox Code Playgroud)

工件会自动存储到附加到我们帐户的Cloudbees快照存储库中.但是,构建最终会失败,并显示以下"无法在reactor中找到所选项目:org.mainco.subco:oldmodule"错误.有没有办法强制构建

[subco] $ mvn initialize -N
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building subco 76.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.841s
[INFO] Finished at: Fri Feb 27 21:59:22 UTC 2015
[INFO] Final Memory: 5M/115M
[INFO] ------------------------------------------------------------------------
Parsing POMs
Modules changed, recalculating dependency graph
maven31-agent.jar already up to date
maven31-interceptor.jar already up to date
maven3-interceptor-commons.jar already up to date
[subco] $ /opt/jdk/jdk1.7.0/bin/java -Dmaven.test.failure.ignore=false …
Run Code Online (Sandbox Code Playgroud)

reactor maven multi-module jenkins cloudbees

6
推荐指数
1
解决办法
4030
查看次数

如何在Wildfly 9中启用JSP的动态编译?

我正在使用Wildfly 9.0.0.CR2.如何启用JSP的动态编译?我在另一个线程中找到了这个配置

    <subsystem xmlns="urn:jboss:domain:web:1.4" default-virtual-server="default-host" native="false">
        <configuration>
            <jsp-configuration development="true" check-interval="1" modification-test-interval="1" recompile-on-fail="true"/>
        </configuration>
    </subsystem>
Run Code Online (Sandbox Code Playgroud)

但唉,它不起作用,当我重新启动JBoss服务器时导致下面的异常gin ...

    14:23:05,224 ERROR [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0055: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0085: Failed to parse configuration
        at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:131)
        at org.jboss.as.server.ServerService.boot(ServerService.java:350)
        at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:271)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[442,2]
Message: Unexpected element '{urn:jboss:domain:web:1.4}subsystem'
        at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:108)
        at org.jboss.staxmapper.XMLExtendedStreamReaderImpl.handleAny(XMLExtendedStreamReaderImpl.java:69)
        at org.jboss.as.server.parsing.StandaloneXml.parseServerProfile(StandaloneXml.java:1199)
        at org.jboss.as.server.parsing.StandaloneXml.readServerElement_1_4(StandaloneXml.java:457)
        at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:144)
        at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:106)
        at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110)
        at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69)
        at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:123)
        ... 3 more
Run Code Online (Sandbox Code Playgroud)

java jboss jsp compilation wildfly

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

我在哪里可以存储此属性以供Maven和Java使用?

我正在使用Maven 3.0.3和Java 6.我想把一个WSDL URL属性放在Maven构建过程可以访问的地方,我的运行时Java代码(我正在构建一个Maven JAR项目)也可以访问.我该如何构建/配置?在我的运行时Java代码中,我有类似的东西

String wsdlUrl = getProperty("wsdl.url");
Run Code Online (Sandbox Code Playgroud)

在Maven中,我想在插件中访问WSDL URL,如此...

                    <plugin>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>jaxws-maven-plugin</artifactId>
                            <executions>
                                    <execution>
                                            <goals>
                                                    <goal>wsimport</goal>
                                            </goals>
                                            <configuration>
                                                    <wsdlUrls>
                                                            <wsdlUrl>${wsdl.url}</wsdlUrl>
                                                    </wsdlUrls>
                                                    <sourceDestDir>${basedir}/src/main/java</sourceDestDir>
                                                    <packageName>org.myco.bsorg</packageName>
                                            </configuration>
                                    </execution>
                            </executions>
                    </plugin>
Run Code Online (Sandbox Code Playgroud)

java properties maven

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

如果文件不存在,如何激活 Maven 配置文件?

我正在使用 Maven 3.2.3。如果文件系统上不存在文件,如何激活配置文件?我已经尝试了以下,但发现<not>不支持该语法:

            <profile>
                    <id>create-test-mysql-props-file</id>
                    <activation>
                            <file>
                                    <not><exists>${basedir}/src/main/myfile</exists></not>
                            </file>
                    </activation>
                    <build>
                            <plugins>
                                    <!-- Generate mysql datasource properties -->
                                    <plugin>
                                            <groupId>org.codehaus.mojo</groupId>
                                            <artifactId>properties-maven-plugin</artifactId>
                                            <version>1.0-alpha-2</version>
                                            <executions>
                                                    <execution>
                                                            <phase>process-resources</phase>
                                                            <goals>
                                                                    <goal>write-project-properties</goal>
                                                            </goals>
                                                            <configuration>
                                                                    <outputFile>
                                                                            ${project.build.outputDirectory}/mysql_datasource.properties
                                                                    </outputFile>
                                                            </configuration>
                                                    </execution>
                                            </executions>
                                    </plugin>
                            </plugins>
                    </build>
            </profile>
Run Code Online (Sandbox Code Playgroud)

profile file-exists maven-3 maven

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

Spring MVC测试:如何检查模型属性是否不存在?

我正在使用Spring 3.2.11.RELEASE.我正在使用新的3.2模拟MVC框架进行单元测试,通常我可以使用以下内容检查模型属性...

private MockMvc mockMvc;
…

@Test
public final void test()
{
…
    mockMvc.perform(get(“/mypath”)
                    .param("userId", customerId))
                    .andExpect(status().isOk())
                    .andExpect(model().attribute(“attr1”, “value”))
                    .andExpect(view().name(“my view"));
Run Code Online (Sandbox Code Playgroud)

但是我如何调整以上内容以验证属性"attr1"未包含在我的模型中?

junit spring spring-mvc

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