maven-plugin

Tomcat-maven-plugin 401 error

♀尐吖头ヾ 提交于 2019-11-29 11:25:23
i am learning tomcat basics and while i tried to deploy my web-application on tomcat i am getting the following error [ERROR] Failed to execute goal org.codehaus.mojo:tomcat-maven-plugin:1.1:deploy (default-cli) on project struts2-demoapp: Cannot invoke Tomcat manager: Server returned HTTP response code: 401 for URL: http://localhost:8080/manager/html/deploy?path=%2FmkyWebApp&war= -> [Help 1] [ERROR] as per this it seems war file location is not being passed to the tomcat manager.i have the following entries in my tomcat-user.xml tomcat-users> <user name="admin" password="admin" roles="admin

java.lang.ClassNotFoundException: org.sonatype.aether.version.InvalidVersionSpecificationException

核能气质少年 提交于 2019-11-29 11:22:29
问题 I am using the maven indexer to fetch the maven index from the maven central repository. Since I updated from org.sonatype.aether to org.eclipse.aether and from maven 3.0.5 to maven 3.1.0 I am getting this Exception. Caused by: java.lang.ClassNotFoundException: org.sonatype.aether.version.InvalidVersionSpecificationException at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass

How to include external jars in maven jar build process?

岁酱吖の 提交于 2019-11-29 09:12:11
I want to build a .jar file with dependencies in maven. Unfortunately I have to include some external .jars in my buildpath. When I now try to build this project with maven package I will get an error that those external .jars are not found. How to adapt my pom file to add those jars? current: <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution>

How to add a file to a war with Maven

拥有回忆 提交于 2019-11-29 08:40:22
问题 I have developed a maven plugin that downloads the release notes from JIRA. It's bound by default to the 'generate-sources' phase and creates a 'release.txt' file in the build folder (${project.build.directory}). My question: how can I add this file in the 'WEB-INF' folder of the war file built by Maven ? I know I can use the 'maven-war-plugin' to include additional external resources from the 'src' folder, but I don't want my 'release.txt' file generated there (=not commitable to svn).

Could not calculate build plan :artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.4.3 is not available in the local repository

删除回忆录丶 提交于 2019-11-29 06:56:52
I have a spring maven 2 project. I built it in terminal and everything is ok, I got build success, but when trying to import it to eclipse I got this error: Could not calculate build plan: The repository system is offline but the artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.4.3 is not available in the local repository. although I am getting build success in terminal and projects run fine. I made maven offline in eclipse, and disabled download index on startup any ideas why I am getting this error? If your pom is not specific as to the version of the maven-resources-plugin,

Maven failure to find maven-plugins:maven-cobertura-plugin

风格不统一 提交于 2019-11-29 06:45:40
I try to compile maven web project with <dependency> <groupId>org.springframework.ws</groupId> <artifactId>spring-ws</artifactId> <version>3.0.5-FINAL</version> </dependency> The problem is that when I try compile it I get the following errors: [ERROR] Failed to execute goal on project inferx-d2aserver: Could not resolve dependencies for project com.inferx:inferx-d2aserver:war:4.0: The following artifacts could not be resolved: maven-plugins:maven-cobertura-plugin:plugin:1.3, maven-plugins:maven-findbugs-plugin:plugin:1.3.1, org.springframework.ws:spring-ws:jar:3.0.5.RELEASE: Failure to find

Resolve maven plugin issue: ' Unable to load mojo'

爱⌒轻易说出口 提交于 2019-11-29 06:15:39
问题 I have configured all the dependencies in my pom.xml through maven. When i give the command mvn install I get the following error: [INFO] Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-surefire-plugin:2.4.3:test': Unable to load the mojo 'org.apache.maven.plugins:maven-surefire-plugin:2.4.3:test' in the plugin 'org.apache.maven.plugins:maven-surefire-plugin'. A required class is missing: org/apache/maven/surefire/util/NestedCheckedException org.apache

how to avoid UTF-8 encoding for binary with maven-resources-plugin?

坚强是说给别人听的谎言 提交于 2019-11-29 06:15:16
I'm using the maven-resources-plugin to copy some resources from my project but one of my resources is a binary file. The output says it is Using 'UTF-8' encoding to copy filtered resources which I my problem!!! Here is my plugin configuration. <plugin> <artifactId>maven-resources-plugin</artifactId> <version>2.5</version> <executions> <execution> <id>copy-resources</id> <!-- here the phase you need --> <phase>validate</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${project.build.directory}/autopublisher</outputDirectory> <resources> <resource>

Maven - Generate Jar and War

放肆的年华 提交于 2019-11-29 05:54:09
问题 I have a CXF WS project that I would use it in another project, I would consume this WS in a Web Project but I don't know how to generate Jar file. Please have you any idea or an example? Thank you 回答1: The maven-war-plugin supports creating a separate artifact that just contains the classes. http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html See the 'attachClasses' parameter. No need to add in the jar plugin or mess with the packaging. Just add the war plugin to pluginManagement

how to use class file from another war

六月ゝ 毕业季﹏ 提交于 2019-11-29 03:27:29
We have two different web application and we want to extend few controllers of one war into another war. We are using maven to build the project. to include war we have given its dependency as <dependency> <groupId>com.abc.exchange</groupId> <artifactId>employer</artifactId> <version>2.3.M2-SNAPSHOT</version> <type>war</type> <scope>compile</scope> </dependency> It is unable to build giving class not found exception. Can any body help me out how to achieve this? I am getting error maven build failed : [INFO] ------------------------------------------------------------------------ [ERROR]