RE: I just don't understand

2007-02-20 Thread Bashar Abdul Jawad
You can use maven in offline mode if you don't want it to connect to the
internet to fetch or update a dependency, just use -o parameter, otherwise
maven will try and connect to the internet to update snapshots as often as
specified in your snapshots update policy.

Bashar





-Original Message-
From: EJ Ciramella [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 20, 2007 2:44 PM
To: Maven Users List
Subject: I just don't understand

When you do something like mvn clean why would it try to download
compile time dependencies?
 
We have something like this:
 
 dependencies
  dependency
   groupIdlty/groupId
   artifactIdlty-model/artifactId
   version1.0-SNAPSHOT/version
  /dependency
  dependency
   groupIdlty/groupId
   artifactIdlty-utils/artifactId
   version1.0-SNAPSHOT/version
  /dependency
  dependency
   groupIdlty/groupId
   artifactIdcrypto/artifactId
   version1.0-SNAPSHOT/version
  /dependency
 dependency
  groupIdcommons-lang/groupId
  artifactIdcommons-lang/artifactId
  version2.1/version
 /dependency
...
 
 
Yet when I do a maven clean, I see:
 
[INFO] [cobertura:clean {execution: default}]
[WARNING]
Artifact atg:das-classes:jar:2006.3.P2:provided retains local
scope 'provided' overriding broader scope 'compile'
given by a dependency. If this is not intended, modify or remove
the local scope.
 
Downloading:
file:\\build.corp.upromise.com/maven2/lty/lty-model/1.0-SNAPSHOT/lty-mod
el-1.0-SNAPSHOT.jar
file:///\\build.corp.upromise.com/maven2/lty/lty-model/1.0-SNAPSHOT/lty
-model-1.0-SNAPSHOT.jar 
[WARNING] Unable to get resource from repository central
(file:\\build.corp.upromise.com/maven2
file:///\\build.corp.upromise.com/maven2 )
Downloading:
file:\\build.corp.upromise.com/maven2/lty/crypto/1.0-SNAPSHOT/crypto-1.0
-SNAPSHOT.jar
file:///\\build.corp.upromise.com/maven2/lty/crypto/1.0-SNAPSHOT/crypto
-1.0-SNAPSHOT.jar 
[WARNING] Unable to get resource from repository central
(file:\\build.corp.upromise.com/maven2
file:///\\build.corp.upromise.com/maven2 )
Downloading:
file:\\build.corp.upromise.com/maven2/lty/lty-utils/1.0-SNAPSHOT/lty-uti
ls-1.0-SNAPSHOT.jar
file:///\\build.corp.upromise.com/maven2/lty/lty-utils/1.0-SNAPSHOT/lty
-utils-1.0-SNAPSHOT.jar 
[WARNING] Unable to get resource from repository central
(file:\\build.corp.upromise.com/maven2
file:///\\build.corp.upromise.com/maven2 )
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] Failed to resolve artifact.
 
Missing:
--
1) lty:lty-model:jar:1.0-SNAPSHOT
 
  Try downloading the file manually from the project website.
 
  Then, install it using the command:
  mvn install:install-file -DgroupId=lty -DartifactId=lty-model \
  -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
 
  Path to dependency:
1) lty:memberApp:war:1.0-SNAPSHOT
2) lty:lty-model:jar:1.0-SNAPSHOT
 
2) lty:crypto:jar:1.0-SNAPSHOT
 
  Try downloading the file manually from the project website.
 
  Then, install it using the command:
  mvn install:install-file -DgroupId=lty -DartifactId=crypto \
  -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
 
  Path to dependency:
1) lty:memberApp:war:1.0-SNAPSHOT
2) lty:crypto:jar:1.0-SNAPSHOT
 
3) lty:lty-utils:jar:1.0-SNAPSHOT
 
  Try downloading the file manually from the project website.
 
  Then, install it using the command:
  mvn install:install-file -DgroupId=lty -DartifactId=lty-utils \
  -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
 
  Path to dependency:
1) lty:memberApp:war:1.0-SNAPSHOT
2) lty:lty-utils:jar:1.0-SNAPSHOT
 
--
3 required artifacts are missing.
 
for artifact:
  lty:memberApp:war:1.0-SNAPSHOT
 
from the specified remote repositories:
  central (file:\\build.corp.upromise.com/maven2
file:///\\build.corp.upromise.com/maven2 )

 
 
 
Please help - I'm so wedged on this...


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [m2] Integration-test target runs integration tests twice...

2007-02-15 Thread Bashar Abdul Jawad
They are not the same, try making this change to your profile section:

  profiles
   profile
 iditest-blah/id   
 activation
 property
  namerewardEngine.iTest/name
 /property
 /activation
build
 plugins
  plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-surefire-plugin/artifactId
configuration 
forkModepertest/forkMode   
skiptrue/skip
/configuration
   executions   
execution
 idsurefire-iTest/id
 phaseintegration-test/phase
 goals
  goaltest/goal
 /goals
 configuration
  forkModepertest/forkMode   
skipfalse/skip
  includes
   include**/*ITest.java/include
  /includes
 /configuration
/execution
   /executions
  /plugin
 /plugins
/build
   /profile
  /profiles

Bashar

-Original Message-
From: EJ Ciramella [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 15, 2007 7:35 AM
To: Maven Users List
Subject: RE: [m2] Integration-test target runs integration tests twice...

To me these look the same, can you point out where I went wrong? 

-Original Message-
From: Bashar Abdul Jawad [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 14, 2007 2:47 PM
To: 'Maven Users List'
Subject: RE: [m2] Integration-test target runs integration tests
twice...

Sorry, I had a small mistake in my pom, the correct version is :

plugin

groupIdorg.apache.maven.plugins/groupId

artifactIdmaven-surefire-plugin/artifactId
configuration
forkModenone/forkMode

childDelegationtrue/childDelegation
skiptrue/skip
/configuration
executions
execution
idtest-phase/id
phasetest/phase
goals

goaltest/goal
/goals
configuration

skipfalse/skip
includes

include**/
*Utest.java/include

/includes
/configuration
/execution
execution

idintegration-test-phase/id

phaseintegration-test/phase
goals

goaltest/goal
/goals
configuration

skipfalse/skip
includes

include**/*Itest.java/include
/includes
/configuration
/execution
/executions
/plugin

-Original Message-
From: Bashar Abdul Jawad [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 14, 2007 12:44 PM
To: 'Maven Users List'
Subject: RE: [m2] Integration-test target runs integration tests
twice...

Hi,

This is not a bug, your pom is not configured correctly.

Try this in your POM file:

plugin

groupIdorg.apache.maven.plugins/groupId

artifactIdmaven-surefire-plugin/artifactId
configuration
forkModenone/forkMode

childDelegationtrue/childDelegation
skiptrue/skip
/configuration
executions
execution
idtest-phase/id
phasetest/phase
goals

goaltest/goal
/goals
configuration

skipfalse/skip
excludes

include**/
*Utest.java/include

/excludes
/configuration
/execution
execution

idintegration-test-phase/id

phaseintegration-test/phase
goals

goaltest/goal
/goals
configuration

skipfalse/skip

RE: [m2] Integration-test target runs integration tests twice...

2007-02-15 Thread Bashar Abdul Jawad
So? Surefire plugin is what runs the tests.

Bashar

-Original Message-
From: EJ Ciramella [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 15, 2007 11:39 AM
To: Maven Users List
Subject: RE: [m2] Integration-test target runs integration tests twice...

Those configuration options are for surefire, not maven. 

-Original Message-
From: Bashar Abdul Jawad [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 15, 2007 11:39 AM
To: 'Maven Users List'
Subject: RE: [m2] Integration-test target runs integration tests
twice...

They are not the same, try making this change to your profile section:

  profiles
   profile
 iditest-blah/id   
 activation
 property
  namerewardEngine.iTest/name
 /property
 /activation
build
 plugins
  plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-surefire-plugin/artifactId
configuration 
forkModepertest/forkMode   
skiptrue/skip
/configuration
   executions   
execution
 idsurefire-iTest/id
 phaseintegration-test/phase
 goals
  goaltest/goal
 /goals
 configuration
  forkModepertest/forkMode   
skipfalse/skip
  includes
   include**/*ITest.java/include
  /includes
 /configuration
/execution
   /executions
  /plugin
 /plugins
/build
   /profile
  /profiles

Bashar

-Original Message-
From: EJ Ciramella [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 15, 2007 7:35 AM
To: Maven Users List
Subject: RE: [m2] Integration-test target runs integration tests
twice...

To me these look the same, can you point out where I went wrong? 

-Original Message-
From: Bashar Abdul Jawad [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 14, 2007 2:47 PM
To: 'Maven Users List'
Subject: RE: [m2] Integration-test target runs integration tests
twice...

Sorry, I had a small mistake in my pom, the correct version is :

plugin

groupIdorg.apache.maven.plugins/groupId

artifactIdmaven-surefire-plugin/artifactId
configuration
forkModenone/forkMode

childDelegationtrue/childDelegation
skiptrue/skip
/configuration
executions
execution
idtest-phase/id
phasetest/phase
goals

goaltest/goal
/goals
configuration

skipfalse/skip
includes

include**/
*Utest.java/include

/includes
/configuration
/execution
execution

idintegration-test-phase/id

phaseintegration-test/phase
goals

goaltest/goal
/goals
configuration

skipfalse/skip
includes

include**/*Itest.java/include
/includes
/configuration
/execution
/executions
/plugin

-Original Message-
From: Bashar Abdul Jawad [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 14, 2007 12:44 PM
To: 'Maven Users List'
Subject: RE: [m2] Integration-test target runs integration tests
twice...

Hi,

This is not a bug, your pom is not configured correctly.

Try this in your POM file:

plugin

groupIdorg.apache.maven.plugins/groupId

artifactIdmaven-surefire-plugin/artifactId
configuration
forkModenone/forkMode

childDelegationtrue/childDelegation
skiptrue/skip
/configuration
executions
execution
idtest-phase/id
phasetest/phase
goals

goaltest/goal
/goals
configuration

skipfalse/skip
excludes

RE: [m2] Integration-test target runs integration tests twice...

2007-02-14 Thread Bashar Abdul Jawad
Hi,

This is not a bug, your pom is not configured correctly.

Try this in your POM file:

plugin
groupIdorg.apache.maven.plugins/groupId

artifactIdmaven-surefire-plugin/artifactId
configuration
forkModenone/forkMode

childDelegationtrue/childDelegation
skiptrue/skip
/configuration
executions
execution
idtest-phase/id
phasetest/phase
goals
goaltest/goal
/goals
configuration
skipfalse/skip
excludes
include**/
*Utest.java/include

/excludes
/configuration
/execution
execution

idintegration-test-phase/id

phaseintegration-test/phase
goals
goaltest/goal
/goals
configuration
skipfalse/skip
includes

include**/*Itest.java/include
/includes
/configuration
/execution
/executions
/plugin

Original Message-
From: EJ Ciramella [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 14, 2007 8:20 AM
To: Maven Users List
Subject: RE: [m2] Integration-test target runs integration tests twice...

Sorry I had that backward a bit, integration tests should only run the
*Itest.java files.  The regular test phase should only include the
Utest.java files.

We can get the unit tests to run fine, it's the integration tests run
via integration-test that run twice. 

-Original Message-
From: EJ Ciramella [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 14, 2007 9:52 AM
To: Maven Users List
Subject: RE: [m2] Integration-test target runs integration tests
twice...

So we have two types of tests, unit and integration.

What we've attempted to do is bind the integration-test lifecycle to the
test phase but ONLY run the *Utest.java tests when integration-test
was specified.

What happens is, by default, the test goal works fine, but when you
specify integration-test it runs the *Utest.java tests twice.

I'll attach the logs shortly... 

-Original Message-
From: franz see [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 13, 2007 9:51 PM
To: users@maven.apache.org
Subject: Re: [m2] Integration-test target runs integration tests
twice...


Good day to you, EJ,

What happens twice? ...May I ask for the build logs in your console?

Cheers,
Franz


EJ Ciramella-2 wrote:
 
 I'm having a problem binding our integration tests to the
 integration-test lifecycle goal.
  
 Can anyone explain why this would happen twice?
  
 Here's my pom:
  
 ?xml version=1.0 encoding=ISO-8859-1?
  
 project xmlns=http://maven.apache.org/POM/4.0.0;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
 http://maven.apache.org/maven-v4_0_0.xsd;
   modelVersion4.0.0/modelVersion
   parent
 groupIdlty/groupId
 artifactIdapp/artifactId
 version1.0-SNAPSHOT/version
   /parent
   artifactIdrewardEngine/artifactId
   packagingjar/packaging
   version1.0-SNAPSHOT/version
   descriptionModule to calculate rewards/description
   nameReward Engine/name
   urlhttp://www.upromise.com/url
   
  build
   resources
resource
 directorysrc/main/resources/directory
 filteringtrue/filtering
/resource
   /resources
   plugins
plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-surefire-plugin/artifactId
 configuration
  reportsDirectory../reportsdirectory/reportsDirectory
  systemProperties
   property
namecommon.properties/name
value${work.dir}/common.properties/value
   /property
   property
namejava.util.logging.config.file/name
value
 ${work.dir}/utils/src/main/conf/logging.properties/value
   /property
   property
namerewardEngineITest.testData.file/name
value
  


RE: [m2] Integration-test target runs integration tests twice...

2007-02-14 Thread Bashar Abdul Jawad
Sorry, I had a small mistake in my pom, the correct version is :

plugin
groupIdorg.apache.maven.plugins/groupId

artifactIdmaven-surefire-plugin/artifactId
configuration
forkModenone/forkMode

childDelegationtrue/childDelegation
skiptrue/skip
/configuration
executions
execution
idtest-phase/id
phasetest/phase
goals
goaltest/goal
/goals
configuration
skipfalse/skip
includes
include**/
*Utest.java/include

/includes
/configuration
/execution
execution

idintegration-test-phase/id

phaseintegration-test/phase
goals
goaltest/goal
/goals
configuration
skipfalse/skip
includes

include**/*Itest.java/include
/includes
/configuration
/execution
/executions
/plugin

-Original Message-
From: Bashar Abdul Jawad [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 14, 2007 12:44 PM
To: 'Maven Users List'
Subject: RE: [m2] Integration-test target runs integration tests twice...

Hi,

This is not a bug, your pom is not configured correctly.

Try this in your POM file:

plugin
groupIdorg.apache.maven.plugins/groupId

artifactIdmaven-surefire-plugin/artifactId
configuration
forkModenone/forkMode

childDelegationtrue/childDelegation
skiptrue/skip
/configuration
executions
execution
idtest-phase/id
phasetest/phase
goals
goaltest/goal
/goals
configuration
skipfalse/skip
excludes
include**/
*Utest.java/include

/excludes
/configuration
/execution
execution

idintegration-test-phase/id

phaseintegration-test/phase
goals
goaltest/goal
/goals
configuration
skipfalse/skip
includes

include**/*Itest.java/include
/includes
/configuration
/execution
/executions
/plugin

Original Message-
From: EJ Ciramella [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 14, 2007 8:20 AM
To: Maven Users List
Subject: RE: [m2] Integration-test target runs integration tests twice...

Sorry I had that backward a bit, integration tests should only run the
*Itest.java files.  The regular test phase should only include the
Utest.java files.

We can get the unit tests to run fine, it's the integration tests run
via integration-test that run twice. 

-Original Message-
From: EJ Ciramella [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 14, 2007 9:52 AM
To: Maven

RE: dependencies are bloated in M2

2007-02-07 Thread Bashar Abdul Jawad
Thanks for clearing that up. I think this discussion made it more clear what
is the difference among provided, optional and exclusions. Sorry if I
confused anyone.

Bashar

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig
McClanahan
Sent: Tuesday, February 06, 2007 11:18 PM
To: Maven Users List
Subject: Re: dependencies are bloated in M2

On 2/6/07, Bashar Abdul Jawad [EMAIL PROTECTED] wrote:

 Yes, but sometimes you will need to use a dependency for compile time
 only,
 and NOT for runtime. You don't need the container to provide it for you
 either because it is not required for runtime. Example: aspectjtools.jar.
 You can't exclude it because your project will not compile. The only way
 is
 to give it the provided scope.


That is not correct.  Declaring a dependency to be optional puts it on the
compile classpath, but avoids any attempt to include it at runtime.


Even if your container doesn't provide it
 that's not a problem, maven doesn't care. I know it is not very clean to
 give a dependency a provided scope when it's not going to be provided
 anywhere, but sometimes you need to do this if you want to compile against
 it.


The semantics of provided are different than optional even though Maven
does not enforce it.

The code you write against a provided API assumes that the API will indeed
be provided by the container.  As an example, you might declare as
provided a library that you've installed in Tomcat's common/lib
directory.  The library must be there in order for the application to
function -- but Maven can assume that it will indeed by supplied by the
container, so won't include it in the WAR.

Optional, on the other hand, means what it says.  Declaring such a
dependency means that you will need it available at compile time FOR THE
DEPENDENCY, but not necessarily for your own code (unless you explicitly
need it for other reasons).  The library is explicitly NOT required at
runtime, because your dependency has said, in effect, I can use this
library if it exists, but if it does not, no harm no foul.

Note also that optional is NOT a scope -- it is a completely separate
element.  That is because the concept of being optional is orthogonal to
scope ... it's perfectly reasonable, for example, to have an optional module
with compile scope if your build process knows how to intelligently deal
with that combination.

PLEASE do not misuse provided scope to mean the optional element or vice
versa.  PLEASE set up your POMs to say what you mean.  These are two
DIFFERENT concepts!

Craig

Bashar

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carlos
 Sanchez
 Sent: Tuesday, February 06, 2007 5:18 PM
 To: Maven Users List
 Subject: Re: dependencies are bloated in M2

 still not right, you have to use exclusions
 provided means the environment (read appserver) provides that
 dependency, which is only true for few dependencies in the whole
 world, like servlet-api

 On 2/6/07, Bashar Abdul Jawad [EMAIL PROTECTED] wrote:
 
  This is the question I was answering:
 
  Tandon, Pankaj wrote:
  
  1. How can we control what get's into WEB-INF/lib. We tried all the
  scopes mentioned, but that did not help.
 
  And it's follow up:
 
   Christian Goetze wrote:
   
I believe that the scope that should work is provided. The problem
 is
that I don't know if maven is smart enough to remove a provided
dependency from the transitive closure. I would call that a bug if
 it
didn't.
 
  And the answer to these 2 questions is to use the provided scope. It
 will
  also stop a dependency from being passed on transitively. Using
 exclusions
  is NOT right if you still want to compile against these dependencies.
 
  Bashar
 
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carlos
  Sanchez
  Sent: Tuesday, February 06, 2007 5:02 PM
  To: Maven Users List
  Subject: Re: dependencies are bloated in M2
 
  exactly, that's why he needs to use exclusions, you exclude things
  that you don't need.
 
  On 2/6/07, Bashar Abdul Jawad [EMAIL PROTECTED] wrote:
   It is the right solution. Using exclusions will exclude a dependency
 from
   being downloaded at all, which means it won't be available at any
 path.
   Using provided will still make the dependency available for compile
 time,
   but not in runtime, and will not bundle it in the package.
  
   Read maven FAQ:
  
   http://maven.apache.org/general.html#scope-provided
  
  
  
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
 Carlos
   Sanchez
   Sent: Tuesday, February 06, 2007 4:29 PM
   To: Maven Users List
   Subject: Re: dependencies are bloated in M2
  
   that's not the right solution, you have to use exclusions
  
   On 2/6/07, Bashar Abdul Jawad [EMAIL PROTECTED] wrote:
It will. If you don't want to include a particular dependency in
 your
generated package just

RE: Can I get a timestamp?

2007-02-06 Thread Bashar Abdul Jawad
You can use maven scm plugin:

plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-scm-plugin/artifactId
configuration
addTimestamptrue/addTimestamp
tagbuild/tag
timestampFormatMMddHHmm/timestampFormat
/configuration
/plugin

-Original Message-
From: Crossley, Jim [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 06, 2007 3:57 PM
To: Maven Users List
Subject: Can I get a timestamp?

Do I really have to write an entire plugin just to make a timestamp
available as a maven property?  That's what Google is telling me, but I
wanted to make sure before I went to all that trouble.

Thanks,
Jim

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: dependencies are bloated in M2

2007-02-06 Thread Bashar Abdul Jawad
It will. If you don't want to include a particular dependency in your
generated package just give it the provided scope, it will be excluded even
if it was a transitive dependency of something else.

Bashar

-Original Message-
From: Christian Goetze [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 06, 2007 2:58 PM
To: Maven Users List
Subject: Re: dependencies are bloated in M2

Tandon, Pankaj wrote:

 
 
So the questions are:
1. How can we control what get's into WEB-INF/lib. We tried all the
scopes mentioned, but that did not help.

I believe that the scope that should work is provided. The problem is 
that I don't know if maven is smart enough to remove a provided 
dependency from the transitive closure. I would call that a bug if it 
didn't.

--
cg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: dependencies are bloated in M2

2007-02-06 Thread Bashar Abdul Jawad
It is the right solution. Using exclusions will exclude a dependency from
being downloaded at all, which means it won't be available at any path.
Using provided will still make the dependency available for compile time,
but not in runtime, and will not bundle it in the package.

Read maven FAQ: 

http://maven.apache.org/general.html#scope-provided



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carlos
Sanchez
Sent: Tuesday, February 06, 2007 4:29 PM
To: Maven Users List
Subject: Re: dependencies are bloated in M2

that's not the right solution, you have to use exclusions

On 2/6/07, Bashar Abdul Jawad [EMAIL PROTECTED] wrote:
 It will. If you don't want to include a particular dependency in your
 generated package just give it the provided scope, it will be excluded
even
 if it was a transitive dependency of something else.

 Bashar

 -Original Message-
 From: Christian Goetze [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 06, 2007 2:58 PM
 To: Maven Users List
 Subject: Re: dependencies are bloated in M2

 Tandon, Pankaj wrote:

 
 
 So the questions are:
 1. How can we control what get's into WEB-INF/lib. We tried all the
 scopes mentioned, but that did not help.
 
 I believe that the scope that should work is provided. The problem is
 that I don't know if maven is smart enough to remove a provided
 dependency from the transitive closure. I would call that a bug if it
 didn't.

 --
 cg

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
 -- The Princess Bride

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Can I get a timestamp?

2007-02-06 Thread Bashar Abdul Jawad
The plug-in will allow you to use timestamp tagging to tag your builds. I am
sorry but I don't think you can access the timestamp property directly in
the pom itself. Why do you need to do that anyway?

Bashar

-Original Message-
From: Crossley, Jim [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 06, 2007 4:43 PM
To: Maven Users List
Subject: RE: Can I get a timestamp?

Thanks for the quick reply, but what does that do, exactly?  In which
property does it make the timestamp available?  I tried ${timestamp}
after adding that snippet to my pom, but it was empty.  What am I
missing?

Thanks,
Jim

-Original Message-
From: Bashar Abdul Jawad [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 06, 2007 6:15 PM
To: 'Maven Users List'
Subject: RE: Can I get a timestamp?

You can use maven scm plugin:

plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-scm-plugin/artifactId
configuration
addTimestamptrue/addTimestamp
tagbuild/tag
timestampFormatMMddHHmm/timestampFormat
/configuration
/plugin

-Original Message-
From: Crossley, Jim [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 06, 2007 3:57 PM
To: Maven Users List
Subject: Can I get a timestamp?

Do I really have to write an entire plugin just to make a timestamp
available as a maven property?  That's what Google is telling me, but I
wanted to make sure before I went to all that trouble.

Thanks,
Jim

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: dependencies are bloated in M2

2007-02-06 Thread Bashar Abdul Jawad

This is the question I was answering:

Tandon, Pankaj wrote:

1. How can we control what get's into WEB-INF/lib. We tried all the 
scopes mentioned, but that did not help.

And it's follow up:

 Christian Goetze wrote:
 
  I believe that the scope that should work is provided. The problem is
  that I don't know if maven is smart enough to remove a provided
  dependency from the transitive closure. I would call that a bug if it
  didn't.

And the answer to these 2 questions is to use the provided scope. It will
also stop a dependency from being passed on transitively. Using exclusions
is NOT right if you still want to compile against these dependencies.

Bashar


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carlos
Sanchez
Sent: Tuesday, February 06, 2007 5:02 PM
To: Maven Users List
Subject: Re: dependencies are bloated in M2

exactly, that's why he needs to use exclusions, you exclude things
that you don't need.

On 2/6/07, Bashar Abdul Jawad [EMAIL PROTECTED] wrote:
 It is the right solution. Using exclusions will exclude a dependency from
 being downloaded at all, which means it won't be available at any path.
 Using provided will still make the dependency available for compile time,
 but not in runtime, and will not bundle it in the package.

 Read maven FAQ:

 http://maven.apache.org/general.html#scope-provided



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carlos
 Sanchez
 Sent: Tuesday, February 06, 2007 4:29 PM
 To: Maven Users List
 Subject: Re: dependencies are bloated in M2

 that's not the right solution, you have to use exclusions

 On 2/6/07, Bashar Abdul Jawad [EMAIL PROTECTED] wrote:
  It will. If you don't want to include a particular dependency in your
  generated package just give it the provided scope, it will be excluded
 even
  if it was a transitive dependency of something else.
 
  Bashar
 
  -Original Message-
  From: Christian Goetze [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, February 06, 2007 2:58 PM
  To: Maven Users List
  Subject: Re: dependencies are bloated in M2
 
  Tandon, Pankaj wrote:
 
  
  
  So the questions are:
  1. How can we control what get's into WEB-INF/lib. We tried all the
  scopes mentioned, but that did not help.
  
  I believe that the scope that should work is provided. The problem is
  that I don't know if maven is smart enough to remove a provided
  dependency from the transitive closure. I would call that a bug if it
  didn't.
 
  --
  cg
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 I could give you my word as a Spaniard.
 No good. I've known too many Spaniards.
  -- The Princess Bride

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
 -- The Princess Bride

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: dependencies are bloated in M2

2007-02-06 Thread Bashar Abdul Jawad
Yes, but sometimes you will need to use a dependency for compile time only,
and NOT for runtime. You don't need the container to provide it for you
either because it is not required for runtime. Example: aspectjtools.jar.
You can't exclude it because your project will not compile. The only way is
to give it the provided scope. Even if your container doesn't provide it
that's not a problem, maven doesn't care. I know it is not very clean to
give a dependency a provided scope when it's not going to be provided
anywhere, but sometimes you need to do this if you want to compile against
it.

Bashar

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carlos
Sanchez
Sent: Tuesday, February 06, 2007 5:18 PM
To: Maven Users List
Subject: Re: dependencies are bloated in M2

still not right, you have to use exclusions
provided means the environment (read appserver) provides that
dependency, which is only true for few dependencies in the whole
world, like servlet-api

On 2/6/07, Bashar Abdul Jawad [EMAIL PROTECTED] wrote:

 This is the question I was answering:

 Tandon, Pankaj wrote:
 
 1. How can we control what get's into WEB-INF/lib. We tried all the
 scopes mentioned, but that did not help.

 And it's follow up:

  Christian Goetze wrote:
  
   I believe that the scope that should work is provided. The problem
is
   that I don't know if maven is smart enough to remove a provided
   dependency from the transitive closure. I would call that a bug if it
   didn't.

 And the answer to these 2 questions is to use the provided scope. It will
 also stop a dependency from being passed on transitively. Using exclusions
 is NOT right if you still want to compile against these dependencies.

 Bashar


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carlos
 Sanchez
 Sent: Tuesday, February 06, 2007 5:02 PM
 To: Maven Users List
 Subject: Re: dependencies are bloated in M2

 exactly, that's why he needs to use exclusions, you exclude things
 that you don't need.

 On 2/6/07, Bashar Abdul Jawad [EMAIL PROTECTED] wrote:
  It is the right solution. Using exclusions will exclude a dependency
from
  being downloaded at all, which means it won't be available at any path.
  Using provided will still make the dependency available for compile
time,
  but not in runtime, and will not bundle it in the package.
 
  Read maven FAQ:
 
  http://maven.apache.org/general.html#scope-provided
 
 
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carlos
  Sanchez
  Sent: Tuesday, February 06, 2007 4:29 PM
  To: Maven Users List
  Subject: Re: dependencies are bloated in M2
 
  that's not the right solution, you have to use exclusions
 
  On 2/6/07, Bashar Abdul Jawad [EMAIL PROTECTED] wrote:
   It will. If you don't want to include a particular dependency in your
   generated package just give it the provided scope, it will be excluded
  even
   if it was a transitive dependency of something else.
  
   Bashar
  
   -Original Message-
   From: Christian Goetze [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, February 06, 2007 2:58 PM
   To: Maven Users List
   Subject: Re: dependencies are bloated in M2
  
   Tandon, Pankaj wrote:
  
   
   
   So the questions are:
   1. How can we control what get's into WEB-INF/lib. We tried all the
   scopes mentioned, but that did not help.
   
   I believe that the scope that should work is provided. The problem
is
   that I don't know if maven is smart enough to remove a provided
   dependency from the transitive closure. I would call that a bug if it
   didn't.
  
   --
   cg
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
  --
  I could give you my word as a Spaniard.
  No good. I've known too many Spaniards.
   -- The Princess Bride
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 I could give you my word as a Spaniard.
 No good. I've known too many Spaniards.
  -- The Princess Bride

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL

RE: Maven 2 surefire doesn't handle junit TestSetup very well

2007-02-01 Thread Bashar Abdul Jawad
Jörg answered my question, surefire doesn’t support TestSuites but you can
still run them the way I did (even though it's not pretty).

Bashar

-Original Message-
From: diroussel [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 01, 2007 2:42 AM
To: users@maven.apache.org
Subject: Re: Maven 2 surefire doesn't handle junit TestSetup very well


You don't say what doesn't work when you run if from maven? Is it that the
tests don't run at all?  Or that the setup gets called too many times? 
Could it be to do with forking the JVM for each test?

Your testSuite() method looks stange to me, surely it should return
something to the test runner, who or what is supposed to call it?

David


Bashar Abdul Jawad wrote:
 
 Hello,
 
  
 
 I am using junit TestSetup to set up a common selenium connection among my
 different tests. The TestSetup runs a global setup and Teardown once
 before
 any of the tests are run. I wrapped a TestSuite in a subclass of TestSetup
 and it works perfectly fine when the TestSuite is run from eclipse:
 
  
 
 The code for my TestSuite:
 
  
 
 public class AllTestsOneTimeSetup {
 
  
 
 public static Test suite() {
 
 TestSuite suite = new TestSuite();
 
 suite.addTestSuite(SomeTest.class);
 
 TestSetup wrapper = new TestSetup(suite) {
 
 protected void setUp() {
 
 oneTimeSetUp();
 
 }
 
  
 
 protected void tearDown() {
 
 oneTimeTearDown();
 
 }
 
 };
 
  
 
 return wrapper;
 
 } 
 
 }
 
  
 
 Now to make this suite runs in Maven 2 I had to add the following method
 to
 the TestSuite:
 
  
 
 public void testSuite(){
 
   TestSetup test = (TestSetup) AllTestsOneTimeSetup.suite();
 
   TestResult result = new TestResult();
 
   test.run(result);
 
 }
 
  
 
 Now something weird happens. The global setup an tear down run fine and
 Maven 2 runs all the tests in the suite fine but  It always reports that
 it
 is running 1 test (the testSuite test) and that it was successful (as the
 testSuite itself doesn't fail, the included tests do).
 
  
 
 One way around this is to do the following:
 
  
 
 if (!result.wasSuccessful()){
 
 String message = ;  
 
 for (Enumeration e = result.failures(); e.hasMoreElements()
 ;){
 
   message += e.nextElement() + \n;
 
 }
 
 for (Enumeration e = result.errors(); e.hasMoreElements() ;){
 
   message += e.nextElement() + \n;
 
 }
 
 Assert.fail(message);
 
 result.endTest(test);
 
   }
 
  
 
 My question is, does anyone have a cleaner solution to this?
 
  
 
 Thanks,
 
   
 
  
 
  
 
 
  
 
 Bashar
 
  
 
 
 

-- 
View this message in context:
http://www.nabble.com/Maven-2-surefire-doesn%27t-handle-junit-TestSetup-very
-well-tf3078018s177.html#a8745415
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Execution order in pre-integration-test phase for Cargo/Antrun

2007-02-01 Thread Bashar Abdul Jawad
This might be helpful:

http://www.mail-archive.com/users@maven.apache.org/msg30757.html

Bashar

-Original Message-
From: Crossley, Jim [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 31, 2007 6:48 AM
To: Maven Users List
Subject: RE: Execution order in pre-integration-test phase for Cargo/Antrun

 Did you try multiple executions with a different Id for each
execution?
 Place one goal in each execution and bind it to the appropriate phase.

Yes.  As you can see from the snippet below, I have the executions
defined.  My problem is that I need the 'serverconfig' execution to
occur *after* 'install-container' but *before* 'start-container'.  Since
all three are bound to the same phase, the order is determined (it
seems) by their declaration order in the POM.  How do I achieve the
order I need?

  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-antrun-plugin/artifactId
executions
  execution
idserverconfig/id
phasepre-integration-test/phase
configuration
  ... 
/configuration
goals
  goalrun/goal
/goals
  /execution
/executions
  /plugin
   
  plugin
groupIdorg.codehaus.cargo/groupId
artifactIdcargo-maven2-plugin/artifactId
executions
  execution
idinstall-container/id
phasepre-integration-test/phase
goals
  goalinstall/goal
/goals
  /execution
  execution
idstart-container/id
phasepre-integration-test/phase
goals
  goalstart/goal
/goals
  /execution
  execution
idstop-container/id
phasepost-integration-test/phase
goals
  goalstop/goal
/goals
  /execution
/executions
configuration
  ...
/configuration
  /plugin

Thanks,
Jim

-Original Message-
From: Bashar Abdul Jawad [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 30, 2007 6:10 PM
To: 'Maven Users List'
Subject: RE: Execution order in pre-integration-test phase for
Cargo/Antrun

Hi,

Did you try multiple executions with a different Id for each execution?
Place one goal in each execution and bind it to the appropriate phase.

Bashar

-Original Message-
From: Crossley, Jim [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 30, 2007 3:59 PM
To: users@maven.apache.org
Subject: Execution order in pre-integration-test phase for Cargo/Antrun

I'm using 2.0.4 with the most recent plugin versions.  I'm trying to
configure JBoss 4.0.5 prior to running an integration test from my
build.  I'm trying to run the following goals in these phases:

pre-integration-test:
  cargo:install
  antrun:run
  cargo:start
post-integration-test:
  cargo:stop

The cargo:install is configured with a ZipUrlInstaller that downloads an
archive of JBoss with an 'ejb3' configuration from an internal web
server.  The subsequent antrun:run task tailors that config with
settings specific to the build.

My problem is that I can't figure out how to mandate the order of the
goals in the pre-integration-test phase.  Depending on which plugin
comes first in the POM, I get either

  antrun:run
  cargo:install
  cargo:start

or:

  cargo:install
  cargo:start
  antrun:run

Neither of which works for me, of course.  What am I doing wrong?  Do I
have to list the cargo plugin twice, once before and after the antrun
plugin?  I'd rather not duplicate that much configuration, if I can help
it.

Thanks,
Jim

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How can I skip tests for a particular execution from the command line

2007-01-30 Thread Bashar Abdul Jawad
Hi,

 

I have 2 surefire executions in my POM file, one for the test phase and
one for the integration test phase. What I would like to do is to be able to
skip running the tests for either of the two executions from the command
line by passing a system property. The problem is passing
-Dmaven.test.skip=true will skip the main execution and not the child
executions. I know I can do this in the POM file but as I said I would like
to be able to do so from the command line. Is it possible to pass the id of
the execution, like this: -Dmaven.test.{execution_id}.skip=true?

 

I have the following in my POM:

 

  /plugin

  plugin

groupIdorg.apache.maven.plugins/groupId

artifactIdmaven-surefire-plugin/artifactId

configuration

  forkModenone/forkMode

  childDelegationtrue/childDelegation

  skiptrue/skip

/configuration

executions

  execution

idtest-phase/id

phasetest/phase

goals

  goaltest/goal

/goals

configuration

  skipfalse/skip

  excludes

 
exclude**/selenium/**/exclude

  /excludes

/configuration

  /execution

  execution

idintegration-test-phase/id

phaseintegration-test/phase

goals

  goaltest/goal

/goals

configuration

  skipfalse/skip

  includes

 
include**/AllTestsSuite.java/include

  /includes

/configuration

  /execution

/executions

  /plugin

 

Thanks

 


Bashar

 



prepare-package phase doesn't exist?

2007-01-30 Thread Bashar Abdul Jawad
Hi,

 

Maven documentation mentions a prepare-package phase on
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.ht
ml

 

However this phase doesn't seem to exist when running mvn prepare-package. I
get the error:

 

 

mvn prepare-package

[INFO] Scanning for projects...

[INFO]


[ERROR] BUILD FAILURE

[INFO]


[INFO] Invalid task 'prepare-package': you must specify a valid lifecycle
phase,

 or a goal in the format plugin:goal or
pluginGroupId:pluginArtifactId:pluginVer

sion:goal

[INFO]


[INFO] For more information, run Maven with the -e switch

[INFO]


[INFO] Total time:  1 second

[INFO] Finished at: Tue Jan 30 10:22:56 MST 2007

[INFO] Final Memory: 1M/2M

[INFO]


 

 

Also any plug-in execution bind to that phase never gets executed. Any
ideas?

 

 

Bashar



RE: prepare-package phase doesn't exist?

2007-01-30 Thread Bashar Abdul Jawad
2.0.4

The version on Maven's homepage (http://maven.apache.org/) is also still
2.0.4.

Bashar

-Original Message-
From: Mark Hobson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 30, 2007 2:42 PM
To: Maven Users List
Subject: Re: prepare-package phase doesn't exist?

On 30/01/07, Bashar Abdul Jawad [EMAIL PROTECTED] wrote:
 Maven documentation mentions a prepare-package phase on

http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.ht
 ml
...
 Also any plug-in execution bind to that phase never gets executed. Any
 ideas?

This was introduced in 2.0.5 - what version of maven are you running?

Mark

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: prepare-package phase doesn't exist?

2007-01-30 Thread Bashar Abdul Jawad
OK, I just saw it on Jira:

http://jira.codehaus.org/browse/MNG-2097?page=com.atlassian.jira.plugin.syst
em.issuetabpanels:comment-tabpanel#action_63375

Bashar



-Original Message-
From: Brett Porter [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 30, 2007 2:52 PM
To: Maven Users List
Subject: Re: prepare-package phase doesn't exist?

Apologies, I should have marked that in the documentation. Actually, it's
2.1+.

On 31/01/07, Bashar Abdul Jawad [EMAIL PROTECTED] wrote:
 2.0.4

 The version on Maven's homepage (http://maven.apache.org/) is also still
 2.0.4.

 Bashar

 -Original Message-
 From: Mark Hobson [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, January 30, 2007 2:42 PM
 To: Maven Users List
 Subject: Re: prepare-package phase doesn't exist?

 On 30/01/07, Bashar Abdul Jawad [EMAIL PROTECTED] wrote:
  Maven documentation mentions a prepare-package phase on
 

http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.ht
  ml
 ...
  Also any plug-in execution bind to that phase never gets executed. Any
  ideas?

 This was introduced in 2.0.5 - what version of maven are you running?

 Mark

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Apache Maven - http://maven.apache.org
Better Builds with Maven book - http://library.mergere.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Skipping Tests but Still Compiling

2007-01-30 Thread Bashar Abdul Jawad
That is not true. Maven will still compile the test classes, but only if
they have changed since the last compilation. To force maven to compile even
if there were no changes run a clean first.

Bashar

-Original Message-
From: Kevan Dunsmore [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 30, 2007 3:46 PM
To: Maven Users List
Subject: Skipping Tests but Still Compiling

So I just discovered that if I kick off a build using

 

mvn -Dmaven.test.skip=true install

 

then Maven will not even bother compiling the test classes. Is there any
way to force Maven to compile the test classes but not run the tests?

 

 

Thanks,

Kevan.

 

 

 

Kevan Dunsmore

Senior Software Engineer

SABRIX Inc

t: 503.924.4908

f: 503.620.5756

 


This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information that is protected from disclosure. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply e-mail and destroy all copies
of the original message and any attachments.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Execution order in pre-integration-test phase for Cargo/Antrun

2007-01-30 Thread Bashar Abdul Jawad
Hi,

Did you try multiple executions with a different Id for each execution?
Place one goal in each execution and bind it to the appropriate phase.

Bashar

-Original Message-
From: Crossley, Jim [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 30, 2007 3:59 PM
To: users@maven.apache.org
Subject: Execution order in pre-integration-test phase for Cargo/Antrun

I'm using 2.0.4 with the most recent plugin versions.  I'm trying to
configure JBoss 4.0.5 prior to running an integration test from my
build.  I'm trying to run the following goals in these phases:

pre-integration-test:
  cargo:install
  antrun:run
  cargo:start
post-integration-test:
  cargo:stop

The cargo:install is configured with a ZipUrlInstaller that downloads an
archive of JBoss with an 'ejb3' configuration from an internal web
server.  The subsequent antrun:run task tailors that config with
settings specific to the build.

My problem is that I can't figure out how to mandate the order of the
goals in the pre-integration-test phase.  Depending on which plugin
comes first in the POM, I get either

  antrun:run
  cargo:install
  cargo:start

or:

  cargo:install
  cargo:start
  antrun:run

Neither of which works for me, of course.  What am I doing wrong?  Do I
have to list the cargo plugin twice, once before and after the antrun
plugin?  I'd rather not duplicate that much configuration, if I can help
it.

Thanks,
Jim

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Skipping Tests but Still Compiling

2007-01-30 Thread Bashar Abdul Jawad
Try to add the compile plugin if it isn't there already:

plugin
groupIdorg.apache.maven.plugins/groupId

artifactIdmaven-compiler-plugin/artifactId
/plugin

Bashar


-Original Message-
From: Mark Hewett [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 30, 2007 4:13 PM
To: Maven Users List
Subject: Re: Skipping Tests but Still Compiling

On 1/30/07, Bashar Abdul Jawad [EMAIL PROTECTED] wrote:
 That is not true. Maven will still compile the test classes, but only if
 they have changed since the last compilation. To force maven to compile
even
 if there were no changes run a clean first.

 Bashar

Doesn't seem to for me...

mvn -Dmaven.test.skip=true clean install
lines deleted
[INFO] [compiler:testCompile]
[INFO] Not compiling test sources
[INFO] [surefire:test]
[INFO] Tests are skipped.
lines deleted

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Surefire, Cargo and Integration Tests

2007-01-25 Thread Bashar Abdul Jawad
Hi,

Take a look at this:

http://docs.codehaus.org/pages/viewpage.action?pageId=62120

Bashar

-Original Message-
From: takai [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 25, 2007 9:47 AM
To: users@maven.apache.org
Subject: Surefire, Cargo and Integration Tests


Hi,

i have problems integrating Cargo Deployment and Surefire Tests. I've bound
cargo:start to pre-integration-test, surefire:test to integration-tests and
finally cargo:stop to post-integration-test.

The problem is that surefire executes twice. Once in test:test and once in
integration-test. This gives me a headache. How do i tell surefire that it
should execute *only* in integration-test? Looks like a surefire bug to
me...

Note: I used the jar lifecycle. Iff you use pom lifecycle (which does not
bind a test:test phase) surefire only fires once in integration:test as it
should.

Note: It's Maven 2.0.4 and Surefire 2.2. Couldn't test the 2.3-SNAPSHOT
since there's no public version available.

Could someone pls confirm and i'll post a bug report.
-- 
View this message in context:
http://www.nabble.com/Surefire%2C-Cargo-and-Integration-Tests-tf3117463s177.
html#a8635674
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Maven 2 surefire doesn't handle junit TestSetup very well

2007-01-23 Thread Bashar Abdul Jawad
Hello,

 

I am using junit TestSetup to set up a common selenium connection among my
different tests. The TestSetup runs a global setup and Teardown once before
any of the tests are run. I wrapped a TestSuite in a subclass of TestSetup
and it works perfectly fine when the TestSuite is run from eclipse:

 

The code for my TestSuite:

 

public class AllTestsOneTimeSetup {

 

public static Test suite() {

TestSuite suite = new TestSuite();

suite.addTestSuite(SomeTest.class);

TestSetup wrapper = new TestSetup(suite) {

protected void setUp() {

oneTimeSetUp();

}

 

protected void tearDown() {

oneTimeTearDown();

}

};

 

return wrapper;

} 

}

 

Now to make this suite runs in Maven 2 I had to add the following method to
the TestSuite:

 

public void testSuite(){

  TestSetup test = (TestSetup) AllTestsOneTimeSetup.suite();

  TestResult result = new TestResult();

  test.run(result);

}

 

Now something weird happens. The global setup an tear down run fine and
Maven 2 runs all the tests in the suite fine but  It always reports that it
is running 1 test (the testSuite test) and that it was successful (as the
testSuite itself doesn't fail, the included tests do).

 

One way around this is to do the following:

 

if (!result.wasSuccessful()){

String message = ;  

for (Enumeration e = result.failures(); e.hasMoreElements() ;){

  message += e.nextElement() + \n;

}

for (Enumeration e = result.errors(); e.hasMoreElements() ;){

  message += e.nextElement() + \n;

}

Assert.fail(message);

result.endTest(test);

  }

 

My question is, does anyone have a cleaner solution to this?

 

Thanks,

  

 

 


 

Bashar