Re: Dependency Plugin behavior changed to copy timestamped snapshot jars

2011-07-18 Thread Reinhard Nägele
I can switch back and forth between versions 2.1, 2.2, and 2.3. With 2.1 
I don't get timestamped snapshots, with 2.2 and 2.3 I do get timestamped 
snapshots for artifacts that don't come from the reactor. The snapshots 
were deployed with Maven 3 to our Nexus server. I think, the fact that 
you get timestamped snapshops depending on whether the artifacts come 
from the reactor or the local repo is something a user wouldn't expect.


I don't think switching to the copy goal is an option. The copy goal 
copies explicitly specified artifacts, whereas I want all dependencies 
to be copied. Or am I missing something here?


Thanks,
Reinhard


Am 16.07.2011 09:08, schrieb Stephen Connolly:

Brian, the changes in 2.2 were in the copy goal. the copy-dependencies goal
is the one being used by Reinhart

Reinhart, are you sure this is a change between 2.2 and 2.1, and nite some
side-effect of having run the install phase on your dependencies locally? if
the artifact is resolved from the reactor or the local repo it will be
-snapshot if resolved from a remote repo which has unique versions true, or
maven 3 was used to deploy, it will be the timestamp.

if the filename is critical to you use the copy goal instead as, since 2.2
that now resolves from the reactor and so can be used in all cases too
(whereas prior to 2.2 if it was a dependency on a reactor module you would
have had to use copy-dependencies)

- Stephen

---
Sent from my Android phone, so random spelling mistakes, random nonsense
words and other nonsense are a direct result of using swype to type on the
screen
On 16 Jul 2011 00:59, "Brian Fox"  wrote:

If the snapshot was resolved from a repo then it will be timestamped,
if it came from the reactor or local repo, then it will be -SNAPSHOT.
The plugin calls into the maven resolution logic so this is core maven
behavior.

In 2.2, resolution from the reactor was introduced for these goals,
previously they would always go to the repository, this could be why
you see a change in the new version.


On Fri, Jul 15, 2011 at 5:28 AM, Reinhard Nägele
  wrote:

Hi all,

We use the dependency plugin's goal "copy-dependencies" in several

projects.

For snapshot dependencies, it would copy unique snapshot jars until

version

2.1. Since version 2.2, the behavior has changed in that now timestamped
snapshots are copied.

I could not find this change anywhere in the release notes. In fact, it

is

not documented at all, what the correct behavior is supposed to be. Is
anyone aware of this change? Has it happened on purpose or by accident?
Anyway, I'd really like to get the old behavior back. I think this should

be

configurable.

Any opinions or insights?

Thanks,
Reinhard




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



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




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



Maven project can't access class file.

2011-07-18 Thread Jeff Bennett
Hello All,

I've been Googling frantically trying to figure out what the problem is with my 
project, and nothing has answered my question so far.  The error I'm getting is:

COMPILATION ERROR :
-
com/orbis/stanfordannotator/FileAnnotator.java:[23,40] cannot access 
JCasAnnotator_ImplBase
class file for JCasAnnotator_ImplBase not found
StanfordCoreNLPAnnotator.getDescription(), "Default");
1 error
-

BUILD FAILURE

Total time: 5.797s
Finished at: Mon Jul 18 10:55:34 EDT 2011
Final Memory: 5M/83M

Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) 
on project StanfordAnnotator: Compilation failure
\Users\jbennett\Documents\NetBeansProjects\StanfordAnnotator\src\main\java\com\orbis\stanfordannotator\FileAnnotator.java:[23,40]
 cannot access JCasAnnotator_ImplBase
class file for JCasAnnotator_ImplBase not found
StanfordCoreNLPAnnotator.getDescription(), "Default");
-> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the 
following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

The class file is definitely there.  I'm building the project with the Maven 
plugin for NetBeans 7.0 and I can browse directly to it in the project tree.  
The full package name for JCasAnnotator_ImplBase is 
org.apache.uima.analysis_component.JCasAnnotator_ImplBase, which is in the 
uimaj-core-2.3.1.jar file all of which can be seen by the NetBeans project 
browser.  Attached is my pom.xml file.  I would appreciate any feedback on why 
I can't seem to convince Maven that it's actually there.  Here's what I've 
tried so far:


1.)Currently I'm building with Maven 3.0.3.  I've tried building with 2.2.1 
and got the same issue.

2.)I've built it with eclipse and NetBeans in Ubuntu 10.10 as well as 
Windows 7 professional.

3.)I've deleted my local JARs and had maven reload them at install time.

4.)I've re-imported the entire project into NetBeans.

5.)I've deleted the entire project and done a fresh SVN checkout.

6.)I've also tried toying with the scope element in the pom.xml file, but I 
admittedly don't know much about that. I saw it on Google and thought I'd give 
it a shot.

Thanks in advance for the help!
--
Jeff Bennett


pom.xml
Description: pom.xml

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

Aggregation vs Inheritance

2011-07-18 Thread Julien Martin
Hello,
I am not sure whether to choose inheritance or aggregation or both for my
maven project.
I have a domain module which contains entity classes. I have a service
module which contains spring services and daos and finally I have a web
module .
Can anyone provide guidelines please?
Regards,
Julien.


Re: Aggregation vs Inheritance

2011-07-18 Thread Anders Hammar
You most likely would like a parent project (inheritance) where you define
and control common stuff, like plugin configuration. Then you also most
likely want to an aggregating project to simplify build. Both could be
combined in the same Maven project.

/Anders

On Mon, Jul 18, 2011 at 18:52, Julien Martin  wrote:

> Hello,
> I am not sure whether to choose inheritance or aggregation or both for my
> maven project.
> I have a domain module which contains entity classes. I have a service
> module which contains spring services and daos and finally I have a web
> module .
> Can anyone provide guidelines please?
> Regards,
> Julien.
>


Re: Aggregation vs Inheritance

2011-07-18 Thread Julien Martin
thanks Anders. that's what I am going to do.

2011/7/18 Anders Hammar 

> You most likely would like a parent project (inheritance) where you define
> and control common stuff, like plugin configuration. Then you also most
> likely want to an aggregating project to simplify build. Both could be
> combined in the same Maven project.
>
> /Anders
>
> On Mon, Jul 18, 2011 at 18:52, Julien Martin  wrote:
>
> > Hello,
> > I am not sure whether to choose inheritance or aggregation or both for my
> > maven project.
> > I have a domain module which contains entity classes. I have a service
> > module which contains spring services and daos and finally I have a web
> > module .
> > Can anyone provide guidelines please?
> > Regards,
> > Julien.
> >
>


Maven 2/3 and Cobetura plugin with both TestNG and JUnit tests (with Surefire plugin configuration)

2011-07-18 Thread Larry Shatzer, Jr.
I have an example project at https://gist.github.com/1090223

This project has both a JUnit test and a TestNG test. Following some
instructions online to get surefire be able to run both I added lines
19-45 in the pom.

This works fine when running "mvn test", except it runs the TestNG
tests twice. I can fix that by commenting out lines 34-43.

Now when I run "mvn cobertura:cobertura", this is where things get weird.

In Maven 2.2.1, it runs both TestNG and JUnit just fine, and produces
the correct coverage.

Now in Maven 3.0.3 it just runs the JUnit tests. (With lines 34-43
still commented out). When I bring those back, this is the output:

---
 T E S T S
---
Running com.company.JUnitTest
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec
Running com.company.TestNGTest
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec
There are no tests to run.

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

So it appears to try to run both tests, but fails to actually run any
tests, and gets 0% coverage.

It appears there is something odd between Maven 2.2.1 and Maven 3.0.3
when the cobertura plugin runs, and its reading of the Surefire plugin
configuration.

Ideally I would only use JUnit or TestNG, and this would not be a
problem. However, we are using TestNG exclusively, and wanted to
introduce a tool that currently only is executed as a JUnit test
(Spock). I wanted to avoid changing all our tests from TestNG to JUnit
unless absolutely necessary.

It appears to be a regression from Maven 2.2.1 to Maven 3.0.3, unless
it was a bug in Maven 2 that was fixed.

-- Larry

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



When to use

2011-07-18 Thread kanesee
Can someone explain to me or point me to a page that explains what the
 is and when it needs to be included?

In some examples I see:

  

...

In other examples I see:

  
   ...


What's the difference? And how do you know when you use it?

--
View this message in context: 
http://maven.40175.n5.nabble.com/When-to-use-pluginManagement-tp4610500p4610500.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



Re: Maven project can't access class file.

2011-07-18 Thread Barrie Treloar
I can't see anything wrong with what you are doing so far.

Is this code on an accessible repository?

A stupid thing to ask, but there is an import statement for
JCasAnnotator_ImplBase in FileAnnotator?

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



Re: When to use

2011-07-18 Thread Benson Margulies
I don't have a reference handy, but I can explain it. I'll use xpath
syntax to talk about where things are.

If you put a  into /project/build/plugins, then you are
asking for an execution whenever you run maven.

If you put it into /project/build/pluginManagement/plugins, then you
are merely specifying version and the default configuration
parameters.

So, if you are using a parent POM structure, you would create
pluginManagement to specify that if any of the inheriting projects use
the plugin in question, here is the configuration they should use --
but you are not telling them all to actually run the plugin.

Similar considerations apply when you have many profiles, some of
which want to execute some plugin, some don't, but all should agree on
the configuration.

A fairly simple example:

... 
  
maven-release-plugin
2.2
  


All this does is select the version of the release plugin in any
profile or inheritor of the current pom.

If this also included , then those parameters would
also apply to those places.

Then, later, in a profile or a pom that uses the above in its parent,

   
  
maven-release-plugin

   

would use the version (and configuration) specified.


On Mon, Jul 18, 2011 at 8:34 PM, kanesee  wrote:
> Can someone explain to me or point me to a page that explains what the
>  is and when it needs to be included?
>
> In some examples I see:
> 
>  
>    
>    ...
>
> In other examples I see:
> 
>  
>   ...
>
>
> What's the difference? And how do you know when you use it?
>
> --
> View this message in context: 
> http://maven.40175.n5.nabble.com/When-to-use-pluginManagement-tp4610500p4610500.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

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



Re: When to use

2011-07-18 Thread kanesee
Thanks. That cleared it up.

--
View this message in context: 
http://maven.40175.n5.nabble.com/When-to-use-pluginManagement-tp4610500p4610553.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



Re: Archiva vs. Nexus

2011-07-18 Thread Rajesh Koilpillai
They are competing and Apache Archiva works just fine with minimal
configuration.

On Sun, Jul 17, 2011 at 3:55 AM, Stephen Connolly <
stephen.alan.conno...@gmail.com> wrote:

> competing
>
> - Stephen
>
> ---
> Sent from my Android phone, so random spelling mistakes, random nonsense
> words and other nonsense are a direct result of using swype to type on the
> screen
> On 16 Jul 2011 17:51, "Eric Kolotyluk"  wrote:
> > Are archiva and nexus competing or complementary products?
> >
> > Cheers, Eric
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> > For additional commands, e-mail: users-h...@maven.apache.org
> >
>



-- 
Thanks,
- Rajesh Koilpillai


Error during release:perform with multi-module git project on Windows

2011-07-18 Thread Josh Stone
I have a multi-module project that uses a git repo. When I do a
release:perform I get the following error from git:

[INFO] Executing: cmd.exe /X /C "git add -- pom.xml
D:\Dev\maven-git-testcase\child\pom.xml"
[INFO] Working directory: d:\dev\maven-git-testcase
[INFO]

[ERROR] BUILD FAILURE
[INFO]

[INFO] Unable to commit files
Provider message:
The git-add command failed.
Command output:
fatal: 'D:\Dev\maven-git-testcase\child\pom.xml' is outside repository

The error occurs because on Windows git doesn't like the absolute path to
the child pom that the maven release plugin creates. The git add command
would work if the path were D:/Dev/maven-git-testcase/child/pom.xml.

Reproducing this problem takes about 1 minute with a test project that
someone previously setup at
https://github.com/rickyclarkson/maven-git-testcase

1. Clone the project.
2. Change the maven release plugin version to 2.2 (newest).
3. Run maven release:clean release:perform.

Does anyone know how to resolve this?

Thanks,
Josh


Using maven shade plugin on provided dependencies

2011-07-18 Thread Josh Stone
Is there a way to have the Maven Shade plugin operate on dependencies that
are provided scoped? It appears that when I change the scope on my
dependencies to provided, the shade plugin no longer picks them up.

Thanks,
Josh