maven-2

Help with Selenium Maven Cargo

夙愿已清 提交于 2020-01-15 11:53:14
问题 I am trying to use cargo to deploy and start my container (which works fine), and then use selenium to execute some UI tests. Whenever I try to run (mvn clean integration-test), I get to the point where it says Launching Selenium Server Waiting for Selenium Server... [INFO]Redirecting output to [INFO]User extensions But then my integration tests never get executed by surefire. Any help is much appreciated. It seems like the Selenium Server never gets started. One quick note, I am using JUnit

Help with Selenium Maven Cargo

谁说我不能喝 提交于 2020-01-15 11:53:11
问题 I am trying to use cargo to deploy and start my container (which works fine), and then use selenium to execute some UI tests. Whenever I try to run (mvn clean integration-test), I get to the point where it says Launching Selenium Server Waiting for Selenium Server... [INFO]Redirecting output to [INFO]User extensions But then my integration tests never get executed by surefire. Any help is much appreciated. It seems like the Selenium Server never gets started. One quick note, I am using JUnit

Maven: How do I include a dependency in test phase and exclude it in integration-test phase?

空扰寡人 提交于 2020-01-15 03:29:08
问题 I'm using Maven 3.0.3. Is it possible to include a dependency for my test phase only, and then another dependency for my integration-phase only? When these two dependencies are included together <dependency> <groupId>com.google.gwt</groupId> <artifactId>gwt-dev</artifactId> <version>${gwtVersion}</version> <scope>test</scope> </dependency> ... <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>2.13.0</version> <scope>test</scope> <

Accessing a web application's static resources

随声附和 提交于 2020-01-14 13:00:12
问题 I've just built a very simple Java web application using the Wicked framework. The current layout of the project is: src/ main/ java/ net/myapp/ Homepage.java Homepage.html reources/ scripts/ script.js In the Homepage.html file I am trying to load the JavaScript file: <script src="scripts/script.js"></script> I deployed the application, but the browser doesn't find the JavaScript file. The WAR file is being packaged using the maven-war-plugin. I looked into the WAR file, and I see the

Cleanest way to get a File in a JUnit test case from Maven

烂漫一生 提交于 2020-01-14 10:39:47
问题 My test code in Maven project B (which is a child of project A) has something like String filePath = "src/main/webapp"; //do something with the filePath The above test case runs fine when I run the project from child (i.e, level B) but when I run from Parent project A (i.e, doing a mvn install at parent level) this fails because obviously there is no folder called "src/main/webapp" under parent level (It is however available in child level). I know I could do some coding do check if a test

Maven: How do you deal with dependencies that are both direct and transitive?

风格不统一 提交于 2020-01-14 09:39:05
问题 I'm trying to determine an approach to the following situation: There are 3 Maven artifacts: A, B, and C. B depends on A. (i.e. it uses some of A's code) C depends on both A and B (i.e. it uses some of A's code and B's code). Assume I want to use the same version of A for both B and C. What approach should be used? 1) Declare A as a dependency in C's pom.xml. Pro: It's clear to the developer that C depends on A. Con: If A's version changes, it needs to be updated in multiple places. (both B

Why does Maven disable caching for HTTP requests?

主宰稳场 提交于 2020-01-14 08:40:17
问题 The default Maven settings for HTTP requests, such as the ones Maven uses to fetch artifacts from repositories, include the following headers: Cache-control: no-cache Cache-store: no-store Pragma: no-cache Expires: 0 Accept-Encoding: gzip This seems to be the documented behavior. The default Maven wagon for HTTP (i.e., the "lightweight" client) does not seem to allow disabling these headers. Why is Maven configured in this way by default? For artifacts that actually have versions, they should

Maven jasperreports-maven-plugin define compile charset

我与影子孤独终老i 提交于 2020-01-14 04:40:19
问题 When using the jasperreports-maven-plugin/1.0-beta-2 to compile a jrxml file to jasper, the resulting report doesn't display unicode characters properly, it displays ???? instead. It is obvious this is a font problem. So I opened iReport 4.0.1, and compiled the jrxml file from there without changing any specific settings, the resulting jasper file could display the unicode characters just fine. So I am assuming there are some compile time properties which I am not setting properly. I thought

Using Maven to run a WAR dynamically in Tomcat, how does one add classpath entries so only Tomcat sees them?

六眼飞鱼酱① 提交于 2020-01-14 00:32:21
问题 Scenario is such: I have a webapp that I'd like to run dynamically with the tomcat-maven-plugin's tomcat:run goal. The wrinkle is that I have numerous classpath resources that need to differ between the packaged artifact and the one run off a local workstation. Failed Attempts: 1.) My first attempt was to use the builder-helper-maven-plugin, but it won't work because the target configuration files will (inconsistently!) work their way into the packaged WAR archive. <plugin> <groupId>org

If the dependency is a unique snapshot version and install is called, what does maven select?

两盒软妹~` 提交于 2020-01-13 18:57:10
问题 Imagine two projects. The first is the framework-core project which is in version 1.1.0 and has several snapshot builds. The other is the example-business project which has the following dependency to framework-core on the build-iteration number 9. <dependency> <groupId>org.example</groupId> <artifactId>framework-core</artifactId> <version>1.1.0-20100518.134928-9</version> </dependency> What happens if mvn install is called on the framework-core ? I found out that the artifact is copied to