Tomcat 7 – Maven Plugin?

It work for me as the following. My setting.xml <server> <id>local_tomcat</id> <username>ray</username> <password>password</password> </server> My plugin configuration <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>tomcat-maven-plugin</artifactId> <configuration> <server>local_tomcat</server> <url>http://localhost:8080/manager/text</url> </configuration> </plugin> My tomcat-users.xml <role rolename=”manager-gui”/> <role rolename=”manager-script”/> <user password=”password” roles=”manager-gui, manager-script” username=”ray”/>

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

m2e lifecycle-mapping not found

The org.eclipse.m2e:lifecycle-mapping plugin doesn’t exist actually. It should be used from the <build><pluginManagement> section of your pom.xml. That way, it’s not resolved by Maven but can be read by m2e. But a more practical solution to your problem would be to install the m2e build-helper connector in eclipse. You can install it from the Window … Read more

Maven 3 warnings about build.plugins.plugin.version

Add a <version> element after the <plugin> <artifactId> in your pom.xml file. Find the following text: <plugin> <artifactId>maven-compiler-plugin</artifactId> Add the version tag to it: <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> The warning should be resolved. Regarding this: ‘build.plugins.plugin.version’ for org.apache.maven.plugins:maven-compiler-plugin is missing Many people have mentioned why the issue is happening, but fail to suggest a fix. All … Read more

Unsupported major.minor version 52.0 in my app

I face this problem too when making new project from android studio. I’ve been able to resolve this by downgrading buildToolsVersion in app gradle setting: change {module-name}/build.gradle line buildToolsVersion “24.0.0 rc1” to buildToolsVersion “23.0.3” @Edit: In Android Studio 2.1 Go to File-> Project Structure->App -> Build Tool Version. Change it to 23.0.3 Do the method … Read more

What is the best way to avoid maven-jar?

In Maven 3.0.x (I tried 3.0.2) you can disable maven-jar-plugin by binding the default-jar execution to a nonexistent phase, as @bmargulies suggested. Unfortunately that doesn’t work in 2.2.1, but you can prevent it from interfering with your own jar by setting an alternative <finalName> and <classifier> for the default-jar execution; it will still create a … Read more

How do I create a new packaging type for Maven?

To do as you described, create a Maven project with packaging jar (as stated here, as there won’t be mojo definitions). In the src/main/resources/META-INF/plexus sub-folder create a components.xml with the following contents (assuming you want the packaging type to be “my-custom-type”, change it to “foobar” if you wish). <component-set> <components> <component> <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role> <role-hint>my-custom-type</role-hint> <implementation> org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping … Read more

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