maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Maines <>
Subject Two issues: goals do not bind, JUnit annotations seem not to work
Date Thu, 26 Feb 2009 03:19:13 GMT
======= Two issues with Maven, perhaps pilot error

I have two issues at the moment,

* Goals do not seem to bind to phases as I expect
* Annotations in JUnit do not seem to be executing at all

The things which do not seem to work are so basic that I'm thinking the 
problems are local to me, and I
need additional insight. Please let me know what I am missing here.  I 
am using the Maven 2.0.9 distribution
under Fedora 9 with no settings file [since tried Maven 2.0.10 as well].

For those who would like to see the POM,  I've inlined it below the 

======= Issue 1: goals do not seem to bind to phases

I believe my pluginManagement section (see POM) should allow me to say,

$ mvn clean test

...and have aspects woven into the result.  As it turns out, AspectJ 
only works when I say,

$ mvn clean aspectj:compile aspectj:test-compile test

...and when it does so, it references in the output the ids of the 
executions I configured in the POM,

[INFO] [aspectj:compile]
[INFO] [aspectj:test-compile]
[INFO] [aspectj:compile {execution: aspectj-compile}]
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [aspectj:test-compile {execution: aspectj-test-compile}]

Also, I wonder whether, if the AspectJ goals were binding correctly to 
phases, I would see them here,

$ mvn help:describe -Dcmd=process-sources
[INFO] 'process-sources' is a phase corresponding to this plugin:

It is a part of the lifecycle for the POM packaging 'jar'. This 
lifecycle includes the following phases:
* validate: Not defined
* initialize: Not defined
* generate-sources: Not defined
* process-sources: Not defined
* generate-resources: Not defined
* process-resources: 
* compile: org.apache.maven.plugins:maven-compiler-plugin:compile
* process-classes: Not defined
* generate-test-sources: Not defined
* process-test-sources: Not defined
* generate-test-resources: Not defined
* process-test-resources: 
* test-compile: org.apache.maven.plugins:maven-compiler-plugin:testCompile
* process-test-classes: Not defined
* test: org.apache.maven.plugins:maven-surefire-plugin:test
* package: org.apache.maven.plugins:maven-jar-plugin:jar
* pre-integration-test: Not defined
* integration-test: Not defined
* post-integration-test: Not defined
* verify: Not defined
* install: org.apache.maven.plugins:maven-install-plugin:install
* deploy: org.apache.maven.plugins:maven-deploy-plugin:deploy

======= Issue 2: annotations in JUnit do not seem to be executing at all

The tests all function as though the JUnit annotations I used, @Test and 
@Before, are not there, though the compiler
seems to process them, and complain if they are incorrectly included. 
The versions I configured I think should allow
for annotations. See POM below for version numbers.


This is my first post to this list, please pardon any inadvertent breach 
of process or etiquette.

Thanks in advance,


======= Inlined POM

<project xmlns="" 





To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message