Re: Executing verify goal even if previous goal failed

2024-03-06 Thread Martin Höller
Hi!

Am 06. Mär. 2024 schrieb Mantas Gridinas:

> (Maven 3.9.4)
> 
> Suppose I have failing unit tests configured via surefire plugin but I
> still want to run the integration tests configured via failsafe plugin. In
> default case maven stops running the lifecycle/goals when one of the
> previous ones fails. How do I prevent that? The fail at end flag seems to
> only continue building modules but does not continue with running
> particular goals on the failing module.

The surefire plugin allows to continue after test failures by enabling
the testFailureIgnore parameter:

mvn -Dmaven.test.failure.ignore verify

See
https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#testFailureIgnore
for details.

hth,
- martin


pgp31RgalJpwv.pgp
Description: Digitale Signatur von OpenPGP


Re: How to use a different signing mechanism with maven-gpg-plugin

2023-02-15 Thread Martin Höller
Hi!

On 15. Feb. 2023 Railean, Alexander wrote:
[...]
> After I sign the jar using utilities provided by the HSM, is there a way to
> tell maven-gpg-plugin to use existing signature of the jar and upload it to
> the server? (instead of trying to produce its own)
> 
> Alternatively, maybe you can recommend another approach that I can take?

Hm, so signing the artifacts already works and you just want to
install/deploy the signatures along with the JARs?

Than I'd say build-helper-maven-plugin is what you need:
http://www.mojohaus.org/build-helper-maven-plugin/attach-artifact-mojo.html

hth,
- martin


pgpZDrW5l1JDC.pgp
Description: Digitale Signatur von OpenPGP


Re: Where can find a working plugin test example

2022-06-27 Thread Martin Höller
Hi! Stephan!

Some years ago I had a similar problem while developing
vdldoc-maven-plugin [1]. I found all the necessary information, but it
was a rather hard search.

Have a look at this plugin's source-code at github [2]. It is a very
simple plugin which has unit tests, integration-tests, uses checkstyle, pmd
and findbugs (which should now be replaced by spotbugs). I'd say it could
be good starting point for you.

hth,
- martin

[1] http://matinh.github.io/vdldoc-maven-plugin/
[2] https://github.com/matinh/vdldoc-maven-plugin


Am 28. Jun. 2022 schrieb Stephan Wissel:

> Trying to write a plugin following TDD practices.
> Tried to follow:
> https://maven.apache.org/plugin-testing/maven-plugin-testing-harness/getting-started/index.html
> 
> which already fails on maven archetype:create (generate works, but doesn't
> create a test case).
> 
> last published version of
> org.apache.maven.plugin-testing/maven-plugin-testing-harness
> was 2014:
> https://search.maven.org/artifact/org.apache.maven.plugin-testing/maven-plugin-testing-harness/3.3.0/jar
> 
> However there's a 2021
> com.github.codeteapot.maven.plugin-testing:maven-plugin-testing-harness
> 
> Where can I find a working example of a plugin-test with contemporary
> dependencies?
> 
> Create a nice day!
> Stephan H. Wissel
> 
> Phone: +65 96673269
> Blog  Twitter 
> LinkedIn  Xing
> 


pgprLFmqq8GAN.pgp
Description: Digitale Signatur von OpenPGP


Re: Surefire excludedGroups problem in multi-module build

2022-05-09 Thread Martin Höller
Hi again!

I created SUREFIRE-2085 [0] for this, as I feel this is a bug or at least
not optimal behavior of the the surefire plugin.

- martin

[0] https://issues.apache.org/jira/browse/SUREFIRE-2085


Am 03. Mai. 2022 schrieb Martin Höller:

> Hi!
> 
> I'm using maven-surefire-plugin 3.0.0-M6 in a multi-module build, with
> JUnit 4.13.2. I use JUnit's categories to mark some unit tests as slow
> like this:
> 
>   @Test
>   @Category(SlowTest.class)
>   public void someTests() {...}
> 
> To avoid running slow tests I run mvn like this:
> 
>   mvn test -DexcludedGroups=SlowTest
> 
> This works basically. But if I have one module without any tests at all,
> surefire fails with the following error:
> 
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M6:test (default-test) 
> on project my-api-module: groups/excludedGroups require TestNG, JUnit48+ or 
> JUnit 5 (a specific engine required on classpath) on project test classpath 
> -> [Help 1]
> 
> The error is correct. I do not have any of the mentioned
> engines/dependencies on classpath, because I don't need them.
> 
> Of course, I could add a dependency to junit, which solves this problem,
> but then I have a declared unused dependency, which is ugly.
> 
> I also could skip surefire execution by configuring the plugin:
> 
>   
> 
>   
> org.apache.maven.plugins
> maven-surefire-plugin
> 
>   true
> 
>   
> 
>   
> 
> This is (IMHO) less ugly as the workaround from above, but this adds a
> few lines of configuration which must be remembered to be removed, once
> unit-tests are written.
> 
> However, I'm still hoping for some clean solution. Any ideas?
> 
> Thanks in advance,
> - martin


pgpfqbgN8_2QL.pgp
Description: Digitale Signatur von OpenPGP


Surefire excludedGroups problem in multi-module build

2022-05-03 Thread Martin Höller
Hi!

I'm using maven-surefire-plugin 3.0.0-M6 in a multi-module build, with
JUnit 4.13.2. I use JUnit's categories to mark some unit tests as slow
like this:

  @Test
  @Category(SlowTest.class)
  public void someTests() {...}

To avoid running slow tests I run mvn like this:

  mvn test -DexcludedGroups=SlowTest

This works basically. But if I have one module without any tests at all,
surefire fails with the following error:

[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M6:test (default-test) on 
project my-api-module: groups/excludedGroups require TestNG, JUnit48+ or JUnit 
5 (a specific engine required on classpath) on project test classpath -> [Help 
1]

The error is correct. I do not have any of the mentioned
engines/dependencies on classpath, because I don't need them.

Of course, I could add a dependency to junit, which solves this problem,
but then I have a declared unused dependency, which is ugly.

I also could skip surefire execution by configuring the plugin:

  

  
org.apache.maven.plugins
maven-surefire-plugin

  true

  

  

This is (IMHO) less ugly as the workaround from above, but this adds a
few lines of configuration which must be remembered to be removed, once
unit-tests are written.

However, I'm still hoping for some clean solution. Any ideas?

Thanks in advance,
- martin


pgpuNz4ac3nM2.pgp
Description: Digitale Signatur von OpenPGP


Re: [ANN] Apache Maven EAR Plugin 3.1.2 Released

2020-10-01 Thread Martin Höller
Hi!

On 01. Okt. 2020 Hervé Boutemy wrote:

> The Maven team is pleased to announce the release of the Apache Maven EAR 
> Plugin, version 3.1.0

With maven-ear-plugin 3.1.0 I get this exception on a project that built fine 
with 3.0.2:

$ mvn -X install
[...]
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-ear-plugin:3.1.0:ear (default-ear) on project 
demo-ear: Failed to create directory 
/home/martin/idea/demo/demo-ear/target/temp/my.domain.demo-demo-webapp-new-3.0-SNAPSHOT.war
 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal 
org.apache.maven.plugins:maven-ear-plugin:3.1.0:ear (default-ear) on project 
demo-ear: Failed to create directory 
/home/martin/idea/demo/demo-ear/target/temp/my.domaon.demo-demo-webapp-new-3.0-SNAPSHOT.war
at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:81)
at 
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
 (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute 
(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced 
(Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch 
(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode 
(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main 
(Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoFailureException: Failed to create 
directory 
/home/martin/idea/demo/demo-ear/target/temp/my.domain.demo-demo-webapp-new-3.0-SNAPSHOT.war
at org.apache.maven.plugins.ear.EarMojo.changeManifestClasspath 
(EarMojo.java:763)
at org.apache.maven.plugins.ear.EarMojo.copyModules (EarMojo.java:466)
at org.apache.maven.plugins.ear.EarMojo.execute (EarMojo.java:336)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo 
(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:81)
at 
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
 (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute 
(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced 
(Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch 
(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode 
(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main 
(Launcher.java:347)
[ERROR] 
[ERROR] 
[ERROR] For more information about 

Re: My view on the relative merits of different ways to unpack jars into target/classes

2013-03-22 Thread Martin Höller
Hi!

On 21 Mär 2013, Stephen Connolly wrote:

 I think mailing lists are not the best way to explain why different
 solutions are to be preferred when ranking against what is best for the
 Maven ecosystem as a whole.
 
 So I wrote a blog post to explain my views on what are good ways and what
 are bad ways.
 
 http://developer-blog.cloudbees.com/2013/03/playing-trade-offs-with-maven.html

Really good post, but... ;-)

There is one thing that is IMHO not clearly (enough) stated in your post:
it is in general a bad idea to add repositories to your POMs [1].

Section 2. Get the external jars into a public Maven repository adds an
additional repository to the pom.xml. This is usually bad pratice and
should be avoided. Brian Fox wrote a detailed blog post [1] about this. 

Maybe you could link to this post and mentione, that putting the
additional repo in your settings.xml is an alternative.

Thanks for your efforts for the maven community and hth,
- martin

[1] 
http://www.sonatype.com/people/2009/02/why-putting-repositories-in-your-poms-is-a-bad-idea/


signature.asc
Description: PGP signature


Re: Maven Central broken? (was: Broken link for avalon)

2012-10-17 Thread Martin Höller
Hi!

On 16 Okt 2012, Volkan Istek wrote:
 Hi Guys,
 
 I am trying use FOP (Formatting Objects Processor) with maven. It uses 
 avalon-framework-api-4.3.1.jar and it can't download it. Because of following 
 links are not working.  Directories are there and other filres in the 
 directories are there too.
 
 http://repo.maven.apache.org/maven2/org/apache/avalon/framework/avalon-framework-api/4.3.1/avalon-framework-api-4.3.1.jar
 http://repo1.maven.org/maven2/org/apache/avalon/framework/avalon-framework-api/4.3.1/avalon-framework-api-4.3.1.jar
 
 Do you have any idea for it or fo you know who I should  connect in order to 
 fix it?

It seems maven central is currently a bit broken. I tried your links and
got connection refused. Listing the directory contents works.

I had the same problem earlier today with maven-scm-provider-bazaar 1.8.
The JAR could be downloaded but not the POM. After a few retries in the
browser I could download the POM. Unfortunately our nexus failed to
download them :(

Anybody knwos where to report it?

- martin


signature.asc
Description: PGP signature


Re: How to optimize maven dependencies to get better performance?

2012-10-11 Thread Martin Höller
On 11 Okt 2012, Wang, Simon wrote:

 Hi, Barrie,
That's really helpful!
 
Even I have local cache, it also takes about 2 mins to resolve 
 dependencies.
Also it seems maven still will talk with remote maven server even I have 
 local cache.

You could try mvn -o and see if this helps.

And maybe this blog post of Tim O'Brien might be of interest:
http://www.sonatype.com/people/2012/08/download-it-all-at-once-a-maven-idea/

hth,
- martin


signature.asc
Description: PGP signature


Re: The Maven Way

2012-04-18 Thread Martin Höller
On 17 Apr 2012, Markku Saarela wrote:

 Hi,
 
 I recommend two books from Sonatype, Maven by Example 1) and Maven 
 Cookbook 2)
 
 1) http://www.sonatype.com/index.php/Support/Books/Maven-By-Example
 2) http://www.sonatype.com/index.php/Support/Books/The-Maven-Cookbook

There is also Apache Maven 2: Effective Implementations from Brett
Porter [1], which basically describes the maven way most of the time.

The disadvantage of this book is, that it's quite old and the maven way
sometimes changed over time.

hth,
- martin

[1] http://www.packtpub.com/apache-maven-2-effective-implementation/book


signature.asc
Description: PGP signature


Re: Dependency in the local repository is ignored

2012-03-06 Thread Martin Höller
Hi!

On 06 Mär 2012, Alex wrote:

 To build and install my jar into local repository I use just
 mvn clean, mvn install or from eclipse m2e's menu install
 
 to include my jar into the eclipse's .classpath file of the other project
 I use:
 mvn eclipse:clean
 mvn eclipse:eclipse

Are you using m2e and mvn eclipse:eclipse together? This is not
supported. You could use one or the other, not both.

hth,
- martin


signature.asc
Description: PGP signature


Re: How to run a maven goal when there is tests failures?

2012-01-10 Thread Martin Höller
On Tuesday 10 January 2012 Xavier S. wrote:
 Hello,

 I would like to know if there is a way to execute a goal when there is
 test failures?

Use mvn -DskipTests.

You can also try mvn -Dmaven.test.skip=true, which is a bit longer and not 
only skips test execution but also skips test compilation.

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: Externalize POM file

2011-12-19 Thread Martin Höller
On Friday 16 December 2011 Anders Hammar wrote:
 Using dependencyManagement in the parent to specify the version of
 dependencies is also an option. IMHO that's the true Maven way, but
 Ron's approach could be an option in some cases. I don't like that
 approach though as it will create an incorrect dependency tree
 (dependencies will be on the wrong level and there will likely be too
 many dependencies).

+1 for Anders' comments about Ron's approach.

- martin


signature.asc
Description: This is a digitally signed message part.


Re: where to put common dependecies in multi-module project

2011-10-24 Thread Martin Höller
Hi!

Define the versions of your dependencies in the parent's 
dependencyManagement section. Define the actual dependency in every 
submodule where you use it. Without the version!

The analyze goal of the maven-dependency-plugin can help you to find out if 
you should declare a dependency or not.

hth,
- martin

On Monday 24 October 2011 codingplayer wrote:
 Hi,

 i'm wondering where to put my common dependenies in my multimodule
 project.

 Let's say, we have a project called sandbox, with three submodules.
 - sandbox-core
 - sandbox-service
 - sandbox-web

 Existing dependencies:
 - sandbox-service has a dependency to sandbox-core
 - sandbox-web has a dependency to sandbox-service

 So practically, all dependencies of sandbox-core, will be transitive
 dependencies for the other modules.


 Let's say i want to use slf4j as logging framework, which should probable
 be used in all modules and all of them should also use the same version.

 I see different approaches on this:
 - i could add the dependencies to the parent pom (sandbox)
 - i could also only define a property for the version, e.g.
 ${slf4j.dependency.version} in the parent pom (sandbox) and actually add
 the dependency on core level (sandbox-core)
 - i could also simply add the dependency (plus version) to the core level
 (sandbox-core)

 I already had some problems, when not building the whole project (on
 sandbox) level, that not all dependencies have been resolved in my leave
 module (sandbox-web).

 So i assume when putting the dependencies in the sandbox-core, one will
 always have to build the whole project in order to have a working
 sandbox-web module, while when putting them into the parent directly, the
 dependencies would be retrieved by maven correctly anyway, since the
 parent-poms are always taken intoconsideration, even when only the
 sandbox-web is built.


 So, what would be the best-practice on that?
 What exact differences would be there between direct dependencies and
 transitive dependencies?
 Where should i put those common dependencies?

 br
 R.C.


 --
 View this message in context:
 http://maven.40175.n5.nabble.com/where-to-put-common-dependecies-in-multi
-module-project-tp4931654p4931654.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




signature.asc
Description: This is a digitally signed message part.


Re: mm project and surefire plugins

2011-10-17 Thread Martin Höller
Hi!

This seems to be a problem with the recent maven-surefire-report-plugin and 
it's new support for the failsafe-maven-plugin.

Try using version 2.8 of the maven-surefire-report-plugin. In this version 
there is no support for the  failsafe-plugin.

hth,
- martin

On Monday 17 October 2011 Giovanni Azua wrote:
 Hello,

 Now it works, I can see the aggregated results in the generated site.

 However the m-surefire-report-plugin is creating two times the link
 Surefire Report under Project Reports, the first one contains the
 aggregate test results and the second link points to an empty Surefire
 Report. Why is this happening? Please find below the relevant parts of
 the current configuration I am using.

 So I see:

 Project Reports
 -- Javadocs
 -- Surefire Reports (aggregated OK)
 -- Surefire Reports (EMPTY ... why does it generates this?)
 -- Source Xref
 -- Test Source Xref

 TIA,
 Best regards,
 Giovanni

 ...
   build
 pluginManagement
   plugins
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-site-plugin/artifactId
   version3.0/version
 /plugin
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-project-info-reports-plugin/artifactId
   version2.4/version
 /plugin
   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-surefire-report-plugin/artifactId
 version2.10/version
   /plugin
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-jxr-plugin/artifactId
   version2.3/version
 /plugin
   /plugins
 /pluginManagement
  plugins
   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-site-plugin/artifactId
 version3.0/version
   /plugin
   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-project-info-reports-plugin/artifactId
 version2.4/version
   /plugin
   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-enforcer-plugin/artifactId
 version1.0.1/version
 executions
   execution
 idenforce-versions/id
 goals
   goalenforce/goal
 /goals
 configuration
   rules
 requireMavenVersion
   version3.0.3/version
 /requireMavenVersion
 requireJavaVersion
   version1.6/version
 /requireJavaVersion
   /rules
 /configuration
   /execution
 /executions
   /plugin
   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-compiler-plugin/artifactId
 version2.3.2/version
 configuration
   source1.6/source
   target1.6/target
 /configuration
   /plugin
   !-- Verify that classes compiled with a newer JDK are compatible
 with an older JDK, by checking against API signatures --
   plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdanimal-sniffer-maven-plugin/artifactId
 version1.7/version
 executions
   execution
 idcheck-java16-sun/id
 phasetest/phase
 goals
   goalcheck/goal
 /goals
 configuration
   signature
 groupIdorg.codehaus.mojo.signature/groupId
 artifactIdjava16-sun/artifactId
 version1.10/version
   /signature
 /configuration
   /execution
 /executions
   /plugin
   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-javadoc-plugin/artifactId
 version2.8/version
 configuration
 /configuration
 executions
   execution
 idaggregate/id
 goals
   goalaggregate/goal
 /goals
 phasesite/phase
 configuration
 /configuration
   /execution
 /executions
   /plugin
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-surefire-report-plugin/artifactId
   version2.10/version
 /plugin
   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-jxr-plugin/artifactId
 version2.3/version
   /plugin
 /plugins
   /build
   reporting
 plugins
   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-project-info-reports-plugin/artifactId
 version2.4/version
   /plugin
   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-javadoc-plugin/artifactId
 version2.8/version
 configuration
 /configuration
 reportSets
   reportSet
  

Re: mm project and surefire plugins

2011-10-17 Thread Martin Höller
On Monday 17 October 2011 Giovanni Azua wrote:
 Hi!

 On Oct 17, 2011, at 4:38 PM, Martin Höller wrote:
  Hi!
 
  This seems to be a problem with the recent maven-surefire-report-plugin
  and it's new support for the failsafe-maven-plugin.
 
  Try using version 2.8 of the maven-surefire-report-plugin. In this
  version there is no support for the  failsafe-plugin.

 Yep! changing from maven-surefire-report-plugin version 2.10 to version
 2.8 solved the issue!

FYI: I just created a JIRA for this: SUREFIRE-777

- martin


signature.asc
Description: This is a digitally signed message part.


Re: Expected behaviour when repository mirror not reachable

2011-10-10 Thread Martin Höller
Anyone?

On Wednesday 05 October 2011 Martin Höller wrote:
 Hi!

 What is the expected behaviour if a configured repository mirror is not
 reachable? It seems maven 2.2.1 tries to contact to original repository
 server, which is absolutely not what I want!

 Here are some details and background information: We have a repository
 manager (nexus) set up to serve all artifacts. Every user has it
 configured in .m2/settings.xml like this (hostname changed):

   mirrors
 mirror
   idnexus-repo/id
   nameInternal Maven Repository/name
  
 urlhttp://nexus.mycompany.net:8080/nexus/content/groups/public//url
 mirrorOf*/mirrorOf
 /mirror
   /mirrors

 Recently we had a problem on this server, so that nexus was not
 reachable. If one tried to build a project during this time, maven
 silently downloaded artifacts from the internet. We only noticed this,
 because one remote repository returned a 404 HTML page, which led to an
 invalid pom.xml. No other errors and no warnings.

 This is IMHO really bad behaviour, because you can get JARs into your
 local repository from an untrusted source without notifying it!

 The only related information I could find was MNG-714. But this doesn't
 say anything about maven's behaviour.

 Did anybody else notice this behaviour? Is it expected? How could I
 configure Maven to report an error instead of going out to the internet?

 The problem occured with maven 2.2.1. I didn't test it with maven 3.

 Any thoughts?
 - martin




signature.asc
Description: This is a digitally signed message part.


Expected behaviour when repository mirror not reachable

2011-10-05 Thread Martin Höller
Hi!

What is the expected behaviour if a configured repository mirror is not 
reachable? It seems maven 2.2.1 tries to contact to original repository 
server, which is absolutely not what I want!

Here are some details and background information: We have a repository manager 
(nexus) set up to serve all artifacts. Every user has it configured in 
.m2/settings.xml like this (hostname changed):

  mirrors
mirror
  idnexus-repo/id
  nameInternal Maven Repository/name
  urlhttp://nexus.mycompany.net:8080/nexus/content/groups/public//url
  mirrorOf*/mirrorOf
/mirror
  /mirrors

Recently we had a problem on this server, so that nexus was not reachable. If 
one tried to build a project during this time, maven silently downloaded 
artifacts from the internet. We only noticed this, because one remote 
repository returned a 404 HTML page, which led to an invalid pom.xml. No other 
errors and no warnings.

This is IMHO really bad behaviour, because you can get JARs into your local 
repository from an untrusted source without notifying it!

The only related information I could find was MNG-714. But this doesn't say 
anything about maven's behaviour.

Did anybody else notice this behaviour? Is it expected? How could I configure 
Maven to report an error instead of going out to the internet?

The problem occured with maven 2.2.1. I didn't test it with maven 3.

Any thoughts?
- martin


signature.asc
Description: This is a digitally signed message part.


Re: [maven-failsafe-plugin] Running integration test with its own profile

2011-02-04 Thread Martin Höller
Hi!

Am Donnerstag 03 Februar 2011, 03:28:54 schrieb nodje:
 Invaluable piece of information Ron, thanks a lot.
 
 I've been searching the archives without success, with 'profile plugin'
 'failsafe profile', all woudn't yield much relevant results.
 But I'd still be happy if you could point me to some efficient keywords to
 search for.

Try Ron Wheeler profiles ;-)

 I don't remember JNDI as that complex actually, I just gave up on it since
 Spring adoption as it didn't seem necessary.

JNDI is just one option for holding your configuration. You could also use 
properties-files or whatever you like.

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: Generating web project with java, webapp, and resource folder from archtype goal

2011-01-20 Thread Martin Höller
Am Mittwoch 19 Januar 2011, 10:30:33 schrieb Piotr Skawinski:
 Hi,
 
 Is there a way in maven to generate a web project with java, resources, and
 webapp folders running the archtype goal. Maven suggest to create a multi
 project module with:
 
 multi-project
 
  |-- pom.xml
  |-- my-app
  |-- my-web-app
 
 by creating a multi project pom file

Maven suggests this, because this is known to be a best practice. You usually 
shouldn't mix Java classes and web-pages/-resources in one project.

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: how to patch releases

2011-01-13 Thread Martin Höller
Am Donnerstag 13 Januar 2011, 13:42:01 schrieb mremerson...@aim.com:
  Hi all,
 
 this might be a simple one and if there is documentation about it I'm happy
 to read that.
 
 Its a basic understanding question:
 
 I have a maven project and do a release - lets say 1.1
 
 The maven release plugin manipulates the poms and tags the software in the
 scm.
 
 the trunk itself has e.g. 1.2-SNAPSHOT - everything is fine and the release
 is done
 
 
 How is the procedure if one needs to patch 1.1 to 1.1.1 ?
 
 I guess one has to create a branch from the tagged version. Then the
 version in the poms have to be set to 1.1.1-SNAPSHOT and then development
 starts.
 
 Is this process only doable by hand or is there also maven tools for that ?

versions-maven-plugin might be useful for setting the versions with a single 
command.

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: How to resolve 'LATEST'

2010-12-20 Thread Martin Höller
Hi!

Have a look at versions-maven-plugin. It provides a goal for updating the 
parent [0]. Maybe you can reuse code from it.

hth,
- martin

[0] http://mojo.codehaus.org/versions-maven-plugin/update-parent-mojo.html

On Friday 17 December 2010 Asmann, Roland wrote:
 Currently I am not using this, but I want the enforcer to check which
 version 'LATEST' is and tell the user he should update to that version!

 On 17-12-10 17:04, Brian Fox wrote:
  Don't use RELEASE or LATEST.
 
  On Fri, Dec 17, 2010 at 7:43 AM, Asmann, Roland
 
  roland.asm...@adesso.at wrote:
Hi all,
   
I'm writing an enforcer-rule, that should check if my parent is the
LATEST version. How can I get the actual version for 'LATEST'?
   
Thanks!
   
--
Roland Asmann
Senior Software Engineer
   
adesso Austria GmbH
Floridotower 26. Stock  T +43 1 2198790-27
Floridsdorfer Hauptstr. 1   F +43 1 2198790-927
A-1210 Wien M +43 664 88657566
   E roland.asm...@adesso.at
   W www.adesso.at
   
-
   
 business. people. technology. 
   
-
   

   - 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




signature.asc
Description: This is a digitally signed message part.


Re: Deployment Advice?

2010-12-16 Thread Martin Höller
Hi!

Am Donnerstag 16 Dezember 2010, 15:07:19 schrieb Ron Wheeler:
 On 16/12/2010 2:19 AM, Martin Höller wrote:
  Hi Ron!
  
  Am Mittwoch 15 Dezember 2010, 23:04:49 schrieb Ron Wheeler:
  Use JNDI to manage the site specific aspects of your configuration. This
  will make deploying to test machines and production less painful.
  
  I saw you mentioning this a few times now. However, I don't get it what
  you are actually doing here. Would you mind explaining this approach in
  more detail.
  
  tia,
  - martin
 
 Of course, it is fairly specific to what we need.
 1) Database connection specification is clearly a place where JNDI is a
 great solution.
 2) Site name/customer name - can be used in code to specify namespaces
 or build file specifications,
 3) Webservice endpoint specifications so that clients use the right
 webservices for test and production by customer.
 4) URLs for resources or error screens
 
 We have removed anything that relates to operations/deployment from the
 code and into the Tomcat configurations (server.xml) on the server
 instance.
 
 Is this what you are looking for?

Thanks for your replies Ron and Brett. It explains what I was askig for and 
what we are already doing (for most things). We just do not use JNDI for 
extranalising configuration but for example properties files (not included in 
the JAR/WAR/EAR) or XML datasource configuration files.

thx,
- martin

PS: Already have Apache Maven 2: Effective Implementation (great book BTW),
it's just been a while since I last looked into it :)


signature.asc
Description: This is a digitally signed message part.


Re: Deployment Advice?

2010-12-15 Thread Martin Höller
Hi Ron!

Am Mittwoch 15 Dezember 2010, 23:04:49 schrieb Ron Wheeler:
 Use JNDI to manage the site specific aspects of your configuration. This
 will make deploying to test machines and production less painful.

I saw you mentioning this a few times now. However, I don't get it what you 
are actually doing here. Would you mind explaining this approach in more 
detail.

tia,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: Figuring out the proper Maven dependency setting

2010-11-11 Thread Martin Höller
Am Mittwoch 10 November 2010, 22:25:13 schrieb Brian Topping:
 On Nov 10, 2010, at 4:06 PM, Yanko, Curtis wrote:
  I have used the technique described here but I have also had too to
  forensic type package level comparisons to try an find matches.
  Eventually slugging our way through namespace collisions and knocking
  down issues one Classpath Not Found at a time.
 
 The directory entries in a Zip archive are not compressed.  This makes
 class names searchable with 'grep -R' on the local repository.  If you
 download and compile a lot of OSS projects that use Maven, chances are
 your repository has most of the dependencies you would normally want to
 use already in it.
 
 Alternately, to speed inquiries on jar contents, I use
 http://mvnrepository.com.  Once one drills down to the page for a specific
 version of a dependency, the package structure of the contents is
 displayed.

There is also http://www.mvnbrowser.com/ and http://www.jarvana.com/jarvana/ 
which I find both to be very usefull. The latter even lets you search for 
classes!

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: Figuring out the proper Maven dependency setting

2010-11-11 Thread Martin Höller
Am Donnerstag 11 November 2010, 02:04:09 schrieb Ron Wheeler:
 On 10/11/2010 4:37 PM, Brian Topping wrote:
  On Nov 10, 2010, at 4:20 PM, Ron Wheeler wrote:
  It is mostly exclusions to stop old versions of libraries from being
  dragged in by mistake. It took a bit of doing to get these the first
  time but it is nice now that we do not have a screen full of
  conflicting version notes.
  
  So I guess you are then having to manually import the dependencies that
  you are excluding?  That is seriously painful.
 
 We only did that once about a year ago. It was painful but now life is
 grand.
 commons-logging is specified once for 60 projects and I know exactly
 what version is used everywhere.

Why not simply use dependencyManagement instead?

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: Property for the location of the local repository

2010-10-20 Thread Martin Höller
Hi!

On Wednesday 20 October 2010 Hilco Wijbenga wrote:
 On 11 October 2010 21:48, Hilco Wijbenga hilco.wijbe...@gmail.com wrote:
  I could have sworn I've used ${localRepository} before but it doesn't
  seem to work. I've also tried ${settings.localRepository} and
  ${maven.repo.local}. How do I refer to the location of the local
  repository in a portable way? Is there a difference between Maven2 and
  Maven3?

 I had a look in the source code and found the following:

[...]
 Is there some documentation on how properties are handled internally?
 How *does* project.build.directory get its value?

 Example POM:

 ?xml version=1.0 encoding=UTF-8?
 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/xsd/maven-4.0.0.xsd;

   modelVersion4.0.0/modelVersion
   groupIdorg.example/groupId
   artifactIdmaven-local-repo/artifactId
   packagingjar/packaging
   version0.1-SNAPSHOT/version
   name${x} - {y}/name
   properties
 x${maven.local.repo}/x
 y${project.build.directory}/y
   /properties
   build
 plugins
   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-antrun-plugin/artifactId
 version1.6/version
 executions
   execution
 phaseclean/phase
 goals
   goalrun/goal
 /goals
 configuration
   target
 echo${x}/echo
 echo${y}/echo
   /target
 /configuration
   /execution
 /executions
   /plugin
 /plugins
   /build
 /project

 Simply run mvn clean.

I don't know what is actually the prefered way of accessing the path to the 
local repository (but I'm quite sure I saw discussions about it on this 
list before). However, running your example pom.xml works as soon as I 
changed ${maven.local.repo} to ${settings.localRepository}. This is working 
with maven 2.2.1 and maven 3.0-beta-3.

hth,
- martin



signature.asc
Description: This is a digitally signed message part.


Re: Jar finalName to m2 repository

2010-08-18 Thread Martin Höller
On Wednesday 18 August 2010 fhomasp wrote:
 I can change it if I use the assembly plugin instead of the
 maven-jar-plugin

You can change the name of the JAR in the local or remote repository with 
the assembly plugin? I doubt this!

You can change the name of the JAR in your targt folder, but that's 
something completely different and you did this already with the 
finalName option.

Changing the internal data storage of maven (the repository) is a bad idea 
and therefore not easy to achieve!

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: Jar finalName to m2 repository

2010-08-18 Thread Martin Höller
Hi again!

On Wednesday 18 August 2010 fhomasp wrote:
 However it would be nice to be able to actually do this using the jar
 plugin.  I know my client is going to want this library to be called
 edp-version.jar.

Eventually you could find some solution with the maven-dependency-plugins' 
goal dependency:copy-dependencies in combination with the antrun-plugin. 
However, it seems you are doing something strange here, which is likely to 
cause more problems later on.

- martin


signature.asc
Description: This is a digitally signed message part.


Re: Creating a Custom Lifecycle

2010-07-09 Thread Martin Höller
Am Freitag, 9. Juli 2010 00:38:37 schrieb asookazian:
 Thanks!  Now I just need to write a simple Mojo/plugin that will copy the
 exploded EAR directory to the server/default/deploy directory in JBoss.
 cool.

Or you use the maven-antrun-plugin and save yourself some work :)

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: Creating a Custom Lifecycle

2010-07-09 Thread Martin Höller
Am Freitag, 9. Juli 2010 08:04:20 schrieb Martin Höller:
 Am Freitag, 9. Juli 2010 00:38:37 schrieb asookazian:
  Thanks!  Now I just need to write a simple Mojo/plugin that will copy the
  exploded EAR directory to the server/default/deploy directory in JBoss.
  cool.

 Or you use the maven-antrun-plugin and save yourself some work :)

The cargo plugin is usually used for depolying artifacts to containers and it 
seems, it can also deploy exploded wars (I haven't use this feature). See 
http://old.nabble.com/-mvnreloadable-webapps-to7702892.html#a7715823 or 
use google for some details.

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: Write Maven Books - Packt Publishing

2010-07-08 Thread Martin Höller
Am Mittwoch, 7. Juli 2010 15:48:29 schrieb Ron Wheeler:
 On 07/07/2010 8:55 AM, Martin Höller wrote:
  Hi Ron!
 
  Am Mittwoch, 7. Juli 2010 14:00:22 schrieb Ron Wheeler:
  On 07/07/2010 5:19 AM, Benjamin Wootton wrote:
  Would anyone be interested in teaming up on something like this? Have
  thought about pitching a maven book before but don't have the cycles to
  go it alone
 
  There is a desperate need for a Best Practice book.
 
  There is one already from Brett Porter and Maria Odea Ching:
  https://www.packtpub.com/apache-maven-2-effective-implementations/book
 
  I'd say it's a fairly good book.
 
  hth,
  - martin

 Is it a How-to book or a Best Practice book.

Kind of a mix. It uses a single app to show you how to accomplish things and 
it uses best practices to do so. Quite often it does not dive too deep into 
the subject but therefore you get a good overview very quickly.

Actually I didn't read the whole book yet, but read the first few chapters and 
use it as a reference for special problems that arise.

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: Creating a Custom Lifecycle

2010-07-08 Thread Martin Höller
Am Mittwoch, 7. Juli 2010 18:46:34 schrieb asookazian:
 There is some limited coverage of creating a custom lifecycle here:
 http://www.sonatype.com/books/mvnref-book/reference/writing-plugins-sect-cu
stom-lifecycle.html

 but it also covers forking and parallel lifecycles, I'm not sure I'm really
 interested in that.  I want to change the package lifecycle so that it uses
 war:explode goal rather than war:war goal.

What about just configuring the war:explode goal in your pom.xml? war:war 
would still be executed, but is this a problem?

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: Maven 3 explode goal?

2010-07-07 Thread Martin Höller
Am Mittwoch, 7. Juli 2010 01:19:16 schrieb asookazian:
[...]
 This is one area where Ant is much more flexible than Maven (or at least
 it's easier to customize invocations of targets in Ant than it is with
 goals in Maven's lifecycle phases)...

Why don't you stick with Ant then?

From your previous mails it seems to me like you are trying to use Maven like 
you did with Ant. Maven is not Ant! If you want to use Maven, use it the 
Maven way or you won't benefit from it at all. Start with reading a good 
Maven book like Maven - The Definitve Guide [0] from Sonatype (which seems 
is now split into two books).

hth,
- martin

[0] http://www.sonatype.com/products/maven/documentation/book-defguide


signature.asc
Description: This is a digitally signed message part.


Re: Write Maven Books - Packt Publishing

2010-07-07 Thread Martin Höller
Hi Ron!

Am Mittwoch, 7. Juli 2010 14:00:22 schrieb Ron Wheeler:
 On 07/07/2010 5:19 AM, Benjamin Wootton wrote:
  Would anyone be interested in teaming up on something like this? Have
  thought about pitching a maven book before but don't have the cycles to
  go it alone

 There is a desperate need for a Best Practice book.

There is one already from Brett Porter and Maria Odea Ching: 
https://www.packtpub.com/apache-maven-2-effective-implementations/book

I'd say it's a fairly good book.

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: mvn eclipse:m2eclipse

2010-05-03 Thread Martin Höller
Hi!

see 
http://maven-users.828.n2.nabble.com/searching-for-eclipse-m2eclipse-td4743556.html

hth,
- martin


On Monday 03 May 2010 Crow, Neil NW wrote:
  Hi,
 
  I thought that I would ask here whether anyone knows why the goal mvn
  eclipse:m2eclipse has been removed from
  org.apache.maven.plugins:maven-eclipse-plugin:2.8
 
  It was available in org.apache.maven.plugins:maven-eclipse-plugin:2.7
 
  I found the following references to this goal:
  http://maven.apache.org/plugins/maven-eclipse-plugin/m2eclipse-mojo.ht
  ml
  http://www.oreillynet.com/onjava/blog/2007/07/wicket_source_to_eclipse
  _using.html
  http://blog.redstream.nl/2008/05/17/setting-up-maven2-projects-in-ecpl
  ise/
 
  I didn't want to raise an issue at
  http://jira.codehaus.org/browse/MECLIPSE due to the warning:
 
  Note: This project is not the right place to fill issues about
  the Maven Integration for Eclipse (M2Eclipse)
  https://issues.sonatype.org/browse/MNGECLIPSE .
 
 
 
 
  Regards,
  Neil Crow

 Standard Bank email disclaimer and confidentiality note
 Please go to
 http://www.standardbank.co.za/site/homepage/emaildisclaimer.html to read
 our email disclaimer and confidentiality note. Kindly email
 disclai...@standardbank.co.za (no content or subject line necessary) if
 you cannot view that page and we will email our email disclaimer and
 confidentiality note to you.



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



Re: passing parameters to plugin Archetype

2010-04-26 Thread Martin Höller
Did you have a look at 
http://blogs.mikeci.com/2010/01/14/working-with-custom-maven-archetypes-part-1/
and
http://blogs.mikeci.com/2010/01/26/working-with-custom-maven-archetypes-part-2/
and its references!

hth,
- martin

Am Montag, 26. April 2010 10:44:29 schrieb slew77:
 Anyone have any idea on this?  It's really frustrating me :confused:

 Thanks,
 Steve.

 slew77 wrote:
  I'm trying to do the same thing - can someone post instructions, I've
  searched everywhere.  I can see it's possible as when I use m2eclipse it
  allows me to specify custom properties that are picked up, I just can't
  figure out how to do it from the command line.
 
  Thanks,
  Steve.
 
  iiggzz wrote:
  I found it out! So if anybody has the same problem go ahead and ask me.
  Now I have another problem. I need to specify the path to my files like
  this: ${projectName}-mymodule/myfile.txt so after creation it should
  look like this: helloworld-mymodule.


signature.asc
Description: This is a digitally signed message part.


Re: why does mvn release replace ${groupId} in scm with actual values?

2010-03-09 Thread Martin Höller
Am Dienstag, 9. März 2010 05:09:18 schrieb hanasaki:
 Did a maven release and had connection information in the scm
 section.  After the release, the new pom with updated coordinates in its
 version section had replaced the ${groupId}/${artifactId}/trunk in the
 new pom with the Actual values.

http://jira.codehaus.org/browse/MRELEASE-128

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: Read properties from pom.xml from Java

2010-02-05 Thread Martin Höller
Am Freitag, 5. Februar 2010 09:50:04 schrieb Søren Krogh Neigaard:
 Im getting grey hairs :)

 I tried with this in my pom.xml:

 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-surefire-plugin/artifactId
   version2.5/version
   configuration
 systemPropertyVariables
   db.driveroracle.jdbc.OracleDriver/db.driver
   db.url${database.url}/db.url
   db.username${database.username}/db.username
   db.password${database.password}/db.password
 /systemPropertyVariables
   /configuration
 /plugin

That's almost exactly how I do it. The differences are:
- I'm still using surefire 2.4.2
- Due to the older version I use the (now) deprecated method of defining
  system properties in surefire (systemProperties instead of
  systemPropertyVariables)

How and where are you trying to access the properties? In some JUnit test 
which is executed by the maven surefire plugin via 
System.getProperty(db.url)? That definitely works for me.

However, Stephen's comments about locking you to maven this way sounds 
reasonable. His approach is probably the better one. But I don't know yet how 
these properties could be used in pom.xml for plugin configuration. Do they 
get imported by maven somehow?

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: Read properties from pom.xml from Java

2010-02-04 Thread Martin Höller
Hi!

Am Donnerstag, 4. Februar 2010 09:59:26 schrieb Søren Krogh Neigaard:
 The username/password/driver/url for the database is set in the pom.xml
 file by maven. How do I read these values from my Java helper class?

Set them in the pom.xml via properties, eg.:

project
  properties
database.usernamenobody/database.username
  /properties
/project

And access these properties in Java via 
System.getProperty(databse.username).

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: Read properties from pom.xml from Java

2010-02-04 Thread Martin Höller
Am Freitag, 5. Februar 2010 07:45:51 schrieb Søren Krogh Neigaard:
 Thank you all for your answers

 I tried adding the following to my pom.xml

 properties
   database.driveroracle.jdbc.OracleDriver/database.driver
   database.url${database.url}/database.url
   database.username${database.username}/database.username
   database.password${database.password}/database.password
 /properties

 And tried reading with System.getProperty(database.username), but it gave
 me null.

 The reason for the ${database.url} and so on, is that it gets its values
 from either a default settings.xml or a user specific settings.xml, and
 that is how I need it to be.

It's as Anders wrote already. If you want to use the same property names in 
settings.xml and pom.xml you have to put them in a profile, that's how I do 
it and it works. The profile could be activeByDefault if you prefer.

So your settings.xml could look like this:

settings
  profiles
profile
  idsomeProf/id
  activation
activeByDefault/
  /activation
  properties
database.urlsomeUrl/database.url
  /properties
/profile
  /profiles
/settings
 
And your pom.xml would be this:

project
  ...
  properties
database.urlsomeDummyValue/database.url
  /properties
/project

Now reading the properties via System.getProperty(database.url) shoud work.


hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: Read properties from pom.xml from Java

2010-02-04 Thread Martin Höller
Hi!

Am Freitag, 5. Februar 2010 08:41:02 schrieb Søren Krogh Neigaard:
 I have this in my settings.xml

 settings
   profiles
 profile
   activation
 activeByDefaulttrue/activeByDefault
   /activation
   properties
 database.driveroracle.jdbc.driver.OracleDriver/database.driver
 database.urljdbc:oracle:thin:@myhome:1521:orcl/database.url
 database.usernamefoo/database.username
 database.passwordbar/database.password
   /properties
 /profile
   /profiles
 /settings

 And I have tried with these in my pom.xml:

 properties
   db.driveroracle.jdbc.OracleDriver/db.driver
   db.url${database.url}/db.url
   db.username${database.username}/db.username
   db.password${database.password}/db.password
 /properties

 And this:

 properties
   database.driveroracle.jdbc.OracleDriver/database.driver
   database.urldummy/database.url
   database.usernamedummy/database.username
   database.passworddummy/database.password
 /properties

 I still get null with System.getProperty

Sorry, I missed one important point: you have to export your properties to 
become system properties. Do this by configuring the surefire plugin as 
described here:
http://maven.apache.org/plugins/maven-surefire-plugin/examples/system-properties.html

I just double checked it, this way it works.

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: maven archetype from command line vs from eclipse

2010-01-28 Thread Martin Höller
Hi!

* m2eclipse is a plugin for eclipse that integrates maven into the IDE.
* maven-eclipse-plugin is a maven plugin that produces eclipse configartion 
  files.

See http://docs.codehaus.org/display/MAVENUSER/Eclipse+Integration for some 
details.

hth,
- martin

On Thursday 28 January 2010 veena pandit wrote:
 I am confused.I am using m2eclipse,  I thought that was the eclipse
 plugin. Maybe that is where the problem is.

 Thanks,

 Sonia

 On Wed, Jan 27, 2010 at 5:10 PM, Wayne Fay wayne...@gmail.com wrote:
  However, when I import the same project into eclipse and select
  index.jsp and click run on server, I get a 404.
  Not sure what I have to configure.
 
  Try using m2eclipse instead of the eclipse plugin.
 
  Wayne
 
  -
  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




signature.asc
Description: This is a digitally signed message part.


Re: best practice to include resources in the jar file and unpack them on target server

2010-01-21 Thread Martin Höller
Hi!

Am Donnerstag, 21. Januar 2010 10:25:20 schrieb eyal edri:
 i'v included resource files inside the jar file using the include tag:

 profile
   iddevel/id
   build
 plugins
   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-jar-plugin/artifactId
 configuration
   classesDirectorysrc/main/resources/classesDirectory
   includes
 include**/*/include
   /includes
 /configuration
   /plugin
 /plugins
   /build
 /profile

What you are doing here is telling the maven-jar-plugin, that classes are 
found in src/main/resources, which is nonsense!

What you should do, is put your resources in src/main/resources and they 
should end up in target/classes and the produced JAR automatically when 
running mvn package or the like.

It seems you are not familiar with maven and I strongly recommend reading a 
maven book, like sonatype's Maven: The Definitve Guide, which is available 
online [0] for free.

hth,
- martin

[0] http://www.sonatype.com/book/


signature.asc
Description: This is a digitally signed message part.


Re: best practice to include resources in the jar file and unpack them on target server

2010-01-21 Thread Martin Höller
Am Donnerstag, 21. Januar 2010 11:54:14 schrieb eyal edri:
 so to my original question, how to i copy the files from the jar after i
 install it on the target server?

Extract the resource files from the JAR-File using 'jar' or 'zip' utilities, 
and copy them to the location where you want them to be.

This is not related to maven any more. There was actually a thread about 
something similar two days ago... and while searching for it, I found that 
you were the original poster. The last mail from Thod Tiessen [0] in this 
thread hits the nail on the head, IMHO.

hth,
- martin

[0] 
http://old.nabble.com/install-maven-project-from-repository-to-local-fs-to27209691.html#a27227458


signature.asc
Description: This is a digitally signed message part.


Re: ${user.home} not substituted in settings.xml localRepository

2010-01-15 Thread Martin Höller
Hi!

Am Donnerstag, 14. Januar 2010 11:08:59 schrieb Julien HENRY:
 I'm bitten by the same issue that was already reported last september [1].
 I'm using Hudson with Maven 2.2.1 and I wrote:

 
 localRepository${user.home}/repositories/${env.JOB_NAME}/repository/loca
lRepository

 but it doesn't work as ${user.home} is not correctly handled.

I'm using Maven 2.2.1 with Java 1.5.0_22 and ${user.home} is working fine for
me (this also did work with at least 2.0.[89]).

I have the following in my settings.xml:

properties
  cargo.container.home${user.home}/work/jboss-4.2.2.GA/cargo.container.home
/properties

And the cargo.container.home property is defined as expected. So I'd say it's
not generally broken.

hth,
- martin
-- 
Martin Höller   | martin.hoel...@xss.co.at
*x Software + Systeme   | http://www.xss.co.at/
Karmarschgasse 51/2/20  | Tel: +43-1-6060114-40
A-1100 Vienna, Austria  | Fax: +43-1-6060114-71


signature.asc
Description: This is a digitally signed message part.


Re: Error running release:perform

2009-11-26 Thread Martin Höller
Hi!

The thread Anders is talking about is probably this one:
http://old.nabble.com/Putting-a-Release-in-the-Repository-to26432264.html

Do you have a flat multi-module project?

hth,
- martin

Am Donnerstag, 26. November 2009 12:15:27 schrieb zyd08:
 I have some issues with using the release plugin. Basically,
 release:prepare can be run with no problems; but when it came to
 release:perform, the build failed with the following error:

 [INFO] [ERROR] BUILD ERROR
 [INFO] [INFO]
 
 [INFO] [INFO] Cannot execute mojo: resources. It requires a project with an
 existing pom.xml, but the build is not using one.

 My understanding of this message is that it cannot find pom.xml which does
 exist in my project directory. So can anyone explain how to resolve this
 please? Thanks very much in advance!


signature.asc
Description: This is a digitally signed message part.


Re: Error running release:perform

2009-11-26 Thread Martin Höller
Hi!

Am Donnerstag, 26. November 2009 14:15:24 schrieb zyd08:
 I've managed to find out the cause of the issue: during the prepare, the
 tag was given at the project root directory (which contains branches, tags
 and trunk) at the svn repo instead of the project_root/trunk directory;
 therefore, when release:perform checks out the working copy of the given
 tag, it has branches, tags and trunk sub-directories all checked out, and
 pom.xml is contained under trunk.

 So the question has become how can I set prepare tag the trunk directory
 rather than the project root directory correctly? Apologies for this newbie
 question, any help is highly appreciated!

Have a look at the scm section in your POM. developerConnection or 
eventually connection are the tags that define the root of your project in 
SCM. Google should bring more information if you need them.

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: Putting a Release in the Repository

2009-11-20 Thread Martin Höller
Which version of the release-plugin are you using? MRELEASE-216[0], which 
seems very related, was fixed for version 2.0-beta-10, but this version is 
not yet released!

hth,
- martin

[0] http://jira.codehaus.org/browse/MRELEASE-261


Am Donnerstag, 19. November 2009 20:43:26 schrieb Neil Chaudhuri:
 I have done those things, but I get the following error:

 [INFO] [INFO] Cannot execute mojo: clean. It requires a project with an
 existing pom.xml, but the build is not using one.

 I thought that error only occurred when the URL to the repo was incorrect.
 Since I am able to do a release:prepare and see the project tagged in SVN,
 I imagine that isn't the case.

 It occurred to me that this could be a flatness issue. My release in SVN
 looks like this:

 myapp-0.8.1
 --parent
 --persistence
 --services

 Each of these represents a module with its own pom. Shockingly, parent is
 the parent module for the others. There is no pom at the myapp-0.8.1 level,
 so that would explain the error.

 Because of the flatness issue, I had to add configure the release plugin in
 the following fashion for it to work:

 configuration

 tagWorkingDirectory${basedir}/../tagWorkingDirectory
 updateWorkingCopyVersionsfalse/updateWorkingCopyVersions
 preparationGoalsclean install/preparationGoals goalsclean
 install/goals
 arguments-Dmaven.test.skip/arguments
 tagBasesvn://url/data/svn/project/tags/tagBase
 autoVersionSubmodulestrue/autoVersionSubmodules
 /configuration


 Given this setup, how can I do the release? Any insight is appreciated.

 Thanks.



 -Original Message-
 From: Stevo Slavić [mailto:ssla...@gmail.com]
 Sent: Thursday, November 19, 2009 2:22 PM
 To: Maven Users List
 Subject: Re: Putting a Release in the Repository

 http://weblogs.java.net/blog/2008/08/31/using-maven-release-plugin

 http://www.vineetmanohar.com/2009/10/23/how-to-automate-project-versioning-
and-release-with-maven/

 Regards,
 Stevo.

 On Thu, Nov 19, 2009 at 8:19 PM, Stephen Connolly 

 stephen.alan.conno...@gmail.com wrote:
  mvn release:perform
  after the prepare
 
  Sent from my [rhymes with tryPod] ;-)
 
 
  On 19 Nov 2009, at 19:11, Neil Chaudhuri nchaudh...@potomacfusion.com
  wrote:
 
   I am using the prepare goal of the Maven Release Plugin to publish a
 
  release in SVN. The result of course is that the poms in the trunk and
  in my local copy are updated to the next version snapshot. What I want
  to do is to take the release in SVN and publish it to my local Nexus
  repository in the releases portion of the site. I am doing the same for
  snapshots by using the Maven Deploy Plugin.
 
 
 
  I suppose my question is how can I get the Maven Release and Deploy
  Plugins to work in tandem so that I can release something to SVN and
  then have it be deployed to my local Nexus repository.
 
 
 
  Thanks.
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org


-- 
Martin Höller   | martin.hoel...@xss.co.at
*x Software + Systeme   | http://www.xss.co.at/
Karmarschgasse 51/2/20  | Tel: +43-1-6060114-40
A-1100 Vienna, Austria  | Fax: +43-1-6060114-71


signature.asc
Description: This is a digitally signed message part.


Re: Problem in creating own archetype

2009-11-16 Thread Martin Höller
Hi!

Did your try the create-from-project [0] goal of the maven-archetype-plugin? 
This should give you some good starting point, from which you could adapt the 
archetype to your needs.

hth,
- martin

[0] http://maven.apache.org/plugins/maven-archetype-plugin/advanced-usage.html


Am Samstag, 14. November 2009 00:49:10 schrieb Qureshi,Shahzad [Ontario]:
 I should mention that compile and install of archetype works fine, I am
 encountering all these issues when I am trying to create the archetype



 -Original Message-
 From: Qureshi,Shahzad [Ontario] [mailto:shahzad.qure...@ec.gc.ca]
 Sent: Friday, November 13, 2009 6:46 PM
 To: users@maven.apache.org
 Subject: Problem in creating own archetype

 Hi all,

 I am trying to convince my group here to start using Maven instead of
 Ant. I am preparing a demonstration for them and in the process, I am
 trying to create my own archetype. I've done it before but this time I
 am stuck at something which I've no idea how to solve.

 I want the project directory structure to be

 - bin
   -- file1
   -- file2.sh
   -- file3.sh
 - src
   -- main
 -- java
 -- file.java
 + site
 + test

 So I've all that setup in archetype-resources folder and here is my
 archetype.xml within META-INF directory

 archetype
   !-- this id tag should be same as the artifactId in the archetype
 pom.xml--
   idarchetype_id/id
   sources
  sourcesrc/main/java/App.java/source
   /sources
   testSources
 sourcesrc/test/java/AppTest.java/source
   /testSources
   resources
   resourcebin/file1/resource
   resourcebin/file2.sh/resource
   resourcebin/file3.sh/resource
   /resources
 /archetype

 The amount of problems I am encountering with something simple as this,
 I've a feeling that this resources folder is supposed to do something
 other then what I am trying to do.

 Q1- How do I include the bin folder where I want it?

 Main problem I am encountering is I haven't been able to figure out how
 to include the entire directory and its files without specifying each
 file the way I've shown above and ** doesn't work and neither does
 specifying a directory and include tag

 ANOTHER weird problem is that when Maven encounters that file2.sh, it
 for some reason tries to open it and parse it because I get an exception
 like this Parser Eception:
 archetype-resources/bin/file2.sh:org.apache.velocity.runtime.parser.Pars
 eException: Encountered .

 Q2- Why is Maven trying to parse my shell script?

 I would appreciate any help you can provide, if I am unable to prove to
 my group how useful Maven is (this is the only snag left), I am afraid
 we'll keep using ANT

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


-- 
Martin Höller   | martin.hoel...@xss.co.at
*x Software + Systeme   | http://www.xss.co.at/
Karmarschgasse 51/2/20  | Tel: +43-1-6060114-40
A-1100 Vienna, Austria  | Fax: +43-1-6060114-71


signature.asc
Description: This is a digitally signed message part.


Re: Plugin to detect if called from the shell

2009-11-10 Thread Martin Höller
Hi!

Am Dienstag, 10. November 2009 16:58:48 schrieb Gajo Csaba:
 Is there a way for a Maven plugin (Mojo) to detect if it has been called
 from the console, and not from pom.xml as part of the lifecycle? I have
 a Mojo which has @requiresProject false, and I execute it like mvn
 pluginname:dostuff

 But it also can be called from pom.xml, as part of a lifecycle.

 If it's called from the shell, I would like the user to input some
 parameters from the console.

Have a look at the release-plugin [0]. If the --batch-mode parameter of maven 
is given, it doesn't ask the user for input but expects some variables to be 
defined.

hth,
- martin

[0] 
http://maven.apache.org/plugins/maven-release-plugin/examples/non-interactive-release.html


signature.asc
Description: This is a digitally signed message part.


Re: Persistence

2009-11-03 Thread Martin Höller
Am Tuesday 03 November 2009 11:43:43 schrieb Anders Hammar:
 One way of adding a repo is explained here:
 http://thedevelopercorner.blogspot.com/2007/08/adding-repositories-to-maven
-2.html However, you can add it in the pom as well. Which way to go kind of
 depends on your scenario. Adding the the pom makes i portable, while adding
 it to the settings.xml file forces everyone to do this configure to their
 environment.

Note, that adding repositories to your POM is a bad idea:
http://www.sonatype.com/people/2009/02/why-putting-repositories-in-your-poms-is-a-bad-idea/

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: Persistence

2009-11-03 Thread Martin Höller
I read the full blog and I didn't say never ever do it but just mentioned 
that it's a bad idea, and that's what the title of the blog (and my opinion) 
is :)

I should have added it's a bad idea in most cases though.

- martin

Am Tuesday 03 November 2009 22:43:59 schrieb Anders Hammar:
 If you read the full blog post you'll see that it is not black and white.
 There are use cases for putting it in the pom.

 /Anders

 On Tue, Nov 3, 2009 at 17:07, Martin Höller mar...@xss.co.at wrote:
  Am Tuesday 03 November 2009 11:43:43 schrieb Anders Hammar:
   One way of adding a repo is explained here:
 
  http://thedevelopercorner.blogspot.com/2007/08/adding-repositories-to-mav
 en
 
  -2.html However, you can add it in the pom as well. Which way to go kind
 
  of
 
   depends on your scenario. Adding the the pom makes i portable, while
 
  adding
 
   it to the settings.xml file forces everyone to do this configure to
   their environment.
 
  Note, that adding repositories to your POM is a bad idea:
 
  http://www.sonatype.com/people/2009/02/why-putting-repositories-in-your-p
 oms-is-a-bad-idea/
 
  hth,
  - martin



-- 
Martin Höller   | martin.hoel...@xss.co.at
*x Software + Systeme   | http://www.xss.co.at/
Karmarschgasse 51/2/20  | Tel: +43-1-6060114-40
A-1100 Vienna, Austria  | Fax: +43-1-6060114-71


signature.asc
Description: This is a digitally signed message part.


Re: Maven JavaScript Plugin

2009-10-23 Thread Martin Höller
On 22 Okt 2009, Neil Chaudhuri wrote:

 A colleague at work expressed an interest in doing a lot of Maven-like things 
 in the JavaScript realm. I did some research and discovered the Maven 
 JavaScript plugin. It looks neat, but it is an alpha version and seems to 
 have little activity. 
 
 I was simply hoping to find some comments from those who have investigated or 
 used the Maven JavaScript plugin. Does it work? Strengths and weaknesses? Any 
 insight is appreciated.

There was a similar thread recently on this list:
http://www.nabble.com/Javascript-support-to25543137.html#a25543137

hth,
- martin


signature.asc
Description: PGP signature


Re: How can I drop a custom Velocity tool into archetype:generate?

2009-10-15 Thread Martin Höller
Hi stug23!

Did you make any progress on this topic? If yes, could you please explain
the details.

tia,
- martin

On 07 Sep 2009, stug23 wrote:

 
 Can anyone give pointers for this question?
 
 
 stug23 wrote:
  
  Is there some way to use Plexus injection to accomplish the addition of a
  custom Velocity tool in an archetype so that archetype:generate can
  leverage the custom Velocity tool?
  
  I recently read an introductory posting on Plexus injection on the
  Sonatype blog, however I don't know whether it's possible to use Plexus
  for the case described above?
  
  Sonatype blog article on Plexus injection:
  
  Plexus Container Five Minute Tutorial
  

  http://www.sonatype.com/people/2009/05/plexus-container-five-minute-tutorial/
  
  
  stug23 wrote:
  
  I am finishing up a multimodule project archetype which needs to do some
  minor string transformations based on the standard archetype property
  'rootArtifactId'.
  
  For example, if rootArtifactId = purchase-order  the requirement is to
  produce a derived string assigned using a Velocity directive. One example
  of this might be something like:
  
  #set( $camelCase = $myCustomTool.capitalize(${rootArtifactId})  )
  
 which yields $camelCase = PurchaseOrder from $rootArtifactId =
  purchase-order
  
  I already have the custom Velocity tool written and working correctly as
  a standalone Java program, however I haven't found any specific
  information on how to incorporate this custom Velocity tool in an
  archetype.
  
  So my question is: Is it possible to configure a custom Velocity tool in
  a VelocityContext and have it available to use during the Velocity
  processing part of project instantiation that occurs for
  archetype:generate in an archetype?
  
  If the answer is yes, are there any examples of how to do this?
  
  I searched far and wide in the forums where I did see some indications
  that this idea was at least discussed, if not implemented. For example in
  the following Nabble posting,
  
  http://www.nabble.com/-m2--Archetype-Plugin-parameters-and-templates-to966996.html#a977701
  
  Jason van Zyl said:
  
  The templates are velocity templates so you get the directives that
  velocity provides and you can make your own velocity macros or tools. A
  tool is simply a Java object that you drop into a velocity context so you
  can really do whatever you want. I would think velocity itself would give
  you enough flexibility. 
  
  TIA!
  
  
  
  
  
  
 
 -- 
 View this message in context: 
 http://www.nabble.com/How-can-I-drop-a-custom-Velocity-tool-into-archetype%3Agenerate--tp25207677p25337553.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
 



signature.asc
Description: PGP signature


Re: Maven archtypes and custom parameters

2009-10-14 Thread Martin Höller
On Tuesday 13 October 2009 Werner Punz wrote:
 Hello everyone I am new to the maven archetype programming but I ran
 instantly into a problem.

 I have a custom archetype which should generate some java code
 the java file has something like public static String ${myvar}

 and I try to generate the code from the artefact via mvn
 archetype:create  -Dmyvar=myValue

 but maven then complains:

 org.apache.velocity.ReferenceException ${myvar} is not a valid reference.
 The funny thin is that the standard parameters are passed down correctly
 such as artifactId or groupId
 so something like public static String ${groupId}
 is resolved correctly.

I'm a archetype newbie but I think you should define something like this in 
archetype-metadata.xml:

  requiredProperties
requiredProperty key=myvar
  defaultValuesome-default/defaultValue
/requiredProperty
  /requiredProperties

See also 
http://maven.apache.org/plugins/maven-archetype-plugin/examples/create-with-property-file.html

hth
- martin


signature.asc
Description: This is a digitally signed message part.


Re: quick question: remove bin-dir.timestamp on mvn clean

2009-07-23 Thread Martin Höller
On Thursday 23 July 2009 Nicholas Tung wrote:
 Hi all,

Does anyone know how to remove the build-dir.timestamp on mvn
 clean? If I don't, it doesn't rebuild Scala files.

Configure the maven-clean-plugin to delete this additional file:
http://maven.apache.org/plugins/maven-clean-plugin/examples/delete_additional_files.html

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: Detected Maven Version: 2.1.0 is not in the allowed range

2009-07-07 Thread Martin Höller
On Tuesday 07 July 2009 Sam Wun wrote:
 As it running forward, near the end of the download.. there is an error:
 ...
 [INFO] [enforcer:enforce {execution: enforce-banned-dependencies}]
 [WARNING] Rule 1:
 org.apache.maven.plugins.enforcer.RequireMavenVersion failed with
 message:
 Detected Maven Version: 2.1.0 is not in the allowed range [2.0.9,2.1).
 [INFO]
 
 [ERROR] BUILD ERROR
 [INFO]
 
 [INFO] Some Enforcer rules have failed. Look above for specific
 messages explaining why the rule failed.
 [INFO]
 
 [INFO] For more information, run Maven with the -e switch
 [INFO]
 
 [INFO] Total time: 9 minutes 20 seconds
 [INFO] Finished at: Tue Jul 07 23:12:08 EST 2009
 [INFO] Final Memory: 37M/63M
 [INFO]
 

 what is it?

Whatever you are building was not prepared for maven version 2.1 or later. 
It explicitly states that allowed version range is [2.0.9,2.1), so either 
use maven 2.0.9 or 2.0.10, or fix the project and make it work with maven 
2.1.

hth,
- martin

PS: If you have problems with some public project, please try the projects
mailinglists first, as your problems are not maven problems.


signature.asc
Description: This is a digitally signed message part.


Re: Dependency Management

2009-06-25 Thread Martin Höller
Hi!

On Thursday 25 June 2009 Peter Horlock wrote:
 Hi,

 I've got a question regarding dependency management -
 I've got a project with a default tree layout - it uses subprojects,
 which again are using subprojects which again...

 Now, one of these subprojects defined a dependency scope as compile.
 It's grand-grand-parent project or the root project defined the same
 dependency as scope test. Now the dependency was set to test and as a
 result
 was not added to the war when deployed. The error how ever was only found
 on runtime and the entire project failed on production! :-(

 Why is that so? Shouldn't dependency, if it is needed, stay there?

This problem was discussed just about a month ago. Here is the link to the 
thread: 
http://www.nabble.com/Transitive-and-inherited-dependencies---potential-bug,-or-my--misunderstanding-of-the-mechanism-to23403092.html#a23436523

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: Public repository for open source project

2009-06-15 Thread Martin Höller
On 13 Jun 2009, jjjaime wrote:

 I participate in an open source project:
 http://en.wikipedia.org/wiki/IST-MUSIC
 and up to now we've used an private maven repository during the
 implementation. We are still using a SNAPSHOT repository until the project
 is mature enough.
 
 We would like to move to a public repository. Is there any public repository
 for mvn deploy? What's the most recommendable repository for an open
 source project?

Hav a look at https://docs.sonatype.com/display/NX/OSS+Repository+Hosting

hth,
- martin


signature.asc
Description: PGP signature


Re: Run a file using maven

2009-06-09 Thread Martin Höller
On Tuesday 09 June 2009 wabom wrote:
 Hi,
 I want to know how to run a file using maven command.
 Thanks...

http://www.lmgtfy.com/?q=maven+execute+command

- martin


signature.asc
Description: This is a digitally signed message part.


Re: Run a file using maven

2009-06-09 Thread Martin Höller
On Tuesday 09 June 2009 wabom wrote:
 Thank you first of all,
 I got this type of exception and I don't know how to solve it???

 org.apache.maven.lifecycle.LifecycleExecutionException: An exception
 occured while executing the Java class. null

How did you specify the java class you want to execute? It seems it has the 
value 'null'.

You need to provide us with more information to make us able to help you. 
Show us the pom.xml and the command line you executed.

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: POM verbosity

2009-06-08 Thread Martin Höller
On Monday 08 June 2009 Benson Margulies wrote:
 So, I have a plugin, I need several executions of it, and each one
 looks like what follows. It's getting long in a hurry.

Don't know if this is an option for you, but have a look at the 
maven-yamlpom-plugin [0]. The plugin allows specifying the POM in YAML 
which is less verbose than XML.

hth,
- martin

[0] http://wiki.github.com/mrdon/maven-yamlpom-plugin


signature.asc
Description: This is a digitally signed message part.


Re: Simple question on packaging a Java Application

2009-06-05 Thread Martin Höller
On Thursday 04 June 2009 Horton, Anne B wrote:
 Say you have a Java application (j2Se) and it has some dependent
 modules.   Easy - right???



 How do I get the Java application packaged as a jar when in my
 packaging clause in the Java application pom.xml is pom?

Why do you use packaging pom for a java application? This way your java 
files wouldn't even get compiled (without extra configuration).

You could use the Appassembler maven plugin [0], but I don't know how well 
it works with packaging pom.

hth,
- martin

[0] http://mojo.codehaus.org/appassembler/appassembler-maven-plugin/


signature.asc
Description: This is a digitally signed message part.


Re: Need to convince my manager to switch to maven

2009-06-05 Thread Martin Höller
Most questions got already answered, just one more comment about finding 
third party dependencies.

On Thursday 04 June 2009 scabbage wrote:
 - Your pom.xml only shows those dependencies your project is directed
 dependent upon. Fine. But what about all other dependencies that your
 dependencies depend upon? Know who they, get them and put in CVS!!

Use the maven-dependency-plugin's [0] goal dependency:tree to get a list of 
all dependencies with their dependencies listed.

hth,
- martin

[0] http://maven.apache.org/plugins/maven-dependency-plugin/


signature.asc
Description: This is a digitally signed message part.


Re: plugin search?

2009-06-05 Thread Martin Höller
Hi!

On Friday 05 June 2009 Nord, James wrote:
 Is there a plugin that anoyone knows that can analyse dependencies in a
 multi module project and then warn if you have a depenendency on the
 same artifact with a set version (ie not using dependencyManagement) in
 more than one project?

Sounds like a job for the versions-maven-plugin [0]. I think the plugin 
already warns you if dependencyManagement is not used. Not sure about 
different versions. If it doesn't support you use case file an enhancement 
request in JIRA. Maybe Stephen Connolly can provide some more details.

hth,
- martin

[0] http://mojo.codehaus.org/versions-maven-plugin/


signature.asc
Description: This is a digitally signed message part.


Re: use relative ..\... Path in includes and excludes of maven-source-plugin?

2009-05-26 Thread Martin Höller
Hi!

On Monday 25 May 2009 torsten.reinh...@gi-de.com wrote:
 I´m trying to include some additional files in my sources.jar:

 src\main\java
 src\main\groovy

I never used it, but I guess you have to use the build helper maven plugin 
to add additional source paths to you project. See 
http://mojo.codehaus.org/build-helper-maven-plugin/usage.html for details.

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: release:perform of an EAR gives error with maven-source-plugin:2.1

2009-05-05 Thread Martin Höller
On Thursday 30 April 2009 Martin Höller wrote:
 The question I now have is, why is source:jar mojo executed at all?
 According to the lifecycle reference [1] this mojo shouldn't be executed
 (for packaging EAR). How can I deactivate this mojo?

The release-profile seems to introduce the m-source-p into my build. Is this 
a good idea for EAR packaging? EARs usually don't have java files attached.

Any thoughts?

- martin

PS: For the moment I switched back to maven-source-plugin 2.0.4.


signature.asc
Description: This is a digitally signed message part.


Re: release:perform of an EAR gives error with maven-source-plugin:2.1

2009-05-04 Thread Martin Höller
On 30 Apr 2009, Grant Rettke wrote:

 Does the workaround on that page work?

Which workaround? Do you mean the patch attached to the MSOURCES-44
issue? I didn't test it but I had a look at the patch and I would assume
it would work.

- martin


signature.asc
Description: PGP signature


release:perform of an EAR gives error with maven-source-plugin:2.1

2009-04-30 Thread Martin Höller
Hi all!

We recently upgrade the maven-source-plugin from version 2.0.4 to 2.1 for a 
multimodule project (consisting of modules of packaging type jar, war, ejb 
and ear). No problems so far when doing a normal build like mvn install.

However, when we do a mvn release:perform the EAR module fails with this 
error: 

...
[INFO] [source:jar]
[INFO] 
[ERROR] BUILD ERROR
[INFO] 
[INFO] Error creating source archive: You must set at least one file.

This is because the EAR module doesn't contain any sources. We wouldn't need 
the -sources.jar anyway. Older versions of the maven-source-plugin created 
an empty archive with an auto-generated MANIFEST.MF file in it, but the 2.1 
version fails as already reported in MSOURCES-44 [0].

The question I now have is, why is source:jar mojo executed at all? According
to the lifecycle reference [1] this mojo shouldn't be executed (for packaging
EAR). How can I deactivate this mojo?

thanks in advance,
- martin

[0] http://jira.codehaus.org/browse/MSOURCES-44
[1] 
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Lifecycle_Reference


signature.asc
Description: This is a digitally signed message part.


Re: Release plugin and multimodule interdependent childs

2009-03-24 Thread Martin Höller
On Tuesday 24 March 2009 Reinhard Nägele wrote:
 I don't have a solution to your problem, but I would advice against
 putting the real version number instead of ${project.version}. It is
 good practice to avoid such redundancy using ${project.version}, even
 though the release plugin can deal with explicit versions. Using
 ${project.version} is also suggested by The Definitive Guide
 (http://www.sonatype.com/products/maven/documentation/book-defguide).

And in this thread [1] it was recommended to use the real version instead of 
${project.version}.

So what is the real truth?

- martin

PS: We are using the version string, having the release plugin update it
without any problems here.

[1] http://www.nabble.com/forum/ViewPost.jtp?post=22340527framed=y


signature.asc
Description: This is a digitally signed message part.


Re: Release plug-in failing to resolve env vars.

2009-03-19 Thread Martin Höller
Just had a look and the JIRA issue I was talking about is  
http://jira.codehaus.org/browse/MRELEASE-406
and was opended by you, James. So this probably doesn't help you much, 
sorry.

regards,
- martin

On Tuesday 17 March 2009 Martin Höller wrote:
 On Tuesday 17 March 2009 Nord, James wrote:
  http://jira.codehaus.org/secure/attachment/40724/mvn2.0.10.log
  http://jira.codehaus.org/secure/attachment/40727/mvn2.0.10_debug.log
  http://jira.codehaus.org/secure/attachment/40725/mvn2.1.0-RC3.log

 The release plugin starts a new maven process and it seems to me that
 environment variables do not get through. I can remember a similar
 problem some time ago on this list. Maybe there is an open JIRA issue for
 this, or you can find something searching the archives.

 Sorry, can't help you further at the moment.

 - martin

   -Original Message-
   From: Martin Höller [mailto:mar...@xss.co.at]
   Sent: 17 March 2009 11:46
   To: Maven Users List
   Subject: Re: Release plug-in failing to resolve env vars.
  
   On Tuesday 17 March 2009 Santos Patel wrote:
Don't make haste buddy.. It seems you forgot to attach the
  
   logs once
  
again.
  
   Or the list blocks (large?) attachements? Try pasting it to
   http://pastebin.com/ or similar an post the link.
  
   hth,
   - martin
 
  ***
 ** * This e-mail is confidential, the property of NDS Ltd
  and intended for the addressee only. Any dissemination, copying or
  distribution of this message or any attachments by anyone other than
  the intended recipient is strictly prohibited. If you have received
  this message in error, please immediately notify the postmas...@nds.com
  and destroy the original message. Messages sent to and from NDS may be
  monitored. NDS cannot guarantee any message delivery method is secure
  or error-free. Information could be intercepted, corrupted, lost,
  destroyed, arrive late or incomplete, or contain viruses. We do not
  accept responsibility for any errors or omissions in this message
  and/or attachment that arise as a result of transmission. You should
  carry out your own virus checks before opening any attachment. Any
  views or opinions presented are solely those of the author and do not
  necessarily represent those of NDS.
 
  To protect the environment please do not print this e-mail unless
  necessary.
 
  NDS Limited Registered Office: One London Road, Staines, Middlesex,
  TW18 4EX, United Kingdom. A company registered in England and Wales
  Registered no. 3080780 VAT no. GB 603 8808 40-00
  ***
 ** *
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org




signature.asc
Description: This is a digitally signed message part.


Re: Release plug-in failing to resolve env vars.

2009-03-17 Thread Martin Höller
On Tuesday 17 March 2009 Santos Patel wrote:
 Don't make haste buddy.. It seems you forgot to attach the logs once
 again.

Or the list blocks (large?) attachements? Try pasting it to 
http://pastebin.com/ or similar an post the link.

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: Release plug-in failing to resolve env vars.

2009-03-17 Thread Martin Höller
On Tuesday 17 March 2009 Nord, James wrote:
 http://jira.codehaus.org/secure/attachment/40724/mvn2.0.10.log
 http://jira.codehaus.org/secure/attachment/40727/mvn2.0.10_debug.log
 http://jira.codehaus.org/secure/attachment/40725/mvn2.1.0-RC3.log

The release plugin starts a new maven process and it seems to me that 
environment variables do not get through. I can remember a similar problem 
some time ago on this list. Maybe there is an open JIRA issue for this, or 
you can find something searching the archives.

Sorry, can't help you further at the moment.

- martin

  -Original Message-
  From: Martin Höller [mailto:mar...@xss.co.at]
  Sent: 17 March 2009 11:46
  To: Maven Users List
  Subject: Re: Release plug-in failing to resolve env vars.
 
  On Tuesday 17 March 2009 Santos Patel wrote:
   Don't make haste buddy.. It seems you forgot to attach the
 
  logs once
 
   again.
 
  Or the list blocks (large?) attachements? Try pasting it to
  http://pastebin.com/ or similar an post the link.
 
  hth,
  - martin

 *
* This e-mail is confidential, the property of NDS Ltd and
 intended for the addressee only. Any dissemination, copying or
 distribution of this message or any attachments by anyone other than the
 intended recipient is strictly prohibited. If you have received this
 message in error, please immediately notify the postmas...@nds.com and
 destroy the original message. Messages sent to and from NDS may be
 monitored. NDS cannot guarantee any message delivery method is secure or
 error-free. Information could be intercepted, corrupted, lost, destroyed,
 arrive late or incomplete, or contain viruses. We do not accept
 responsibility for any errors or omissions in this message and/or
 attachment that arise as a result of transmission. You should carry out
 your own virus checks before opening any attachment. Any views or
 opinions presented are solely those of the author and do not necessarily
 represent those of NDS.

 To protect the environment please do not print this e-mail unless
 necessary.

 NDS Limited Registered Office: One London Road, Staines, Middlesex, TW18
 4EX, United Kingdom. A company registered in England and Wales Registered
 no. 3080780 VAT no. GB 603 8808 40-00
 *
*

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




signature.asc
Description: This is a digitally signed message part.


Re: Multiple module maven project questions

2009-03-16 Thread Martin Höller
Hi!

On 15 Mar 2009, Thai Dang Vu wrote:

[...]
 I have some questions here:
 
 1. How to tell the maven-ear-plugin to use my application.xml? And where in 
 the ear directory should I place my own application.xml?

The m-ear-p is able to autogenerate an application.xml for you. Maybe you
should try to use this feature. See [1] for details.

If auto-generation doesn't fit your needs, I'd put my application.xml in
src/main/resources/META-INF/application.xml of my ear module. IMHO, this
should work.

 2. Because of the dependency on the ejb, I have to run mvn install in the ejb 
 directory before I can run mvn compiler:compile in the war directory.

Your dependencies are incorrect! You missed they typeejb/type in your
war dependency declaration.

 3. In my application.xml, beside the ejb and war modules, I need to add one 
 more module like this:
 
 moduleejbjboss-seam-2.1.1.GA.jar/ejb/module
 
 The jboss seam jar file can be found with a dependency. What should I do to 
 tell maven to include that file into the root of the ear file it creates when 
 I run mvn ear:ear in the ear directory?

Not 100% sure what you want to achieve. Did you try specifying the seam
artifact as a normal dependency (with scope runtime) of your EAR?

hth,
- martin

[1] http://maven.apache.org/plugins/maven-ear-plugin/


signature.asc
Description: PGP signature


Re: How to get permission to Jira?

2009-03-10 Thread Martin Höller
On Monday 09 March 2009 Lewis, Eric wrote:
 This may be a stupid question, but I didn't find any help online.
 I'd like to enter a Maven issue (for the site plugin). I set up an
 account in Jira and got access. According to the Jira help, I should see
 a 'Create new issue' link if I have the permission - but I don't see it,
 so obviously I don't have that permission.
 What do I have to do to get the permission to create an issue?

Creating an account (and logging in of course) should be enough.
Did you eventually disable cookies in your browser?

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: Special URL characters

2009-03-10 Thread Martin Höller
It's not, just in Nabble. Your Browser is interpreting the 'amp;' entities. 
Look at the source code in your browser.

hth,
- martin
On Tuesday 10 March 2009 solo1970 wrote:
 Hello Chris,

 I kind of understand your explanation, but the URL you're suggesting to
 me is the same as mine!???
 ?

 Can you re-type the URL I should put in the url/url tag?

 Sonia

 Chris Lieb-2 wrote:
  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
 
  solo1970 wrote:
  Hello All,
 
  I would like to put the following URL:
 
  http://local.mysite/pub/get?Type=19010-TEST9040044/1Lang=XRev=1Form
 at=GZIP in the url/url tags of my POM,
  but I get the following error:
 
  [INFO] Scanning for projects...
  [INFO]
  --
 -- [ERROR] FATAL ERROR
  [INFO]
  --
 -- [INFO] Error building POM (may not be this project's POM).
 
 
  Project ID: unknown
  POM Location: C:\TMP\sonia\pom.xml
 
  Reason: Parse error reading POM. Reason: entity reference name can not
  contain c
  haracter =' (position: START_TAG seen
  ...urlhttp://local.mysite/pub/get?Type=1
  9010-TEST9040044/1Lang=... @11:66)  for project unknown at
  C:\TMP\sonia\pom.xml
 
 
  Is there a workaround?
 
  Thanks
 
  Sonia
 
  Since the POM is an XML document, all text in it must be proper XML. 
  In your case, the '' character starts an XML entity.  An entity name
  is terminated with a ';' character.  When the parser reads in your POM,
  it sees the first '' in your URL and then starts reading until it
  reaches a ';' so that it can read the entity name.  While trying to
  find a ';', the parser encountered a '=', which is not a valid
  character in an entity name.
 
  To get around this, you need to replace the '' with the correct XML
  entity, 'amp;'.  This would change your repository URL to:
 
  http://local.mysite/pub/get?Type=19010-TEST9040044/1amp;Lang=Xamp;Rev
 =1amp;Format=GZIP
 
  HTH,
  Chris
  -BEGIN PGP SIGNATURE-
  Version: GnuPG v1.4.9 (MingW32)
  Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
  iQEcBAEBAgAGBQJJtomeAAoJEJWxx7fgsD+CKAkH/iTolsr9S5ehRtTdxRYVCXyV
  RTiIAAaZnWixJg/Vp4XKlfvS3dYmcXNlXXyukHc9bGC6NAUVhFyFG3zvOGT7tzzs
  9OlsZQKi9Gf/zrDhYYTVu9G5J0aDF7lx9eUPK0JxTN5n99hAuSdVZMW6x6priy4d
  jDurIugWn7C/Xfu0HJv+81Xgf1Gg6TyXUAJahevx001R05gWO187E18KxpKTcUeA
  tMIWtlw3R/9u9XCYxWqr0XODZt/Oh53d0z8cs+pkZwRMQED60oAt8l7Y1+zsMy1E
  uuRFt3HPH5mbqpP86cugNEe0pZTS77B3Lu9O61mDnjBj4uUyZg52b2xIfXCI9oA=
  =64Au
  -END PGP SIGNATURE-
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org




signature.asc
Description: This is a digitally signed message part.


Re: release:prepare cannot find artifacts

2009-03-05 Thread Martin Höller
On Thursday 05 March 2009 David C. Hicks wrote:
 Todd Thiessen wrote:
  However, when you have dependencies between modules, the release
  prepare will fail by default since it doesn't do an install. Without an
  install, one module doesn't have access to the artifacts of another.

 To be completely fair, I just realized, reading this, that there is a
 little twist.  In my case, the two modules that are missing are modules
 of a module.  I don't think it should make any difference, but maybe
 there is a defect that begins at the 3rd level.  Again, here's a bit of
 a skeleton view:

 Project
 ModuleA(pom)
 ModuleA1(pom)
 ModuleA2(pom)
 ModuleB(jar, depends on ModuleA1,ModuleA2)

 When it gets to ModuleB, the failure is in finding either of those two
 dependencies.

How did you define the dependencies in ModuleB? Did you specify the correct 
type (pom) for the dependencies?

- martin


signature.asc
Description: This is a digitally signed message part.


Re: Functional Test strategies with Maven

2009-03-03 Thread Martin Höller
Hi Martijn!

I'm joining this discussion a little late, but have some references to add 
which may help making up your mind:

http://docs.codehaus.org/display/MAVENUSER/Maven+and+Integration+Testing
http://www.jroller.com/carlossg/entry/functional_testing_with_maven_cargo

hth,
- martin

On Monday 02 March 2009 martijnverb...@gmail.com wrote:
 Hi all,

 I'd like to get opinions from others on how they structure/deal with what
 we deem 'functional tests'

 To us these are tests that are broader in scope than a unit test but
 whose scope is still limited to that same module and require no 3rd party
 resources to run (we're able to Mock everything we need). Traditionally a
 Maven structure looks something like:

 foobar
 jar
 src
 main
 java
 test
 java
 war
 ...
 sar
 ...
 rar
 ...
 ear

 With the 'test' structure being used for Unit Tests.

 So we're wondering if it was wise to put the functional tests under
 jar--test--src--java (perhaps differentiating them by package
 structure) or introduce a new module (say functional-test) eg

 foobar
 jar
 src
 main
 java
 test
 java
 functional-test
 src
 test
 java
 war
 ...
 sar
 ...
 rar
 ...
 ear
 ...

 Is there a preferred technique/other options that people have used?




signature.asc
Description: This is a digitally signed message part.


Re: The PluginDescriptor for the plugin maven:maven-war-plugin was not found

2009-02-27 Thread Martin Höller
On Thursday 26 February 2009 Wayne Fay wrote:
 1. Check with CAS Users and Dev list to make sure someone else has
 successfully built their project with 2.0.10. If not, what about
 2.0.9? Or 2.0.8?

The pom.xml Vinicious posted contains a configuration section for the 
enforcer plugin to make sure 2.0.10 is used. So it won't work with previous 
versions unless you modify the pom.xml.

 What version is the CAS Dev team using? What about 
 their operating system and JDK versions?

Same for JDK version: 1.5 is required.

- martin


signature.asc
Description: This is a digitally signed message part.


Re: selenium-maven-plugin howto specifie multiple browsers

2009-02-16 Thread Martin Höller
Obviously I was wrong: according to [0], execution of a single plugin
multiple times is possible.

[0] http://article.gmane.org/gmane.comp.java.maven-plugins.mojo.user/1307

hth,
- martin

On 05 Feb 2009, Martin Höller wrote:

 Hi!
 
 Executing one plugin with different configurations in one phase seems to be 
 a common problem in maven. Problems usually occur with the 
 maven-antrun-plugin or the exec-maven-plugin, but as we see it could also 
 hit other plugins as well.
 
 I think(!) the only possibility you have is to use profiles to define the 
 configuration of your selenium plugin and run maven multiple times with 
 different profiles actived.
 
 hth,
 - martin
 
 On Thursday 05 February 2009 kukudas wrote:
  Hi thanks for your response. I want to run the Selenium tests as html
  suits in the integration-test lifecycle,  which works perfect but just in
  one browser. I thought that there is somehow a way to tell maven that he
  has to launch the tests in diffrend browsers aswell.
 
  Mick Knutson-4 wrote:
   I use TestNG to do this.
   I have my test method to start the server:
  
   *...@beforeclass(groups = {selenium })
   @Parameters(
   { selenium-server-address, browser-type,
   application-address }
   )
   protected void startSeleniumServer(String seleniumServerAddress,
   String browserType, String applicationAddress) throws Exception
   { log.info(Starting Selenium client);
   selenium = new DefaultSelenium(seleniumServerAddress,
   SeleniumServer.getDefaultPort(), browserType,
   applicationAddress);
   selenium.start();
   }*
  
   Then in my testng.xml:
  
  * test name=Acegi Login - IE
   parameter name=browser-type value=*iexplore/
  
   classes
   class name=com.baselogic.selenium.LoginTest/
   /classes
   /test*
  
  
   Note this is para-phrased. I actually need to write a blog on this. But
   hopefully this can help get you started.
  
  
   ---
   Thank You…
  
   Mick Knutson, President
  
   BASE Logic, Inc.
   Enterprise Architecture, Design, Mentoring  Agile Consulting
   p. (866) BLiNC-411: (254-6241-1)
   f. (415) 685-4233
  
   Website: http://baselogic.com
   Linked IN: http://linkedin.com/in/mickknutson
   Twitter: http://twitter.com/mickknutson
   Vacation Rental: http://tahoe.baselogic.com
   ---
  
   On Wed, Feb 4, 2009 at 8:55 AM, kukudas kukuda...@googlemail.com 
 wrote:
   hi,
  
   how can i run selenese command with more than one browser ? Atm i use
   browser*opera/browser for example. I couldn't find any hint in the
   documentation i hope somebody can help me.
  
   Thanks kukudas
   --
   View this message in context:
   http://www.nabble.com/selenium-maven-plugin-howto-specifie-multiple-br
  owsers-tp21830943p21830943.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
 
 



signature.asc
Description: PGP signature


Re: maven-eclipse-plugin

2009-02-16 Thread Martin Höller
Hi!

On 16 Feb 2009, Dmitri Ilyin wrote:

 i wanted to use maven-eclipse-plugin with Eclipse 3.4. After short tries i
 have found out that it only support WTP 1.5. The actual version of Eclipse
 WTP is 3.x
 
 After that i find that the last version of plugin is 10 month old.

Accoring to a mail from last week, a new version is going to be released
in a couple of weeks.

 What ist he status oft he plugin? Is it still in developing? If no, are
 there any alternatives? I'm new in maven  and looking for eclipse support
 for maven.

Searching this list's archive would have given you links like this one:
http://www.nabble.com/Using-maven-with-eclipse-to21478705.html#a21478705

hth,
- martin


signature.asc
Description: PGP signature


Re: maven-eclipse-plugin

2009-02-16 Thread Martin Höller
http://lmgtfy.com/?q=maven+eclipse+plugin+next+release

On 16 Feb 2009, Dmitri Ilyin wrote:

 hi,
 thanks Martin.
 
 Can you provide an email here? or where can i find it?
 Do you know which WTP version will be supported?
 
 regards
 Dmitri
 
 2009/2/16 Martin Höller mar...@xss.co.at
 
  Hi!
 
  On 16 Feb 2009, Dmitri Ilyin wrote:
 
   i wanted to use maven-eclipse-plugin with Eclipse 3.4. After short tries
  i
   have found out that it only support WTP 1.5. The actual version of
  Eclipse
   WTP is 3.x
  
   After that i find that the last version of plugin is 10 month old.
 
  Accoring to a mail from last week, a new version is going to be released
  in a couple of weeks.
 
   What ist he status oft he plugin? Is it still in developing? If no, are
   there any alternatives? I'm new in maven  and looking for eclipse support
   for maven.
 
  Searching this list's archive would have given you links like this one:
  http://www.nabble.com/Using-maven-with-eclipse-to21478705.html#a21478705
 
  hth,
  - martin
 



signature.asc
Description: PGP signature


Re: eclipse:eclipse - no .project for POM packaging?

2009-02-11 Thread Martin Höller
On Tuesday 10 February 2009 David C. Hicks wrote:
 Is there a way to force the maven-eclipse-plugin to produce .project
 files for modules that are packaging=pom?

There is an open JIRA issue [0] for this and a lot of duplicates. Read the 
comments to see what the status quo is.

hth,
- martin

[0] http://jira.codehaus.org/browse/MECLIPSE-94


signature.asc
Description: This is a digitally signed message part.


Re: Local repository and problem with downloading parent

2009-02-09 Thread Martin Höller
On 07 Feb 2009, Johannes Schneider wrote:

 Now I try to switch to isolated local repositories. Therefore I call
 mvn compile -Dmaven.repo.local=.
 Unfortunately that still downloads the parent pom to ~/.m2/repository
 and not to my isolated local repo...

Works for me with maven 2.0.9 as expected. What version are you using?

hth,
- martin


signature.asc
Description: PGP signature


Re: selenium-maven-plugin howto specifie multiple browsers

2009-02-05 Thread Martin Höller
Hi!

Executing one plugin with different configurations in one phase seems to be 
a common problem in maven. Problems usually occur with the 
maven-antrun-plugin or the exec-maven-plugin, but as we see it could also 
hit other plugins as well.

I think(!) the only possibility you have is to use profiles to define the 
configuration of your selenium plugin and run maven multiple times with 
different profiles actived.

hth,
- martin

On Thursday 05 February 2009 kukudas wrote:
 Hi thanks for your response. I want to run the Selenium tests as html
 suits in the integration-test lifecycle,  which works perfect but just in
 one browser. I thought that there is somehow a way to tell maven that he
 has to launch the tests in diffrend browsers aswell.

 Mick Knutson-4 wrote:
  I use TestNG to do this.
  I have my test method to start the server:
 
  *...@beforeclass(groups = {selenium })
  @Parameters(
  { selenium-server-address, browser-type,
  application-address }
  )
  protected void startSeleniumServer(String seleniumServerAddress,
  String browserType, String applicationAddress) throws Exception
  { log.info(Starting Selenium client);
  selenium = new DefaultSelenium(seleniumServerAddress,
  SeleniumServer.getDefaultPort(), browserType,
  applicationAddress);
  selenium.start();
  }*
 
  Then in my testng.xml:
 
 * test name=Acegi Login - IE
  parameter name=browser-type value=*iexplore/
 
  classes
  class name=com.baselogic.selenium.LoginTest/
  /classes
  /test*
 
 
  Note this is para-phrased. I actually need to write a blog on this. But
  hopefully this can help get you started.
 
 
  ---
  Thank You…
 
  Mick Knutson, President
 
  BASE Logic, Inc.
  Enterprise Architecture, Design, Mentoring  Agile Consulting
  p. (866) BLiNC-411: (254-6241-1)
  f. (415) 685-4233
 
  Website: http://baselogic.com
  Linked IN: http://linkedin.com/in/mickknutson
  Twitter: http://twitter.com/mickknutson
  Vacation Rental: http://tahoe.baselogic.com
  ---
 
  On Wed, Feb 4, 2009 at 8:55 AM, kukudas kukuda...@googlemail.com 
wrote:
  hi,
 
  how can i run selenese command with more than one browser ? Atm i use
  browser*opera/browser for example. I couldn't find any hint in the
  documentation i hope somebody can help me.
 
  Thanks kukudas
  --
  View this message in context:
  http://www.nabble.com/selenium-maven-plugin-howto-specifie-multiple-br
 owsers-tp21830943p21830943.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




signature.asc
Description: This is a digitally signed message part.


Re: Problems with release:prepare on the resolution of a dependency with test classifier

2009-01-29 Thread Martin Höller
Sound's like a known issue:
http://jira.codehaus.org/browse/SCM-406

hth,
- martin

On Wednesday 28 January 2009 Thiago Moreira (timba) wrote:
   Thank you Barrie! Now it is working fine BUT I'm getting a new error...

 [INFO] [release:prepare]
 [INFO] Resuming release from phase 'scm-tag'
 [INFO] Tagging release with the label floggy-1.2.0...
 [INFO] Executing: svn --non-interactive copy --file
 /tmp/maven-scm-200887962.commit .
 https://floggy.svn.sourceforge.net/svnroot/floggy/tags/floggy-1.2.0
 [INFO] Working directory:
 /home/tmoreira2020/projects/floggy/trunk-fr2536956 [INFO]
 
 [ERROR] BUILD FAILURE
 [INFO]
 
 [INFO] Unable to tag SCM
 Provider message:
 The svn tag command failed.
 Command output:
 svn: Commit failed (details follow):
 svn: File
 '/svnroot/floggy/tags/floggy-1.2.0/eclipse-floggy-feature/pom.xml'
 already exists

 [INFO]
 
 [INFO] For more information, run Maven with the -e switch
 [INFO]
 
 [INFO] Total time: 22 seconds
 [INFO] Finished at: Wed Jan 28 00:24:11 PST 2009
 [INFO] Final Memory: 9M/82M
 [INFO]
 

   That file don't exist! You can check the project structure here
 http://floggy.svn.sourceforge.net/viewvc/floggy/

   Has anyone else experienced something like this??

   Cheers

 On Tue, Jan 27, 2009 at 6:36 PM, Barrie Treloar baerr...@gmail.com 
wrote:
  On Wed, Jan 28, 2009 at 4:34 AM, Thiago Moreira (timba)
 
  tmoreira2...@gmail.com wrote:
Ok, I took a look on the source code of the maven-release-plugin and
 
  there
 
   is no way to set the preparationGoals from the command line!!!
  
The method mergeCommandLineConfig
 
  http://maven.apache.org/plugins/maven-release-plugin/xref/org/apache/ma
 ven/plugins/release/PrepareReleaseMojo.html#181
 
  of
   the PrepareReleaseMojo class only merge the releaseVersions and
   developmentVersions properties.
 
  We have the same scenario that you have and we are using release fine.
 
  You may want to use
   dependency
 groupIdMYGROUP/groupId
 artifactIdMYARTIFACT/artifactId
 versionMYVERSION/version
 typetest-jar/type
 scopetest/scope
   /dependency
 
  type = test-jar
  instead of classifier = test.
 
  There are some wierd inconsistencies with this.
 
  Straight from our release page in our wiki:
   mvn release:prepare
  -Dmaven.scm.provider.cvs.implementation=cvs_native
  -DpreparationGoals=clean,install -Dusername=CVS_userid
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org




signature.asc
Description: This is a digitally signed message part.


Re: [M2] Repository Manager

2009-01-27 Thread Martin Höller
Hi!

On Tuesday 27 January 2009 Matthias Müller wrote:
 i'm quite new to maven. i want to setup a shared internal remote
 repository on a network drive. the users use there own local repository
 (~/.m2/repository) as a cache and for their unreleased projects. if the
 project need an artifact that is not in the internal remote repository,
 that artifacts need to be downloaded from central to that internal remote
 repository and then copied to the local one. what's the easiest way to
 accomplish that?
 is that the purpose of request managers like Nexus?
 what request managers do you recommend?

Usually these software packages are refered to as repository managers 
rather than request managers. However, Nexus, Archiva or Artifactory are 
such repository managers. A list is available on maven's homepage [0] or at 
codehaus.org [1].

You will also find some posts if you search this list's archive with nabble [2]

hth,
- martin

[0] http://maven.apache.org/repository-management.html
[1] 
http://docs.codehaus.org/display/MAVENUSER/Maven%2BRepository%2BManager%2BFeature%2BMatrix
[2] http://www.nabble.com/Maven---Users-f178.html


signature.asc
Description: This is a digitally signed message part.


Re: locked out of archiva

2009-01-27 Thread Martin Höller
Hi!

On Tuesday 27 January 2009 Ed Young wrote:
 I find myself unable to log into archiva (v 1.1.3 standalone on an ubuntu
 box). I suspect the passwords all expired but not sure. I've tried the
 email password reset, but it the link it sends does me no good,  because
 it just allows me to try to log in again.

Read this thread [0] on the archiva mailing list.

In general, questions like this are better posted to the archiva list.

hth,
- martin

[0] http://www.nabble.com/Admin-account-locked-to15318269.html#a15318434


signature.asc
Description: This is a digitally signed message part.


Re: Iterating through a files using maven plugin

2009-01-22 Thread Martin Höller
On Thursday 22 January 2009 arve wrote:
 hi,
 I run a maven task mvn appfuse:gen -Dentity=Pojo name.
 if i have 100 pojos in a folder i have to run the same command 100 times.
 Instead is there some plugin/trick whcih could iterate the same command
 with different pojo names with a  single command?

Use the shell! For example in bash it would be something like

  for POJO in $ALL_POJOs; do
mvn appfuse:gen -Dentity=$POJO;
  done

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: Interdependencies between modules

2009-01-21 Thread Martin Höller
Hi Richard!

You have to be online to pull in updates of third-party artifacts, but you 
don't want updates of your own artefacts?

Well, I'd say there is only one solution to this: use snapshot versions for 
the artifacts you want updates for and define non-snapshot versions for all 
others.

Regarding reproducability: an artifact with a snapshot-dependency is never 
reproducable, that's the nature of snapshots.

hth,
- martin

On Tuesday 20 January 2009 Richard Chamberlain wrote:
 Apologies for not being clear.

 In my second mail i had thought of another situation where
 interdependencies between artefacts you have built cause an
 unpredictable build.

 Let me illustrate the problem clearer.

 Parent P
 Project A
 Project B
 Project C - depends on A

 mvn install

 My reactor build would do:

 - Build Project P
 - Build Project A - installed into local repo
 - Build project B - installed into local repo

 During the build of Project B, an updated Project A was put into the
 remote repository by, say an automated build

 - Build Project C (during build of project C it would have downloaded
 project A)

 Therefore project C would not build with my project A. I cannot use
 offline with this multi-module project as I want A, B and C to pull in
 any changes to third-party artefacts.

 I may have understood the way that maven works in this regards, please
 could you let me know if this is an issue.

 Regards,

 Richard




 -Original Message-
 From: bmat...@gmail.com [mailto:bmat...@gmail.com] On Behalf Of Baptiste
 MATHUS
 Sent: 20 January 2009 15:43
 To: Maven Users List
 Subject: Re: Interdependencies between modules

 What do you mean by someone deployed to the repository. It has to be
 you,
 particularly if you're working offline. As the local maven repository is
 local, this should not be possible. You're not sharing your local
 repository with others are you?

 Did you try with mvn -o? You're not very clear about it in your last
 mail.

 Cheers

 2009/1/20 Richard Chamberlain richard.chamberl...@caplin.com

  This is worse when incorporated into a multi-module build:
 
  When the reactor builds B it is not guaranteed to use locally built A.
  If someone deployed to the repository, then it would use that one.
 
  Is this an issue? Or have I missed something?
 
 
  -Original Message-
  From: bmat...@gmail.com [mailto:bmat...@gmail.com] On Behalf Of

 Baptiste

  MATHUS
  Sent: 20 January 2009 12:56
  To: Maven Users List
  Subject: Re: Interdependencies between modules
 
  Just a thought: use profile to disable your repository? Or simply work
  offline (mvn -o)? This way it will only use your local jar.
 
  Cheers.
 
  2009/1/20 Richard Chamberlain richard.chamberl...@caplin.com
 
   Hi All,
  
  
  
   I've got a question about how maven works when there is a newer

 remote

   library than a locally installed artefact.
  
  
  
   Say I've got project A and project B. B depends on A.
  
  
  
   -  I build A and install it, to test that B will work with

 the

   API changes in A.
  
   -  If I build B it will use my locally built copy of A,
   everything is fine
  
  
  
   UNLESS: The continuous integration tool builds a new copy of A after

 I

   build A and install locally. When I come to build B it pulls in the
   remote copy of A and my local change in A is ignored.
  
  
  
   How can I stop this happening as it does not give a predicatable
 
  build?
 
   I really need to tell B to update its dependencies except for A.
  
  
  
   Thanks in advance,
  
  
  
   Rich
 
  --
  Baptiste Batmat MATHUS - http://batmat.net
  Sauvez un arbre,
  Mangez un castor !
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org




signature.asc
Description: This is a digitally signed message part.


Re: How to reference home directory in linux?

2009-01-21 Thread Martin Höller
On Wednesday 21 January 2009 keepfocusing wrote:
 I want to set the local repository position with this expression
 ~/m2/repo, which is also used as an example in settings.xml. But it
 seems not working unless I change it into absolute path such as
 /home/abc/m2/repo.

 1) Is it a bug of maven?

No. ~ is (usually) interpreted by the shell you are using. If it's in a 
configuration file the shell never sees it thus cannot replace it with the 
user's home directory. For maven ~ is just a character, nothing more.

 2) How can I do if a reference to home directory is needed here?

As Haim said, try ${user.home}. I think this is a system property.

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: denpendency/ for org/testng/testng/5.8/

2009-01-15 Thread Martin Höller
Hi!

On Thursday 15 January 2009 thomas2004 wrote:
 I need the testng-5.8-jdk15.jar in my program and I find it under:
 http://mirrors.ibiblio.org/pub/mirrors/maven2/org/testng/testng/5.8/

 I put this dependency in the pom.xml as follow but it couldn't find
 that. What is the correct writting for dependency/?

You can always use http://www.mvnbrowser.com/ or http://mvnindex.org/ to 
find an artifact and see the corresponding pom-snippet.

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: Using maven with eclipse

2009-01-15 Thread Martin Höller
On Thursday 15 January 2009 Farrukh Najmi wrote:
 I am experienced with maven but new to Eclipse IDE. I have used maven
 with Netbeans IDE and the mevenide Netbeans plugin. WHat I liked about
 it was how Netbeans was completely driven by the pom configuration and
 how natural and familiar everything was for a maven user.

 I would like to try Eclipse IDE with my existing multi-module project.
 What is the best approack for doing this? Which plugin should I use?
 Please share any links and pointers. Thanks.

See [0] for a comparison of the available plugins.

The maven-eclipse-plugin just creates eclipse configuration files for your 
projects, no further intergration. This is simple, quite robust but doesn't 
provide as much comfort as the other two options.

I didn't use m2eclipse or q4e recently but they follow a completely 
different approach. They are plugins for eclipse and try to adapt your IDE 
and add new features to it.

If you search the list archive you should find some more information. This 
question is asked every now and then.

hth,
- martin

[0] http://docs.codehaus.org/display/MAVENUSER/Eclipse+Integration


signature.asc
Description: This is a digitally signed message part.


Re: maven-archetype-plugin does not exist error when creating new project, non-working link in FAQ

2009-01-12 Thread Martin Höller
On Monday 12 January 2009 sandy.verfai...@roularta.be wrote:
 Hello,

 When I try to create a new projects with my new installed maven, I get
 the error 'org.apache.maven/lifecycle.LifecycleExecutionException: the
 plugin org.apache.maven.plugins:maven-archetype-plugin' does not exist
 or no valid version could be found.

 I used this syntax to create it: mvn archetype:create
 -DgroupId=com.roularta.app -DartifactId=my-app -e

 All the environment vars are ok.

 I see this exact error named in the FAQ, but the link to the answer
 doesn't work/exist..

The answer can be found on the same page. Just search for How do I resolve 
and you'll get the answer.

I just tried to update the wiki-page, but I always get a page not found 
error :-(

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: maven-archetype-plugin does not exist error when creating new project, non-working link in FAQ

2009-01-12 Thread Martin Höller
On Monday 12 January 2009 Martin Höller wrote:
 I just tried to update the wiki-page, but I always get a page not found
 error :-(

This seems to be a problem with konqueror. Updateing in firefox worked.

- martin


signature.asc
Description: This is a digitally signed message part.


Re: possibility to control an artifact version when installing/deploying/releasing?

2008-12-22 Thread Martin Höller
On 22 Dec 2008, konkere wrote:

 so which manager would you suggest? i read a bit about nexus, archiva and
 artifactory on the very feature of prohibiting redeploy. nexus does it for
 sure (though role-based), while the other two seem not to handle this (and
 that is my question - is it really?).

Archiva has an open issue for it:
https://jira.codehaus.org/browse/MRM-747

- martin


signature.asc
Description: PGP signature


Re: mvn dependency:resolve what's it for?

2008-12-22 Thread Martin Höller
You define a property Spring.Version but use it as ${Spring.version}.
You see the difference in upper and lower case?

hth,
- martin

On 22 Dec 2008, aymen83 wrote:

 
 i'm really confused. I wrote the following profile but after compilation and
 when i tape mvn -Plegacy dependency:tree the only version of spring i can
 see is 2.5.6
 is there something wrong?
 profile
   idlegacy/id
   activation
   activeByDefaultfalse/activeByDefault
   jdk1.5/jdk
   /activation
   
   properties
   Spring.Version2.0.8/Spring.Version
   /properties
   dependencyManagement
   
   dependencies
   dependency
   groupIdorg.springframework/groupId
 artifactIdspring/artifactId
 version${Spring.version}/version
 /dependency
 dependency
 groupIdorg.springframework/groupId
 artifactIdspring-web/artifactId
 version${Spring.version}/version
 /dependency
 dependency
 groupIdorg.springframework/groupId
 artifactIdspring-webmvc/artifactId
 version${Spring.version}/version
 /dependency
 dependency
 groupIdorg.springframework/groupId
 artifactIdspring-aspects/artifactId
 version${Spring.version}/version
/dependency
   /dependencies
   /dependencyManagement
   build
   resources
   resource
   
 directorysrc\main\resources\ressourcesDev/directory
   /resource
   /resources
   plugins
   plugin
   
 groupIdorg.apache.maven.plugins/groupId
   
 artifactIdmaven-war-plugin/artifactId
   version2.0/version
   configuration
   webResources
   resource
   
 directoryWsService\ressources2/directory
   /resource
   /webResources
   /configuration
   /plugin
   /plugins
   /build
   
   /profile
 
 Brian E Fox wrote:
  
  It's simply asking the core to resolve all the dependencies and then it
  enumerates them. It can be usefull when you just want to see the list of
  deps, or if you are troubleshooting resolution issues, you can quickly
  force everything to be resolved. There is also dependency:tree that will
  give you more info.
  
  -Original Message-
  From: aymen83 [mailto:aymen.bhm...@yahoo.fr] 
  Sent: Monday, December 22, 2008 8:04 AM
  To: users@maven.apache.org
  Subject: Re: mvn dependency:resolve what's it for?
  
  
  ok, thanks for the clarification
  cheers
  
  Brett Randall-2 wrote:
  
 my project was initially compiled with spring 2.5.6 and after that i
  compiled it with spring 2.0.8
  
  How did you enact the change from 2.5.6 to 2.0.8? Did you make a
  hard-change
  to the dependency version, or did you activate a profile?
  
  If you activated a profile, then to see the same results with
  dependency:resolve, you would also need to activate the same profile
  when
  running that goal.
  
  On Mon, Dec 22, 2008 at 10:11 PM, aymen83 aymen.bhm...@yahoo.fr
  wrote:
  
 
  my question is
  if i compile my project with spring 2.0.8 for exemple and i tape mvn
  dependency:reslove the CLI will show that the project was compiled
  using
  it?
 
  i asked this question because my project was initially compiled with
  spring
  2.5.6 and after that i compiled it with spring 2.0.8 so when i tape
  mvn
  dependency:resolve i see spring 2.5.6 so i was wondering if it was
  really
  compiled with version2.0.8? or is there another CLI that can be more
  specific?
 
  thanks
 
 
  Brett Randall-2 wrote:
  
   According to
   http://maven.apache.org/plugins/maven-dependency-plugin/index.html
  ,Spring.Version
  
   dependency:resolve
 
  http://maven.apache.org/plugins/maven-dependency-plugin/resolve-mojo.htm
  l
  tells
   Maven to resolve all 

Re: Release Plugin, ssh and svn Problem

2008-12-19 Thread Martin Höller
On Friday 19 December 2008 Stephen Connolly wrote:
 I am sorry, it is since 18 years I German gelearnt, und my grasp of
 German grammar applied to English cannot decode your question.

I'm a German native speaker and still cannot decode the question :)

 I do not know if Subversion 1.5.5 fixes the issue... only that it it a
 rumor... another solution is to downgrade to Subversion 1.4.x

To give my post at least some value, here is the link to the JIRA issue
and to some recent conversation on the subversion list:
http://jira.codehaus.org/browse/SCM-406
http://www.nabble.com/Maven-scm-tag-does-not-work-with-Subversion-1.5.x-to20930592.html

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: Are Maven profiles like Ant targets?

2008-12-18 Thread Martin Höller
On Wednesday 17 December 2008 Trevor Harmon wrote:
 On Dec 17, 2008, at 12:18 PM, Martin Höller wrote:
  Ok. My approach would then be to create one profile which is only
  executed
  before releasing or when running in the contiuous-integration
  server. This
  profile would configure the antrun plugin to execute install4j, run
  integration tests, and do some other time-consuming work.

 Yes, that's what I've been doing, but you said I was doing it wrong.

In your original mail you tried to use profiles like you would use tasks in 
ant. That's not the maven way and that's what I meant when I was saying you 
are doing it wrong. I never said using profiles is wrong.

  You say it: it runs all of the _configurations_, but it's still only
  _one_
  goal that runs. In this case the 'run' goal of the antrun plugin. The
  antrun plugin is kind of special as it runs ant task within maven,
  which
  doesn't have the concept of tasks.

 The exec plugin is like that too, and I find both to be very integral
 to the development process. Perhaps these plugins need a new feature
 that allows the user to specify which configuration is used.

Yes, maybe. However, adding such a feature is quite equivalent to using 
profiles to select a configuration. And this is how it all started ;-)

- martin


signature.asc
Description: This is a digitally signed message part.


  1   2   3   >