maven-2

Buttons to run Maven targets in NetBeans

余生颓废 提交于 2019-12-05 13:18:02
问题 I'd like to have a button to run (custom) Maven targets in NetBeans 6.9. Hot-keys would also be nice. Is this possible? If it is not possible: is there something like a console where I could Maven commands directly? 回答1: In NetBeans 6.9: Right-click on the project -> Custom -> Goals. Make sure to check "Remember as: ". You can run this by Right-click on the project -> Custom -> "myRememberAsName" I don't know if there is an easy way to assign this to a button or a short cut. 回答2: Instead of

In the Eclipe PMD plugin, can I reference the standard ruleset files?

≡放荡痞女 提交于 2019-12-05 12:53:04
I would like my eclipse PMD plugin configuration to access the same standard ruleset files as the maven-pmd-plugin . You can configure the maven pmd plugin to use a custom set of rule sets like this: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pmd-plugin</artifactId> <version>2.5</version> <configuration> <rulesets> <!-- Two rule sets that come bundled with PMD --> <ruleset>/rulesets/braces.xml</ruleset> <ruleset>/rulesets/naming.xml</ruleset> <!-- Custom local file system rule set --> <ruleset>d:\rulesets\strings.xml</ruleset> <!-- Custom remote rule set accessed

Generating html surefire test html output during test phase

做~自己de王妃 提交于 2019-12-05 12:50:45
问题 I'm not sure if this is a simple question or not, but I'd like surefire to generate html formatted output files(in addition to the xml and txt formatted output files) during the test phase. I've tried to make this happen by adding an 'executions' entry for build>surefire. Is this the correct location for this? If so, am I doing it wrong? <build> .. <plugins> .. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-report-plugin</artifactId> <version>2.6</version>

Maven: Report plugin org.apache.maven.plugins:maven-project-info-reports-plugin has an empty version

馋奶兔 提交于 2019-12-05 12:50:20
问题 I have a Maven 2 project which I build with the following parameters: -B -f <path to pom.xml> clean site -P <several profiles> I see the following warning message in the build log: [INFO] --- maven-resources-plugin:2.6:resources (default) @ autotest --- [INFO] Copying 1 resource [INFO] Copying 1 resource [INFO] skip non existing resourceDirectory C:\Jenkins\workspace\selfTests\${localProfile} [INFO] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] --- maven-resources-plugin:2

How can I embed Maven into my application?

久未见 提交于 2019-12-05 12:38:52
I'd like to embed Maven or the library that does all the magic into my Java application. The keypoints : They are two tasks I want to perform : 1/ Publishing a jar in local repository 2/ Publishing a jar in a private enterprise repository (Nexus) All required jars MUST be located in a public Maven repository The jars SHOULD be Maven version agnostic (ie not specific to Maven 2 or 3) If you can , please provide a snippet with your response. Brett Porter Here is an example embedding Maven 2 libraries: CentralRepositoryService.java pom.xml Instead of looking up the project builder, you can look

Is it necessary to have .java files in /src/main/java when compiling with maven?

为君一笑 提交于 2019-12-05 12:33:25
I tried to convert a project to a maven one... it has its .java files in other location than /src/main/java , when i run maven install, all the files (.hbm , .xml) except those .class occurs in my jar. This is build part from pom.xml : <build> <resources> <resource> <directory>${basedir}/src</directory> <excludes> <exclude>**/*.java</exclude> </excludes> </resource> </resources> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.5</source> <target>1.5</target> <fork>true</fork> <compilerVersion>1.5</compilerVersion> <compilerArguments> <encoding>UTF-8<

Maven release:prepare overwrites SCM properties with resolved values

坚强是说给别人听的谎言 提交于 2019-12-05 12:12:24
I suppose this is kinda obvious, but I still judge it as a shortcoming... I have 23 Mavenized projects. I'm now adding the <scm> bit because I've started using the release plugin. Here was my thought process: I'll add the <scm> section only in my company base POM, and parameterise the URLs with properties, e.g. <scm> <connection>${scmBaseConnection}/${scm.module}/${scm.edition}</connection> <developerConnection>${scmBaseConnection}/${scm.module}/${scm.edition}</developerConnection> <url>${fisheyeBaseUrl}/${scm.module}</url> </scm> Then each project root (aggregator) POM need only declare its

how to add arbitrary information in manifest from maven assembly plugin

こ雲淡風輕ζ 提交于 2019-12-05 12:11:11
问题 i use the assembly plugin to create a uber jar from several maven artifacts. Now I like to add some company specific entries into the Manifest of the created assembly jar. But how ? the archive element doesnt allow arbitrary elements (or is there a way to add foobar: tutu inside the archive tag ?) also in addition with maven-jar-plugin it does not work as this only affects the default artifact of the project and not the assembled. Any idea how to do this ? 回答1: argh... after posting it i

How to create folder for generated sources in Maven?

僤鯓⒐⒋嵵緔 提交于 2019-12-05 12:05:16
I have to generate sources using wsimport and i assume that it should go to /target/generated-sources/wsimport rather than /src/main/java. The problem is that wsimport needs target folder created before execution and it fails. Can I create that dir first using any maven plugin. I can do it using ant but i prefer to keep it in POM. I have to generate sources using wsimport and i assume that it should go to /target/generated-sources/wsimport rather than /src/main/java. This is a correct assumption. The problem is that wsimport needs target folder created before execution and it fails. Can I

Code Analysis Tools and Inter-Type-Declarations

吃可爱长大的小学妹 提交于 2019-12-05 11:39:24
问题 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