maven-2

How to generate a Maven site from Maven plug-in for NetBeans IDE ?

Hi, I use Maven plugin for NetBeans IDE. But i want to know how to generate a Maven site from Maven plug-in in NetBeas IDE ? What should i set up in order to generate it ? Is there any way ? regards, ...

Does the maven-dependency-plugin use some other kind of artifact resolution than the rest of maven?

If I use the maven-dependency-plugin plugin, than I can't use a version range. Also it seems the version of a there defined artifact doesn't get updated though a newer version is in the remote repository. Why is that so? Uses the maven-dependency-plugin some other mechanism than the rest of maven to resolve dependencies? And if that is...

Why doesn't my Maven plugin pick up parent properties?

When I make one plugin extend another it normally inherits the properties from the parent. Sometimes it doesn't work though. When the plugin is loaded up, the properties from the parent are all null What might I be doing wrong? I package my project as a maven-plugin and it builds ok. ...

How do I add time-stamp information to Maven artifacts?

I am upgrading a large build-system to use Maven2 instead of Ant, and we have two related requirements that I'm stuck on: We need to generate a time-stamped artifact, so a part of the package phase (or wherever), instead of building project-1.0-SNAPSHOT.jar we should be building project-1.0-20090803125803.jar (where the 2009080...

Best practices for integration tests with Maven?

I have a project which I am building with Maven which uses Hibernate (and Spring) to retrieve data from a database, etc. My "tests" for the DAOs in my project extend Spring's AbstractTransactionalDataSourceSpringContextTests so that a DataSource can be wired into my class under test to be able to actually run the query/Hibernate logic, ...

Can I set the project version with a buildnumber-maven-plugin?

I'm trying to add the svn.revision to project version as a build number and can't seem to do so. My jar has the correct name durin packaging, but its installed in the my local repository it is as if ${buildNumber} is/was undefined when the version was set. I get foo-1.0.0-SNAPSHOT-${buildNumber} instead of foo-1.0.0-SNAPSHOT-304 Any ...

How can I use Maven to get the latest Hibernate release?

I am having trouble getting the latest release of Hibernate via Maven dependency. It appears that the latest I can fetch from a Maven central repository is 3.2.6.GA, and I am interested in using 3.3.2.GA, which is the latest release shown on the hibernate.org site. When I modify my hibernate dependency to this latest version in my proj...

How to share common properties among several maven projects?

I have several projects built by maven, and I want to share some common properties among them - spring version, mysql driver version, svn base url, etc. - so I can update them once and it will be reflected on all projects. I thought of having a single super pom with all the properties, but if I change one of the problem I need to eithe...

Can I use Spring roo in existing project that doesn't use Maven?

Spring Roo can be use in existing projects that follow standard maven layout. So far this appears to mean that projects that doesn't use maven are out of luck. I am wondering what (if any) are the options for such existing projects. Re-arrange the project layout to conform to Maven layout? This appears to be very difficult path for ...

Simulating the Maven2 filter mechanism using Ant

I have a properties file, let say my-file.properties. In addition to that, I have several configuration files for my application where some information must be filled regarding the content of my-file.properties file. my-file.properties: application.version=1.0 application.build=42 user.name=foo user.password=bar Thus, in my configura...

How to execute JUnit and TestNG tests in same project using maven-surefire-plugin ?

Right now I have both type of tests but when I say "mvn test" it only executes TestNG tests and not Junit. I want to execute both one after another. Any Idea ? ...

Managing a Large OSGi Application

Hello, I have a large, growing OSGi application with a number of bundles. I am curious to know the best way to manage this type of application. Currently, I am using Eclipse and Maven, but although this is great for building bundles (via maven-bundle-plugin), as of now it has not been easy to manage the entire application. What I would...

JPA-based JUnit Test Best Practices

This is a bit of an odd question, but it has been bothering me for a few months now. I have built a JPA-based web application using Wicket + Hibernate (built with Maven), and want to test the DAO layer directly. I created a specific src/test/resources/META-INF/persistence.xml file that I used for testing, but have been running into confl...

Why does m2eclipse exclude resources from Eclipse build path?

I am trying out m2eclipse, the Eclipse plugin for Maven, and have noticed that the resources are now excluded from the build path of all my projects. I have seen a question on the M2Eclipse FAQ page which seems to deal with this exact question, but the answer (paraphrased) seems to say that this is intentional to allow resource filterin...

Junit4 and TestNG in one project with Maven

To run them together there are few options available but I have chosen using different profiles for Junit and TestNG. But now problem is with excluding and including test cases. Since if we add testNG dependency to main project in maven it will skip all Junit,I have decided to put it in separate profile. So I am excluding TestNG tests ...

How to filter ressources during build in Eclipse project?

I have an application that uses several configuration files (let just consider appli.properties here). These files contain several values that depend on the environment. We can find some information such as: server.port=${envi.server.port} On other side, I have a set of properties files, one per environment (dev.properties, homolo.pro...

Anyone heard about a standard property deployment.name?

I've just fought for a whole day with a strange maven problem: I had a custom property called "deployment.name" that was never to resolved to what I configured for it, but rather the maven filtering mechanism always replaced it by the project's name. I tried the goal "help:expressions" to find out whether this is a preconfigured prop...

How to send out email notification for Maven build

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

How to stop Maven/Artifactory from keeping Snapshots with timestamps

Hi, Due to disk space considerations I'd like to only ever keep one version of any snapshot in my repository. Rather than keeping multiple versions with timestamp suffixes e.g. ecommerce-2.3-20090806.145007-1.ear How can I set this up? Is this a build setting or repository (Artifactory) setting Thanks! ...

Is there a way to make the Maven build independent of the network connection?

I'm working in a Continuous Integration environment and part of the automated build process includes the compilation of Maven managed projects. What I want to know is if there is a way to make the Maven build independent of the network connection. Currently we have the all the jar's that we need installed in the repository but the pro...