maven-3

Spring MVC3.2.2 + Hibernate4 + @Autowire SessionFactory sessionFactory gives nullpointer exception

ぐ巨炮叔叔 提交于 2019-12-13 07:35:40
问题 I am using GenricHibernateDAO which autowires a sessionfactory, which getting set to null all the time when I call the save(user) method through controller, it give me a null pointer exception. package com.hdo.dao; public class GenericHibernateDAO<T> implements GenericDAO<T> { @Autowired private SessionFactory sessionFactory; public void setSessionFactory(SessionFactory sessionFactory) { this.sessionFactory = sessionFactory; } @Override @Transactional public void save(T t) { // TODO Auto

Cannot compile android internal app using Maven

有些话、适合烂在心里 提交于 2019-12-13 06:08:34
问题 Im trying to compile the android ics 4.0.4 Phone app using maven. I was able to compile properly using eclipse by adding the required internal jars as system libraries. The required jars were: classes-full-debug.jar from framework_intermediates android-common_intermediates guava_intermediates ext_intermediates com.android.phone.common_intermediates com.android.vcard_intermediates of the build. This is the dependency part of pom.xml : ` <dependencies> <dependency> <groupId>com.username.ics<

Firefox has stopped working for Selenium 2.45

落爺英雄遲暮 提交于 2019-12-13 06:00:27
问题 I have been getting this issue when I run test suit on intelliJIDEA. Error details are: Problem signature: Problem Event Name: APPCRASH Application Name: firefox.exe Application Version: 39.0.0.5659 Application Timestamp: 55933a80 Fault Module Name: xul.dll Fault Module Version: 39.0.0.5659 Fault Module Timestamp: 55934bcf Exception Code: c0000005 Exception Offset: 001e39c7 OS Version: 6.1.7601.2.1.0.256.4 Locale ID: 1033 Additional Information 1: 0a9e Additional Information 2:

Using profiles in multimodule project

≡放荡痞女 提交于 2019-12-13 05:54:01
问题 I have a multimodule maven project. Project layout is described below: PARENT |-CHILD1 |-CHILD2 Parent project has pom packaging type and declares CHILD1 and CHILD2 projects as modules. Also PARENT project declares profile dev which declares some property. CHILD1 project has jar packaging type and "overrides" PARENT dev profile by adding some dependency(dependency on commons-collections for example). CHILD2 project has war packaging type and has dependency on CHILD1 project. Also CHILD2

Unable to locate Source XRef to link to

可紊 提交于 2019-12-13 05:06:17
问题 I have a big maven project that uses the pmd plugin for code quality checks. since I started using the pmd plugin i get the following warning message: [WARNING] Unable to locate Source XRef to link to - DISABLED I googled and found that i need to implement the jxr plugin. so I add the following to the build property in the main pom.xml file. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jxr-plugin</artifactId> <version>2.3</version> </plugin> welp it doesn't really

Maven not working when 'mvn package' command is run

无人久伴 提交于 2019-12-13 03:38:47
问题 I am working on a Spring mvc using Eclipse. Until now I was using ant to create war file. But now I switched to Maven. I have copied Maven 3.3 on my system and set system variables for Maven. It works fine, when I run Maven following command from command prompt: mvn -version I have created a pom.xml file in my Spring mvc app's root directory. I run Maven through command prompt, not through Eclipse. When I run following command: mvn -X package it shows following errors: [INFO] BUILD FAILURE

Package a multiple-entry jar using maven for hadoop project

我的梦境 提交于 2019-12-13 03:35:51
问题 I'm new to maven. I want to package a jar of my hadoop project with its dependencies, and then use it like: hadoop jar project.jar com.abc.def.SomeClass1 -params ... hadoop jar project.jar com.abc.def.AnotherClass -params ... And I want to have multiple entry points for this jar (different hadoop jobs). How could I do it? Thanks! 回答1: There's two ways to create a jar with dependencies: Hadoop supports jars in a jar format - meaning that your jar contain contain a lib folder of jars that will

How to generate HTML report with SonarQube-6.7.5

孤街浪徒 提交于 2019-12-13 03:13:06
问题 I am working on Spring4.0 Project with apache-maven-3.5.4 and Java 1.8 and would like to use SonarQube for code coverage and reports. I am using jacoco-maven-plugin 0.7.8 version plugin for that. I am able to see the details in the browser. But when I try to generate the report to HTML, I am not seeing the reports generated. I did a lot of research in Google and I followed the below mvn sonar:sonar -Dsonar.issuesreport.html.enable=true and i added the entry in POM as well. But the reports are

Java app deployment to heroku using Maven failed

帅比萌擦擦* 提交于 2019-12-13 01:26:08
问题 I am trying to setup the Continuous deployment process for a Tomcat based java app using Github for source code hosting, TravisCI for building the WAR file, running the unit tests and then Heroku to deploy the packaged WAR file. I tried following the tutorial from https://devcenter.heroku.com/articles/deploying-war-files-to-heroku-from-travis-ci#creating-a-java-web-application I am getting an error while running the below step from the above tutorial: mvn clean heroku:deploy-war Command outpt

Why I can't build jar in Maven

大兔子大兔子 提交于 2019-12-12 21:04:16
问题 Already I checked all the advice about similar problems. Nothing works. Maybe someone has an idea of what the problem is? Below pom file and console with an error. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>pezal2</groupId> <artifactId>pezal2</artifactId> <version>0.0.1-SNAPSHOT</version>