Getting dependency artifact path

2010-04-22 Thread Tim Andersen
I'm working on creating a plugin and am having a little difficulty with getting 
a path from a dependency.

I found a great guide at 
http://docs.codehaus.org/display/MAVENUSER/Mojo%20Developer%20Cookbook

At the bottom of the page it has a code example but the 
project.getDependencyArtifacts() returns an empty list.  How can I get my 
plugin to find the dependencies of the project it is part of?

Tim

This e-mail and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom

they are addressed. If you have received this e-mail in error please notify the 
originator of the message. This footer also

confirms that this e-mail message has been scanned for the presence of computer 
viruses. Any views expressed in this message are

those of the individual sender, except where the sender specifies and with 
authority, states them to be the views of Iowa Student

Loan.



 


Maven Log Analyzer?

2009-09-22 Thread Tim Andersen
I'm looking for a Maven plugin (or some other way, we use Teamcity) to make my 
build fail if the build log contains a keyword (let's use an example: 
"BadSqlGrammarException").   I searched for "maven log analyzer" and "maven 
fail exception" and didn't find anything useful.  I acknowledge that some of 
our tests might need to be improved to fail when these exceptions occur, but I 
want to make sure the buildserver does not falsely report a passing build.

Tim Andersen

This e-mail and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom

they are addressed. If you have received this e-mail in error please notify the 
originator of the message. This footer also

confirms that this e-mail message has been scanned for the presence of computer 
viruses. Any views expressed in this message are

those of the individual sender, except where the sender specifies and with 
authority, states them to be the views of Iowa Student

Loan.


 


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



RE: Plugin / Tool for local repository

2009-06-16 Thread Tim Andersen
We use a scheduled task that runs a Ruby program to delete our local repository 
if it is older than a week.  You could manipulate this to only delete 
snapshots, but I prefer to get everything fresh to make sure our internal 
mirror is working correctly.  The full version of this program (not included) 
also does nifty chores such as defragging and updating Subversion directories. 
If you're interested in more admin tasks with Ruby I suggest: 
http://www.pragprog.com/titles/bmsft/everyday-scripting-with-ruby

Here's the Ruby code snippet to blast the maven repository:

#Delete the local maven repository if it is older than a week
m2_repo = "c:\\path\\to\\your\\maven\\repo"
if File.exists?(m2_repo)
one_week_in_seconds = 604800
dir_age = start - File.ctime(m2_repo)

if (dir_age > one_week_in_seconds)
puts "#{m2_repo} was created #{dir_age} seconds ago."
puts "Deleting #{m2_repo}"
FileUtils.rm_rf(m2_repo)
puts "Finished deleting #{m2_repo}"
else
puts "Skipped deleting #{m2_repo} it's only #{dir_age} seconds 
old"
end
"No directory #{m2_repo}"
end






-Original Message-
From: Mohan KR [mailto:kmoh@gmail.com]
Sent: Monday, June 15, 2009 1:38 PM
To: 'Maven Users List'
Subject: RE: Plugin / Tool for local repository

same here, interested in any updates on the plugin from the discussion
below. Don't want to whip out another one
if it already exists.


Thanks,
mohan kr

-Original Message-
From: Henri Gomez [mailto:henri.go...@gmail.com]
Sent: Monday, June 15, 2009 9:32 AM
To: Maven Users List
Subject: Re: Plugin / Tool for local repository

I saw an interested thread on mojo-dev about a local repository purge
plugin.

http://www.nabble.com/local-repository-purge-plugin-td16937047.html

Any one know it status ?

2009/6/15 Henri Gomez :
> Good stuff but I also needed the various versions of the project to be
removed.
>
>
>
> 2009/6/15 Anders Hammar :
>>
http://maven.apache.org/plugins/maven-dependency-plugin/purge-local-reposito
ry-mojo.html
>>
>> /Anders
>>
>> On Mon, Jun 15, 2009 at 10:46, Henri Gomez wrote:
>>> Hi to all,
>>>
>>> I wonder if there is a plugin/tool available to clean a local repository
?
>>>
>>> After some time repository could became huge with many snapshots or
>>> versions (when using ranges) and the only way, for now, is just to
>>> clean up by hand.
>>>
>>> Repository managers like Nexus or Archiva does this cleanup, that's
>>> why I wonder if such service could exist in a maven plugin.
>>>
>>> Regards
>>>


This e-mail and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom

they are addressed. If you have received this e-mail in error please notify the 
originator of the message. This footer also

confirms that this e-mail message has been scanned for the presence of computer 
viruses. Any views expressed in this message are

those of the individual sender, except where the sender specifies and with 
authority, states them to be the views of Iowa Student

Loan.


 


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



RE: maven 2.1.0 why it is looking at servicemix.org?

2009-06-15 Thread Tim Andersen
SOLVED!

We changed our mirror settings based upon the advanced guide: 
http://maven.apache.org/guides/mini/guide-mirror-settings.html

Our settings.xml now excludes our local repositories (local meaning in our 
building, not on the local machine):

  thirdparty
  *,!internal,!ga,!snapshots
  ISL Third Party Proxy Repository
  http://m2repo/archiva/repository/thirdparty



Thanks for the suggestions, it lead us down the right path to find the solution.





From: Tim Andersen [tander...@studentloan.org]
Sent: Monday, June 15, 2009 9:35 AM
To: Maven Users List
Subject: RE: maven 2.1.0 why it is looking at servicemix.org?

Wayne, thanks for the suggestions.  I did not find anything in my ~/.m2 that 
contained servicemix.org except for the problematic jars that contained 
javascript/html instead of the pom.xml. I also ran a "mvn help:effective-pom" 
and did not see servicemix.org.

When I changed central to external:* 
in my settings.xml, I was able to download the jars that had been a problem. I 
get the same results if I use *.  (This seems to have 
fixed my original problem.)

My new problem with the external:* is that I can no longer 
access any of my local repositories except for thirdparty.

My guess is that one of my local repository names conflicts with another 
repository. My local repository names are:
  internal
  thirdparty
  ga
  snapshots

I'm guessing that I had a problem with these jars because one of our local 
repositories has a conflict with the repositoryId (which is why it was looking 
for servicemix.org):
  commons-pool-1.2
  commons-pool-1.3
  geronimo--jta_1.1_spec
  howl-1.0.1-1
  slf4j-api-1.4.3
  xerces-2.0.2


Can anyone confirm my guess about conflicting repositoryId's?






From: Wayne Fay [wayne...@gmail.com]
Sent: Friday, June 12, 2009 8:32 PM
To: Maven Users List
Subject: Re: maven 2.1.0 why it is looking at servicemix.org?

> Any ideas on how I can determine where the servicemix.org is coming from?

Grep your ~/.m2/ directory for servicemix.org and see if it might be
in a random artifact's pom that is being brought into your build as a
direct dependency or transitive.

Probably your settings.xml does not specify * but
only central. This means only central will be accessed via
your Archiva instance.

Wayne

This e-mail and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom

they are addressed. If you have received this e-mail in error please notify the 
originator of the message. This footer also

confirms that this e-mail message has been scanned for the presence of computer 
viruses. Any views expressed in this message are

those of the individual sender, except where the sender specifies and with 
authority, states them to be the views of Iowa Student

Loan.


 


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



RE: maven 2.1.0 why it is looking at servicemix.org?

2009-06-15 Thread Tim Andersen
Wayne, thanks for the suggestions.  I did not find anything in my ~/.m2 that 
contained servicemix.org except for the problematic jars that contained 
javascript/html instead of the pom.xml. I also ran a "mvn help:effective-pom" 
and did not see servicemix.org.

When I changed central to external:* 
in my settings.xml, I was able to download the jars that had been a problem. I 
get the same results if I use *.  (This seems to have 
fixed my original problem.)

My new problem with the external:* is that I can no longer 
access any of my local repositories except for thirdparty.

My guess is that one of my local repository names conflicts with another 
repository. My local repository names are:
  internal
  thirdparty
  ga
  snapshots

I'm guessing that I had a problem with these jars because one of our local 
repositories has a conflict with the repositoryId (which is why it was looking 
for servicemix.org):
  commons-pool-1.2
  commons-pool-1.3
  geronimo--jta_1.1_spec
  howl-1.0.1-1
  slf4j-api-1.4.3
  xerces-2.0.2


Can anyone confirm my guess about conflicting repositoryId's?






From: Wayne Fay [wayne...@gmail.com]
Sent: Friday, June 12, 2009 8:32 PM
To: Maven Users List
Subject: Re: maven 2.1.0 why it is looking at servicemix.org?

> Any ideas on how I can determine where the servicemix.org is coming from?

Grep your ~/.m2/ directory for servicemix.org and see if it might be
in a random artifact's pom that is being brought into your build as a
direct dependency or transitive.

Probably your settings.xml does not specify * but
only central. This means only central will be accessed via
your Archiva instance.

Wayne

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org




This e-mail and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom

they are addressed. If you have received this e-mail in error please notify the 
originator of the message. This footer also

confirms that this e-mail message has been scanned for the presence of computer 
viruses. Any views expressed in this message are

those of the individual sender, except where the sender specifies and with 
authority, states them to be the views of Iowa Student

Loan.


 


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



RE: maven 2.1.0 why it is looking at servicemix.org?

2009-06-12 Thread Tim Andersen
Thanks for the tip, I changed my settings.xml to be more like your example.  I 
made a "developer" profile and used your trick to take advantage of the 
fallback URL so everything always hits the mirror for the repositoryId.

I'm getting the same problem where it tries to download artifacts that should 
be coming from thirdparty, but it is looking at internal (stuff we released).  
The big puzzler to me is that it is trying to download artifacts from 
servicemix.org when it can't find it in internal. I don't have any 
configuration that aims at servicemix.org, where is this coming from?

Most artifacts are resolved just fine, the only artifacts I'm having problems 
with are:
  commons-pool-1.2
  commons-pool-1.3
  geronimo--jta_1.1_spec
  howl-1.0.1-1
  slf4j-api-1.4.3
  xerces-2.0.2


The clue to me looks like the "remote = 
  
  

  central
  http://central
  true
  true


  snapshots
  http://snapshots
  true
  true

  


So like I said, looking at your settings.xml I think we might have slightly 
different use cases - sounds like you want to continue to use the public 
repos/mirrors (for central) but just add on a single mirror. I hope this helps 
anyway.

-Matt


-----Original Message-
From: Tim Andersen [mailto:tander...@studentloan.org]
Sent: Friday, June 12, 2009 1:41 PM
To: Matt Brown
Subject: RE: maven 2.1.0 why it is looking at servicemix.org?

Hi Matt,

Sorry to email you off-list, but I'm not sure if I should make our settings.xml 
"public". If you can help me understand this issue from the attached file I'll 
post a follow-up to my original question.

Kind Regards,
Tim




From: Matt Brown [matt.br...@citrixonline.com]
Sent: Friday, June 12, 2009 11:12 AM
To: Maven Users List
Subject: RE: maven 2.1.0 why it is looking at servicemix.org?

What does your settings.xml look like?

-Original Message-
From: Tim Andersen [mailto:tander...@studentloan.org]
Sent: Friday, June 12, 2009 12:04 PM
To: users@maven.apache.org
Subject: maven 2.1.0 why it is looking at servicemix.org?

When I upgraded to Maven 2.1.0 it seems like it is not looking at the mirror I 
have in my settings.xml. It is trying to download howl-1.0.1-1  servicemix.org 
instead of my local Archiva mirror.

How do I find out why it is looking at servicemix.org? This problem does not 
occur with Maven 2.0.10 or 2.0.9.



Here's the relevant part of my build log:

Downloading: 
http://m2repo/archiva/repository/internal/org/objectweb/howl/howl/1.0.1-1/howl-1.0.1-1.pom
[INFO] Unable to find resource 'org.objectweb.howl:howl:pom:1.0.1-1' in 
repository internal (http://m2repo/archiva/repository/internal)
Downloading: 
http://servicemix.org/m2-repo/org/objectweb/howl/howl/1.0.1-1/howl-1.0.1-1.pom
1K downloaded  (howl-1.0.1-1.pom)
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = 
'2be00629e2affd448f8509a01a383b7abdbbb139'; remote = '
http://www.mail-archive.com/users@maven.apache.org/msg99267.html

After digging in a little more, I hope this post provides more relevant 
information.

This e-mail and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom

they are addressed. If you have received this e-mail in error please notify the 
originator of the message. This footer also

confirms that this e-mail message has been scanned for the presence of computer 
viruses. Any views expressed in this message are

those of the individual sender, except where the sender specifies and with 
authority, states them to be the views of Iowa Student

Loan.


 


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



maven 2.1.0 why it is looking at servicemix.org?

2009-06-12 Thread Tim Andersen
When I upgraded to Maven 2.1.0 it seems like it is not looking at the mirror I 
have in my settings.xml. It is trying to download howl-1.0.1-1  servicemix.org 
instead of my local Archiva mirror.

How do I find out why it is looking at servicemix.org? This problem does not 
occur with Maven 2.0.10 or 2.0.9.



Here's the relevant part of my build log:

Downloading: 
http://m2repo/archiva/repository/internal/org/objectweb/howl/howl/1.0.1-1/howl-1.0.1-1.pom
[INFO] Unable to find resource 'org.objectweb.howl:howl:pom:1.0.1-1' in 
repository internal (http://m2repo/archiva/repository/internal)
Downloading: 
http://servicemix.org/m2-repo/org/objectweb/howl/howl/1.0.1-1/howl-1.0.1-1.pom
1K downloaded  (howl-1.0.1-1.pom)
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = 
'2be00629e2affd448f8509a01a383b7abdbbb139'; remote = '
http://www.mail-archive.com/users@maven.apache.org/msg99267.html

After digging in a little more, I hope this post provides more relevant 
information.

This e-mail and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom

they are addressed. If you have received this e-mail in error please notify the 
originator of the message. This footer also

confirms that this e-mail message has been scanned for the presence of computer 
viruses. Any views expressed in this message are

those of the individual sender, except where the sender specifies and with 
authority, states them to be the views of Iowa Student

Loan.


 


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



problem upgrading to Maven 2.1.0

2009-06-11 Thread Tim Andersen
I am currently using Maven 2.0.9. When I upgraded to Maven 2.1.0, it seems to 
be trying to download dependencies from different repositories. I have doubled 
checked my settings.xml to make sure it uses the same as my 2.0.9 settings.

We use Archiva 1.1.3 mirroring http://repo1.maven.org/maven2

The specific jars I'm having a problem with are howl-1.0.1-1.jar and 
xerces-2.0.2.jar.

Here's where it is trying to get them from:
http://servicemix.org/m2-repo/xerces/xerces/2.0.2/xerces-2.0.2.jar
http://servicemix.org/m2-repo/org/objectweb/howl/howl/1.0.1-1/howl-1.0.1-1.pom


Why is it trying to download these from different locations when they exist in 
my local mirror that is configured in my settings.xml?

This e-mail and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom

they are addressed. If you have received this e-mail in error please notify the 
originator of the message. This footer also

confirms that this e-mail message has been scanned for the presence of computer 
viruses. Any views expressed in this message are

those of the individual sender, except where the sender specifies and with 
authority, states them to be the views of Iowa Student

Loan.


 


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Maven2 Fitnesse Plugin with TeamCity

2007-10-03 Thread Tim Andersen
I'm getting false green for my build.  

Is anyone else using Maven2 with TeamCity?  If so, how do you run your FitNesse 
tests?

We use TeamCity 2.1 for continuous integration. When a FitNesse test fails 
using the fitnesse-maven-plugin it does not fail the build.  I'm having trouble 
determining if the problem is with TeamCity or the fitnesse-maven-plugin.

Originally, I thought the fitnesse-maven-plugin should come back as [FAILURE] 
instead of [ERROR] to make the build fail.  I'm not sure if it is a bug in 
TeamCity for not handling the [ERROR] result as a failed build, or if I'm 
missing a feature from the fitnesse-maven-plugin to make and artifact for 
TeamCity to report the build failure correctly.

my post for the fitnesse-maven-plugin
http://jira.codehaus.org/browse/MFITNESSE-17

Regards,
Tim Andersen


This e-mail and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this e-mail in error please notify the originator of the 
message. This footer also confirms that this
e-mail message has been scanned for the presence of computer viruses.

 Any views expressed in this message are those of the individual sender, except 
where the sender specifies and with authority, states them to be the views of 
Iowa Student Loan.