Greetings

First off apologies if this sort of issue has been answered before.  I
did as thorough a search as I could and couldn't find anything
resembling it. 

Am attempting to use Clover for code coverage.  I've set up the pom and
settings as instructed by the atlassian folks
(http://confluence.atlassian.com/display/CLOVER/Clover-for-Maven+2+User%
27s+Guide).  Details of this are at the end of this email.  Atlassian
support has verified that things are set up correctly.   


When I do a myriad of maven tasks (clean, package, whatever), the
correct Clover maven plugin (3.6) is pulled down from their repository
from the atlassian repository from the correct
directory(com\atlassian\maven\plugins).   However, when I attempt to
perform a Clover goal (in this case, clover:instrument),  maven goes
thru all sorts of machinations and then pulls down an old plugin (2.4.1)
from the wrong directory (org/apache/maven/plugins).  It then horks.
The ultimate reason why this is happening seems to be the metadata.xml
files that are in org/apache/maven/plugins.  They reference a clover
plugin 

<plugin>
<name>Maven Clover Plugin</name>
<prefix>clover</prefix>
<artifactId>maven-clover-plugin</artifactId>
</plugin>

When I remove this block from the metadata files, it does not attempt to
download nor use this old plugin.  

1)  Why is this happening?
2)  Is there a way to get maven to change the order in which it looks
for plugins (so it will find the new version first), or at least ignore
the old version?

Here is the -X output from the build. 


[INFO] Searching repository for plugin with prefix: 'clover'.
[INFO] com.atlassian.maven.plugins: checking for updates from
atlassian-m2-repository
[INFO] com.atlassian.maven.plugins: checking for updates from Home
Plugin Repository
[DEBUG] repository metadata for: 'com.atlassian.maven.plugins' could not
be found on repository: Home Plugin Repository
[INFO] com.atlassian.maven.plugins: checking for updates from central
[DEBUG] repository metadata for: 'com.atlassian.maven.plugins' could not
be found on repository: central
[INFO] com.express-scripts.ccs.framework: checking for updates from
atlassian-m2-repository
[DEBUG] repository metadata for: 'com.express-scripts.ccs.framework'
could not be found on repository: atlassian-m2-repository
[INFO] com.express-scripts.ccs.framework: checking for updates from Home
Plugin Repository
[INFO] com.express-scripts.ccs.framework: checking for updates from
central
[DEBUG] repository metadata for: 'com.express-scripts.ccs.framework'
could not be found on repository: central
[INFO] org.apache.maven.plugins: checking for updates from
atlassian-m2-repository
[INFO] org.apache.maven.plugins: checking for updates from Home Plugin
Repository
[DEBUG] repository metadata for: 'org.apache.maven.plugins' could not be
found on repository: Home Plugin Repository
[INFO] org.apache.maven.plugins: checking for updates from central
[INFO] org.codehaus.mojo: checking for updates from
atlassian-m2-repository
[DEBUG] repository metadata for: 'org.codehaus.mojo' could not be found
on repository: atlassian-m2-repository
[INFO] org.codehaus.mojo: checking for updates from Home Plugin
Repository
[DEBUG] repository metadata for: 'org.codehaus.mojo' could not be found
on repository: Home Plugin Repository
[INFO] org.codehaus.mojo: checking for updates from central
[INFO] artifact org.apache.maven.plugins:maven-clover-plugin: checking
for updates from atlassian-m2-repository
[INFO] artifact org.apache.maven.plugins:maven-clover-plugin: checking
for updates from Home Plugin Repository
[DEBUG] repository metadata for: 'artifact
org.apache.maven.plugins:maven-clover-plugin' could not be found on
repository: Home Plugin Repository
[INFO] artifact org.apache.maven.plugins:maven-clover-plugin: checking
for updates from central
[DEBUG] maven-clover-plugin: resolved to version 2.4.1 from repository
central
[DEBUG] Trying repository central
Downloading: http://[our mirror of the maven central
repository]/maven/org/apache/maven/plugins/maven-clover-plugin/2.4.1/mav
en-clover-plugin-2.4.1.pom
[DEBUG] Artifact not found - using stub model: Unable to locate resource
in repository

  org.apache.maven.plugins:maven-clover-plugin:pom:2.4.1

from the specified remote repositories:
  central (http://[our mirror of the maven central
repository]/maven-repository/maven),
  atlassian-m2-repository (http://repository.atlassian.com/maven2),
  ESI CCS Plugin Repository (http://[Home]/maven-repository/ccs)

[DEBUG] Using defaults for missing POM
org.apache.maven.plugins:maven-clover-plugin:pom:2.4.1
[DEBUG] Trying repository atlassian-m2-repository
Downloading:
http://repository.atlassian.com/maven2/org/apache/maven/plugins/maven-cl
over-plugin/2.4.1/maven-clover-plugin-2.4.1.jar
30K downloaded

Here is my setup 

In settings.xml 

                        <pluginRepositories>
                                <pluginRepository>
                                        <id>atlassian-m2-repository</id>
                                        <name>Atlassian Maven 2.x
Repository</name>
        
<url>http://repository.atlassian.com/maven2</url>
                                </pluginRepository>
....


        <pluginGroups>
                <pluginGroup>com.atlassian.maven.plugins</pluginGroup>
....bbv  `


And in my pom  (in this case the ccsapon pom) 

....
                        <plugin>
        
<artifactId>maven-clover-plugin</artifactId>
        
<groupId>com.atlassian.maven.plugins</groupId>
                                <version>3.6</version> <!-- added in an
attempt to specify the correct version -->
                                <configuration>
        
<licenseLocation>${clover.licenseLocation}</licenseLocation>
                                </configuration>
                        </plugin>
                </plugins>

******* Confidentiality Notice *******
This email, its electronic document attachments, and the contents of its 
website linkages may contain confidential health information.  This information 
is intended solely for use by the individual or entity to whom it is addressed. 
 If you have received this information in error, please notify the sender 
immediately and arrange for the prompt destruction of the material and any 
accompanying attachments.


Reply via email to