maven

how do I get sbt to use a local maven proxy repository (Nexus)?

Hello, I've got an sbt (Scala) project that currently pulls artifacts from the web. We'd like to move towards a corporate-standardized Nexus repository that would cache artifacts. From the Nexus documentation, I understand how to do that for Maven projects. But sbt obviously uses a different approach. (I understand Ivy is involved someho...

Maven: invoke method in _running_ virtual machine? Java debug interface plug-in?

Dear All: I am interested in the following potential functionality in Maven. I have one Java VM running that has a static method in a class that I'd like to invoke. I run Maven, and would like to invoke this method. One alternative is to use the following API somehow from a plug-in: Java Debug Interface http://download.oracle.com/jav...

Weaving production classes with AspectJ aspects in Maven for tests execution only

I have a project with Maven build and need to add some basic performance tracing to methods. I decided to use AspectJ for this. Main requirement is to weave tracing aspect into production classes but only for unit tests execution phase. I was able to configure weaving in Maven however after execution of tests same production classes wi...

Artifacts with classifiers not copying to local repository

I am using Maven version 2.0.7 and I am using the javadoc and source plugins to create additional artifacts for deploy. All of the generated artifacts are deploying correctly but it seems that when someone else builds they are only getting the specific artifact they specify. I don't want to have to add the source and javadoc artifacts as...

edit a source file using maven at build time

Hi, 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 only one js file combining all js files and minimize it and similarly for css. The problem is USER doesn't want to make changes to template file but instead ask...

run task with maven after specific phace

how run a task post maven eclipse:eclipse phase ? <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.2</version> <executions> <execution> <phase>eclipse:eclipse</phase> <goals> <goal>java</goal> </goals> <configuration> <execu...

Sort maven dependencies in Eclipse

Hello, Just wanted to know if it is possible in Eclipse to sort Maven dependencies by alphabetical order? It's bothering me to have a list of 200 jars not ordered... :( ...

Why is a junit test that is skipped because of an assumption failure is not reported as skipped?

I use junit assumptions to decide whether to run a test or not. Tests where the assumption fails are ignored/skipped by the junit framework. I wonder why skipped tests are not reported as 'skipped'? Please have a look at the example: import static org.junit.Assert.fail; import org.junit.Assume; import org.junit.Test; public class Ass...

Shiro Plugin conflicting with Quartz framework in Grails

Hi All.. I have been working Quartz framework in my grails project with lib called quartz-all-1.7.3. Now I need to install the shiro plugin to my project. So, whenever I am installing shiro plugin to my project its getting installed successfully.. But again whenever I am running my project again it's giving compilation error as follow...

Maven finalName Property Missing Artifact Extension

I'm writing a Maven plugin that takes as a parameter the path to the .jar file built by the project. At the moment I'm using the following definition for my configuration variable within my Mojo class... /** * Location of the built artifact * @parameter expression="${project.build.finalName} * @required */ private File path; The ...

Log4j properties from each module

Hello, I'm writing an application that consists of several maven modules. All of them have to log stuff to their own log files. I created a log4j.properties file in the main/resources folder of each module. Now when I start the application from one of the modules, it writes everything to the log file of that module. I wondered if this w...

Measuring integration test coverage with Maven

The followings are ok now: I have a multi-module project in maven with EJB and WAR projects I want to use JMeter (and later selenium) for integration testing. I can run both from Maven. The JMeter plan is ready, I run it with Chronos maven plugin. My application is a JEE application, so I want to test the code with the planned producti...

How to attach an artifact with assembly-plugin during custom lifecycle

Hello, i'm trying to create a plugin with a custom lifecycle : /** * @goal my-goal * @execute lifecycle="my-custom-lifecycle" phase="attach-foo" */ public class MyMojo extends AbstractMojo { ... with src/main/resources/META-INF/maven/lifecycle.xml file : <lifecycles> <lifecycle> <id>attach-foo</id> <phases> <phas...

redirect and get the output of console of eclipse to string or output text java

i tired to redirect the output of eclipse to an output text , the principale idea is to get the output of eclipse console , th result is the maven description, i want to redirect the output such as hudson console in an output text ...

Access maven project version in Spring config files

I would like to display the currently running version of my web application in the page. The project is based on Maven, Spring, and Wicket. I'd like to somehow get the value of maven's ${project.version} and use it in my spring XML files, similarly to the way I use the Spring PropertyPlaceholderConfigurer to read a property file for set...

i tried to get log details maven file (java eclipse)

can you give me the entry point of this ? ...

how to put dependency in maven not in WEB-INF/lib

Is there a way to put dependency of a war not in WEB-INF/lib but in out custom folder? I'm using Maven 2 Hi, what i need is that from list of dependencies of a war only one artifact should be placed not in WEB-INF/lib but in WEB-INF/bundles/ and others dependencies should be places in WEB-INF/lib thx THX to everybody, i can't update ...

Maven: How to change path to target directory from command line?

Maven: How to change path to target directory from command line? (I want to use another target directory in some cases) ...

Custom properties in Maven based on command line switch

[reduced for simplicity] I have a project with several Maven modules A module has a properties files whose contents are filtered during build There are sets of properties that can be grouped Only one group of properties exists in a given build All groups have the same properties, only their values change between groups parent +- pom.xm...

Is it possible to avoid duplication of maven archiver configuration?

This is my parent pom.xml: [...] <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.0</version> <configuration> <archive> <manifestEntries> <SCM-Revision>${buildNumber}</SCM-Revision> </manifestEntries> </archive> </configuration> </plugin> <plu...