Declare Maven dependency as test runtime only

There is no scope that does exactly what you want here; test is the best available option. A test-runtime scope has been requested before (Re: Need for a test-runtime scope?) and the suggested workaround is exactly the ignoreNonCompile configuration you’ve already discovered. dependency:analyze already has some limitations (“some cases are not detected (constants, annotations with … Read more

What is the difference between “+-” and “\-” in maven dependency tree output?

Those symbols do not have any meaning whatsoever, they are just present to read the output of the tree better! Here’s a more complex output to see better what it does, on a spring-webmvc dependency: [INFO] +- org.springframework:spring-webmvc:jar:4.2.2.RELEASE:compile [INFO] | +- org.springframework:spring-beans:jar:4.2.2.RELEASE:compile [INFO] | +- org.springframework:spring-context:jar:4.2.2.RELEASE:compile [INFO] | | \- org.springframework:spring-aop:jar:4.2.2.RELEASE:compile [INFO] | | \- … Read more

How to get access to Maven’s dependency hierarchy within a plugin

The dependency plugin has the tree goal that does most of this work. It processes a MavenProject using the DependencyTreeBuilder, this returns a DependencyNode with hierarchical information about the resolved dependencies (and their transitive dependencies). You can copy much of the code directly from the TreeMojo. It uses the CollectingDependencyNodeVisitor to traverse the tree and … Read more

Maven WAR dependency

There’s another option since maven-war-plugin 2.1-alpha-2. In your WAR project: <plugin> <artifactId>maven-war-plugin</artifactId> <version>2.1.1</version> <configuration> <attachClasses>true</attachClasses> </configuration> </plugin> This creates a classes artifact which you can use in the acceptance tests project with: <dependency> <groupId>your-group-id</groupId> <artifactId>your-artifact-id</artifactId> <version>your-version</version> <classifier>classes</classifier> </dependency>

Eclipse : Maven search dependencies doesn’t work

Eclipse artifact searching depends on repository’s index file. It seems you did not download the index file. Go to Window -> Prefrences -> Maven and check “Download repository index updates on start”. Restart Eclipse and then look at the progress view. An index file should be downloading. After downloading completely, artifact searching will be ready … Read more

Force re-download of release dependency using Maven

You cannot make Maven re-download dependencies, but what you can do instead is to purge dependencies that were incorrectly downloaded using mvn dependency:purge-local-repository See: http://maven.apache.org/plugins/maven-dependency-plugin/purge-local-repository-mojo.html This looks up the list of all transitive dependencies of the current project, deletes them, then redownloads them. You can even add it as a plugin into your pom if … Read more

What is pluginManagement in Maven’s pom.xml?

You still need to add <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> </plugin> </plugins> in your build, because pluginManagement is only a way to share the same plugin configuration across all your project modules. From Maven documentation: pluginManagement: is an element that is seen along side plugins. Plugin Management contains plugin elements in much the same way, except … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)