Re: Beginner needs help: Maven won't run my tests...

2011-07-19 Thread Barrie Treloar
On Sun, Jul 17, 2011 at 7:21 PM, Julien Martin bal...@gmail.com wrote:

Julien, you need to setup a repository manager at your work.

[del]
 [INFO] snapshot com.cheetah:cheetah-domain:1.0-SNAPSHOT: checking for
 updates from jboss
 [DEBUG] Using Wagon implementation lightweight from default mapping for
 protocol http
 [DEBUG] Checking for pre-existing User-Agent configuration.
 [DEBUG] Adding User-Agent configuration.
 [DEBUG] Connecting to repository: 'jboss' with url: '
 http://repository.jboss.org/maven2/'.
 [DEBUG] Using Wagon implementation lightweight from default mapping for
 protocol http
 [WARNING] repository metadata for: 'snapshot
 com.cheetah:cheetah-domain:1.0-SNAPSHOT' could not be retrieved from
 repository: jboss due to an error: Authorization failed: Access denied to:
 http://repository.jboss.org/maven2/com/cheetah/cheetah-domain/1.0-SNAPSHOT/maven-metadata.xml
 [DEBUG] Exception
 org.apache.maven.wagon.TransferFailedException: Authorization failed: Access

Your maven build is reaching out over the internet to look for things
it will never find (i.e. your locally installed artifacts)


From your output:
[DEBUG]   (f) compileSourceRoots =
[/home/julien/Documents/donnees/projets/Site emploi
finance/java/cheetah/web/src/test/java]
[DEBUG]   (f) compilerId = javac
[DEBUG]   (f) debug = true
[DEBUG]   (f) failOnError = true
[DEBUG]   (f) fork = false
[DEBUG]   (f) optimize = false
[DEBUG]   (f) outputDirectory =
/home/julien/Documents/donnees/projets/Site emploi
finance/java/cheetah/web/target/test-classes
[DEBUG]   (f) outputFileName = cheetah-web-1.0-SNAPSHOT
[DEBUG]   (f) showDeprecation = false
[DEBUG]   (f) showWarnings = false
[DEBUG]   (f) source = 1.6
[DEBUG]   (f) staleMillis = 0
[DEBUG]   (f) target = 1.6
[DEBUG]   (f) verbose = false
[DEBUG] -- end configuration --
[INFO] [compiler:testCompile {execution: default-testCompile}]
[DEBUG] Using compiler 'javac'.
[DEBUG] Source directories:
[/home/julien/Documents/donnees/projets/Site emploi
finance/java/cheetah/web/src/test/java]
[DEBUG] Classpath: [/home/julien/Documents/donnees/projets/Site emploi
[del]
[DEBUG] Output directory: /home/julien/Documents/donnees/projets/Site
emploi finance/java/cheetah/web/target/test-classes
[INFO] Nothing to compile - all classes are up to date

Either there is nothing in this
/home/julien/Documents/donnees/projets/Site emploi
finance/java/cheetah/web/src/test/java directory to compile or its
all up to date.
Can you confirm that there is a .class file in
/home/julien/Documents/donnees/projets/Site emploi
finance/java/cheetah/web/target/test-classes that matches
CreateJobPostingTest?

You can see from the output that no tests have been selected for running.:
Running TestSuite
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.362 sec

i dont believe spaces in folder names is an issue, but you can try
renaming your directory structure to avoid spaces.

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



How to exclude a child-module from being released during release:perform

2011-07-19 Thread Hansjoerg
Hi

I'm trying to figure out, how I can exclude a child module from beeing
released to our company repository during the execution of release:perform.

The situation is this:
parent pom
...
 modules
modulechild1/module
modulechild2/module
 modules

child 2 shouldn't be put directly to the maven repository, so I tried to
reconfigure the release plugin the child2 pom.xml.

  build
plugins
  plugin
 artifactIdmaven-release-plugin/artifactId
 version2.2/version
 inheritedfalse/inherited
  /plugin
/plugins
  /build


In the end I would like to see, that only parent and child1 are released
with the new version into our company repository. However, child2 gets
released as well. I also tried to overwrite the configuration for the
deploy plugin, but that doesn't work as well.

So my question: Does anybody have an idea, how I could exclude a
Child-Module from beeing released to the company repository during the run
of release:perform?

Thanks.
Hansjoerg




--
View this message in context: 
http://maven.40175.n5.nabble.com/How-to-exclude-a-child-module-from-being-released-during-release-perform-tp4611383p4611383.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: How to exclude a child-module from being released during release:perform

2011-07-19 Thread Barrie Treloar
On Tue, Jul 19, 2011 at 4:48 PM, Hansjoerg hj.winge...@bluewin.ch wrote:
 Hi

 I'm trying to figure out, how I can exclude a child module from beeing
 released to our company repository during the execution of release:perform.

 The situation is this:
 parent pom
 ...
  modules
    modulechild1/module
    modulechild2/module
  modules

 child 2 shouldn't be put directly to the maven repository, so I tried to
 reconfigure the release plugin the child2 pom.xml.
[del]
 So my question: Does anybody have an idea, how I could exclude a
 Child-Module from beeing released to the company repository during the run
 of release:perform?

Its a module so it *should* be released at the same time.

I assume that child1 probably depends upon child2 in which case you
can't release because it depends on snapshots.

You can either delete the module declaration or change the
child2/pom.xml to be a non-snapshot version (in which case release
plugin won't release it)

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



Re: How to exclude a child-module from being released during release:perform

2011-07-19 Thread Stephen Connolly
If all you want to do is ensure that the child2 is not deployed to the maven
repo, then you would turn on the
http://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html#skipparameter
in that module, ideally by using a release profile and having that
release profile with a definition in the release root and child2. the child2
definition will turn on skip for deploy.

On 19 July 2011 08:18, Hansjoerg hj.winge...@bluewin.ch wrote:

 Hi

 I'm trying to figure out, how I can exclude a child module from beeing
 released to our company repository during the execution of release:perform.

 The situation is this:
 parent pom
 ...
  modules
modulechild1/module
modulechild2/module
  modules

 child 2 shouldn't be put directly to the maven repository, so I tried to
 reconfigure the release plugin the child2 pom.xml.

  build
plugins
  plugin
 artifactIdmaven-release-plugin/artifactId
 version2.2/version
 inheritedfalse/inherited
  /plugin
/plugins
  /build


 In the end I would like to see, that only parent and child1 are released
 with the new version into our company repository. However, child2 gets
 released as well. I also tried to overwrite the configuration for the
 deploy plugin, but that doesn't work as well.

 So my question: Does anybody have an idea, how I could exclude a
 Child-Module from beeing released to the company repository during the run
 of release:perform?

 Thanks.
 Hansjoerg




 --
 View this message in context:
 http://maven.40175.n5.nabble.com/How-to-exclude-a-child-module-from-being-released-during-release-perform-tp4611383p4611383.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




Include original manifest file in war overlay

2011-07-19 Thread Sarah Sloan
Hi,

This seems like a pretty straightforward thing to want to do but I haven't 
found a way of doing it. I'm generating a war, call it module1, and adding some 
entries to the manifest of this war. I'm then overlaying this war, which 
generates the expected results, but I want to include the entries from the 
original module1 manifest in the new manifest. Is there a way to do that? I've 
tried using includes to reference the manifest.mf file but this doesn't have 
any effect.

Thanks,
Sarah



Re: Beginner needs help: Maven won't run my tests...

2011-07-19 Thread Julien Martin
Hello Barrie,

Thanks for your reply!

I removed the white spaces from the directory name.

Yes there is a classes in the test-classes directory.

The point you make about my mvn trying to install the artefact into the
jboss repository is very relevant but do I really need a repository manager
even though I am the only developer on this project? Don't you think there
might be something wrong with my settings.xml instead?

Here it is:

?xml version=1.0 encoding=UTF-8?
settings xmlns=http://maven.apache.org/SETTINGS/1.0.0;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd;
profiles
profile
idjulien/id
repositories
repository
idjboss/id
urlhttp://repository.jboss.org/maven2/url
/repository
repository
idtapestry/id
urlhttp://tapestry.formos.com/maven-repository/url
/repository
/repositories
/profile
/profiles
activeProfiles
activeProfilejulien/activeProfile
/activeProfiles
/settings

I am sure I am missing something in the settings.xml file...

What do you think?

Julien.

P.S. I am still going to have a look at Nexus in the meantime.

2011/7/19 Barrie Treloar baerr...@gmail.com

 On Sun, Jul 17, 2011 at 7:21 PM, Julien Martin bal...@gmail.com wrote:

 Julien, you need to setup a repository manager at your work.

 [del]
  [INFO] snapshot com.cheetah:cheetah-domain:1.0-SNAPSHOT: checking for
  updates from jboss
  [DEBUG] Using Wagon implementation lightweight from default mapping for
  protocol http
  [DEBUG] Checking for pre-existing User-Agent configuration.
  [DEBUG] Adding User-Agent configuration.
  [DEBUG] Connecting to repository: 'jboss' with url: '
  http://repository.jboss.org/maven2/'.
  [DEBUG] Using Wagon implementation lightweight from default mapping for
  protocol http
  [WARNING] repository metadata for: 'snapshot
  com.cheetah:cheetah-domain:1.0-SNAPSHOT' could not be retrieved from
  repository: jboss due to an error: Authorization failed: Access denied
 to:
 
 http://repository.jboss.org/maven2/com/cheetah/cheetah-domain/1.0-SNAPSHOT/maven-metadata.xml
  [DEBUG] Exception
  org.apache.maven.wagon.TransferFailedException: Authorization failed:
 Access

 Your maven build is reaching out over the internet to look for things
 it will never find (i.e. your locally installed artifacts)


 From your output:
 [DEBUG]   (f) compileSourceRoots =
 [/home/julien/Documents/donnees/projets/Site emploi
 finance/java/cheetah/web/src/test/java]
 [DEBUG]   (f) compilerId = javac
 [DEBUG]   (f) debug = true
 [DEBUG]   (f) failOnError = true
 [DEBUG]   (f) fork = false
 [DEBUG]   (f) optimize = false
 [DEBUG]   (f) outputDirectory =
 /home/julien/Documents/donnees/projets/Site emploi
 finance/java/cheetah/web/target/test-classes
 [DEBUG]   (f) outputFileName = cheetah-web-1.0-SNAPSHOT
 [DEBUG]   (f) showDeprecation = false
 [DEBUG]   (f) showWarnings = false
 [DEBUG]   (f) source = 1.6
 [DEBUG]   (f) staleMillis = 0
 [DEBUG]   (f) target = 1.6
 [DEBUG]   (f) verbose = false
 [DEBUG] -- end configuration --
 [INFO] [compiler:testCompile {execution: default-testCompile}]
 [DEBUG] Using compiler 'javac'.
 [DEBUG] Source directories:
 [/home/julien/Documents/donnees/projets/Site emploi
 finance/java/cheetah/web/src/test/java]
 [DEBUG] Classpath: [/home/julien/Documents/donnees/projets/Site emploi
 [del]
 [DEBUG] Output directory: /home/julien/Documents/donnees/projets/Site
 emploi finance/java/cheetah/web/target/test-classes
 [INFO] Nothing to compile - all classes are up to date

 Either there is nothing in this
 /home/julien/Documents/donnees/projets/Site emploi
 finance/java/cheetah/web/src/test/java directory to compile or its
 all up to date.
 Can you confirm that there is a .class file in
 /home/julien/Documents/donnees/projets/Site emploi
 finance/java/cheetah/web/target/test-classes that matches
 CreateJobPostingTest?

 You can see from the output that no tests have been selected for running.:
 Running TestSuite
 Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.362 sec

 i dont believe spaces in folder names is an issue, but you can try
 renaming your directory structure to avoid spaces.

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




Re: Beginner needs help: Maven won't run my tests...

2011-07-19 Thread Barrie Treloar
On Tue, Jul 19, 2011 at 5:23 PM, Julien Martin bal...@gmail.com wrote:
 Hello Barrie,

 Thanks for your reply!

 I removed the white spaces from the directory name.

 Yes there is a classes in the test-classes directory.

I'm running out of thoughts.
The file name ends in Test should it should be automatically included
by surefire.
I can see you are using junit 4 and that should work out of the box.
You have the annotations needed.

Is this project accessible on the net?

 The point you make about my mvn trying to install the artefact into the
 jboss repository is very relevant but do I really need a repository manager
 even though I am the only developer on this project? Don't you think there
 might be something wrong with my settings.xml instead?

settings.xml [del]

No, your settings.xml is fine.
However, I would remove activeProfiles and manually enable the profile
with -Pjulien when you need it.
Its a deficiency with Maven that it contacts all defined repositories
for any SNAPSHOT artifacts even though those repositories will never
contain those artifacts.
(i.e. there is currently no way to inform Maven what groupIds are
expected to be located at that repository).
By using a repository manager you get that functionality.

A lot of people install repository managers on their laptops.  It
helps them transition between work and home without mucking around
with settings.xml and proxy settings.
You may not need one.

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



Re: Beginner needs help: Maven won't run my tests...

2011-07-19 Thread Julien Martin
Sure. I am going to set one up. Which repo manager do you recommend?
Regards,
Julien.

2011/7/19 Barrie Treloar baerr...@gmail.com

 On Tue, Jul 19, 2011 at 5:23 PM, Julien Martin bal...@gmail.com wrote:
  Hello Barrie,
 
  Thanks for your reply!
 
  I removed the white spaces from the directory name.
 
  Yes there is a classes in the test-classes directory.

 I'm running out of thoughts.
 The file name ends in Test should it should be automatically included
 by surefire.
 I can see you are using junit 4 and that should work out of the box.
 You have the annotations needed.

 Is this project accessible on the net?

  The point you make about my mvn trying to install the artefact into the
  jboss repository is very relevant but do I really need a repository
 manager
  even though I am the only developer on this project? Don't you think
 there
  might be something wrong with my settings.xml instead?
 
 settings.xml [del]

 No, your settings.xml is fine.
 However, I would remove activeProfiles and manually enable the profile
 with -Pjulien when you need it.
 Its a deficiency with Maven that it contacts all defined repositories
 for any SNAPSHOT artifacts even though those repositories will never
 contain those artifacts.
 (i.e. there is currently no way to inform Maven what groupIds are
 expected to be located at that repository).
 By using a repository manager you get that functionality.

 A lot of people install repository managers on their laptops.  It
 helps them transition between work and home without mucking around
 with settings.xml and proxy settings.
 You may not need one.

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




Relative path to parent directory at multi module maven project

2011-07-19 Thread Cem Koc
I have 3 level multi module maven project.  I want to utilize a common plugin
configuration at parent pom and the rest of the 2nd and 3rd level modules
will utilize this configuration. The plugin configuration has a
configuration file for 3rd level modules such as:

mypluging-config-source-path../../conf/myplugin/mypluging-config-source-path

But this configuration could not be used by 2rd level modules. They need

mypluging-config-source-path../conf/myplugin/mypluging-config-source-path

What is the best way to use a common path for all modules in a project even
at root parent pom?  

--
View this message in context: 
http://maven.40175.n5.nabble.com/Relative-path-to-parent-directory-at-multi-module-maven-project-tp4611798p4611798.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-19 Thread Jesse Farinacci
It works fine just as long as your minimal configuration doesn't
include Java 6. There's a bug[1] hanging out there for almost a year
now which prevents Archiva from being useful for me and a lot of
others.

That being the case, Nexus all the way.

[1] http://jira.codehaus.org/browse/MRM-1412

-Jesse

On Tue, Jul 19, 2011 at 12:10 AM, Rajesh Koilpillai
rajesh.koilpil...@gmail.com wrote:
 They are competing and Apache Archiva works just fine with minimal
 configuration.


-- 
There are 10 types of people in this world, those
that can read binary and those that can not.

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



Re: Using maven shade plugin on provided dependencies

2011-07-19 Thread Mark Derricutt
That sounds like standard, expected behavior - if the dependencies are 
-provided- for you, why would you need to shade them?


Resources filtering failed if file contains @ on Linux/Mac

2011-07-19 Thread Li Yanhui
Hi,

I'm using maven-resources-plugin:2.4.3 on my Mac.

I found it can't replace placeholder in properties file if it contains the '@' 
character.

For example, I have a env.properties under src\main\resources which has the 
following content:

  jdbc.url=jdbc:oracle:thin:@192.168.1.212:1521:demodb
  solr.home=${solr.home}

I have the following configuration in pom.xml:

build
resources
resource
directorysrc/main/resources/directory
filteringtrue/filtering
/resource
/resources
...
/build

Then I run the following command:

  mvn clean resources:resources -Dsolr.home=/tmp/solr

And check file content using:

  cat target/classes/env.properties

It remains the original content.


If I removed the '@' character in properties file, it just works.

Any ideas?

PS. I also tested this case on Windows and Linux, it passed on Windows but 
failed on Linux.


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



Re: Resources filtering failed if file contains @ on Linux/Mac

2011-07-19 Thread Lukas Theussl


maybe this: http://jira.codehaus.org/browse/MRESOURCES-104 ?

-Lukas


On 07/19/2011 12:01 PM, Li Yanhui wrote:

Hi,

I'm using maven-resources-plugin:2.4.3 on my Mac.

I found it can't replace placeholder in properties file if it contains the '@' 
character.

For example, I have a env.properties under src\main\resources which has the 
following content:

   jdbc.url=jdbc:oracle:thin:@192.168.1.212:1521:demodb
   solr.home=${solr.home}

I have the following configuration in pom.xml:

 build
 resources
 resource
 directorysrc/main/resources/directory
 filteringtrue/filtering
 /resource
 /resources
...
 /build

Then I run the following command:

   mvn clean resources:resources -Dsolr.home=/tmp/solr

And check file content using:

   cat target/classes/env.properties

It remains the original content.


If I removed the '@' character in properties file, it just works.

Any ideas?

PS. I also tested this case on Windows and Linux, it passed on Windows but 
failed on Linux.


Regards,
Li Yanhui
-
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: Beginner needs help: Maven won't run my tests...

2011-07-19 Thread Brian Topping
Julien,

Sorry I didn't notice you had responded.  Like most mailing lists, one thing to 
keep in mind is we're all doing this for free and at one time or another 
someone helped us out.  So we're just returning the favor. 

Anyway, your logs show the line:

 [DEBUG]   (f) testSourceDirectory =
 /home/julien/Documents/donnees/projets/Site emploi
 finance/java/cheetah/web/src/test/java

I see you made many changes like removing spaces and that would have also been 
my first suggestion.  

Now, please run the mvn command with -X again.  There's no need now to send the 
entire file, just search through the output for testSourceDirectory and make 
sure you can do ls /home/julien/Documents/donnees/projets/Site emploi 
finance/java/cheetah/web/src/test/java from the command line, for instance, 
but using whatever the new output from that line is.

Also, take a look at the web page for the surefire plugin configuration at 
http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html.  Note how 
testSourceDirectory is documented there, along with every other parameter in 
your -X output.  Pay close attention to each one, mapping it back to the 
documentation, then ask questions about the ones you don't understand and think 
might be causing problems.

In the worst case, regenerate the project using a project archetype in a second 
directory and look how it gets set up there.  

Cheers, Brian

On Jul 19, 2011, at 2:36 AM, Julien Martin wrote:

 up
 
 2011/7/17 Julien Martin bal...@gmail.com
 
 Hello Thomas and thank you for the reply,
 Yes the tests are indeed located there.
 I was not able to reproduce the bug unfortunately...
 Does anyone have any idea where else to look for a problem?
 Regards,
 Julien.
 
 
 
 2011/7/17 Thomas Sundberg t...@kth.se
 
 Hi Julien!
 
 You still haven't told us where your tests are locted. They should be
 located in the directory
 
 src/test/java/com/cheetah/web/pages
 
 to be picked up and executed by Surefire.
 
 Is it possible to clone your project, remove almost everything and
 keep a Hello world so you are able to locate the problem with a
 minimal set of possible problems and then add the things you want,
 step by step?
 
 HTH
 Thomas

snip/


-
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-19 Thread Eric Kolotyluk
I must say, I don't know either technology that well, but after looking 
around Nexus seems to have the more favorable reviews. I'll probably try 
Nexus first given I am already using m2e and Sonatype seem to document 
things well.


Thanks for that clarity everyone.

Cheers, Eric

On 2011-07-19 4:11 AM, Jesse Farinacci wrote:

It works fine just as long as your minimal configuration doesn't
include Java 6. There's a bug[1] hanging out there for almost a year
now which prevents Archiva from being useful for me and a lot of
others.

That being the case, Nexus all the way.

[1] http://jira.codehaus.org/browse/MRM-1412

-Jesse

On Tue, Jul 19, 2011 at 12:10 AM, Rajesh Koilpillai
rajesh.koilpil...@gmail.com  wrote:

They are competing and Apache Archiva works just fine with minimal
configuration.




-
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-19 Thread Ron Wheeler

On 19/07/2011 9:17 AM, Eric Kolotyluk wrote:
I must say, I don't know either technology that well, but after 
looking around Nexus seems to have the more favorable reviews. I'll 
probably try Nexus first given I am already using m2e and Sonatype 
seem to document things well.

I am really happy with Nexus but have not tried Archiva.
Follow the installation procedure carefully as it has some bits about 
directories that are not intuitive.

If you pay attention to the instructions, you will not have any problems.
The user interface is very simple and easy to understand.
The support is very good in the Nexus forum and to a certain extent here 
as well.

Documentation is clear and abundant.

Good Luck.
Ron



Thanks for that clarity everyone.

Cheers, Eric

On 2011-07-19 4:11 AM, Jesse Farinacci wrote:

It works fine just as long as your minimal configuration doesn't
include Java 6. There's a bug[1] hanging out there for almost a year
now which prevents Archiva from being useful for me and a lot of
others.

That being the case, Nexus all the way.

[1] http://jira.codehaus.org/browse/MRM-1412

-Jesse

On Tue, Jul 19, 2011 at 12:10 AM, Rajesh Koilpillai
rajesh.koilpil...@gmail.com  wrote:

They are competing and Apache Archiva works just fine with minimal
configuration.




-
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: Beginner needs help: Maven won't run my tests...

2011-07-19 Thread Julien Martin
Hello,

I appreciate your help Brian!

I changed my POM as follows:

*plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-surefire-plugin/artifactId
dependencies
dependency
groupIdorg.apache.maven.surefire/groupId
artifactIdsurefire-junit4/artifactId
version2.7.2/version
/dependency
/dependencies
configuration
includes
include**/*Test.java/include
/includes
/configuration
  /plugin*

It now seems something is being run. Here is the output now:
*---
 T E S T S
---
Running TestSuite
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.769 sec

Results :

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

Notice the Running TestSuite. However it still fails to find my test
methods. I suspect it might have to do with this:

*[DEBUG] Adding to surefire test classpath:
/home/julien/.m2/repository/org/apache/maven/surefire/surefire-testng/2.4.3/surefire-testng-2.4.3.jar
[DEBUG] Adding to surefire test classpath:
/home/julien/.m2/repository/org/apache/maven/maven-artifact/2.0/maven-artifact-2.0.jar
[DEBUG] Adding to surefire test classpath:
/home/julien/.m2/repository/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.jar
[DEBUG] Adding to surefire test classpath:
/home/julien/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
[DEBUG] Adding to surefire test classpath:
/home/julien/.m2/repository/org/apache/maven/surefire/surefire-api/2.4.3/surefire-api-2.4.3.jar
*
Notice it says it is using version 3.8.1 of Junit...

However it goes on to say:
Test Classpath :
...
*[DEBUG]   /home/julien/.m2/repository/junit/junit/4.8.2/junit-4.8.2.jar*
...

So what is the difference between the surefire test classpath and the
Test classpath?

Here is how my test method is named and annotated:
   *@Test
public void test() {*
...

Any idea what is wrong?
J.


2011/7/19 Brian Topping topp...@codehaus.org

 Julien,

 Sorry I didn't notice you had responded.  Like most mailing lists, one
 thing to keep in mind is we're all doing this for free and at one time or
 another someone helped us out.  So we're just returning the favor.

 Anyway, your logs show the line:

  [DEBUG]   (f) testSourceDirectory =
  /home/julien/Documents/donnees/projets/Site emploi
  finance/java/cheetah/web/src/test/java

 I see you made many changes like removing spaces and that would have also
 been my first suggestion.

 Now, please run the mvn command with -X again.  There's no need now to send
 the entire file, just search through the output for testSourceDirectory
 and make sure you can do ls /home/julien/Documents/donnees/projets/Site
 emploi finance/java/cheetah/web/src/test/java from the command line, for
 instance, but using whatever the new output from that line is.

 Also, take a look at the web page for the surefire plugin configuration at
 http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html.
  Note how testSourceDirectory is documented there, along with every other
 parameter in your -X output.  Pay close attention to each one, mapping it
 back to the documentation, then ask questions about the ones you don't
 understand and think might be causing problems.

 In the worst case, regenerate the project using a project archetype in a
 second directory and look how it gets set up there.

 Cheers, Brian

 On Jul 19, 2011, at 2:36 AM, Julien Martin wrote:

  up
 
  2011/7/17 Julien Martin bal...@gmail.com
 
  Hello Thomas and thank you for the reply,
  Yes the tests are indeed located there.
  I was not able to reproduce the bug unfortunately...
  Does anyone have any idea where else to look for a problem?
  Regards,
  Julien.
 
 
 
  2011/7/17 Thomas Sundberg t...@kth.se
 
  Hi Julien!
 
  You still haven't told us where your tests are locted. They should be
  located in the directory
 
  src/test/java/com/cheetah/web/pages
 
  to be picked up and executed by Surefire.
 
  Is it possible to clone your project, remove almost everything and
  keep a Hello world so you are able to locate the problem with a
  minimal set of possible problems and then add the things you want,
  step by step?
 
  HTH
  Thomas

 snip/


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




Re: Using maven shade plugin on provided dependencies

2011-07-19 Thread Benson Margulies
This has come up before, I believe that there is a JIRA requesting it.
It happens when someone has two environments: one in which something
is provide, and one in which they want to shade it. It's not currently
possible.

On Tue, Jul 19, 2011 at 7:13 AM, Mark Derricutt m...@talios.com wrote:
 That sounds like standard, expected behavior - if the dependencies are
 -provided- for you, why would you need to shade them?


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



Re: Relative path to parent directory at multi module maven project

2011-07-19 Thread Hilco Wijbenga
On 19 July 2011 03:01, Cem Koc cemalettin@gmail.com wrote:
 I have 3 level multi module maven project.  I want to utilize a common plugin
 configuration at parent pom and the rest of the 2nd and 3rd level modules
 will utilize this configuration. The plugin configuration has a
 configuration file for 3rd level modules such as:

 mypluging-config-source-path../../conf/myplugin/mypluging-config-source-path

 But this configuration could not be used by 2rd level modules. They need

 mypluging-config-source-path../conf/myplugin/mypluging-config-source-path

 What is the best way to use a common path for all modules in a project even
 at root parent pom?

You could set a property with an absolute path in the parent.
Something like parent-path${basedir}/parent-path. Then you can use
that as a starting point:
myplugin-config-source-path${parent-path}/conf/myplugin/myplugin-config-source-path

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



Re: Relative path to parent directory at multi module maven project

2011-07-19 Thread Stephen Connolly
On 19 July 2011 16:44, Hilco Wijbenga hilco.wijbe...@gmail.com wrote:

 On 19 July 2011 03:01, Cem Koc cemalettin@gmail.com wrote:
  I have 3 level multi module maven project.  I want to utilize a common
 plugin
  configuration at parent pom and the rest of the 2nd and 3rd level modules
  will utilize this configuration. The plugin configuration has a
  configuration file for 3rd level modules such as:
 
 
 mypluging-config-source-path../../conf/myplugin/mypluging-config-source-path
 
  But this configuration could not be used by 2rd level modules. They need
 
 
 mypluging-config-source-path../conf/myplugin/mypluging-config-source-path
 
  What is the best way to use a common path for all modules in a project
 even
  at root parent pom?

 You could set a property with an absolute path in the parent.
 Something like parent-path${basedir}/parent-path. Then you can use
 that as a starting point:


Not really as inheritance will kill you by resetting the property in the
child project.



 myplugin-config-source-path${parent-path}/conf/myplugin/myplugin-config-source-path

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




Re: Relative path to parent directory at multi module maven project

2011-07-19 Thread Hilco Wijbenga
On 19 July 2011 09:16, Stephen Connolly stephen.alan.conno...@gmail.com wrote:
 On 19 July 2011 16:44, Hilco Wijbenga hilco.wijbe...@gmail.com wrote:

 On 19 July 2011 03:01, Cem Koc cemalettin@gmail.com wrote:
  I have 3 level multi module maven project.  I want to utilize a common
 plugin
  configuration at parent pom and the rest of the 2nd and 3rd level modules
  will utilize this configuration. The plugin configuration has a
  configuration file for 3rd level modules such as:
 
 
 mypluging-config-source-path../../conf/myplugin/mypluging-config-source-path
 
  But this configuration could not be used by 2rd level modules. They need
 
 
 mypluging-config-source-path../conf/myplugin/mypluging-config-source-path
 
  What is the best way to use a common path for all modules in a project
 even
  at root parent pom?

 You could set a property with an absolute path in the parent.
 Something like parent-path${basedir}/parent-path. Then you can use
 that as a starting point:


 Not really as inheritance will kill you by resetting the property in the
 child project.

Mmmh, yeah, I guess ${basedir} is not a great idea. :-) So either set
*all* properties in the parent (and then simply use them in the
children) or use an environment variable (${env.SHARED_CONF_DIR}).

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



Re: Using maven shade plugin on provided dependencies

2011-07-19 Thread Josh Stone
Thanks for the response.

On Tue, Jul 19, 2011 at 7:30 AM, Benson Margulies bimargul...@gmail.comwrote:

 This has come up before, I believe that there is a JIRA requesting it.
 It happens when someone has two environments: one in which something
 is provide, and one in which they want to shade it. It's not currently
 possible.

 On Tue, Jul 19, 2011 at 7:13 AM, Mark Derricutt m...@talios.com wrote:
  That sounds like standard, expected behavior - if the dependencies are
  -provided- for you, why would you need to shade them?
 

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




Re: Relative path to parent directory at multi module maven project

2011-07-19 Thread Marc Rohlfs
I normally define a property called something like 
'multiproject.basedir' in every POM - or at least in every POM that 
needs to reference a path in the parent project dir.


Some examples:
 - in 'parent/pom.xml' it's:
 multiproject.basedir${basedir}multiproject.basedir
 - in 'parent/sub1/pom.xml' it's:
 multiproject.basedir${basedir}/..multiproject.basedir
 - in 'parent/sub1/sub2/pom.xml' it's:
 multiproject.basedir${basedir}/../..multiproject.basedir

With this, You have a common property to locate Your configuration in 
the parent project dir.



Another approach would be similar to Sharing Assembly Descriptors [1]. 
It's just little more complicated:


1. Create module that contains the all the configuration files. It 
should use the Assembly plugin to package the file into a ZIP (or TAR or 
whatever) archive and install it to the local repo.


2. Use the dependency:unpack goal to extract the contents of the ZIP 
archive, that was created by the new module, and bind it to the 
'pre-site' phase. You can do this configuration once in the parent POM 
and inherit it to all modules.


2.a. If You like/need, You could use the resources:copy-resources goal 
to overwrite the extracted configuration files with custom files that 
are placed in the modules. Also bind it to the 'pre-site' phase. This 
configuration can also be inherited from the parent to all module POMs.


3. Configure the site plugins to use the unpacked configuration files in 
each module. Even this can be done in the parent POM and inherited to 
the modules.



Kind regards, Marc


[1] 
http://maven.apache.org/plugins/maven-assembly-plugin/examples/sharing-descriptors.html


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



Re: Beginner needs help: Maven won't run my tests...

2011-07-19 Thread Barrie Treloar
On Tue, Jul 19, 2011 at 11:20 PM, Julien Martin bal...@gmail.com wrote:
 Hello,

 I appreciate your help Brian!

 I changed my POM as follows:

 *plugin
                groupIdorg.apache.maven.plugins/groupId
                artifactIdmaven-surefire-plugin/artifactId
                dependencies
                    dependency
                        groupIdorg.apache.maven.surefire/groupId
                        artifactIdsurefire-junit4/artifactId
                        version2.7.2/version
                    /dependency
                /dependencies
                configuration
                    includes
                        include**/*Test.java/include
                    /includes
                /configuration
  /plugin*

 It now seems something is being run. Here is the output now:
 *---
  T E S T S
 ---
 Running TestSuite
 Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.769 sec

 Results :

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

 Notice the Running TestSuite. However it still fails to find my test
 methods. I suspect it might have to do with this:

 *[DEBUG] Adding to surefire test classpath:
 /home/julien/.m2/repository/org/apache/maven/surefire/surefire-testng/2.4.3/surefire-testng-2.4.3.jar
 [DEBUG] Adding to surefire test classpath:
 /home/julien/.m2/repository/org/apache/maven/maven-artifact/2.0/maven-artifact-2.0.jar
 [DEBUG] Adding to surefire test classpath:
 /home/julien/.m2/repository/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.jar
 [DEBUG] Adding to surefire test classpath:
 /home/julien/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
 [DEBUG] Adding to surefire test classpath:
 /home/julien/.m2/repository/org/apache/maven/surefire/surefire-api/2.4.3/surefire-api-2.4.3.jar
 *
 Notice it says it is using version 3.8.1 of Junit...

 However it goes on to say:
 Test Classpath :
 ...
 *[DEBUG]   /home/julien/.m2/repository/junit/junit/4.8.2/junit-4.8.2.jar*
 ...

 So what is the difference between the surefire test classpath and the
 Test classpath?

 Here is how my test method is named and annotated:
   *@Test
    public void test() {*
 ...


If surefire thinks you are using junit 3 then it wont run your tests
since you are using annotations instead of extending TestCase.


http://maven.apache.org/plugins/maven-surefire-plugin/examples/junit.html

You aren't specifying a version of surefire but you are locking down
the surefire provider (2.7.2).
That may mean you are using version 2.9 of surefire but with an older provider.
You shouldn't need to specify a provider version - the docs indicate
it will select the correct one based upon your dependencies.
But you can try fiddling with these values.
There is a caveat on the docs when you manually specify a provider
When using this technique there is no check that the proper
test-frameworks are present on your project's classpath. Failing to
add the proper test-frameworks will result in a build failure.

I also notice testng on the classpath.
Perhaps one of the other dependencies is pulling things in you dont
expect and mucking up surefire (because multiple test frameworks are
available)
You can try
mvn dependency:tree
and see whether that output gives any clues.

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



Re: Beginner needs help: Maven won't run my tests...

2011-07-19 Thread Julien Martin
Yes Barrie you're right. I've just realized that one of my tapestry
dependencies (tapestry-test) includes a hidden dependency to testng which
was the cause of my woes!

Have excluded the dependency as follows:
 dependency
groupIdorg.apache.tapestry/groupId
artifactIdtapestry-test/artifactId
version5.2.6/version
scopetest/scope
   * exclusions
exclusion
artifactIdtestng/artifactId
groupIdorg.testng/groupId
/exclusion
/exclusions*
/dependency

sorted the problem!

Thank you very much to all of you!

Regards,

Julien.

2011/7/19 Barrie Treloar baerr...@gmail.com

 On Tue, Jul 19, 2011 at 11:20 PM, Julien Martin bal...@gmail.com wrote:
  Hello,
 
  I appreciate your help Brian!
 
  I changed my POM as follows:
 
  *plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-surefire-plugin/artifactId
 dependencies
 dependency
 groupIdorg.apache.maven.surefire/groupId
 artifactIdsurefire-junit4/artifactId
 version2.7.2/version
 /dependency
 /dependencies
 configuration
 includes
 include**/*Test.java/include
 /includes
 /configuration
   /plugin*
 
  It now seems something is being run. Here is the output now:
  *---
   T E S T S
  ---
  Running TestSuite
  Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.769 sec
 
  Results :
 
  Tests run: 0, Failures: 0, Errors: 0, Skipped: 0*
 
  Notice the Running TestSuite. However it still fails to find my test
  methods. I suspect it might have to do with this:
 
  *[DEBUG] Adding to surefire test classpath:
 
 /home/julien/.m2/repository/org/apache/maven/surefire/surefire-testng/2.4.3/surefire-testng-2.4.3.jar
  [DEBUG] Adding to surefire test classpath:
 
 /home/julien/.m2/repository/org/apache/maven/maven-artifact/2.0/maven-artifact-2.0.jar
  [DEBUG] Adding to surefire test classpath:
 
 /home/julien/.m2/repository/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.jar
  [DEBUG] Adding to surefire test classpath:
  /home/julien/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
  [DEBUG] Adding to surefire test classpath:
 
 /home/julien/.m2/repository/org/apache/maven/surefire/surefire-api/2.4.3/surefire-api-2.4.3.jar
  *
  Notice it says it is using version 3.8.1 of Junit...
 
  However it goes on to say:
  Test Classpath :
  ...
  *[DEBUG]   /home/julien/.m2/repository/junit/junit/4.8.2/junit-4.8.2.jar*
  ...
 
  So what is the difference between the surefire test classpath and the
  Test classpath?
 
  Here is how my test method is named and annotated:
*@Test
 public void test() {*
  ...
 

 If surefire thinks you are using junit 3 then it wont run your tests
 since you are using annotations instead of extending TestCase.


 http://maven.apache.org/plugins/maven-surefire-plugin/examples/junit.html

 You aren't specifying a version of surefire but you are locking down
 the surefire provider (2.7.2).
 That may mean you are using version 2.9 of surefire but with an older
 provider.
 You shouldn't need to specify a provider version - the docs indicate
 it will select the correct one based upon your dependencies.
 But you can try fiddling with these values.
 There is a caveat on the docs when you manually specify a provider
 When using this technique there is no check that the proper
 test-frameworks are present on your project's classpath. Failing to
 add the proper test-frameworks will result in a build failure.

 I also notice testng on the classpath.
 Perhaps one of the other dependencies is pulling things in you dont
 expect and mucking up surefire (because multiple test frameworks are
 available)
 You can try
 mvn dependency:tree
 and see whether that output gives any clues.

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




Unrecognised tag: 'useAllReactorProjects'

2011-07-19 Thread kanesee
I copy-pasted an assembly config from the web and it doesn't work. it doesn't
like the useAllReactorProjects node under moduleSet.

I'm using maven 3.0.3.

Any ideas what may be wrong here:
{
assembly
xmlns=http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   
xsi:schemaLocation=http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
http://maven.apache.org/xsd/assembly-1.1.2.xsd;
  idbin/id
  formats
formatdir/format
  /formats
  includeBaseDirectoryfalse/includeBaseDirectory
  moduleSets
moduleSet

  
  useAllReactorProjectstrue/useAllReactorProjects
  
  
  includes
includecom.inferlink.example:my-artifact/include
  /includes
  binaries
outputDirectorymodules/${artifactId}/outputDirectory
unpackfalse/unpack
  /binaries
/moduleSet
  /moduleSets
/assembly
}

--
View this message in context: 
http://maven.40175.n5.nabble.com/Unrecognised-tag-useAllReactorProjects-tp4613832p4613832.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-19 Thread Eric Kolotyluk
Is it easy to move a Nexus repository from one system to the next? I was 
thinking of using my personal workstation to host Nexus, because it is 
more powerful than any server we have, and I don't want to have to go 
find a server with spare cycles.


Would it make more sense for me to create a VMWare virtual machine 
called 'nexus' and run it there? That way if I want to move the 
repository to another machine I can move the VM. Does anyone have any 
preconfigured VMs with Nexus already installed?


If I am running in a VM, would it make more sense to run it with Linux 
so I don't have to pay for another Windows License?


Cheers, Eric

On 2011-07-19 6:44 AM, Ron Wheeler wrote:

On 19/07/2011 9:17 AM, Eric Kolotyluk wrote:
I must say, I don't know either technology that well, but after 
looking around Nexus seems to have the more favorable reviews. I'll 
probably try Nexus first given I am already using m2e and Sonatype 
seem to document things well.

I am really happy with Nexus but have not tried Archiva.
Follow the installation procedure carefully as it has some bits about 
directories that are not intuitive.

If you pay attention to the instructions, you will not have any problems.
The user interface is very simple and easy to understand.
The support is very good in the Nexus forum and to a certain extent 
here as well.

Documentation is clear and abundant.

Good Luck.
Ron



Thanks for that clarity everyone.

Cheers, Eric

On 2011-07-19 4:11 AM, Jesse Farinacci wrote:

It works fine just as long as your minimal configuration doesn't
include Java 6. There's a bug[1] hanging out there for almost a year
now which prevents Archiva from being useful for me and a lot of
others.

That being the case, Nexus all the way.

[1] http://jira.codehaus.org/browse/MRM-1412

-Jesse

On Tue, Jul 19, 2011 at 12:10 AM, Rajesh Koilpillai
rajesh.koilpil...@gmail.com  wrote:

They are competing and Apache Archiva works just fine with minimal
configuration.




-
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



RE: Archiva vs. Nexus

2011-07-19 Thread Robert Scholte

http://www.sonatype.com/people/2011/06/nexus-tips-and-tricks-backup-nexus/ 
-Robert  Date: Tue, 19 Jul 2011 14:55:38 -0700
 From: eric.koloty...@gmail.com
 To: users@maven.apache.org
 Subject: Re: Archiva vs. Nexus
 
 Is it easy to move a Nexus repository from one system to the next? I was 
 thinking of using my personal workstation to host Nexus, because it is 
 more powerful than any server we have, and I don't want to have to go 
 find a server with spare cycles.
 
 Would it make more sense for me to create a VMWare virtual machine 
 called 'nexus' and run it there? That way if I want to move the 
 repository to another machine I can move the VM. Does anyone have any 
 preconfigured VMs with Nexus already installed?
 
 If I am running in a VM, would it make more sense to run it with Linux 
 so I don't have to pay for another Windows License?
 
 Cheers, Eric
 
 On 2011-07-19 6:44 AM, Ron Wheeler wrote:
  On 19/07/2011 9:17 AM, Eric Kolotyluk wrote:
  I must say, I don't know either technology that well, but after 
  looking around Nexus seems to have the more favorable reviews. I'll 
  probably try Nexus first given I am already using m2e and Sonatype 
  seem to document things well.
  I am really happy with Nexus but have not tried Archiva.
  Follow the installation procedure carefully as it has some bits about 
  directories that are not intuitive.
  If you pay attention to the instructions, you will not have any problems.
  The user interface is very simple and easy to understand.
  The support is very good in the Nexus forum and to a certain extent 
  here as well.
  Documentation is clear and abundant.
 
  Good Luck.
  Ron
 
 
  Thanks for that clarity everyone.
 
  Cheers, Eric
 
  On 2011-07-19 4:11 AM, Jesse Farinacci wrote:
  It works fine just as long as your minimal configuration doesn't
  include Java 6. There's a bug[1] hanging out there for almost a year
  now which prevents Archiva from being useful for me and a lot of
  others.
 
  That being the case, Nexus all the way.
 
  [1] http://jira.codehaus.org/browse/MRM-1412
 
  -Jesse
 
  On Tue, Jul 19, 2011 at 12:10 AM, Rajesh Koilpillai
  rajesh.koilpil...@gmail.com  wrote:
  They are competing and Apache Archiva works just fine with minimal
  configuration.
 
 
  -
  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
 
  

Re: Archiva vs. Nexus

2011-07-19 Thread Dan Tran
Archiva supports staging out of box and Nexus you have to pay.

-D

On Tue, Jul 19, 2011 at 2:58 PM, Robert Scholte rfscho...@codehaus.org wrote:

 http://www.sonatype.com/people/2011/06/nexus-tips-and-tricks-backup-nexus/ 
 -Robert  Date: Tue, 19 Jul 2011 14:55:38 -0700
 From: eric.koloty...@gmail.com
 To: users@maven.apache.org
 Subject: Re: Archiva vs. Nexus

 Is it easy to move a Nexus repository from one system to the next? I was
 thinking of using my personal workstation to host Nexus, because it is
 more powerful than any server we have, and I don't want to have to go
 find a server with spare cycles.

 Would it make more sense for me to create a VMWare virtual machine
 called 'nexus' and run it there? That way if I want to move the
 repository to another machine I can move the VM. Does anyone have any
 preconfigured VMs with Nexus already installed?

 If I am running in a VM, would it make more sense to run it with Linux
 so I don't have to pay for another Windows License?

 Cheers, Eric

 On 2011-07-19 6:44 AM, Ron Wheeler wrote:
  On 19/07/2011 9:17 AM, Eric Kolotyluk wrote:
  I must say, I don't know either technology that well, but after
  looking around Nexus seems to have the more favorable reviews. I'll
  probably try Nexus first given I am already using m2e and Sonatype
  seem to document things well.
  I am really happy with Nexus but have not tried Archiva.
  Follow the installation procedure carefully as it has some bits about
  directories that are not intuitive.
  If you pay attention to the instructions, you will not have any problems.
  The user interface is very simple and easy to understand.
  The support is very good in the Nexus forum and to a certain extent
  here as well.
  Documentation is clear and abundant.
 
  Good Luck.
  Ron
 
 
  Thanks for that clarity everyone.
 
  Cheers, Eric
 
  On 2011-07-19 4:11 AM, Jesse Farinacci wrote:
  It works fine just as long as your minimal configuration doesn't
  include Java 6. There's a bug[1] hanging out there for almost a year
  now which prevents Archiva from being useful for me and a lot of
  others.
 
  That being the case, Nexus all the way.
 
  [1] http://jira.codehaus.org/browse/MRM-1412
 
  -Jesse
 
  On Tue, Jul 19, 2011 at 12:10 AM, Rajesh Koilpillai
  rajesh.koilpil...@gmail.com  wrote:
  They are competing and Apache Archiva works just fine with minimal
  configuration.
 
 
  -
  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



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



Misunderstanding modules: Two or more projects in the reactor have the same identifier

2011-07-19 Thread kanesee
So it seems Maven handles dependency inheritance pretty well.
Let's say I have a parent project A that depends on projects B and C. And
both B and C depend on D. This works fine as dependencies.

But suppose I wanted to make B and C modules of A. And I want to make D a
module of B and C, then Maven will complain that two or more projects in the
reactor have the same identifier. I believe this is because module D is
included twice.

Does anyone know how to get around this?
...perhaps some need plugin that ignores this duplicate identifier?

Thanks,
Kane

--
View this message in context: 
http://maven.40175.n5.nabble.com/Misunderstanding-modules-Two-or-more-projects-in-the-reactor-have-the-same-identifier-tp4614001p4614001.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: Misunderstanding modules: Two or more projects in the reactor have the same identifier

2011-07-19 Thread kanesee
I found this reference to my problem:
http://dspace.2283337.n4.nabble.com/DSpace-1-7-0-amp-Maven-3-0-2-DuplicateProjectException-Missing-pom-xml-properties-td3339149.html

So Maven 3 removed the enable nested module option from the earlier
version? I guess that might have helped with my situation.

Does anyone have any other info about this? Maybe there's another
workaround...?
If not, I'll have to reorganize my company's entire dependency hierarchy,
which is less than desirable. 

-Kane

--
View this message in context: 
http://maven.40175.n5.nabble.com/Misunderstanding-modules-Two-or-more-projects-in-the-reactor-have-the-same-identifier-tp4614001p4614028.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-19 Thread kanesee
My 2 cents: I'm very new to Maven and its repository and I found Nexus very
easy to install, set up, and use. I haven't tried Archiva though

--
View this message in context: 
http://maven.40175.n5.nabble.com/Archiva-vs-Nexus-tp4594364p4614051.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



[ANN] Maven JXR Version 2.3 Released

2011-07-19 Thread Benson Margulies
The Maven team is pleased to announce the release of the Maven JXR, version 2.3

JXR is a tool for creating cross-references of Java source files.

http://maven.apache.org/jxr

and

http://maven.apache.org/plugins/maven-jxr-plugin


You should specify the version in your project's plugin configuration:

plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-jxr-plugin/artifactId
  version2.3/version
/plugin

Release Notes - Maven 2.x JXR - Version 2.3


Release Notes - Maven JXR - Version 2.3


** Bug
* [JXR-64] - System ID of XHTML frameset incorrect in HTML source
* [JXR-69] - fails to create cross links in multi-module project
* [JXR-84] - Spurious error message fixed in Velocity 1.5 still
exists in JXR


** Improvement
* [JXR-59] - speed up AbstractJxrReport.hasSources()
* [JXR-71] - JXR doesn't link classes with non letters in their names
* [JXR-86] - add standard skip configuration option

** New Feature
* [JXR-88] - create jxr:aggregate and jxr:test-aggregate

Enjoy,

-The Maven team

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



Re: Misunderstanding modules: Two or more projects in the reactor have the same identifier

2011-07-19 Thread Barrie Treloar
On Wed, Jul 20, 2011 at 8:14 AM, kanesee kane...@gmail.com wrote:
 So it seems Maven handles dependency inheritance pretty well.
 Let's say I have a parent project A that depends on projects B and C. And
 both B and C depend on D. This works fine as dependencies.

 But suppose I wanted to make B and C modules of A. And I want to make D a
 module of B and C, then Maven will complain that two or more projects in the
 reactor have the same identifier. I believe this is because module D is
 included twice.

 Does anyone know how to get around this?
 ...perhaps some need plugin that ignores this duplicate identifier?

Modules do not equal inheritance.

Think of modules as syntactic sugar to allow you to run a class at the
top level and have maven automatically run the same command for all
modules.
Just because B is a module of A does not mean that B depends upon anything in A.
Also remember that if a pom contains a module then its pom/type should
always be pom (and not jar, ear, war, etc)

Can you explain what you are attempting to achieve with this dual
module inclusion?

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



Re: Misunderstanding modules: Two or more projects in the reactor have the same identifier

2011-07-19 Thread kanesee
Well, I would like to be able to call a maven phase like compile in the
top-level parent project and have it combine all of its
dependencies/submodules. That's really the only reason I'm using modules
instead of sticking with dependencies.

--
View this message in context: 
http://maven.40175.n5.nabble.com/Misunderstanding-modules-Two-or-more-projects-in-the-reactor-have-the-same-identifier-tp4614001p4614151.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: Misunderstanding modules: Two or more projects in the reactor have the same identifier

2011-07-19 Thread Barrie Treloar
On Wed, Jul 20, 2011 at 9:44 AM, kanesee kane...@gmail.com wrote:
 Well, I would like to be able to call a maven phase like compile in the
 top-level parent project and have it combine all of its
 dependencies/submodules. That's really the only reason I'm using modules
 instead of sticking with dependencies.

So why are you trying to include a module twice?
Having them declared once will allow you to do this.

If they are not logically part of the same system (i.e. when you run
mvn release) they shouldn't be modules.
So you are better off having two (or more) separate projects and you
have to run mvn in each project when you need to.

You can reduce/remove the need to run mvn until you are ready to
commit into your version control system and run the unit tests by
* Using continuous integration (e.g. jenkins)
* Configuring your IDE so that you work there most of the time.  e.g
Eclipse can depend upon the other projects in your workspace (even
though they are separate maven projects) so that you get all the
benefits of fast compilation done by your IDE.  You only need to break
out to a shell to double check that everything works in maven too.

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



Re: Misunderstanding modules: Two or more projects in the reactor have the same identifier

2011-07-19 Thread kanesee
I guess I don't really understand the Maven modules then.

Well, this is what I have. My company has a bunch of components and our
own home-brewed build system. We want to translate it to the Maven
environment.
The library components depend on each other in that they may reference
classes in other components (but no cyclic references exist). So there may
be library component A, B, and C. Let's say A and B both depend on C.
We also have product components that groups the library components it
needs for a product. So product X may need A and product Y may need A and B.

I'd like to be able to run mvn on the product components and have it
automatically compile and package its library components.

So is dependency or module more appropriate here or some mix of the two?

--
View this message in context: 
http://maven.40175.n5.nabble.com/Misunderstanding-modules-Two-or-more-projects-in-the-reactor-have-the-same-identifier-tp4614001p4614201.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



HELP! : javax.mail could not find the main class

2011-07-19 Thread Abdul Hakim
Hello,

Im trying to build a project which requires the mail.jar from Sun. it runs
perfectly in Netbeans. However, when I tried compiling it with maven, it
produces a jar file that will display this error message when I tried to
execute it : Could not find the main class : ANNEX.Program will exit.
This is the content of my POM:

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
  groupIdcom.mycompany.app/groupId
  artifactIdANNEX/artifactId
  packagingjar/packaging
  version1.0/version
  nameANNEX/name
  urlhttp://maven.apache.org/url
  
  build
plugins
  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-jar-plugin/artifactId
configuration
  archive
manifest
  addClasspathtrue/addClasspath
  mainClassANNEX/mainClass
/manifest

  /archive
  resources
resource
  directorysrc/main/resources/directory
  filteringtrue/filtering
/resource
resource
  directorysrc/main/non-packaged-resources/directory
  filteringtrue/filtering
  targetPath../targetPath
/resource
/resources


/configuration
  /plugin
/plugins
  /build
  
  
  
  dependencies
  dependency
  groupIdjunit/groupId
  artifactIdjunit/artifactId
  version3.8.1/version
  scopetest/scope
/dependency
dependency
  groupIdjavax.mail/groupId
  artifactIdmail/artifactId
  version1.4.4/version
/dependency


  /dependencies
/project


Please help me. Thanks

--
View this message in context: 
http://maven.40175.n5.nabble.com/HELP-javax-mail-could-not-find-the-main-class-tp4614483p4614483.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: HELP! : javax.mail could not find the main class

2011-07-19 Thread Sebastian Otaegui
The issue is not related to javax.mail it is with the specification of your
main class.

In mainClass you have to put the fully qualified path to the class

like in mainClasspa.cka.ge.ANNEX/mainClass (if that is your main class)

And if you require javax.mail you will have to add it to the class path when
you execute it

something like:

java -cp mail.jar -jar ANNEX.jar



On Tue, Jul 19, 2011 at 10:16 PM, Abdul Hakim akeybreak...@gmail.comwrote:

 Hello,

 Im trying to build a project which requires the mail.jar from Sun. it runs
 perfectly in Netbeans. However, when I tried compiling it with maven, it
 produces a jar file that will display this error message when I tried to
 execute it : Could not find the main class : ANNEX.Program will exit.
 This is the content of my POM:

 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
  groupIdcom.mycompany.app/groupId
  artifactIdANNEX/artifactId
  packagingjar/packaging
  version1.0/version
  nameANNEX/name
  urlhttp://maven.apache.org/url

  build
plugins
  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-jar-plugin/artifactId
configuration
  archive
manifest
  addClasspathtrue/addClasspath
  mainClassANNEX/mainClass
/manifest

  /archive
  resources
resource
  directorysrc/main/resources/directory
  filteringtrue/filtering
/resource
resource
  directorysrc/main/non-packaged-resources/directory
  filteringtrue/filtering
  targetPath../targetPath
/resource
 /resources


/configuration
  /plugin
/plugins
  /build



  dependencies
  dependency
  groupIdjunit/groupId
  artifactIdjunit/artifactId
  version3.8.1/version
  scopetest/scope
/dependency
dependency
  groupIdjavax.mail/groupId
  artifactIdmail/artifactId
  version1.4.4/version
/dependency


  /dependencies
 /project


 Please help me. Thanks

 --
 View this message in context:
 http://maven.40175.n5.nabble.com/HELP-javax-mail-could-not-find-the-main-class-tp4614483p4614483.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




-- 
Those who do not understand Unix are condemned to reinvent it, poorly.
Any sufficiently recent Microsoft OS contains an ad hoc,
informally-specified, bug-ridden, slow implementation of half of Unix.


Re: Misunderstanding modules: Two or more projects in the reactor have the same identifier

2011-07-19 Thread Barrie Treloar
On Wed, Jul 20, 2011 at 10:22 AM, kanesee kane...@gmail.com wrote:
 I guess I don't really understand the Maven modules then.

 Well, this is what I have. My company has a bunch of components and our
 own home-brewed build system. We want to translate it to the Maven
 environment.
 The library components depend on each other in that they may reference
 classes in other components (but no cyclic references exist). So there may
 be library component A, B, and C. Let's say A and B both depend on C.
 We also have product components that groups the library components it
 needs for a product. So product X may need A and product Y may need A and B.

 I'd like to be able to run mvn on the product components and have it
 automatically compile and package its library components.

 So is dependency or module more appropriate here or some mix of the two?

Libraries = Dependency.

Parts of a single Product = Modules.  (If its re-used across another
product then its dependency again).

You probably need to re-educate the way you think about your build system.
I haven't re-read the books in a while but have a look at
http://maven.apache.org/articles.html there are at least two books
there that should give guidance and explain what you need to do.

When you build Product X the libraries A, B and C should already
exist.  You dont want to rebuild them just to build Product X, that
will slow down your development process.
Ideally A, B, and C are released versions, but if you find a bug in
them then you will be using SNAPSHOT versions, which will need to be
released separately prior to releasing Product X.
If developers are rarely touching the libraries then its better to let
your continuous build system (e.g. Jenkins) build the libraries and
Maven will automatically pull down the latest SNAPSHOT for you.
This way Developer D can fix a bug in A and Developer E will
automatically get the bug fix the next time they pull down the
SNAPSHOT build of library A, they no longer need to resync and
manually build.
You can configure how often Maven will check for a snapshot update
(see updatePolicy
http://maven.apache.org/ref/3.0.3/maven-settings/settings.html#class_snapshots)

With a continuous build system in place whenever C changes it will
automatically schedule a build for A and B, run your unit tests and
report success or failure.
It should also then build Product X and Y for you (since a downstream
dependency changed), again running your unit tests.

You will also want a Repository Manager so that it can keep some
control over how many SNAPSHOT versions to keep (otherwise you can
find yourself running out of disk space)

Hope this helps some.

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



Re: HELP! : javax.mail could not find the main class

2011-07-19 Thread Barrie Treloar
On Wed, Jul 20, 2011 at 1:27 PM, Sebastian Otaegui fen...@gmail.com wrote:
 The issue is not related to javax.mail it is with the specification of your
 main class.

 In mainClass you have to put the fully qualified path to the class

 like in mainClasspa.cka.ge.ANNEX/mainClass (if that is your main class)

 And if you require javax.mail you will have to add it to the class path when
 you execute it

 something like:

 java -cp mail.jar -jar ANNEX.jar

As Sebastian notes, your mainClass is probably wrong.
A standard rule is to never use classes that don't have a package -
too many things go wrong.

You've got Maven to set the ClassPath entry in the Manifest, see
http://maven.apache.org/shared/maven-archiver/examples/classpath.html

But you also need to get copies of dependent libraries, see
http://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-project-dependencies.html

You probably want to create an assembly that has your main jar, its
dependencies, and any config files (log4j, etc) see
http://maven.apache.org/plugins/maven-assembly-plugin/

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



Re: HELP! : javax.mail could not find the main class

2011-07-19 Thread Abdul Hakim
My project directory is ANNEX. I place the main class (ANNEX.java) in
\ANNEX\src\main\java\com\mycompany\app
Does this mean that i have to put
something like this in the POM?
mainClasscom.mycompany.app.ANNEX/mainClass.
Also, I intend to distribute it in a single jar, which is executable by just
clicking at the file. How am I suppose to achieve this. I have compiled
several other projects with maven and I have no problem with just putting
the Main class in the tag (mainClassMAIN/mainClass). I dont understand
why I am getting this error now. Please assist me as I dont have much
knowledge in this thing.

This is what is in the manifest :
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: akey
Build-Jdk: 1.6.0_21
Main-Class: ANNEX
Class-Path: plexus-utils-1.1.jar mail-1.4.4.jar


Thanks. 

--
View this message in context: 
http://maven.40175.n5.nabble.com/HELP-javax-mail-could-not-find-the-main-class-tp4614483p4614764.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