maven-2

Code Analysis Tools and Inter-Type-Declarations

亡梦爱人 提交于 2019-12-03 23:22:49
I have a maven project generated by Spring Roo and use several tools (checkstyle, pmd etc.) to collect information about my project. (namely I am using codehaus' sonar for this) Roo makes heavy use of AspectJ Inter Type Declarations (ITD) to seperate concerns like persistence, javabeans-getter/setters etc. These ITDs are woven in at compile-time so tools like checkstyle and pmd (who work on source-level) have a lot of false positives. The only solution I currently see, is to deactivate checks for Classes that use ITDs. Any better ideas? This answer would not help you right now, but hopefully

Override Maven plugin configuration defined in the pom pluginManagement from the command line

血红的双手。 提交于 2019-12-03 22:57:06
The POM that my project inherits contains some <pluginManagement> for the release plugin that specifies some additional arguments . My question is: Is there a way to override the arguments parameter from the command line in this case? The parent POM has this: <pluginManagement> <plugin> <artifactId>maven-release-plugin</artifactId> <configuration> <arguments>-Prelease</arguments> </configuration> </plugin> </pluginManagement> Due to that the command line argument doesn't work: mvn release:prepare -Darguments="-Pmock -Prelease" The -Darguments="-Pmock -Prelease" part has no effect. When

Maven & Protobuf compile error: Cannot find symbol in package com.google.protobuf

十年热恋 提交于 2019-12-03 22:18:12
I'm new to Linux and Protobuf.. I need help. I'm trying to "mvn package" a project that contains many ".proto" files, and a pom.xml file of course... I'm working on Ubuntu ======================================= ERROR When I run "mvn package", I receive this error: after ... Compiling 11 source files to .../target/classes ... I get a bunch of these errors: [ERROR] .../target/generated-sources/...java:[16457,30] cannot find symbol [ERROR] symbol : class Parser [ERROR] location: package com.google.protobuf [ERROR] [ERROR] .../target/generated-sources/...java:[17154,37] cannot find symbol [ERROR]

m2e shade eclipse “project main artifact does not exist”

允我心安 提交于 2019-12-03 22:15:13
I'm trying to make a deployment package that bundles all the dependencies of my maven module that has dependencies to another maven project in eclipse. I have this in my pom.xml <modelVersion>4.0.0</modelVersion> <groupId>com.my.proj</groupId> <artifactId>AAA</artifactId> <version>0.0.2-SNAPSHOT</version> <name>btc</name> <dependencies> <dependency> <groupId>com.another.proj</groupId> <artifactId>BBB</artifactId> <version>1.4-SNAPSHOT</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId>

How do I get m2eclipse to recognize $M2_OPTS?

跟風遠走 提交于 2019-12-03 22:11:59
It appears m2eclipse is not recognizing my $M2_OPTS variable. I can run the same build outside of eclipse fine (with cranked up heapsize): [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 51 seconds [INFO] Finished at: Tue Nov 10 00:00:02 EST 2009 [INFO] Final Memory: 72M/187M [INFO] ------------------------------------------------------------------------ But when I run this with m2eclipse I always run out of memory: [INFO] ------------------

Common test data for multiple independent maven projects

﹥>﹥吖頭↗ 提交于 2019-12-03 21:16:44
I have a maven project that converts text files of a specific format to another format. For testing I have put in src/test/resources a large amount of test files. I also have another project that uses the first one to do the conversion and then do some extra stuff on the output format. I also want to test this project against the same test dataset, but I dont want to have duplicate data sets and I want to be able to test the first project alone since it is also a standalone converter project. Is there any common solution for doing that? I dont mind not having the test dataset inside the

Add Maven generated site to generated package

左心房为你撑大大i 提交于 2019-12-03 21:13:19
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! Using site:jar and then the assembly plugin to create a bundle of everthing should be possible. I'm posting here to document a solution

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

为君一笑 提交于 2019-12-03 20:33:32
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 helpful to see how it should be used. Here is the test code using InitialContext: public void testEcho()

maven snapshot updates

孤人 提交于 2019-12-03 19:54:04
问题 I have a maven project with a snapshot dependency. How does maven know if the snapshot needs to be updated? Does it always update? Is it time based? A checksum based update? I know I can force an update but otherwise, how does it check? thanks, Jeff 回答1: According to the docs, the default is that it will only update once a day. That is when the first build of the day is executed. You can override this behavior with the snapshot-policy element. always - always check when Maven is started for

Builds are tagged unstable even when they are successful

大城市里の小女人 提交于 2019-12-03 19:44:37
问题 I am running Jenkins version 1.411 and use Maven for building. Even though the application builds successfully, Jenkins treats it as an unstable build. I have disabled all tests to isolate the problem. [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 45.389s [INFO] Finished at: Wed May 11 12:16:57 EST 2011 [INFO] [DocLinks] Skip document