maven-2

How do I make javadoc inheritance work for external APIs? (with Maven2)

给你一囗甜甜゛ 提交于 2019-12-05 04:51:06
When a class overrides a concrete method or implements and abstract method, the Javadoc is automatically inherited unless explicitly overwritten. Or, at least the tool tries to do this. It seems it does not work for linked external APIs. For instance, when I in my code implement java.util.Map , or something else from the JRE, the javadocs are not inherited/copied from the JRE javadocs/apidocs. In my specific case, I am trying to configure this in the Maven2 Javadoc plugin, but it is the same when I run the javadoc CLI tool directly. My Maven2 Javadoc plugin configuration currently looks like

Maven/Eclipse: The default build path for resources excluded everything

陌路散爱 提交于 2019-12-05 04:45:59
I'm using M2E for maven integration with eclipse. My unit tests reference property files in the resources/ directory. Well, everything fine in the command line test ( mvn test ). However, in Eclipse, the resources couldn't be found. Check the Java Build Path, there, all resources entries are marked with Excluded: ** . (I deem it should only exclude .java/ .class files) Then, after removed the exclude pattern, the problem fixed. I'm not sure whether I should remove all Excluded ** by hand, or maybe I doesn't use M2E correctly. P.S. The projects are imported by Existing Maven Projects . It does

Add Maven generated site to generated package

走远了吗. 提交于 2019-12-05 04:10:22
问题 In order to deliver an all-in-one Jar for our project, we are wondering if it is possible to include the project's generated site (generated via the site plugin) into the generated project's package? The idea behind this is very simple, we have a project named "sample" that demonstrates the usage of our API and we want to give the user documentation on the API and its usage in a single bundle. Is it possible using Maven to create such a Jar? Thanks in advance! 回答1: Using site:jar and then the

Where can I find a complete Maven Cargo plugin example for EJB tests?

时间秒杀一切 提交于 2019-12-05 04:08:44
问题 For tests of some small JBoss enterprise apps I would like to use JUnit, and the Maven Cargo plugin. (I know that there is also JSFUnit but first I would like to take a closer look at Cargo.) Is there a simple example available online which I could use as a reference for running a JUnit test which invokes a EJB operation using JBoss (4.2 or 5.1) using the Maven Cargo plugin? I have found some good introductions to the configuration, but I get error messages in the EJB lookup so it would be

Is it possible to single out and run a specific goal bound to a maven phase?

时光怂恿深爱的人放手 提交于 2019-12-05 03:58:05
Updated to (hopefully) clarify : If a goal is defined to run during a given phase, is it possible to run the individual goal without running thru all phases. In other words would it be possible to run the antrun:run goal (which is defined as part of the install phase below) without getting dependencies, generate-resources, compiling, testing, package, etc? I'm using the antrun plugin to create a zip file during the package phase and to delete and copy some files during the install phase. I understand how to run single maven plugin goals, for example: mvn antrun:run . However, is there a way to

include source code while exporting a jar using maven

两盒软妹~` 提交于 2019-12-05 03:57:09
I want to export a jar file using maven which can have the source included in it. I tried using 'maven-source-plugin', but it creates a separate jar file with source. Is there any way that I can export a jar file using maven like a normal eclipse export with source? You can do it with resource section, see example: <build> <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.java</include> <include>**/*.gwt.xml</include> </includes> </resource> </resources> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration>

How can I use different JARs for compiling and testing in maven?

有些话、适合烂在心里 提交于 2019-12-05 03:56:31
I compile my programm against javaee-api. But for Junit testing I must use a specific implementation like glassfish's javaee.jar to avoid errors like java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/persistence/Persistence (see also 1 ). So avoid using methods, that are only available in glassfish implementation, I want to compile my artifact with the general api, but run junit with the implementation jar. But both provide equal named classes and inferfaces, so the class loader gets in trouble. What is the best way to solve this

List of possible classifiers and types in dependencies

一曲冷凌霜 提交于 2019-12-05 03:56:27
I have searched the net for the all the possible values that you can put in the scope tag inside dependency tag, but I haven't found any list with the same data for the classiffier and the type. Anybody knows what I can and cannot put inside this tags? Just to be clear, I am not asking what does the classifier tag or the type tag do, I just want a list of the data that this tag accepts or where can I find it. Thanks! From the Maven Reference : Update Oops, I misunderstood the question. Here is my second shot (important parts italicized by me): The classifier allows to distinguish artifacts

404 Not Found Error in a simple Jetty/Maven Hello World webapp

99封情书 提交于 2019-12-05 03:49:54
I have followed the instructions to create a "Standard WebApp with Jetty and Maven" precisely as described on the eclipse wiki: http://wiki.eclipse.org/Jetty/Tutorial/Jetty_and_Maven_HelloWorld#Developing_a_Standard_WebApp_with_Jetty_and_Maven However when I run the webapp (mvn jetty:run) and go to localhost:8080/hello-world/hello I end up at a "HTTP ERROR 404 Problem accessing /hello-world/hello. Reason: Not Found". I have read through documentation, looked at the wiki page's history, poked around other forums and stackoverflow threads, but can not find the answer to this seemingly simple

Maven Surefire: Unable to fork parallel test execution

会有一股神秘感。 提交于 2019-12-05 03:42:58
using Maven surefire, I'm unable to fork parallel test execution. That is, each of my test cases hs to run in a serapate JVM, hence the forking. In addition, I want my test cases to run in parallel. the first part is working without problem: I'm able to run each test case in its own JVM. the second part, however is still a challene for me. I haven't managed to get the paralle execution of test cases working. Here is how my plugin declaration look like: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.5</version> <configuration>