Skip to content

Tag: maven

IntelliJ Idea IDE using port 1099

I’m using IntelliJ Idea Community Edition IDE and I’m trying to run a Maven WebApp with Jetty by command line. I’m on a RedHat box I run this command: And I get this error: The funny thing is that when I close IntelliJ Idea, the 1099 port is released. I can’t find the reason why and ho…

Where does maven search for log4j.properties file?

I am facing issues using log4j with Maven. I’ve one properties file i.e log4j.properties and I’ve put that file at the same path where project’s pom.xml is stored. pom.xml I’ve used log4j in my code which is under test folder. Code I would like to know, how does maven identify where th…

Maven build: Tomcat server doesn’t start

I am new to Maven and trying to setup a web project using Maven. I have setup the project in Eclipse and I am using Tomcat 7.0.53. In run configuration for Maven build and I have set tomcat:run in Goals. When I run this configuration, following log is seen in the Eclipse console: Nothing happens after this. T…

JSON object from java ObjectName.toString

I have a java object witch generates this output when i type objectName.toString() : Is there a JSON parser that lets me make a JSON from the string that my object generates? something like: JsonObject x = new JsonObject(busObject.toString()) It is important for me to generate it from the string that i get wh…

Using Maven Exec Plugin inside Bash

I’m writing a bash script which will execute some part of a maven project. The script looks like this: But this fails every time with the following error: If I skip the CMD=… assignment, and just run the mvn part directly, like this… …it works just fine. How can I get maven and the exe…

Allure report: nothing shown in Chrome

I’m trying to use Allure-framework to generate a report for my Selenium WebDriver tests. I use JUnit framework and allure-maven-plugin with version 1.3.9 of Allure. I run tests with mvn test then generate the report using mvn site. I see generated report in target/site/allure-maven-plugin/ directory. Wh…

How to share code between two projects?

I have two Java projects called A and B. Both of them are web apps deployed as war files. I created them in Eclipse workspace separately. Project B uses a class in project A named MusicMapper. I added the project A to project B’s build path in Eclipse as suggested in this post. So now project B can comp…