maven-2

Maven - Nexus: find dependent projects

本秂侑毒 提交于 2019-12-05 09:32:03
Is there a way in nexus to find all the projects that depend on a particular dependency? We have a list of projects in our nexus repository. We'd need to find all the projects that use a particular dependency. The Artifact Usage Nexus Plugin is an open source plugin for Nexus that can do that. A list of further available plugins and integrations is available in the free Nexus book . Be sure to use the correct version of Nexus with the plugin or fork the project and update it to your version of Nexus. 来源: https://stackoverflow.com/questions/23498313/maven-nexus-find-dependent-projects

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

假如想象 提交于 2019-12-05 09:16:45
问题 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

How do you perform a reactor build in Maven3 without a root project?

会有一股神秘感。 提交于 2019-12-05 08:14:07
How does one perform an ad-hoc reactor build over multiple maven projects without a root project? This used to be possible in maven2 by invoking the mvn command with the '-r' option which would search recursively from the working directory for projects and organize them in the reactor to build in the correct order even if the projects did not share a common parent pom.xml. Optionally one could specifically include or exclude certain projects using maven.reactor.includes and maven.reactor.excludes option. I realize that the legacy reactor mode was removed from maven3 but I can't figure out how

M2Eclipse, META-INF/MANIFEST.MF

杀马特。学长 韩版系。学妹 提交于 2019-12-05 08:01:55
I use the M2Eclipse plugin in Eclipse. And I don't know for what reason, each time I import a Maven project in Eclipse, it always generates an empty - src/main/META-INF/MANIFEST.MF file (jar-packaged projects) - src/main/webapp/META-INF/MANIFEST.MF file (war-packaged projects) I find this a bit annoying ;-) Does someone know how to disable this behavior ? Thanks This was fixed in m2e-wtp 0.13.0. Latest m2e-wtp version can be found at http://download.jboss.org/jbosstools/updates/m2eclipse-wtp/ The root cause of the problem is WTP's Dynamic Web Facet, which automatically creates a MANIFEST.MF

Add additional path to exec-maven-plugin

帅比萌擦擦* 提交于 2019-12-05 07:49:39
I would like to add an additional class path to the exec-maven-plugin. Besides the %classpath, I would like to add an extra path to a directory containing resources (/Users/kornp/resources). Currently, my pom looks like this: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.1.1</version> <configuration> <executable>java</executable> <classpathScope>runtime</classpathScope> <arguments> <argument>%classpath:/Users/kornp/resources</argument> <argument>org.drrabbit.maventest.App</argument> </arguments> </configuration> </plugin> How should I

Parent properties inside maven antrun plugin

谁都会走 提交于 2019-12-05 07:38:11
There is a multi-module project. Inside the child I need to do some complicated stuff (integration test with deploying to application server and so on). So there is an integrationtest child, and from this module I need the root of the parent to reach other modules. I do not want to use "..". There is a property in integrationtest POM: <properties> <main.basedir>${project.parent.basedir}</main.basedir> ... </properties> And there is an antrun plugin with the following content: <plugins> <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <id>render-parameter-sql</id>

m2eclipse resource filtering

一笑奈何 提交于 2019-12-05 07:08:55
I've having problems with resource filtering using m2eclipse Maven support in Eclipse. It seems that filtering only takes place on resources that have changed. This is fundamentally flawed because, if I have a file that references properties (e.g. ${my.property}, if the value of the property changes, the filtering will only be performed if the referencing file is also modified - if I only change the property value (in my pom.xml), the filtering is not applied to the files that that reference it. So, if I make a change to a property in my pom file, the filtering is not applied. However, if I

Eclipse (STS) + Maven

荒凉一梦 提交于 2019-12-05 07:05:57
I basically have 2 questions: Is there a way to invoke maven console from eclipse? (where I could write eclipse:eclipse , and it started building eclipse project) Where does STS unpack it's maven? I'd like to add that path to env variables, so that I could use it from my windows console. Pascal Thivent Is there a way to invoke maven console from eclipse? (where I could write eclipse:eclipse, and it started building eclipse project) You could open a shell inside eclipse , cd into the right directory and run the maven console from there. But, when using M2Eclipse (see next point), you're not

converting an eclipse formatter file to a checkstyle file

拜拜、爱过 提交于 2019-12-05 05:44:39
I have an eclipse formatting file (which contains some configurations) and i want to make the same thing (these configurations) for a checkstyle file to use after with maven build. The Eclipse-Checkstyle plugin provides an export feature to export your preferences. crasp Unfortunately, there is no way to convert a formatter file to a checkstyle ruleset at the moment. You have to do it the other way around as explained here . Otherwise you have to adjust every setting in your formatter manually for checkstyle. 来源: https://stackoverflow.com/questions/8327498/converting-an-eclipse-formatter-file

How to prevent Maven from accessing remote repositories?

限于喜欢 提交于 2019-12-05 04:54:00
How can I enforce Maven to only use my local repository and single specific repository on intranet and not downloading anything from internet? Even my POMs all has single company's internal repository specified, maven goes to internet repositories taken from libs' POM files to fetch dependencies. In your settings.xml (usually under %user.home%/.m2) you can configure this. E.g. <mirrors> <mirror> <id>repo.example.com</id> <mirrorOf>*</mirrorOf> <name>Internal repo</name> <url>http://repo.example.com/repo</url> </mirror> </mirrors> The key part there is the <mirrorOf>*</mirrorOf> which means