maven-plugin

Using Maven for C/C++ projects

北城以北 提交于 2019-11-27 05:59:20
I'm putting Maven build around cluster of amateur, poorly written and frankly - primitive C/C++ code (meaning some C, some C++). Problem is - there's lots of it in circulation currently and cannot be easily replaced. Building it requires a lot of tribal knowledge (you have to go from cube to cube just to find out how to compile/build various parts) and releasing is total nightmare. (No - I'm not going to rewrite it, plz don't ask) My question is - should I use maven-native-plugin to replace multitude of short makefiles or use exec-maven-plugin to simply execute these? I had pretty good

How to create a project using maven-archetype-plugin? What is artefactId etc?

余生颓废 提交于 2019-11-27 05:16:42
问题 I am new to Maven and am using the maven.apache.org tutorial here as an introduction. In the " How do I make my first Maven project? " section of the tutorial, it teaches us to generate a Maven archetype project by executing the following command: mvn archetype:generate After Maven downloaded many artifacts, it suddenly stopped and asked the following question on the command line: Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): 149: The Apache tutorial

Invoking Actions other than Build and Clean & Build

喜你入骨 提交于 2019-11-27 03:23:22
问题 I am new to NetBeans and am trying to define and run various custom goals for my Maven proj. My Maven proj uses a number of plugins; once for building the Java classes, another for pre-compiling JSPs, another for building an OSGi bundle, and another for deploying to my dev app server. It seems that by default, NetBeans has Build, and Clean & Build as easily accessible "build options" in the main toolbar bar. These trigger the install goal which runs through the entire build processes

maven compilation error: duplicate classes

假装没事ソ 提交于 2019-11-27 03:13:18
问题 In my maven2 project I have a directory ${basedir}/autogen that contains some autogenerated source code files produced by wsdl2java . When running mvn compile I get an compilation error, because of duplicate classes, that lives in ${basedir}/autogen . This is true. But what is the compilation phase doing in ${basedir}/autogen ? I have not told maven to add this directory as a source directory. And there seems to be no way of telling maven to ignore the directory. 回答1: I had the same problem

Maven plugin to restrict specific packages from being used

别等时光非礼了梦想. 提交于 2019-11-27 02:16:33
问题 I work in a team of around 40 developers, and I do not want any developer to use some specific API(java.sun.Base64 to be precise) to be used by any of the developers and rather make them use alternatives to the sun API as its proprietary. Are there any plugins for maven, by which , specifying the restricted packages in the pom.xml , the build will break if any of those packages are being used anywhere in the code?? Or is there a more graceful way to do this?? Thanks 回答1: You want to define an

Maven assembly : add different version of the same artifact

强颜欢笑 提交于 2019-11-27 01:51:10
I create my application archive with the maven assembly plugin. All the dependency present in my pom are included without any problem. Now I need to include two or more version of the same artifact. If in my pom I put <dependencies> [...] <dependency> <groupId>db.test</groupId> <artifactId>my-model</artifactId> <version>1.0.3</version> </dependency> <dependency> <groupId>db.test</groupId> <artifactId>my-model</artifactId> <version>1.1.0</version> </dependency> </dependencies> Of source the dependenvcy resolver remove the old version and only the 1.1.0 is packaged in the archive I try to

How can I add war file to another java web application dependencies?

我的梦境 提交于 2019-11-27 01:50:58
问题 I have web maven project. Project's output is a war file. I want to add this war file as dependency to project_b. The project_b's pom.xml file, have a plugin as following: ... <plugin> <inherited>true</inherited> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.3</version> <configuration> <warName>geoserver</warName> <webappDirectory>${project.build.directory}/geoserver</webappDirectory> <packagingExcludes>WEB-INF/lib/servlet-api*.jar<

Multiple antrun tasks in maven

末鹿安然 提交于 2019-11-27 00:56:15
问题 How would you execute ant tasks at different phases in a maven build cycle? 回答1: I used this in the build/plugins section <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <id>clean</id> <phase>clean</phase> <configuration> <tasks> <echo message = ">>>>>>>>>>>>>>>>>>>>>>>>>>clean"/> </tasks> </configuration> <goals> <goal>run</goal> </goals> </execution> <execution> <id>compile</id> <phase>compile</phase> <configuration> <tasks> <echo message = ">>>>>>>>>>>>>>>>>>

Tomcat 7 - Maven Plugin?

断了今生、忘了曾经 提交于 2019-11-27 00:39:09
I just wanted to double-check, has anyone found or is working on a Tomcat 7 plugin? If not, is anyone interested in helping me get it up and running? I want another quick alternative to Glassfish, JBoss AS 6.0 is a bit heavy still for quick mockups. Walter Pascal Thivent There is t7mp - a Tomcat 7 Maven Plugin - on Google code. Cargo (and its Cargo Maven2 Plugin) also has support for Tomcat 7 (this was CARGO-790 ). Apache Tomcat Maven Plugin 2.0-beta-1 supports Tomcat 7. It work for me as the following. My setting.xml <server> <id>local_tomcat</id> <username>ray</username> <password>password<

m2e lifecycle-mapping not found

十年热恋 提交于 2019-11-27 00:09:01
I am trying to use the solution described here to solve the annoying "Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:build-helper-maven-plugin:1.7:add-source (execution: default, phase: generate-sources)" when I place the following plugin on my pom.xml: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <executions> <execution> <phase>generate-sources</phase> <goals><goal>add-source</goal></goals> <configuration> <sources> <source>src/bootstrap/java</source> </sources> </configuration> </execution> </executions> </plugin