FAQ Database Discussion Community


how to hide dependency jars in eclipse's project explorer window

java,eclipse,maven,maven-plugin,eclipse-kepler
Once i use mvn eclipse:eclipse to generate the eclipse IDE file and import the project in eclipse, the eclipse shows all the dependency jars in the project explorer window(see image) .. How to hide all the dependency jars in project explorer ? ...

How can one find the default goal for a maven plugin without reading the source?

java,maven,maven-plugin
Given a maven plugin, is there any command that one can use to see the default phase/goal bindings for its mojos? I realize that if I look at the sources or the generated javadocs I can find the annotation. However that seems too indirect. I've tried the :help goal, but...

Cannot find parent aspect for concrete aspect

java,maven-plugin,aspectj,wildfly-8,load-time-weaving
I have trying to test load time weaving in simple hello world normal Servlet based example in wildfly8.2 I have below Aspect code package com.test.aspects; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Pointcut; import com.test.helloworld.HelloService; @Aspect public abstract class FieldAspect { @Pointcut public abstract void getField(); @Pointcut public abstract void setField(); @Around("getField()")...

what does having two goals in same plugin mean in maven?

maven,maven-3,maven-plugin
Here is an example of pom.xml <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <version>2.18.1</version> <configuration> ...... </configuration> <executions> <execution> <goals> <goal>integration-test</goal> <goal>verify</goal> </goals> <phase>integration-test</phase> </execution> </executions> </plugin> </plugins> what does having two...

Include jar to SoapUI maven

maven,jar,maven-plugin,soapui
I wrote my own library to maven. I include the jar file like this: http://www.soapui.org/extension-plugins/old-style-extensions/developing-old-style-extensions.html and everything is OK. But, i wanna run my SoapUI projekt in maven. How i can include this library?...

Is it possible to jar a spring application?

spring,maven-plugin,executable-jar
I have a web application in spring and hibernate and maven. I want to package my services and create a jar so that when main method is invoked, it will take the spring configurations from class path and it will call the services. Is it possible?

Mave-assembly-plugin: customize descriptor to exclude a folder

maven,maven-3,maven-plugin,maven-assembly-plugin
I have the following directory structure: MyProject/ - temp/ - cat_A/ - tmp/ - file_A - cat_B/ - tmp/ - file_B I am using maven-assembly-plugin. I want to create a tar.gz file with the content to be like following: output/ - cat_A/ - file_A - cat_B/ - file_B I tried...

jaxb2-annotate-plugin not working

java,jaxb,maven-plugin,jaxb2-annotate-plugin
I want to generate "@java.lang.SuppressWarnings("all")" before the generated "Doc" class. Problem: jaxb2-annotate-plugin don't generate annotations. My pom.xml: ... <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jaxb2-maven-plugin</artifactId> <version>1.5</version> <executions> <execution> <id>xjc</id> <goals> <goal>xjc</goal> </goals> <configuration> <extension>true</extension>...

The method is undefined for the type [Class Name]

java,maven,dependencies,maven-plugin
I have to projects both contains the pom.xml , Let say Project A and Project B. In project B I added project A as dependency in its pom.xml. In project A there is a class Mirror.java, in this class I added method and then updated the Project B by right...

Delombok Java 8 Type Annotations

maven,maven-plugin,lombok,type-annotation
I am working on a Java 8 Spring project and wanted to use Lombok to reduce boilerplate code. Since I need a Javadoc, I set up the lombok-maven-plugin and the maven-javadoc-plugin. After running the lombok:delombok goal the source is generated to target/generated-sources/delombok, as I specified it. But the code is...

Maven dependency plugin copy jar with dependencies

maven,jar,maven-2,maven-3,maven-plugin
I'm trying to copy a jar from my local repository into another project as described here: http://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html However my jar is coming out of maven-assembly-plugin as a "jar with dependencies", which puts the regular jar and the assembled jar in my local repo. The jar name looks something like: example-test-0.0.1-SNAPSHOT-jar-with-dependencies.jar...

Enunciate Reporting - Error The 'assemble' goal requires 'war' packaging

java,maven,maven-plugin,enunciate
I am getting the error while running the below command while generating enunciate report mvn clean pre-site site:site site:stage -PskipQuality -DskipTests=true -U My pom.xml's enunciate plugin configuration below <plugin> <groupId>org.codehaus.enunciate</groupId> <artifactId>maven-enunciate-plugin</artifactId> <version>1.27</version> <executions> <execution> <goals> <goal>assemble</goal> </goals> </execution> </executions> </plugin> Error -...

Auto reload with play2

java,maven,playframework,maven-plugin
This is my play2 project having maven nature: pom.xml with relevant code: <packaging>play2</packaging> <plugin> <groupId>com.google.code.play2-maven-plugin</groupId> <artifactId>play2-maven-plugin</artifactId> <version>${play2.plugin.version}</version> <extensions>true</extensions> <configuration> <!-- only if using database evolutions --> <serverJvmArgs>-DapplyEvolutions.default=true</serverJvmArgs> </configuration>...

mvn integration-test command pulls in unwanted unit tests for execution

maven,maven-plugin,maven-surefire-plugin,maven-failsafe-plugin
When I run mvn test it executes unit tests only but when I run mvn integration-test it executes both unit test and integration test even after configuring the maven-failsafe-plugin and excluding the *Test.java file. Not sure what I am missing here. Also worth mentioning that I have not put in...

does maven profile configured for integration phase execute during build life cycle?

maven,maven-plugin,maven-profiles,maven-lifecycle
Here is the condensed snippet of pom.xml from my project <profiles> <profile> <id>run-tests</id> <build> <plugins> <plugin> <groupId>com.google.code.maven-replacer-plugin</groupId> <artifactId>replacer</artifactId> <version>1.5.2</version> <executions> <execution> <phase>pre-integration-test</phase> <goals> <goal>replace</goal> </goals> </execution> </executions> <configuration>...

Is it mandatory to specify maven-failsafe-plugin to run integration tests?

maven,maven-plugin,maven-failsafe-plugin
Sorry about this very basic questions about maven-failsafe-plugin but I am not very much familiar with maven. Is it mandatory to specify maven-failsafe-plugin to run integration tests? Why can't mvn verify execute integration tests just like mvn test executes unit tests? Can integration tests be executed without this plugin? ...

How to exclude folder with files from war maven assebly

java,maven,maven-2,maven-plugin,maven-assembly-plugin
I wanna exclude folder marked with red line. How can I do it? Here is my pom.xml: <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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.test</groupId> <artifactId>Test</artifactId> <packaging>war</packaging> <version>1.0</version>...

Double Instrumentation error on clover plugin

java,maven,java-ee,maven-plugin,clover
I'm using clover maven plugin for a multi module project. I'm experiencing a CloverException upon running the instrument goal for clover. It's displaying "Double Instrumentation detected" appears to have already been instrumented by Clover. I've no idea how this is happening and I've searched on google about it and still...

How to filter attached sources using maven?

java,maven,maven-plugin,sources
There is Apache Maven Source Plugin, that creates a jar archive of source files. It's good, but what if I want to filter source files, and add to jar some of them (for example, marked with annotation or smth else). Is there some maven plugin or tool, that can do...

a dependency to be in classpath only if run a plugin

maven,maven-plugin
For development I run application using jetty through maven (jetty-maven-plugin) and for all other deployments I use tomcat, I want jetty web-socket(javax-websocket-server-impl) libs added to the classpath on if I run my app using jetty maven plugin, in tomcat these are inbuilt so I need not tell maven to grab...

For a Maven 3 plugin what is the latest way to resolve a artifact

maven,maven-3,maven-plugin
What is the latest way of resolving an Artifact within a Maven 3.2.5 plugin. ArtifactResolver and ArtifactFactory(depreciated) are in the compat library which implies that there is a newer/better way of resolution, but I can not find any examples, docs or searches that do not use the above. Thanks Michael...

Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved

maven,maven-2,maven-3,maven-plugin,maven-release-plugin
I have install maven in my machine. I have properly set the class-path and maven home folder. Every time I execute mvn clean install, it gives me exception. I have also tried to delete the .m2 folder but the same result. mvn -version output Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T19:57:37+08:00) Maven...

how to solve spring mvc org.springframework.security error?

spring,maven,spring-mvc,spring-security,maven-plugin
When i try to add this 2 Dependency in my pom.xml it's give error in pom.xml file. 1)org.springframework.security:spring-security-taglibs:3.2.8.RELEASE 2)org.springframework.security:spring-security-config:3.2.8.RELEASE i face this error : Missing artifact org.springframework.security:spring-security-taglibs:jar:3.2.8.RELEASE and Missing artifact org.springframework.security:spring-security-config:jar:3.2.8.RELEASE how can i solve it. ...

Renaming static files when building WAR file using Maven

java,maven,maven-3,maven-plugin,maven-war-plugin
I want to rename static files when building my WAR file using maven-war-plugin, with version number. For intance, in my project I have a file: src/main/webapp/css/my.css I want it to appear in the WAR file as: css/my-versionNumber.css The same question was already asked (see Rename static files on maven war...

Only include specific issues in maven-changes-plugin JIRA report

java,maven,report,jira,maven-plugin
I'm currently using the maven-changes-plugin to generate a JIRA report for a given fixVersionId, as follows: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-changes-plugin</artifactId> <version>2.9</version> <configuration> <fixVersionIds>16355</fixVersionIds> </configuration> </plugin> However, what if instead of specific fixVersionIds, I want to be able to include specific issues? Is there a way to do that? I don't see...

maven plugin - get generated-sources directory

maven,maven-plugin
I am developing a Maven plugin. Is there a way to get the location of the target\generated-sources directory? It is possible to get the location of the target directory as following: @Mojo(...) public class MyMojo extends AbstractMojo { @Parameter(defaultValue = "${project.build.directory}", readonly = true) private File target; .... This gives:...

Compilation Error on maven

java,eclipse,maven,maven-plugin
Working on maven project. I m trying to build using maven but I m getting the following error! I m working on eclipse using JDK 8. Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) I also tried the above solution, but still I m getting error! [INFO] Scanning for projects... [INFO] [INFO]...

gradle maven plugin - how to customise maven upload's archive name

maven,gradle,maven-plugin,build.gradle
In a gradle script, I am able to customise the name of a built WAR archive by adding the following line: war.archiveName = "${war.baseName}##${war.version}.${war.extension}" This line would cause a generated WAR to be named something like this: project-name##1.0.1.war instead of project-name-1.0.1.war However, when the WAR file is then uploaded to...