Skip to content
Advertisement

Tag: maven

Selecting class by Maven build profile

I am quite new to Maven and Java EE programming all-together. I would like to create a stub class for authentication testing which should be activated in the default Maven build profile. Currently I have two classes with same name but in different packages. Is it possible to somehow select the correct class to use in the build phase by

JAXB generating JAXBElement instead of String

I am using Apache CXF cxf-codegen-plugin Maven plugin to generate sources from WSDL file. Problem is that I get JAXBElement<String> generated instead of String. I have added the jaxb-bindings.xml file which looks like this: This should prevent JAXB to generate JAXBElement<String>. But it is not working I still have JAXBElement<String> generated instead of String. My Maven plugin looks like this:

How do you “Mavenize” a project using Intellij?

I have seen many posts about using eclipse to Mavenize a project. Is there a easy way to do that in IntelliJ? From what I understand about “Mavenize”, it’s just add some xml in pom.xml and the directory structure is in src/main/java, src/main/test …. Answer For those that benefit from a visual, as I did: Essentially, just right-click on the

How to configure checkstyle in eclipse using m2e automatically?

I’ve read posts about configuring checkstyle using the m2eclipse plugin, but it seems its not working for the new m2e plugin maintained by eclipse. Is there a way for using the same checkstyle configuration rules in maven and eclipse automatically without falling back to maven-eclipse-plugin? Thanks in advance. Answer The m2e checkstyle plugin, which lives at https://github.com/organizations/m2e-code-quality, is a little

How to deal with missing src/test/java source folder in Android/Maven project?

I’m not very experienced with Maven in combination with Android yet, so I followed these instructions to make a new Android project. When the project has been created, I get the following error message: Project ‘xxx-1.0-SNAPSHOT’ is missing required source folder: ‘src/test/java’ When I try to add a new source folder with New->Other->Java-Source Folder with src/test/java, I get another error

How to download sources for a jar with Maven?

In my project I am using a JAR file provided via Maven. But what Maven gives me is only this jar – no javadocs and no sources. Pressing “Download Sources” has no effect: Eclipse still does not find the sources of the jar. What this depends on? Should repository provide sources automatically? May be I need to write something in

How to add Java JAR files to Grails project?

I have a few Java/Maven projects that I want to use in a Grails 2.0.4 project. I have tried various approaches, such as: Installing the JAR files in my local maven repository, and executing grails install-dependency com.foo:my-project:0.0.1-SNAPSHOT Copying the JAR files into the lib folder of grails. Adding compile com.foo:my-project:0.0.1-SNAPSHOT to the dependencies section of BuildConfig.groovy Uncommenting mavenLocal() and passing

Maven error: Not authorized, ReasonPhrase:Unauthorized

I checked out my code from the Nexus repository repository. I changed the password for my account and set it correctly inside my settings.xml file. While executing mvn install clean I get the error saying Not authorized, ReasonPhrase:Unauthorized when it tries to download files from that repository. Any idea how to solve this error? I am using Windows 7 with

Advertisement