build « Development « Maven/Ant Q&A

Home
Maven/Ant Q&A
1.Ant
2.artifact
3.dependency
4.deploy
5.Development
6.eclipse
7.glassfish
8.hudson
9.integration
10.jetty
11.junit
12.m2eclipse
13.module
14.netbeans
15.package
16.plugin
17.POM
18.repository
19.svn
Maven/Ant Q&A » Development » build 

1. Missing aar file in maven2 multi-project build    stackoverflow.com

I'm trying to use maven2 to build an axis2 project. My project is configured as a parent project with AAR, WAR, and EAR modules. When I run the parent ...

2. How can i speed up my maven2 build?    stackoverflow.com

I'm using a local artifactory to proxy the request, but the build and test phases are still a bit slow. It's not the actual compile and tests that are slow, it's ...

3. Preprocessing source code as a part of a maven build    stackoverflow.com

I have a lot of Java source code that requires custom pre-processing. I'd like rid of it but that's not feasible right now so I'm stuck with it. Given that I ...

4. How do you build an SWT application with Maven    stackoverflow.com

I trying to learn swt, and I use maven for all my builds and eclipse for my IDE. When getting the swt jars out of the maven repository, I get:

Exception in ...

5. Maven replacement?    stackoverflow.com

What would you suggest as a replacement to the Maven Java build toolset? Just plain Ant scripts? SCons?

6. How to externalize pieces of maven build file?    stackoverflow.com

I was faced to a problem how to version a configuration file in XML format. The easiest way is to write XSLT updates. Every release of the application has its own ...

7. Stopping EntityResolver from using the internet in maven2 build?    stackoverflow.com

Our build is a standard maven2 build running surefire on jdk 1.5. I know that some of the tests are connecting to the internet to resolve schemas/dtds because they use a ...

8. Maven: how to do parallel builds?    stackoverflow.com

When you build with maven on a multicore / multi-CPU machine it would often be possible to build different subprojects in parallel. Is there a way to do this with maven? ...

9. Is there a Maven Alternative or port for the .NET world?    stackoverflow.com

Is there a Maven Alternative or port for the .NET world? I would love to use a good dependency management system that the Java world has ... but i don't find ...

10. On Maven2, how may I call an URL at the end of a (failed or successful) build?    stackoverflow.com

I've build a small AppeEngine application which displays a green or red screen according to an URL call (/pass or /fail). That page is refreshed ...

11. Why is there no need for Maven in .NET?    stackoverflow.com

I have the impression, that in the .NET-world, there is no real need for a Maven-like tool. I am aware that there is Byldan and NMaven (is it still alive?), ...

12. Is the maven-native-plugin widely used to build C++ projects using maven?    stackoverflow.com

It's been a little while since I did C++ development professionally and I'd like to get caught up on what the current state of C++ development is in a number of ...

13. How to turn off jar compression in Maven    stackoverflow.com

Is there an option in Maven (2.0.9) to turn off jar compression for the entire operation? I'm using Maven both in the build server and in my work station and I'd ...

14. Example code archive using maven    stackoverflow.com

The project is a library that contains the core library code, tests, and example code. At the end of the build process, the following archives should be created:

  • xy-1.1.0-core.jar
  • xy-1.1.0-tests.jar
  • xy-1.1.0-examples.jar
What is the best ...

15. How to create source distribution with self sustainable maven build?    stackoverflow.com

What I want to do is to create source code distribution of my application with all dependencies and burn it on DVD. So that I could build it in 100 years ...

16. How to fail a Maven build on a missing parameter?    stackoverflow.com

I have a environment variable or jvm parameter which must be present. How do I get Maven to fail if this parameter does not exist?

17. How to send out email notification for Maven build    stackoverflow.com

Is there a simple way to send out email notifications in Maven for each build without outside CI tools, just like Ant?

18. Maven - skip parent project build    stackoverflow.com

I know it's mauvais ton to ask twice in a single day but here's another Maven puzzler: I have a parent POM which defines 5 modules (5 subprojects). Since each module is ...

19. Integrate Protocol Buffers into Maven2 build    stackoverflow.com

I'm experimenting with Protocol Buffers in an existing, fairly vanilla Maven 2 project. Currently, I invoke a shell script every time I need to update my generated sources. This is obviously ...

20. Maven like build tool for c++?    stackoverflow.com

I want a good build tool for c++, just like maven is dedicated to Java is there any build tool dedicated to c++ which does all job that maven does ? ...

21. Multi-platform multi-module builds with Maven    stackoverflow.com

I have a large project which uses SWT on several different platforms like windows (32 and 64 bits), linux-gtk (32 and 64 bits) etc. The project has several modules in a ...

22. How to set up maven for two separate projects that depend on the same jar    stackoverflow.com

If this is answered somewhere else, kindly smack me and point me in the right direction. I'm brand new to Maven and trying to wrap my head around how to use it ...

23. With Maven, how can I build a distributable that has my project's jar and all of the dependent jars?    stackoverflow.com

I have a project (of type 'jar') that (obviously) builds a jar. But that project has many dependencies. I'd like Maven to build a "package" or "assembly" that ...

24. What are solid NMaven or build servers for .NET alternatives?    stackoverflow.com

Maven had a long history and is well supported in the Java world. NMaven has received a less successful start and has never become as popular in ...

25. How can I get Maven to generate a jnlp for my project?    stackoverflow.com

I'd like to have Maven2 generate a .jnlp (webstart profile) for my application. There is a maven-jnlp-plugin, but it's deprecated as of somewhere around Maven 1.1-beta2. Is there a more preferred way to ...

26. In Maven, can I specify a relative path above my current project?    stackoverflow.com

I'm learning maven on the fly while doing work on a project with a large set of projects to build. Currently a line in the main build uses an absolute path to ...

27. How to use Continuum to build from multiple branches    stackoverflow.com

I've got a project which is built using Maven and Continuum. We've got several release branches, most of which are in retirement but any could conceivably be resurrected if an ...

28. Maven tool to build web application    stackoverflow.com

i m using eclipse 3.2.2 as IDE. i want maven code to build and deploy my web application, which is using spring web mvc 2.0.

29. How to create a patched build with Maven?    stackoverflow.com

I was wondering if there is a standard way (i.e. a plugin) to apply a set of patches during a Maven build. Patching the code base in a dedicated step before ...

30. How can I fail Maven build if exec:java goal fails?    stackoverflow.com

We're using the Maven exec:java goal to run a custom java application that configures a database for use with our integration tests. We want to use exec:java over exec:exec to be ...

31. Invalid URI with Maven    stackoverflow.com

I am new to maven, while using mvn install I've got this error, any idea? thanks in advance

   java.lang.IllegalArgumentException: Invalid uri 'http://maven.mysite.com:9999/repository/npg/data-recovery/${applicationVersion}/data-recovery-${applicationVersion}.pom': escaped absolute path not valid
    ...

32. Is it possible to build a zip-distribution that would contain a jar-with-dependencies?    stackoverflow.com

I would like to produce a binary zip distribution of my project that would contain an uber jar and a set of scripts. Right now, I am using two descritors, first ...

33. Maven and bit-for-bit identical builds    stackoverflow.com

If your project requirements for a large application with many 3rd party dependencies included: 1) Maintain a configuration management system capable of reproducing from source bit-for-bit ...

34. Is there a way to make Maven build 1.5 and 1.6 bytecode jars simultaneously?    stackoverflow.com

Is there a way to make maven build 1.5 and 1.6 bytecode jars simultaneously. I know I can use classifiers to name them, but this forces to me to build them ...

35. Why maven requires so many options to create a hello world project,can you recommend a more dedicated build tool for Java?    stackoverflow.com

Quoted from here:

mvn archetype:generate -DgroupId=org.sonatype.mavenbook.simple \
                        ...

36. How do I build a hello world class with maven?    stackoverflow.com

Now the source code is ready, how can I build it with maven? Suppose the source file is hw.java I've googled some time, all the solutions requires me to set the directory in ...

37. Maven 2 build Java web services? Help    stackoverflow.com

Has anyone built Java web services using Maven-2. I've read about the jax-ws plugin, but I haven't found any clear documentation or examples on how to use it. I tried building ...

38. Can we start the maven build from the point where it failed    stackoverflow.com

Suppose, I am doing a full build on my large project which has 7 modules and on the 6th module, the build failed because a test failed. Is there any way ...

39. how to use NCover (free) in maven builds    stackoverflow.com

Just an inquiry on how to integrated NCover (free) in .Net project (maven build) I looked at hudson but I guess I can't use it in maven. Thanks!

40. Specifying jar file in maven build argument    stackoverflow.com

We have our project build using maven. We try to run our unit test cases in maven build itself and for doing that we need to add DB2 driver jar in ...

41. Build multiple Maven projects    stackoverflow.com

I'm very new to Maven, and have a question about building multiple Maven projects. We have two Maven projects, Project A and Project B. Project A depends on an artefact generated by Project ...

42. How to build multiple maven projects in one step without a common parent?    stackoverflow.com

I have read that to build multiple Maven projects in one step (with automatic building of dependencies) the Maven reactor plugin can be used. However, all the examples I have seen ...

43. maven jdepend fail build with cycles    stackoverflow.com

Is there way to use the jdepend plugin in maven to fail a build when package cycles exist? I know you can do it fairly easily with ant, but I haven't ...

44. Can maven-exec-plugin fail the build?    stackoverflow.com

I have a maven execution that runs a javascript compressor as a command line program, however, this tool also does some jslint checks as well. If these jslint checks fail so ...

45. how do things like maven-cli-plugin / mvnsh speed up the maven build?    stackoverflow.com

sorry for being dumb here, but I failed to see why these tools can speed up the build. for example (if I understand it correctly), maven-cli requires you to do a build ...

46. Best practices for integrating QTP with Maven build Scripts?    stackoverflow.com

i want to Integrate QTP with the MAVEN build scripts. So that i can achieve continuous integration. Whats the best practices for achieving this? Will Hudson be of any use here? ...

47. How can I call Nant scripts from Maven?    stackoverflow.com

I'm working on a mainly Java based project, that also has a couple of components written in C++. The project is currently built using Ant scripts which invoke Nant to build the ...

48. Simple setup for maven hbm2ddl    stackoverflow.com

I am setting up maven to take annotated java classes and produce some DDL which varies depending on the database. Is there a better way to do this? It ...

49. Is anyone using Maven/NAR for any large scale C/C++ projects?    stackoverflow.com

And, what has your experience been? Do you think that Maven has been well suited to your project, and how would you advise others on following your path? Thanks in advance! ...

50. edit a source file using maven at build time    stackoverflow.com

I have one freemarker template file which loads all css and js files used in web app. But these multiple http requests causing increased page load time. I have asked to use ...

51. Release different configurations with Maven    stackoverflow.com

I'm currently migrating our build process to Maven from Ant. Our application is deployed to many different customers, each with a unique set of dependencies and and configuration. I can implement ...

52. Add file to jar during maven build    stackoverflow.com

I have an xslt that I want to add to my jar file when I do the maven build. I read int he documentation you can add stuff in the resources ...

53. Why does Maven2 check for updates of stax-ex at every build?    stackoverflow.com

Maven2 checks for updates of stax-ex at every build. And it's just checking this single dependency, all other dependencies are updated only once per day. Maven2 output:

artifact org.jvnet.staxex:stax-ex: checking for ...

54. Is there any Maven like tool that works for many languages?    stackoverflow.com

I'm trying to find a tool like Maven (standardized build & packaging, artifact repo, etc) that supports more than Java (and C/C++), specifically Python and .NET (C#) as well. Especially good ...

55. Warning when build maven    stackoverflow.com

A Warning showed "[WARNING] Failed to initialize environment variable resolver. Skipping environment substitution in settings." when i use mvn install -P [evn]. What is the meaning of warning?

56. Creating a Web2.0 application with Maven(or other build tools)    stackoverflow.com

Background: I've been building web apps and web sites for many years, but each time I tend to start from scratch as each project has different requirements. However, this has me ...

57. build maven project with propriatery libraries included    stackoverflow.com

How to create maven pom, which will make project buildable, can I include propriatery jars with my project directly without having to take them from repository? anyone did this before ? ...

58. Build failure due to missing libraries    stackoverflow.com

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project spring-intergation: Compilation failure: Compilation failure:
[ERROR] \spring-intergation\src\main\java\uk\co\dd\spring\domain\User.java:[3,24] package javax.persistence does not exist
[ERROR] \spring-intergation\src\main\java\uk\co\dd\spring\domain\User.java:[4,24] package javax.persistence does not exist
[ERROR] \spring-intergation\src\main\java\uk\co\dd\spring\domain\User.java:[5,24] package javax.persistence does not ...

59. Maven. How to include specific folder or file when assemblying project depending on is it dev build or production?    stackoverflow.com

Using maven-assembly-plugin

<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.1</version>
<configuration>
 <descriptors>
  <descriptor>descriptor.xml</descriptor>
 </descriptors>
 <finalName>xxx-impl-${pom.version}</finalName>
 <outputDirectory>target/assembly</outputDirectory>
 <workDirectory>target/assembly/work</workDirectory>
</configuration>
in descriptor.xml file we can specify
    <fileSets>
    <fileSet>
        <directory>src/install</directory>
  ...

60. What is a good way to create SAR archives with maven?    stackoverflow.com

Actually i found the Maven plugin maven-sar-plugin. It was last published on 2007-11-06. Is there a more uptodate way to create an sar?

61. Where do I find a sequence diagram for how maven does a build?    stackoverflow.com

I'm working on my first maven project and I've been tasked with improving build times on a very large project with lots of modules. I've found that the Sonnatype documents ...

62. RCP build with maven    stackoverflow.com

how to build and package RCP (Rich client Platform ) using Eclipse. is it possible to build as a .jar file. Thanks & regards... PPj

63. Maven project build problems    stackoverflow.com

I have a maven 2 web project which I have checked out of svn. My settings file has a mirror configured. When I do a clean install maven is trying to download ...

64. Problem creating jar through maven    stackoverflow.com

HI, I am trying to creating executable jar using maven. The jar is created and when i try to execute java -jar myjar i get the following error

Caused by: ...

65. exec-maven-plugin goal is not started during build    stackoverflow.com

Hallo, I try to run a main method during my maven build process. Hence, I added the exec-maven-plugin and the following snippet to my pom.xml

<plugin>
     <!-- http://www.vineetmanohar.com/2009/11/3-ways-to-run-java-main-from-maven/ -->
 ...

66. exclude file from maven build    stackoverflow.com

I've a web application with file src/main/webapp/META-INF/context.xml which contains some configuration for testing database. On production server this file is in $TOMCAT_HOME/conf/Catalina/localhost/ROOT.xml and I'm testing with embedded tomcat so I don't ...

67. Maven-assembly-plugin & incremental build    stackoverflow.com

It seems that the assembly plugin (or jar/war plugin) are just dumb. They just can't figure out whenever there is just nothing to do. A basic "Makefile" won't recompile a target if all ...

68. maven; how to break backwards compatibility?    stackoverflow.com

Maven has a version management system that picks the highest version of a library if multiple versions are referenced. For example if a pom A refers to a version 1.1 and ...

69. How do you perform a reactor build in Maven3 without a root project?    stackoverflow.com

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 ...

70. Maven Build Failed    stackoverflow.com

Please Help Me I am getting Maven build failed and getting bellow Error The following mojo encountered an error while executing: Group-Id: org.apache.maven.plugins Artifact-Id: maven-war-plugin Version: 2.0 Mojo: war brought in via: packaging: war

71. what happens when we Build a java web project    stackoverflow.com

I am a newbie to J2EE and I am not able to understand the directory structure created on building the java web project. After bit of googling i understood what we ...

72. Can I use PostgreSQL in Maven build?    stackoverflow.com

I am trying to create an integration test, which requires a running PostgreSQL server. Is it possible to start the server in maven build and stop it when tests are completed ...

73. override maven mirror settings on a build server    stackoverflow.com

we have a settings.xml on a build server that restricts access to outside repositories and forces access to a local repository. with the cooperation of the policy makers behind this, we ...

74. How can I use maven to build a tarball for a project?    stackoverflow.com

OK, lemme set the stage. I have a parent pom, project_maven, that contains 3 modules in its POM, project_common, project_explode, and project_client. project_client has dependencies on both project_common and project_explode. ...

75. Impose build order for a multi-project in Maven    stackoverflow.com

I have a multi project in maven like this:

paren-project
  -> plugin-project
  -> testbed-project
The plugin project generates a JAR, which is manually copied to a specific subdirectory of testbed (using ...

76. Maven build producing empty Jar    stackoverflow.com

I am new to maven and I am trying to do the maven in 5 mins I have been trying to figure out why mvn package is producing an empty ...

77. Maven build issue    stackoverflow.com

I have multi module project where one project contains excel spreadsheet and it is being dropped in the target folder when maven build the project. Now when I do a mvn ...

78. Looking for a Maven shortcut -- including a jar file in a Maven build    stackoverflow.com

I've inherited a Maven project. I'm just using it as a build tool and I'd like to disturb things as little as possible. I have to make a slight ...

79. Open default browser as as build goal    stackoverflow.com

Is it possible to set an execution goal for maven so that the default browser is opened in a given url?

80. selective build with maven    stackoverflow.com

I have maven configured for my java project to build single jar with all the classes. Is it possible to select certain classes and build a separate jar out of them? ...

81. How to invoke the same maven build twice in one call    stackoverflow.com

Is it possible to invoke the same maven build a number of times with different configuration parameters? I have a maven build that creates a number RPMs with the rpm-maven-plugin. I pass ...

82. How to build a jar using Maven?    stackoverflow.com

I want to build my project with Maven. How do I do that?

  • Maven is installed,
  • the project is called Sertsu1
  • it contains a pom.xml-file
What must be entered in the command line ...

83. What is the motivation of using Maven? Can I just create a build script instead?    stackoverflow.com

According to What is Maven the objectives are:

  • Making the build process easy
  • Providing a uniform build system
  • Providing quality project information
  • Providing guidelines for best practices development
  • Allowing transparent migration to new features
Can ...

84. How do I build a Java project with Java 6 against Java 1.4 libraries?    stackoverflow.com

I've got a project that was originally written for Java 1.4, but I only have Java 6 on my Mac and I cannot install Java 1.4. Normally, I'd use a line like ...

85. How do you create libs from 2 maven builds with the same name?    stackoverflow.com

I need to create 2 libraries, a 32 and a 64 bit library, with the same name. I would like to do this in one build in maven however I ...

86. Maven build process - building two projects using one build script    stackoverflow.com

I am trying to figure out how to use Maven for the build process of the project I am involved in. I want something like this: Let's say we have two or ...

87. maven configuring for alpha, beta, prod builds    stackoverflow.com

my project will have different resources for alpha, beta, and prod builds. i use a python script to build and deploy and want to simply pass a variable to the ...

88. what's the usage of extensions in the build section    stackoverflow.com

For some maven POM.xml, I found there are extensions in the build section. What's the purpose to include build extensions?

89. Having problems building a project with Maven    stackoverflow.com

I've just started work on a project that uses maven. However, when I try to build the project I get the following error:

MyClass.java:[7,2] annotations are not supported in -source 1.3
(use -source ...

90. Maven does not know my internal project    stackoverflow.com

I have two projects A and B managed with maven and B depends on A. (Additionally they both have external dependencies from the public repositories). When I run mvn compile on A ...

91. Multiple builds in maven    stackoverflow.com

I build an application and it should be obfuscated.
The tricky thing is that I don't need a single artifact but rather some amount of artifacts that should be obfuscated differently. ...

92. Build system for multi-language project    stackoverflow.com

I am getting ready to embark on a project mainly for experimenting with languages, but also with a hint of usefulness. It will consist of a server-application, written in Erlang, and ...

93. How to run a shell script modifying environment during a maven build?    stackoverflow.com

The context : I have a maven build using maven-nar-plugin, in which I try to compile C++ code using Visual Studio (under its msvc name). Unfortunatly, due to Microsoft installation, ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.