Re: module ordering
Hi, This is a bug in the enforcer plugin. Disabling it from the core-parent pom fixes it. -- Kenney Steve Ebersole wrote: I am having a problem getting multi-module builds to work right. All this stuff is publicly accessible, if someone was willing to take a look and try to help me figure it out. There are a couple of piece of information you'd need: 1) First, you'd need to define the jboss repo in addition to the central repo: repositories repository idjboss/id urlhttp://repository.jboss.com/maven2/url releases enabledtrue/enabled /releases snapshots enabledfalse/enabled /snapshots /repository /repositories pluginRepositories pluginRepository idjboss-plugins/id urlhttp://repository.jboss.com/maven2/url releases enabledtrue/enabled /releases snapshots enabledfalse/enabled /snapshots /pluginRepository /pluginRepositories 2) Check out the parent poms and install them locally: a) http://anonsvn.jboss.org/repos/testhibernate/maven-poms/trunk/core-parent/ b) http://anonsvn.jboss.org/repos/testhibernate/maven-poms/trunk/core-manual-parent/ 3) Check out the project: http://anonsvn.jboss.org/repos/testhibernate/core/trunk/ The situation is that I have a root project (./pom.xml) which defines a number of sub-projects via modules. Some of those sub-projects have dependencies on one another. So for example, ./core/pom.xml is depended upon by a number of other modules. Attempts to run 'mvn install' against the root project fail. They fail in a bizarre fashion. The output shows that maven believes (I think) that ./core/pom.xml has a dependency on ./cache-ehcache/pom.xml. It fails because ./cache-ehcache/pom.xml does then in fact have a dependency back to ./core/pom.xml: [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] Hibernate Core [INFO] Hibernate Ehcache Integration [INFO] Hibernate JBossCache Integration [INFO] Hibernate JBossCache2.x Integration [INFO] Hibernate OSCache Integration [INFO] Hibernate SwarmCache Integration [INFO] Hibernate C3P0 ConnectionProvider [INFO] Hibernate Proxool ConnectionProvider [INFO] Hibernate JMX Module [INFO] Hibernate Testing [INFO] Hibernate Testsuite [INFO] Hibernate Example [INFO] Hibernate Manual (en-US) [INFO] Hibernate Manual (fr-FR) [INFO] Hibernate Manual (aggregator) [INFO] Hibernate Tutorial [INFO] Hibernate Core - Documentation [INFO] Hibernate Core Aggregator [INFO] --- [INFO] Building Hibernate Core [INFO]task-segment: [install] [INFO] --- [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. Missing: -- 1) org.hibernate:hibernate-core:jar:3.3.0-SNAPSHOT Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=org.hibernate -DartifactId=hibernate-c re \ -Dversion=3.3.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=org.hibernate -DartifactId=hibernate-core -Dversion=3.3.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file \ -Durl=[url] -DrepositoryId=[id] Path to dependency: 1) org.hibernate:hibernate-ehcache:jar:3.3.0-SNAPSHOT 2) org.hibernate:hibernate-core:jar:3.3.0-SNAPSHOT -- 1 required artifact is missing. for artifact: org.hibernate:hibernate-ehcache:jar:3.3.0-SNAPSHOT from the specified remote repositories: central (http://repo1.maven.org/maven2), jboss (http://repository.jboss.com/maven2) But, dependency:analyze shows that core really does not have a dep on ehcache module: [INFO] [dependency:analyze] [INFO] Used declared dependencies: [INFO]commons-collections:commons-collections:jar:3.1:compile [INFO]javax.transaction:jta:jar:1.1:compile [INFO]javassist:javassist:jar:3.4.GA:compile [INFO]javax.security:jaas:jar:1.0.01:provided [INFO]ant:ant:jar:1.6.5:provided [INFO]commons-logging:commons-logging:jar:1.0.4:compile [INFO]javax.security:jacc:jar:1.0:provided [INFO]dom4j:dom4j:jar:1.6.1:compile [INFO]cglib:cglib:jar:2.1_3:compile [INFO]asm:asm-attrs:jar:1.5.3:compile [INFO]antlr:antlr:jar:2.7.6:compile [INFO]
Re: [m2] How do I specify the target DIR of a resource with the resource
Yout your resources in src/main/resources/META-INF/ -- Kenney Mick Knutson wrote: I want to put my resources into /META-INF/* But can't find anything about this in the plugin docs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: upgrading from 2.0.4 - 2.0.7?
Hi, If you just _use_ maven 2.0.4, install 2.0.7 and use that. No pom changes required. All modelVersion4.0.0/modelVersion poms currently work with all versions of maven 2.0. -- Kenney Roger Huang (rchuang) wrote: I'm inheriting a project that uses Maven 2.0.4, and want to upgrade to 2.0.7. Can someone please point me information on how I need to modify my existing pom.xml's? I found the changelog for 2.0.7, 2.0.6, and 2.0.5, but it's not clear to me the changes I need to make. http://jira.codehaus.org/browse/MNG?report=com.atlassian.jira.plugin.sys tem.project:changelog-panel thanks, Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Checkstyle plugin - need list of params that can be set
Si_Simon wrote: Where can I find a complete list of parameters that can be set in the configuration section of the Maven2 Checkstyle plugin? http://maven.apache.org/plugins/maven-checkstyle-plugin/checkstyle-mojo.html -- Kenney thanks Si'mon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to get a plugin to see my log4j.xml
Hi, Dennis is abslutely right. There's one other way that doesn't require modification or building of the plugin, but I'm not sure it'll work, though it's worth a shot: create a new maven project that only contains src/main/resources/log4j.xml, mvn install it, and add a dependency on that project to the plugindependencies section for the xfire-maven-plugin. The only thing that may prevent this from working is the classpath order for the plugin itself (if it's own dependencies come before the added one this will not work). This is especially true if the log4j.xml file is in the plugin artifact itself. If you're lucky, the plugin uses log4j.properties; then log4j.xml will take precedence. For testing/debugging this I'd recommend 'jar uvf ~/.m2/repository/org//xfire-maven-plugin/version/xfire-maven-plugin-version.jar log4j.xml' -- Kenney Dennis Lundberg wrote: A log4j configuration should be in src/main/resources for the plugin - not your own project. If xfire-maven-plugin uses log4j for logging it should provide some kind of configuration for it. You could build the plugin yourself and add a suitable logging configuration when you build it. Ryan Moquin wrote: I'm trying to generate classes for a wsdl using the xfire-maven-plugin but I'm running into trouble. I need to get my log4j.xml onto the plugins classpath so that I can see it's logging output, but it won't pick it up like I would have expected from the src/main/resources directory. Is there a way to get the plugin to see the log4j.xml in the src/main/resources directory? Or if it should do this, is there a way to confirm what I'm doing wrong? my other log4j settings appear to work as expected in my tests so I'm doubting it's a config issue. Thanks! Ryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Maven Error - is duplicated in the reactor
Hi, Jo Vandermeeren wrote: On 5/30/07, Stefano Bagnara [EMAIL PROTECTED] wrote: This is not coherent. You say groupId + artifactId + versionId uniquely identify an artifact. So I should be able to manage multiple versions of the same artifact in a single reactor build. What you say should only apply to 2 modules having all 3 values identical... Is this considered a limit of maven? Stefano, The combination of groupId, artifactId, version (and possibly the classifier of a build output) are indeed used to uniquely identify an artifact in a Maven repository. Correct. The module definition is something completely different. For what it's worth.. Here is how I think how module definitions and their resolution work.. A build in Maven starts with a project descriptor (the pom.xml file in the current working directory). This project can be either a single-module project, or a multi-module project. If the project is a single-module project, the reactor sequence is fairly simple. Only this one project is built. If the project contains multiple modules, Maven will take the module names and append them to the current working directory path. The result of this operation is a path to a subdirectory of the current working directory. In this subdirectory, Maven will look for a pom.xml file, which, again, can be either a single-module project or a multi-module project (same logic is applied recursively). Maven will inspect inter-module dependencies and tries to arrange the build sequence in such a way that those module dependencies are built before the module that depends on them. The convention for modules of a pom-packaged project is to use the artifactId as the module name and thus relative directory name. It's the convention, but not a rule. You can have a module name that differs from the artifactId of that module. Because of the chosen strategy (module name as part of the relative directory path), you can not define modules with the same artifactId (=module name) in the parent POM. Yes you can, since modulename!=artifactid. You can have a module a/pom.xml, and copy that to b/pom.xml, and have the parent declare both a and b as modules. That's why you get the 'artifact X is duplicated in the reactor'. Well, actually it is due to the naming convention of modules, I guess. I haven't had the need to give them another name than their artifactId, so I can't be sure of it. Could be that the entries in the reactor are actually identified by resolving the module's POM details to a full artifact path (groupId:artifactId etc..). If so, then my statement is incorrect. Yup, it is. The reactor uniquely identifies projects/modules as groupId:artifactId. Anyway, even then, the module names should still need to be unique. nope ;) Is this a limitation of Maven? Maybe. It is definitely worth a discussion but probably not on the users list. It's definitely a limitation. Maven assumes it'll only build 1 version of 1 module in 1 reactor. It shouldn't, but it does. The reason for this is to avoid recursion, though when the version would be taken into account (in the unique identifier for the module/project), it should be possible to build 2 versions of the same artifact in the same reactor build. Another reason this isn't done is because maven is usually run against some checkout of an SCM like svn, and normally there's only 1 version of a project there. The only reason to build multiple versions of the same artifact in 1 go I can think of, is for maven integration testing. The least you can say about this decision is that it is faster than a lookup in the repository, and it makes the module definition a lot less complex. And in the end, that's what we all want, isn't it :) Maven reads the pom.xml files pointed to by the module path, and when it's building a project, it never looks at the repository for information for that project itself. It does however look at a repository for parents (after trying your workspace first), and dependencies. So.. You can not build multiple versions of a project in one build. But why on earth would you want to build totally different codebases of a project in a single build? That sounds a bit like smashing together irrelevant parts. The only thing I can think of that remotely matches the context of your question is product development with parallel development of different release versions at the same time. But even then, I would not define them as modules of a master build definition and still build them separately. Exactly. There's one other reason you can get this error though; a bug in maven. I had a 2 module project, with the parent residing next to the modules (flat structure). Running 'mvn -r install' gave me the error that the parent was duplicated. Is it something like this that's causing it? -- Kenney Feel free to comment.. Cheers Jo - To unsubscribe,
Re: Ant Plugin Tip
John Stauffer wrote: I am trying to use ant to develop a new packaging type, and have everything working as expected, but have been unable to figure out how to set the artifact file for the project as part of the packaging mojo. According to the docs I've found, if I were using Java for this, I would simply include the following line at the end of the mojo: package.getArtifact().setFile(new File(target/my-output.zip)); that'd be wrong. You should use projectHelper.attachArtifact( project, type, classifier, outputFile ); and have it injected with /** @component */ private MavenProjectHelper projectHelper; in a mojo. Is there a mechanism to do the equivalent in ant? I've tried setting a number of properties in my ant script, but none of them seem to work. The error I end up with is: The packaging for this project did not assign a file to the build artifact. I am trying to do the impossible? Yes, right now there's no way to alter the MavenProject instance from Ant. I don't even think there's an ant task for it atm.. -- Kenney Get the Yahoo! toolbar and be alerted to new email wherever you're surfing. http://new.toolbar.yahoo.com/toolbar/features/mail/index.php - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: calling plugin in another plugin?
張旭 wrote: Thanks to everyone. Now I know there is no way through maven2 api to call another plugin. Am I right? No, but for your sake, let's say yes. ;) According to Jason, it's a bad idea to call one plugin directly in another. Also according to any other maven developer. It's totally against the principals of maven. But I still think it's maybe very convenience to do things like that so I can use functions of other plugin directly and have parameters passed to other plugin totally under my control. If you do this kind of things in a plugin, the POM is no longer descriptive of the process. Your plugin would have an influence on the build, which could change the build. For instance, your plugin could add a dependency depending on the current time (bad example but it illustrates the problem). In this case, the build is no longer repeatable, which is bad. As to using functions of plugins directly: that's not recommended. Plugins/Mojos should be thin wrappers around a library. You'd want to use the library directly. The mojo's not only make those libraries available to your build, but also hook them in in a precise way. And you don't want to control parameters of other plugins - the POM author should control those. In maven 2.1 there is a shared-context component that can be used by plugins to communicate data to eachother, but it will not allow you to call plugins. The only API you are allowed to use if you should depend on another plugin would be the Mojo api: execute(). You can never count on any 3rd party library (the plugin's dependency) being there, as the Mojo is a facade or front-end for those libraries. And you should not depend on another plugin and call it, because you cannot configure it properly - this is dealt with in maven core. Consider this the same limitation as Ant poses. You don't want the 'mkdir' task to have any influence on the 'javac' task. The only communication between these two is through the configuration of those tasks. In ant, there are no 2 tasks that call eachother. Maven mojo's are comparable with ant tasks, though more goal oriented, and no maven mojo will call another mojo directly. Whatever you're trying to accomplish, there's a better, Maven-way, to do it. -- Kenney On 6/7/07, David Jackman [EMAIL PROTECTED] wrote: Here's another situation where I want to have a plugin call another plugin. Can you tell me the right way to accomplish this? In our group we have a release procedure that involves a few more steps beyond running the release:prepare mojo. In fact, some of the parameters into the release:prepare mojo are based on internal standards, so they could be computed automatically. I want to create a single plugin that embodies this entire release process that also calls the release:prepare mojo with the correct parameters as part of that process. This would be another situation where one plugin invokes another plugin. Obviously there is coupling there. What is a better way to achieve this without that coupling (is it even possible)? Would I create a lifecycle within my mojo that puts the necessary data on the bus and invokes the release:prepare mojo as part of that lifecycle (thinking in Maven 2.1terms)? ..David.. -Original Message- From: Kenney Westerhof [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 06, 2007 5:48 PM To: Maven Users List Subject: Re: calling plugin in another plugin? Nunn, Gerald wrote: Jason, It's a bad practice, and leads to coupling between plugins which is bad. We've seen the aftermath of this happening in Maven 1.x. Since I'm doing this already I'm curious how this could be done better and accomplish my goal, I'm a relative newbie to Mojos so I'm wondering if I am missing a better approach. In my case, I needed a plugin that can handle a WebLogic shared library. A shared library is a WAR or EAR that contains many different assets including JARs and in order to be able to use these in Maven I've created a plugin that temporarily unpacks the shared library and installs each JAR individually under a library group name. It also creates a parent POM for the library that can be used to drag in all the dependencies defined by the library. In order to do this, my plugin needs to install each file individually. Rather then rewrite the install plugin, I simply use my invoker class to invoke the install plugin for each file I have unpacked passing in the necessary parameters to make this work. How could I accomplish the same goal using the approach you outlined? This is a one-time setup, and really not part of the build. You should have had those jars in the ears/wars in a repository already. Either create a shellscript for it, or a pom, declaring a dependency on the war/ear (i assume that one _is_ in a repository? if not - it shouldn't be part of the maven build lifecycle). You use the maven-dependency-plugin to unpack the war/ear (for instance in generate
Re: calling plugin in another plugin?
David Jackman wrote: Here's another situation where I want to have a plugin call another plugin. Can you tell me the right way to accomplish this? In our group we have a release procedure that involves a few more steps beyond running the release:prepare mojo. In fact, some of the parameters into the release:prepare mojo are based on internal standards, so they could be computed automatically. I want to create a single plugin that embodies this entire release process that also calls the release:prepare mojo with the correct parameters as part of that process. This would be another situation where one plugin invokes another plugin. Obviously there is coupling there. What is a better way to achieve this without that coupling (is it even possible)? Would I create a lifecycle within my mojo that puts the necessary data on the bus and invokes the release:prepare mojo as part of that lifecycle (thinking in Maven 2.1 terms)? This is the wrong approach - you don't want to wrap the release plugin, but extend it. You could take a look at the release project ( https://svn.apache.org/repos/asf/maven/release/trunk ). The release-manager works with an internal 'lifecycle' of it's own, with phases etc. I'm sure there's a place there where you can attach a component of your own that does the preparation you need. When you found the spot to hook in your functionality, you create a new project in your corp SCM, that has a dependency on release-manager. It declares a components.xml with your component(s) listed, in such a way that the release-manager picks them up and attaches them to the proper phase. Take a look at release/maven-release-manager/src/main/resources/META-INF/plexus/components.xml). The first component declares the phases, the other components implement these phases. Your component declaration in your components.xml would look something like this: component roleorg.apache.maven.shared.release.phase.PreparePhase/role role-hintinput-variables/role-hint implementationcom.yourcompany.maven.release.phase.CustomPreparePhase/implementation /component and your CustomPreparePhase class would implement PreparePhase. then you package this project up, and in your company root pom you declare a pluginManagement section for the release plugin, listing a dependency on your project containing the above, like so: pluginManagement plugins plugin artifactIdmaven-release-plugin/... dependencies dependency groupIdcom.yourcompany.maven artifactIdyour-extension/artifactId version. then whenever you do a release:prepare, your component will be injected into the release manager and be executed. That's imho the proper approach. -- Kenney ..David.. -Original Message- From: Kenney Westerhof [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 06, 2007 5:48 PM To: Maven Users List Subject: Re: calling plugin in another plugin? Nunn, Gerald wrote: Jason, It's a bad practice, and leads to coupling between plugins which is bad. We've seen the aftermath of this happening in Maven 1.x. Since I'm doing this already I'm curious how this could be done better and accomplish my goal, I'm a relative newbie to Mojos so I'm wondering if I am missing a better approach. In my case, I needed a plugin that can handle a WebLogic shared library. A shared library is a WAR or EAR that contains many different assets including JARs and in order to be able to use these in Maven I've created a plugin that temporarily unpacks the shared library and installs each JAR individually under a library group name. It also creates a parent POM for the library that can be used to drag in all the dependencies defined by the library. In order to do this, my plugin needs to install each file individually. Rather then rewrite the install plugin, I simply use my invoker class to invoke the install plugin for each file I have unpacked passing in the necessary parameters to make this work. How could I accomplish the same goal using the approach you outlined? This is a one-time setup, and really not part of the build. You should have had those jars in the ears/wars in a repository already. Either create a shellscript for it, or a pom, declaring a dependency on the war/ear (i assume that one _is_ in a repository? if not - it shouldn't be part of the maven build lifecycle). You use the maven-dependency-plugin to unpack the war/ear (for instance in generate-resources), say to ${project.build.directory}/foo/ and specify a series of executions of the install plugin (for instance in process-resources), each one configured with the location a jar in ${project.build.directory}/foo/. Anyway, this is not recommended practice, but I can see why your plugin is useful. The eclipse plugin has a similar mojo, that scans an eclipse installation directory for plugins and installs each plugin as a maven2 artifact in the local directory
Re: Build of maven 2.0.x branch: test failures
Graham Leggett wrote: On Wed, June 6, 2007 4:53 pm, Jason van Zyl wrote: Just built and it works fine. You on windows? On windows and inside a firewall: --- T E S T S --- Running org.apache.maven.cli.BatchModeDownloadMonitorTest Downloading: null://nullnull/null This looks like an URL that's gone pear shaped. It may be the test falls off the tracks if it cannot reach the net. I have the same output on linux, but the test passes. This isn't the test that fails though, this is: Running org.apache.maven.plugin.PluginParameterExpressionEvaluatorTest Tests run: 11, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.391 sec FAILURE! (later on in the output: Results : Failed tests: testTwoExpressions(org.apache.maven.plugin.PluginParameterExpressionEvaluatorT est) Tests run: 52, Failures: 1, Errors: 0, Skipped: 0 ) can you give me the contents of maven-core/target/surefire-reports/org.apache.maven.plugin.PluginParameterExpressionEvaluatorTest.txt? Mine is: --- Test set: org.apache.maven.plugin.PluginParameterExpressionEvaluatorTest --- Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.631 sec Cheers, Kenney Regards, Graham -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven2: How do I run pre and post test initialization and cleanup scripts
Sidharth Kuruvila wrote: I have a few scripts that I would like to run before the unittests. These are currently shell scripts but I plan on converting them into jython scripts. How do i set things up so that maven executes them? Is there general practice for setting up the environment for running tests.? Several things can be done, depending on the type of tests. Normally the env is set up in the unit tests themselves, by using a testsuite, as maven doesn't have any pre/post test phases. That's fine, because when people run 'mvn test', there's no phase after test run to tear down the env. When your scripts just generate files, you can call them in the prepare-test-(re)sources phase or any *-test-* phase before test itself. If you're starting up databases or similar, this is more like an integration test. we're still working on a solid solution for integration testing though, so I cannot give you the best practise (though you could use maven-it-plugin, but that's still in the sandbox and requires maven 2.1-snapshot). So I think you're best of calling those scripts in the unit tests themselves for the time being. -- Kenney - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NoSuchMethodError with surefire-booter-2.3.1-20070606.032942-4
Hi, I just redeployed all of the surefire artifacts for 2.3.1, so, could you test again and let me know if it's fixed now? I think someone deployed the booter and not the plugin or vice versa. -- Kenney Ole-Martin Mørk wrote: [INFO] Trace java.lang.NoSuchMethodError: org.apache.maven.surefire.booter.SurefireBooter.setUseSystemClassLoader(Z)V at org.apache.maven.plugin.surefire.SurefirePlugin.constructSurefireBooter( SurefirePlugin.java:684) at org.apache.maven.plugin.surefire.SurefirePlugin.execute( SurefirePlugin.java:391) at org.apache.maven.plugin.DefaultPluginManager.executeMojo( DefaultPluginManager.java:412) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals( DefaultLifecycleExecutor.java:534) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle (DefaultLifecycleExecutor.java:475) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal( DefaultLifecycleExecutor.java:454) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures (DefaultLifecycleExecutor.java:306) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments( DefaultLifecycleExecutor.java:273) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute( DefaultLifecycleExecutor.java:140) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) at org.apache.maven.cli.MavenCli.main(MavenCli.java:256) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java :315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java :430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Maven version: 2.0.4 java version 1.6.0_01 Java(TM) SE Runtime Environment (build 1.6.0_01-b06) Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing) AND java version 1.5.0_06 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: calling plugin in another plugin?
Nunn, Gerald wrote: Jason, It's a bad practice, and leads to coupling between plugins which is bad. We've seen the aftermath of this happening in Maven 1.x. Since I'm doing this already I'm curious how this could be done better and accomplish my goal, I'm a relative newbie to Mojos so I'm wondering if I am missing a better approach. In my case, I needed a plugin that can handle a WebLogic shared library. A shared library is a WAR or EAR that contains many different assets including JARs and in order to be able to use these in Maven I've created a plugin that temporarily unpacks the shared library and installs each JAR individually under a library group name. It also creates a parent POM for the library that can be used to drag in all the dependencies defined by the library. In order to do this, my plugin needs to install each file individually. Rather then rewrite the install plugin, I simply use my invoker class to invoke the install plugin for each file I have unpacked passing in the necessary parameters to make this work. How could I accomplish the same goal using the approach you outlined? This is a one-time setup, and really not part of the build. You should have had those jars in the ears/wars in a repository already. Either create a shellscript for it, or a pom, declaring a dependency on the war/ear (i assume that one _is_ in a repository? if not - it shouldn't be part of the maven build lifecycle). You use the maven-dependency-plugin to unpack the war/ear (for instance in generate-resources), say to ${project.build.directory}/foo/ and specify a series of executions of the install plugin (for instance in process-resources), each one configured with the location a jar in ${project.build.directory}/foo/. Anyway, this is not recommended practice, but I can see why your plugin is useful. The eclipse plugin has a similar mojo, that scans an eclipse installation directory for plugins and installs each plugin as a maven2 artifact in the local directory. It doesn't use the install mojo, afaik, but the maven api's. I'm assuming your plugin is similar, in that it can unpack/install wars/ears found in a bea weblogic installation directory? -- Kenney Thanks, Gerald - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Plugin order when all plugins have the same phase
Hi, Can you paste your pom.xml here? If you define 2 (different) plugins in the same phase, they should be executed sequentially (at least with maven 2.0.6). The only reason i can think of that only one of them executes is that you declared the same plugin twice, where the latter will overwrite the first one. If you want to run the same plugin twice, define 2 executions for that plugin. Maybe it's easier to have 2 projects: one with the java as the main artifact, and also running javah to generate the headers and make that a secondary (attached) artifact, with a classifier (is probably done automatically). The second project will contain the c code and have a dependency on the headers artifact. -- Kenney Graham Leggett wrote: Hi all, I have a project that needs to compile three things: - Some java - JNI / javah on the compiled java - Build some C code using ant Ideally all three of these configs need to be in the compile phase, but if I do that, only the JNI build, or the C build will run - not both. I tried putting the JNI stuff and C stuff into the process-classes phase, but again, either one or the other runs, not both. Can anyone explain how plugins can be executed - in order - when they are bound to the same phase? Regards, Graham -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Accessing web source path inside plugin
Hi, Unfortunately there's no pom element that describes the webapp source path, so there's no expression for it.. the war plugin uses src/main/webapp as a default. If you have other plugins that use that directory you have to configure them; unless ofcourse the plugins have a default to src/main/webapp. You could set a property in a pom pointing to that dir and use that expression everywhere you need to configure the webapp location. -- Kenney CasMeiron wrote: Hi guys, im trying trying to acess the path src/main/webapp inside plugin, idk something like: ${project.source.webapp} Where can i find the expression paths?! And i want to know if user can use the expression to tell plugin the new path, like: plugin configuration webPath${project.source.webapp}/webPath /configuration /plugin Tkz. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Maven scm:update
your scm url is wrong. use: scm:svn:https://. -- Kenney Jens Hohl wrote: Hello, how to configure Maven that scm:update will work with HTTPS using SVN ? I get following Error: Embedded error : Can't load the scm provider. No such provider 'HTTPS' ... If it is not possible what to do ? My Current Projekt already using Maven Regards, Jens - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What is the Best practice for generating variations of an artifacts?
Hi, Vincent Massol wrote: Hi, I've never found a good answer to this use case so far so I'm curious about how others have implemented it. Imagine a project that generates a WAR. This WAR contains a config file (say in WEB-INF/classes) that configures connection parameters for the database. Now imagine that your project wants to support several databases and you want the ability to build for a given database. I see 2 options: Option 1 --- * Use filtering * Use profiles to set the values for the different databases Issues: * In order to differentiate the generate WAR file name you'll need to use finalName but the value set there won't be used for install/deploy which means that the WAR files users will see will always be the same. You could use the buildhelper-maven-plugin or the assembly plugin to attach the artifact with a classifier. You can also configure the jar/war plugins with a classifier element. Idea for future: * It would be nice if Maven had a classifier element under project so that it would be possible to generate an artifact with a classifier. That's not an option. The pom is shared between all artifacts, both primary and all secondary attachments. The main artifact is always without a classifier. Option 2 --- * Create one module per database, under a parent module * Create profiles in the parent module to conditionally include the module to be built Issues: * Very heavy (one module per database) especially when the only difference between the generated artifacts is only 3 lines in a config file * Need a way to share common configuration between the modules, in order to prevent duplication. For example if the config files only contains 3 lines that are different for each database and there are 100 lines in total, you don't want to duplicate the 97 lines in as many modules as you have databases What do people do? Is there some plan to support this use case in a better fashion in the future? This is typically solved in several different ways, depending on the role a person has in the team. Standard j2ee practices etc. recommend a 'deployment manager' to either edit WEB-INF/web.xml before deploying, or as an alternative, a 'system manager' will provide you with the name of a JNDI Datasource configured in tomcat's server.xml (or whatever container is used). This latter approach is best since it won't require any modifications to the war. In the case of embedded databases or other circumstances, some other solutions could be: - split the configuration into 2 files: the common file that's the same for each 'classifier', and a database/environment specific file. The modules would then only contain the environment specific file - create the environment specific file using filtering and maven's profile mechanism - package up just 1 war with a property file for all possible environments. Specify a system property or a configuration file or JNDI property that contains the name of the type of environment, and let the webapp load the appropriate property file. Downside is that you cannot use the automatic mechanism of the db provider to load the property file, but you have to supply it in code. I'd go with either profiles for different environments, or just use settings.xml with some properties that need to be configured (so that developers themselves can choose wheter 1 profile is sufficient, or create multiple profiles for different environments). If the only data you want to change is database settings, I'd go with a static JNDI name. HTH, -- Kenney Thanks -Vincent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Project is duplicated in the reactor
Hi, this is a user question and should be posted on the user list. Posting the answer on the user list. Quick answer: you probably have 2 projects with the same groupId/artifactId (copy paste error when creating pom.xml files?). The other possible cause is that you define the same module twice (for instance in a child project you have module../modulename/module somewhere, and the parent has modulemodulename/module. -- Kenney Graham Leggett wrote: Hi all, I am getting a very strange problem with a multiproject build using maven v2.0.4. I get the error project foo is duplicated in the reactor: [INFO] Scanning for projects... [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] Project 'alchemy:alchemy-validation' is duplicated in the reactor [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 1 second [INFO] Finished at: Wed Nov 01 18:37:35 CAT 2006 [INFO] Final Memory: 1M/3M [INFO] Trouble is, I see no evidence of the project being duplicated in the reactor: modules modulealchemy-client/module modulealchemy-hdf/module modulealchemy-mx/module modulealchemy-testing/module modulealchemy-ui/module modulealchemy-validation/module moduleLoginModule/module modulealchemy-trader/module modulealchemy-trader-ear/module modulealchemy-eclipse/module /modules Does anyone know if this is a known bug, or is the error message trying to tell me something completely different? I worked around this previously by commenting out all modules but the first one, and slowly adding all the modules back in. Once all the modules were commented back in, it worked fine. Now suddenly the problem is back. Anyone have any ideas? Regards, Graham -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ftp-wagon : Authentication failed
Your repository id (portal-repository) does not match the server's id. -- Kenney Jeff Mutonho wrote: In my settings.xml I have servers server id165.148.216.14/id usernamemaven/username passwordmaven/password /server /servers and in the top-level pom distributionManagement site id165.148.216.14/id namePortal App Website/name urlscp://165.148.216.14/var/www/html/projects/eportal/url /site repository idportal-repository/id namePortal Repository/name urlscp://165.148.216.14/home/maven/portal-releases/url /repository /distributionManagement When I run 'mvn deploy' , I get prompted for a my password(even though its specified in the settings.xml) .After typing the password , I get the following authentication error message : [INFO] [deploy:deploy] Password for [EMAIL PROTECTED]: maven [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Error deploying artifact: Authentication failed: Cannot connect. Reason: Auth fail [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 26 seconds [INFO] Finished at: Fri Oct 27 10:42:43 CAT 2006 [INFO] Final Memory: 5M/508M [INFO] Q1) Why am I prompted for a password even though I specify one in the settings.xml file? Q2)When I get prompted for a password , the connect string is incorrect : Password for [EMAIL PROTECTED]: The username as stated in the setting.xml is maven and I would expect it to be [EMAIL PROTECTED] . mutonhj is my username on the PC.Why is maven using this to construct the connect string? Jeff Mutonho GoogleTalk : ejbengine Skype: ejbengine Registered Linux user number 366042 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Patching plugins
-SNAPSHOT is newer, which is strange. How is this supposed to work? That makes sense to me. Maven thinks -INTERNAL is a *fixed* version. It's no different than 1.2 or 1.3-beta. It's just some version, deployed at some point in the past. The -SNAPSHOT version is the latest. If you read http://docs.codehaus.org/display/MAVENUSER/Patching+Maven+Plugins, it says Set the version to be -INTERNAL instead of -SNAPSHOT. Thre si not about version number increase and the plugins usually are snapshots. So if snapshot is published, the -INTERNAL will not be used. It doesn't make sense to me. The reason to change SNAPSHOT into another string, like INTERNAL, or FOOBAR, comes from the fact that when you mvn install a SNAPSHOT version, and somebody deploys a new snapshot to a remote repo, then that latter version will be downloaded and considered newer. This used to be not the case. To be completely safe, you should specify the -INTERNAL version in the root pom in a pluginManagement section. So you specify a fixed version, and by using that 'INTERNAL' string, you're safe from new releases. So even if the -INTERNAL is considered newer than -SNAPSHOT, you're still going to get updates if the actual version changes: Say you modify 2.1-SNAPSHOT and deploy as 2.1-INTERNAL. Then when 2.1 or any newer version is released, that newer version will be used. Depending on wheter you want to lift with new releases you decide wheter to set the version in a pluginManagement section or not. On the other hand you could also just deploy the snapshot and specify the fixed timestamp version in the root pom. -- Kenney Thanks, Jan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Server certificate verification failed: issuer is not trusted
Hi, You'll need to install the certificate for the website manually. See http://docs.codehaus.org/display/HAUSMATES/WebDAV#WebDAV-WebDAVInstallingtheAddTrustCAintotheJavaJDK for an example of how to do this. -- Kenney frenchm wrote: Hi, I am try to get continuum to build my m2 multi project continously but get the following error whrn try in to check the code out from source forge: INFO | jvm 1| 2006/10/07 19:02:00 | 2006-10-07 19:02:00,034 [Thread-2] WARN ContinuumScm - Error while updating the code for project: 'Maven Quick Start Archetype', id: '11' to 'C:\Program Files\Mergere\Maestro 1.0.1.20060703\project-server\bin\win32\..\..\apps\continuum\..\..\data\continuum\working-directory\11'. INFO | jvm 1| 2006/10/07 19:02:00 | 2006-10-07 19:02:00,034 [Thread-2] WARN ContinuumScm - Command output: svn: PROPFIND request failed on '/svnroot/storcarman' INFO | jvm 1| 2006/10/07 19:02:00 | svn: PROPFIND of '/svnroot/storcarman': Server certificate verification failed: issuer is not trusted (https://svn.sourceforge.net) INFO | jvm 1| 2006/10/07 19:02:00 | Any ideas of how to solve it? Cheers Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: M2 release plugin snapshot version does not handle new development d
Hi, This is not a bug - the release plugin just updates the module you're releasing. Dependencies should be updated manually, since changing versions might break things. What you could do though is specify ${pom.version} for the version in your dependencies. -- Kenney shinsato wrote: Did you find a solution? I'm noticing the same problem. The POM version is changed from 1.0.0.1-SNAPSHOT to 1.0.0.1 for the release, and then up to 1.0.0.2-SNAPSHOT for the next development. But the internal project dependencies are not changed from 1.0.0.1 to 1.0.0.2-SNAPSHOT. It seems like a definite bug, unless I'm missing something in the way that the POM was supposed to be written. Harold Markku Saarela wrote: Hi, After release:perform snapshot version project pom.xml include dependency versions for dependent projects remains to new release version ex. 1.0a not new development version ex 1.0-SNAPSHOT. I couldn't find anything from google concerning this issue. Is there any way to avoid this. It's annoying because there are over 40 modules in project. Regards, Markku Saarela - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Release Failure [SOLVED]
Hi, The NPE is definitely a bug. But connection IS mandatory, and developerConnection isn't. DeveloperConnection is meant to be an override for connection, if the developer URL (write access) is different from the URL for read-only access. So normally you'd only specify the connection. Btw, this issue seems fixed now in SVN. -- Kenney shinsato wrote: This may or not be a bug in the code (though I think the nullpointerexception is clearly a bug from a user perspective - the failure should be more informative - I've submitted a bug about it in JIRA, MRELEASE-167). But if it isn't a bug, it should be more clearly described in the online documentation. This was an unnecessary waste of several hours, and I can see from the other posts to the nabble forum, I wasn't the first. I'll submit a JIRA issue about this. Cheers, Harold Hi, I've found the reason why release:prepare fails for my project (it's an issue from Chas Douglass' post). The scm section of my pom.xml was like this: scm developerConnectionscm:svn:file:///usr/local/svnrep/xxx/trunk/ developerConnection /scm I downloaded the release plugin sources and checked the write method in the PropertiesReleaseConfigurationStore.java class (this is where the process fails). And I've found, that the method assumes that a connection tag is mandatory inside the scm section. So the (temporary?) solution to this problem is to include both, the connection and developerConnection in the scm section, eg: scm connectionscm:svn:file:///usr/local/svnrep/xxx/trunk/connection developerConnectionscm:svn:file:///usr/local/svnrep/xxx/trunk/ developerConnection /scm I think that this is a bug. The developerConnection should be mandatory, but connection should be optional, because the developerConnection is needed to perform the release:perform. Or at least the process should stop and an apropriate message should send to console. If it's a bug, I will file a JIRA issue and send a patch. What do you think? Regards, Jakub - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Patching plugins
Hi, Not that I'm aware of, but it's basically the same as providing patches for any open source project: check out the source, modify it, svn diff patch and attach the patch to the issue tracker so others can benefit. What part of the wiki is unclear? -- Kenney jan_bar wrote: Hi, I need to patch several plugins, but it seems too complicated to do. I already read http://docs.codehaus.org/display/MAVENUSER/Patching+Maven+Plugins, but I do not fully understand it. Are there any other resources about this topic? Thanks, Jan List of needed patches: * xmlbeans-maven-plugin - use xbeans-2.2 instead of xbeans-2.0 * maven-ejb-plugin - use 2.1-SNAPSHOT (EJB3 support) * xdoclet-maven-plugin - use xjavadoc-1.1-j5-v4, xjavadoc-1.1 chokes on Java 5 annotations - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: M2 release plugin snapshot version does not handle new development d
LAMY Olivier wrote: This is not a bug in case of reactor projects : sure ? Have a look : http://jira.codehaus.org/browse/MRELEASE-91 I have to agree with Mike Perham there. But the fact that dependencies and dependencyManagement are treated differently is a bug, though. I don't think dependencies or dependencyManagement should update dependency versions from stable to snapshots at all, not unless perhaps you explicitly tell the release plugin to do so. Especially when working on a maintenance branch, you only provide bugfix releases, so you want to keep the changes small and not update dependencies except if you really have to. Personnaly, I have trouble using ${pom.version} due to http://jira.codehaus.org/browse/MNG-2339. Ah. Initially I'd say it's not a bug either, but the description is not that clear. I assume it's about using ${project.version} in the plugin POM. I don't see why you using ${pom.version} in your own pom files is affected by that issue.. -- Kenney - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Patching plugins
Hi, So your question is really 'how do I share plugins in my company?'. You'll want to set up a remote repository first see [1]. Next you'll have to add a pluginRepository definition for that url in your companies root pom (or in the top level pom of the project). See [2]. Finally you'll need to deploy the modified plugin to that repository; see [3]. -- Kenney [1] http://maven.apache.org/guides/introduction/introduction-to-repositories.html [2] http://maven.apache.org/guides/mini/guide-multiple-repositories.html for that. [3] http://maven.apache.org/guides/mini/guide-3rd-party-jars-remote.html jan_bar wrote: Thanks Wendy, the ejb plugin works for me too, now I will have to share it with my team. I will try and see... Jan Wendy Smoak [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On 9/30/06, jan_bar [EMAIL PROTECTED] wrote: I need to patch several plugins, but it seems too complicated to do. I already read http://docs.codehaus.org/display/MAVENUSER/Patching+Maven+Plugins, but I do not fully understand it. Are there any other resources about this topic? Not really. Building plugins is always an adventure. For example, some plugins require a snapshot of Maven itself before you can build them. (However, I was just able to build maven-ejb-plugin with Maven 2.0.4, so you may be in luck there.) My advice is to get as far as you can, then ask on the development list or on IRC (#maven at codehaus). -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Yet another question about multi module reporting...
Sure, but you have to do 2 things: 1) edit site.xml and remove the ${modules} (or the menu ref=modules/) 2) configure all plugins to be aggregating in the reports section in the root pom. Not all plugins support aggregation, though, and I'm not sure if that's desirable (i.e. the surefire report, if it's aggregated it might become unreadable). -- Kenney Torsten Curdt wrote: On 8/13/06, Jan Vissers [EMAIL PROTECTED] wrote: Is it possible to have *only* aggregated reports and remove the submodule 'links' at the upper left hand corner of the main index.html page? Well, at least you are not the only one wishing for that... ;-) cheers -- Torsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] xdoclet with MDBs
On Mon, 17 Jul 2006, ertnutler wrote: Hi, The problem is that xjavadoc (the source scanner for xdoclet) only checks sources that are present. So you have to add the 'implements ...' directly to the bean classes, otherwise xjavadoc won't recognize them as bean classes. There's one solution though: you can add a dependency to the plugin tag for the artifact that contains the parent class. -- Kenney hey, all. i have an EJB project that builds an MDB with m2. my problem is that when i use xdoclet in conjunction with this project, it doesn't generate the appropriate deployment descriptors when my MDB bean class inherits from a superclass. when i remove the extends clause and replace it with direct implementation of MessageDrivenBean and MessageListener, it works fine. anybody seen/resolved this problem? my relevant plugin config is below: plugin groupIdorg.codehaus.mojo/groupId artifactIdxdoclet-maven-plugin/artifactId executions execution phasegenerate-sources/phase goals goalxdoclet/goal /goals configuration tasks ejbdoclet verbose=true force=true ejbSpec=2.0 destDir=${project.build.outputDirectory} mergeDir=${project.build.sourceDirectory}/../xdoclet fileset dir=${project.build.sourceDirectory} include name=**/*MDB.java/ /fileset deploymentDescriptor displayname=${name} destDir=${project.build.outputDirectory}/META-INF/ oc4j validateXML=false destDir=${project.build.outputDirectory}/META-INF/ /ejbdoclet /tasks /configuration /execution /executions /plugin -- View this message in context: http://www.nabble.com/-m2--xdoclet-with-MDBs-tf191.html#a5363493 Sent from the Maven - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Executing java code during build
On Mon, 17 Jul 2006, Alexander Rau wrote: Yeah, in principle you are absolutely right. However I just need to execute the main method of a specific class without any additional arguments. That's a pretty generic functionality and the exec plugin proposed by Tim Kettler does the job. Ah ok.. still, the main() method is really just one way of executing that code - there's no reason why you couldn't call that from a plugin.. I tried to write my own plugin and so far it could work if there wasn't a classpath problem. My custom class is not on the classpath of my plugin. Nothing of the project (which uses the custom plugin) is visible on the classpath (from the plugins point of view). Just curious: do I need to write some custom ClassLoader or should that work out of the box ? You should create a new classloader, yes. You can just use the URLClassLoader and add the mavenProject.getRuntimeClasspathElements() and add those. Not all (read: most) plugins don't need the classpath to be filled with the dependencies. Only the unit test and compiler plugins, actually. The rest just operates on the sources/resources/class files themselves, or operate on the dependency files themselves. That's why it doesn work 'out of the box'. But since this is such a popular request, there will probably be a utility method somewhere that constructs your classloader for you, in the near future. -- Kenney Tnx and regards, Alex Kenney Westerhof wrote: On Sat, 15 Jul 2006, Tim Kettler wrote: Hi, This is exactly what plugins are for. I suggest you write a small plugin - a simple Mojo that calls your custom java code should do the trick. See http://maven.apache.org/guides/plugin/guide-java-plugin-development.html -- Kenney Hi, perhaps the exec-maven-plugin [1] is what you want? -Tim [1] http://mojo.codehaus.org/exec-maven-plugin/ Alexander Rau schrieb: Hi all, I need to run a custom java class for generating some stubs. How can I integrate something like that into a pom.xml ? This should be similar to the antrun plugin except that it's java code I want to execute. I've seen that it could be possible by using antrun itself, however a more cleaner way would be nice. Tnx in advance Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: target in antrun
On Wed, 12 Jul 2006, rebels_mascot wrote: Hi, The tasks tag _is_ a target tag; you cannot have target tags in the antrun configuration. It isn't meant to include entire build scripts in the POM, it's just a utility to perform simple ant tasks, things you can put in a target tag in a build.xml. If you want to execute complex build files you should use the ant tag to call your buildfile, or better yet, have a look at how to write ant plugins: http://maven.apache.org/guides/plugin/guide-ant-plugin-development.html -- Kenney Hey all, I'm converting a goal from Maven 1 to Maven 2 using antrun. I've problems with some it do. With: target name=media /target I get: Embedded error: Could not create task or type of type: target. Ant could not find the task or a class this task relies upon. This is common and has a number of causes; the usual solutions are to read the manual pages then download and install needed JAR files, or fix the build file: Is there a target option I can use in ant as a substitute? -- View this message in context: http://www.nabble.com/%3Ctarget%3E-in-antrun-tf1931494.html#a5290712 Sent from the Maven - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Executing java code during build
On Sat, 15 Jul 2006, Tim Kettler wrote: Hi, This is exactly what plugins are for. I suggest you write a small plugin - a simple Mojo that calls your custom java code should do the trick. See http://maven.apache.org/guides/plugin/guide-java-plugin-development.html -- Kenney Hi, perhaps the exec-maven-plugin [1] is what you want? -Tim [1] http://mojo.codehaus.org/exec-maven-plugin/ Alexander Rau schrieb: Hi all, I need to run a custom java class for generating some stubs. How can I integrate something like that into a pom.xml ? This should be similar to the antrun plugin except that it's java code I want to execute. I've seen that it could be possible by using antrun itself, however a more cleaner way would be nice. Tnx in advance Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] maven-it-plugin
On Wed, 12 Jul 2006, Adam Hardy wrote: Hi, It was an attempt of mine to be able to fork test projects like maven-core-it/*/ in projects themselves. The idea is that you create src/it/project1/pom.xml, src/it/project2/pom.xml etc. and use those poms to do integration tests on the completed artifact, using the pom to set up and run the tests. What is your setup, what are the problems you're experiencing, and what are you trying to accomplish? I basically wanted a way to test .war files and maven plugins in the project itself. The test phase doesn't have access to the packaged artifact, but the integration-test phase does. When I started the plugin, there was no pre-integration-test and post-integration-test phase, and I needed more than 1 phase to deploy the .war, run the tests, and undeploy it (for instance). Right now you could just use the pre-integration-test phase to deploy the war and compile the integration test sources, the integration-test phase to run your unit tests using surefire, and the post-integration-test to clean up after the test. But maybe a simple project in src/it/ is easier. It's still in the sandbox, unfortunately, until there's some really good purpose for it. Maybe your usecase will help. -- Kenney Integration testing is getting too big and lengthy for our app and I want to move it so that we don't have to run them during normal builds. i.e. we can configure continuous integration to run them seperately. I can see maven-it-plugin in the sandbox and I can see a couple of emails in the archive and also this JIRA issue: http://jira.codehaus.org/browse/MNG-1922 which makes me wonder, what is it for? I tried setting it up but couldn't figure out the configuration. Is anybody using? Adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Effective-pom and junit M2
On Wed, 12 Jul 2006 [EMAIL PROTECTED] wrote: Hi, Dependencies specified in dependencyManagement are not added as dependencies. They just specify defaults for projects that _do_ specify those dependencies - they could only specify groupId and arfifactId, the version and scope will be set from the depMgt section. So in your case, either add a dep on junit to the child projects that need junit, or remove the dependencyManagement opening and closing tags from the parent project. -- Kenney Hi, I have a multi project set-up in M2 - version 2.0.4. I have set up a pom containing things that I want to apply across all modules (such as certain reports - PMD, Macker, Checkstyle, etc). If I include a dependency management in there (e.g) dependencyManagement dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency /dependencies /dependencyManagement Why, at a module level do I get the error that Junit packages cannot be found ? I have referred to the other pom via the parent tag. I have run the mvn help:effective-pom and I can see Junit is a dependency, but code can't seem to see it. I have seen a bug reported in 2.0.2 of maven and some further discussion around it. Jira says it is fixed, but am I just seeing that it has been reintroduced ? http://jira.codehaus.org/browse/MNG-2068 Thx Andy -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to configure attached tests?
On Thu, 6 Jul 2006, Paul Spencer wrote: Hi, (Maven 2.0.4) I have configured my project to use an attached test per the Guide to using attached tests, http://maven.apache.org/guides/mini/guide-attached-tests.html, but the attached tests are not running. You can only use the tests by extending them - they're in the classpath but only test classes from target/test-classes (or src/test/java/) are being run. So just create an empty class that extends from your unit tests from the imported test artifact. The surefire plugin currently doesn't scan all .class files in all .jars for available tests. I'm not sure if that is what surefire is going to support, though. But the documentation certainly suggests that it works this way. -- Kenney 1) I have verified the test class exist in test jar, foo-SNAPSHOT-test.jar. 2) I am using the command mvn test, but the attached test are not being run. The attached test jar is listed in the classpathElements display by mvn -X test Paul Spencer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Generating ejb-client jar
On Tue, 20 Jun 2006, Jo Vandermeeren wrote: Hi, Several things: - Here's what I've got in a working pom: project modelVersion4.0.0/modelVersion nameProject EJB/name groupIdcom.mycompany/groupId artifactIdproject-ejb/artifactId packagingejb/packaging build plugins plugin artifactIdmaven-ejb-plugin/artifactId configuration generateClienttrue/generateClient /configuration /plugin /plugins /build /project the excludes you specified are the default - all **/*Bean.java are excluded. - You specified **/mtracker-ejb/*Bean.java as an exclude. You should know that this applies to src/target/classes/, and so 'mtracker-ejb' will be seen as the part of a package. But package names cannot have '-' in them so this is illegal. (I'm pretty sure you cannot find a 'mtracker-ejb' subdirectory anywhere in target/classes/). Maven scans target/classes, applies your filter, and then creates the archive. - But all the above does not matter - the default includes still apply. Try running 'mvn -X install' on your ejb project. You should see exactly what files are included and what jars are created: [INFO] [ejb:ejb] [INFO] Building ejb project-ejb-1.0-SNAPSHOT [INFO] Building jar: ./target/project-ejb-1.0-SNAPSHOT.jar [DEBUG] adding directory META-INF/ [DEBUG] adding entry META-INF/MANIFEST.MF [DEBUG] adding directory com/ snip [INFO] Building ejb client project-ejb-1.0-SNAPSHOT-client [INFO] Building jar: .../target/project-ejb-1.0-SNAPSHOT-client.jar [DEBUG] adding directory META-INF/ [DEBUG] adding entry META-INF/MANIFEST.MF [DEBUG] adding directory com/ snip [INFO] [INFO] BUILD SUCCESSFUL [INFO] If you can't figure out what happens, please send the output of mvn -X install. HTH, -- Kenney Hi there, I'm playing around with the Better builds with maven book.. I'm following chapter 4.. I have defined a parent POM that contains 2 modules: mtracker-ejb and mtracker-web.. The web module should depend on the ejb-client jar of the ejb module. ** But I can't seem to get the EJB module to produce the ejb-client jar artifact.. I have this in my EJB module's POM: build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-ejb-plugin/artifactId configuration generateClienttrue/generateClient clientExcludes clientExclude**/mtracker-ejb/*Bean.class /clientExclude /clientExcludes /configuration /plugin [...] This snippet is in the web module's POM: dependencies dependency groupIdmtracker/groupId artifactIdmtracker-ejb/artifactId version${pom.version}/version typeejb-client/type /dependency [...] When I do a mvn install on the EJB module, it does not generate an ejb-client module ** Also, IntelliJ doesn't seem to recognize this module as an EJB module, although the EJB module's POM has packaging set to ejb.. Any help on this would be appreciated.. Regards, Jo -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: antrun classpaths
On Tue, 13 Jun 2006, Lee Meador wrote: Try pasting this in the pom.xml in place of the ant/ tag. Shouldn't matter, but who knows. Maybe you're still using maven-antrun-plugin 1.0, try adding version1.1/version below the plugin tag. -- Kenney path id=axis.classpath path refid=maven.runtime.classpath/ /path taskdef resource=axis-tasks.properties classpathref=axis.classpath / On 6/12/06, Kenney Westerhof [EMAIL PROTECTED] wrote: On Mon, 12 Jun 2006, Lee Meador wrote: Hi, I can't reproduce this with 'inheritRefs=true'. What do you have in your build.xml? -- Kenney I went to here to see how to let ant get to some maven classpaths: http://maven.apache.org/plugins/maven-antrun-plugin/classpaths.html I have a build.xml file that I run with this in my pom: build plugins plugin artifactIdmaven-antrun-plugin/artifactId executions execution phasegenerate-sources/phase goals goalrun/goal /goals configuration tasks ant inheritRefs=true target=axisWsdl2Java antfile=build.xml dir=. / /tasks sourceRoot${project.build.directory }/generated-sources/java/sourceRoot /configuration /execution /executions /plugin /plugins /build But it complains that: [ERROR] BUILD ERROR [INFO] [INFO] Error executing ant tasks Embedded error: The following error occurred while executing this line: [path here]\build.xml:31: Reference maven.runtime.classpath not Any ideas? Is the doc page up to date? Thanks. -- -- Lee Meador Sent from gmail. My real email address is [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- Lee Meador Sent from gmail. My real email address is [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Error looking up lifecycle mapping to retrieve optional mojos
modelVersion4.0.0/modelVersion groupIdossj.jsr264/groupId artifactIdoss_om_spec_model/artifactId version0.8-PUBLIC_DRAFT/version packagingtigerstripe-application/packaging build sourceDirectorytarget/tigerstripe.gen/sourceDirectory plugins plugin groupIdossj.jsr264/groupId artifactIdmaven-tigerstripe-plugin/artifactId version1.0/version extensionstrue/extensions /plugin /plugins /build /project Andreas Ebbert-Karroum Senior Software Design Engineer - Nokia Networks Services / Middleware phone: +49-211-94123928, fax: +49-211-94123838 Heltorfer Straße 1, 40472 Düsseldorf, Germany This message is confidential. If you have received this message in error, please delete it from your system. You should not copy it for any purpose, or disclose its contents to any other person. Internet communications are not secure and therefore Nokia GmbH does not accept legal responsibility for the contents of this message as it has been transmitted over a public network. Thank you. Nokia GmbH, Nokia Networks is a German Company. Further information about the Company is available from its principal offices at Heltorferstrasse 1, D-40472, Düsseldorf, Germany and from the website at http://www.nokia.com/ --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cactus plugin?
On Mon, 12 Jun 2006 [EMAIL PROTECTED] wrote: Hi, I believe there's nothing usable yet, but I could be wrong. In the mean time you could use the maven-antrun-plugin to call the cactus ant tasks. It's not ideal but it'll help you migrate. You could also take a look at http://maven.apache.org/guides/plugin/guide-ant-plugin-development.html. -- Kenney Hi, I have heard that Cactus plugin for Maven 2 is currently under development. For us, it is the last peace of the puzzle for lossless migration from maven 1 to maven 2. Is there any alpha or beta version of maven 2 cactus plugin available? Thanks a lot for the great job you are doing! Vitaliy Shevchuk This message and any attachments (the message) is intended solely for the addressees and is confidential. If you receive this message in error, please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval. The internet can not guarantee the integrity of this message. BNP PARIBAS (and its subsidiaries) shall (will) not therefore be liable for the message if modified. - Ce message et toutes les pieces jointes (ci-apres le message) sont etablis a l'intention exclusive de ses destinataires et sont confidentiels. Si vous recevez ce message par erreur, merci de le detruire et d'en avertir immediatement l'expediteur. Toute utilisation de ce message non conforme a sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L'internet ne permettant pas d'assurer l'integrite de ce message, BNP PARIBAS (et ses filiales) decline(nt) toute responsabilite au titre de ce message, dans l'hypothese ou il aurait ete modifie. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: include dependencies in a plugin
On Mon, 12 Jun 2006, rebels_mascot wrote: You have to manually add the spring-jdbc dependency to your pom. -- Kenney I'm using the spring-mock plugin and also need the spring-jdbc, the spring-jdbc is a dependency in the spring-mock pom but is set to optional true. How do I set the spring-mock dependency to include the spring-jdbc? -- View this message in context: http://www.nabble.com/include-dependencies-in-a-plugin-t1774087.html#a4828762 Sent from the Maven - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [M2] Struts and XDoclet
On Mon, 12 Jun 2006, [ISO-8859-1] R�my Sanlaville wrote: I see a lot of spaces in the POM, especially includes=**/* Form.java This might prevent the Form files from being detected. -- Kenney Hi, I try to use XDoclet with Maven 2 in order to generate Struts (v1.2.9) descriptors (struts-config.xml and validation.xml). All seems to be OK, but in the struts-config.xml file the form Bean section is empty ! !-- == Form Bean Definitions === -- form-beans !-- If you have non XDoclet forms, define them in a file called struts-forms.xml and place it in your merge directory. -- /form-beans If I try in the same project with ANT, I have no trouble !-- == Form Bean Definitions === -- form-beans form-bean name=BookSearchForm type=test.struts.model.form.BookSearchForm / !-- If you have non XDoclet forms, define them in a file called struts-forms.xml and place it in your merge directory. -- /form-beans Do you have any idea ? R�my My pom.xml : ?xml version= 1.0?project modelVersion4.0.0/modelVersion groupIdtest/groupId artifactIdlibrary/artifactId nameProject for managing a library/name version1.0-SNAPSHOT/version packagingwar/packaging dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency dependency groupIdlog4j/groupId artifactIdlog4j/artifactId version1.2.13/version optionaltrue/optional /dependency dependency groupIdstruts/groupId artifactIdstruts/artifactId version1.2.9/version /dependency dependency groupIdorg.apache.geronimo.specs/groupId artifactIdgeronimo-j2ee_1.4_spec/artifactId version1.0/version scopeprovided/scope /dependency /dependencies build plugins plugin groupId org.codehaus.mojo/groupId artifactIdxdoclet-maven-plugin/artifactId dependencies dependency groupId javax.servlet/groupId artifactIdservlet-api/artifactId version2.4/version scopeprovided/scope /dependency /dependencies executions execution phasegenerate-sources/phase goals goalxdoclet/goal /goals configuration tasks webdoclet destdir=${project.build.directory}/${ project.build.finalName}/WEB-INF excludedtags= @version,@author verbose= true fileset dir=${project.build.sourceDirectory} include name=**/* Form.java / include name=**/*Action.java / /fileset strutsconfigxml mergeDir= ${basedir}/src/main/webapp/WEB-INF/merge validatexml= true version= 1.2/ strutsvalidationxml validatexml= true version= 1.1.3/ /webdoclet /tasks /configuration /execution /executions /plugin /plugins /build /project -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: antrun classpaths
On Mon, 12 Jun 2006, Lee Meador wrote: Hi, I can't reproduce this with 'inheritRefs=true'. What do you have in your build.xml? -- Kenney I went to here to see how to let ant get to some maven classpaths: http://maven.apache.org/plugins/maven-antrun-plugin/classpaths.html I have a build.xml file that I run with this in my pom: build plugins plugin artifactIdmaven-antrun-plugin/artifactId executions execution phasegenerate-sources/phase goals goalrun/goal /goals configuration tasks ant inheritRefs=true target=axisWsdl2Java antfile=build.xml dir=. / /tasks sourceRoot${project.build.directory }/generated-sources/java/sourceRoot /configuration /execution /executions /plugin /plugins /build But it complains that: [ERROR] BUILD ERROR [INFO] [INFO] Error executing ant tasks Embedded error: The following error occurred while executing this line: [path here]\build.xml:31: Reference maven.runtime.classpath not Any ideas? Is the doc page up to date? Thanks. -- -- Lee Meador Sent from gmail. My real email address is [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Parent vs. Multi Project super pom
On Mon, 12 Jun 2006, Stephen Duncan wrote: Hi, I'd thought I'd throw in a pair of $0.01.. Using the aggregating POM as the parent pom implies that the projects are structured in a directory structure matching the child-parent relationship. That means that the child-parent relationship is the inverse of the parent-module relationship. A simple sample is the grouping of a set of plugins. Since they're siblings in the directory structure, the parent pom can easily serve as the parent pom, defining all things common to plugins. But like you, I've also found that this sometimes gives problems, since there's no multiple inheritance. In my case it was when working on a project that consists of two applications, both EARs each containing a WAR using the same web framework (and thus sharing some settings and dependencies). The modules were grouped by application, and using the parent-as-aggregator there's no way to let both WAR projects have the same settings if they're not siblings in the directory structure. There's also some common POM configuration for the two applications (for instance the groupId's). Basically, there are too many relations to fit into a tree (it becomes a graph), and you just have to pick the one that makes the most sense. In my experience, it's convenient to have the parent pom as an aggregator so your project tree is actually a tree. On a side note, there are some plugins, like the site plugin, that currently kind of expect the parent-module relationship to be bidirectional (meaning modules must specify the aggregator as their parent). The behaviour of this plugin depends on whether it's run in reactor-mode or not, and when the modules define different parents, you get unexpected results. But this is being addressed. -- Kenney I personally do more as you do. I have team-wide super-POMs I have a primary one that has basic url, issue management, etc. type settings. Then I have a core POM with common dependencyManagment section to encourage use of the same versions of Jar's to prevent incompatibilities, as well as common reporting configuration. Then I have a webapp parent POM that specifically states the provided dependencies for webapps to be deployed to our target server, as well as webapp specific stuff, such as setting finalName${project.artifactId}/finalName to remove the version number from wars, and wtpVersion1.0/wtpVersion for the Eclipse plugin. For multi-module project, I have an aggregating POM that defines the modules, but each module uses the appropriate super-POM as its parent, not the aggregating POM. I've found this to work better for us. But I too have been wondering what the reasoning for the pattern of using the aggregating POM also as the parent POM is... -Stephen On 6/12/06, Stefan Hübner [EMAIL PROTECTED] wrote: Hi all, this is kind of a best-practise-question about your habbits of using the concepts of multi-project-super-pom. First of all, are there distinctive terms commonly agreed upon for each of those concepts? Second, those two ways of using POMs appear to me to be orthogonal to each other, really. Parent POMs are used to define common characterisitics for a group of projects. Multi Project POMs on the other hand aggregate modules belonging to a greater project. I usually have the habbit of defining two diffent poms for multiproject situations. e.g.: /multiproject-pom X -parent-pom Y -module A / pom A (parent pom: Y) -module B / pom B (parent pom: Y) In most examples found though (e.g. in maven's own sources themselfs) typically multi project poms at the same time are used as parent poms for those modules they aggregated. So, what I can't get my head around yet is, is it just a matter of habbit or taste to combine those two usages in just one POM? or am I really missing something important here, if I define two distinctive POMs the way described above. I'm thinking about this for quite a while now and any clarification would be much appreciated. Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Stephen Duncan Jr www.stephenduncanjr.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Maven 2 ant run plugin - error in multi project build
) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) at org.apache.maven.cli.MavenCli.main(MavenCli.java:256) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.PluginManagerException: Unable to find the mojo 'org.apache.maven.plugins:maven-antrun-plugin:1.0:run' in the plugin 'org.apache.maven.plugins:ma ven-antrun-plugin' at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPlugin Manager.java:533) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManage r.java:390) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLife cycleExecutor.java:534) ... 16 more Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: Component descriptor cannot be found in the component repository: org.apache.maven.plugin.Mo joorg.apache.maven.plugins:maven-antrun-plugin:1.0:run. at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.jav a:323) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.jav a:312) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.jav a:440) at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPlugin Manager.java:524) ... 18 more - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: + JBoss Embedded EJB3 and Surefire Plugin Maven 2 PROBLEM+
:208) at junit.framework.TestSuite.run(TestSuite.java:203) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.maven.surefire.junit.JUnitTestSet.execute( JUnitTestSet.java:210) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet( AbstractDirectoryTestSuite.java:135) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute( AbstractDirectoryTestSuite.java:122) at org.apache.maven.surefire.Surefire.run(Surefire.java:129) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess( SurefireBooter.java:225) at org.apache.maven.surefire.booter.SurefireBooter.main( SurefireBooter.java:747) Caused by: java.lang.NoClassDefFoundError at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.loadMBeanServer( EJB3StandaloneBootstrap.java:357) at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.boot( EJB3StandaloneBootstrap.java:329) ... 22 more Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.203 sec FAILURE! Results : Tests run: 2, Failures: 0, Errors: 2, Skipped: 0 [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] There are test failures. [INFO] [DEBUG] Trace org.apache.maven.BuildFailureException: There are test failures. at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals( DefaultLifecycleExecutor.java:555) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle (DefaultLifecycleExecutor.java:475) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal( DefaultLifecycleExecutor.java:454) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures (DefaultLifecycleExecutor.java:306) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments( DefaultLifecycleExecutor.java:273) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute( DefaultLifecycleExecutor.java:140) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) at org.apache.maven.cli.MavenCli.main(MavenCli.java:256) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java :315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java :430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures. at org.apache.maven.plugin.surefire.SurefirePlugin.execute( SurefirePlugin.java:403) at org.apache.maven.plugin.DefaultPluginManager.executeMojo( DefaultPluginManager.java:412) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals( DefaultLifecycleExecutor.java:534) ... 16 more [INFO] [INFO] Total time: 2 seconds [INFO] Finished at: Sat Jun 03 11:38:10 CEST 2006 [INFO] Final Memory: 3M/7M [INFO] (ivan) [591] -- -- Serge Emmanuel Pagop Java EE Consultant and Trainer E-Mail: [EMAIL PROTECTED] Skype-Name: sisepago Cell : +49-172-8552687 -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: + JBoss Embedded EJB3 and Surefire Plugin Maven 2 PROBLEM+
On Sat, 3 Jun 2006, Serge Emmanuel Pagop wrote: Hi Kenney, here is my resources and my testResources configuration. Is that ok? Looks fine, but: resources resource directorysrc/java/resources/META-INF/directory includes includepersistence.xml/include /includes targetPathMETA-INF/targetPath you could also just point to src/java/resources/ and set the includes to META-INF/persistence.xml and leave out the target path, OR even better: move src/java/resources to src/main/resources and drop the entire resource. /resource /resources testSourceDirectorysrc/test/java/testSourceDirectory ^^ this is the default, you can leave it out testResources testResource directorysrc/test/resources/directory Idem, this is the default. you can leave this out, unless you need to specify the includes because there are also files that need to be excluded. Btw, why do you have the testResources in the default location, but the main resources in src/java/resources? Btw, is the ClassCastException fixed now? -- Kenney includes includedefault.persistence.properties/include includejndi.properties/include includeembedded-jboss-beans.xml/include includeejb3-interceptors-aop.xml/include includelog4j.xml/include includesecurity-beans.xml/include includelogin-config.xml/include /includes /testResource /testResources On 6/3/06, Serge Emmanuel Pagop [EMAIL PROTECTED] wrote: On 6/3/06, Kenney Westerhof [EMAIL PROTECTED] wrote: On Sat, 3 Jun 2006, Serge Emmanuel Pagop wrote: Just out of curiosity, where are your java sources located in this structure? src/java/main/java/ ? -- Kenney no, my java sources is locates in this directory src/main/java -- -- Serge Emmanuel Pagop Java EE Consultant and Trainer E-Mail: [EMAIL PROTECTED] Skype-Name: sisepago Cell : +49-172-8552687 -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Binding a plugin execution to a lifecycle phase JUST for one packaging type
On Sat, 3 Jun 2006, Akbarr wrote: Hi, that's not possible, unless you make your own packaging which I'd recommend against. You can specify the binding in pluginManagement in the root pom, and then you only have to specify the plugin in the children (you can leave out the executions, just specify plugingroupId/artifactId//plugin in the pom's you want to run it on. you could also just specify it in the build section of the root pom, but then it'll be executed in all modules (except those with packaging 'pom'). This should be harmless, though. On a side note, if you generate sources or resources, you better link the xdoclet plugin to the generate-sources or generate-resources phase, so sources get compiled. Plus, it documents better what it's for. -- Kenney Hi, First of all, let me say I think Maven 2 is great. The major problem was the lack of documentation, but I think it's been ove with the upcoming of the book Better builds with Maven. I'd like to do something, but I'm not sure it's possible. I know how to bind a plugin execution to a lifecycle phase, but I wonder if it'd be possible to make this bind only for some determined packaging types. Of course, this binding would be done in a parent POM. For instance, execution of Hibernate doclet: plugin groupIdorg.codehaus.mojo/groupId artifactIdxdoclet-maven-plugin/artifactId executions execution phasecompile/phase goals goalxdoclet/goal /goals configuration tasks mkdir dir=${project.build.sourceDirectory} / hibernatedoclet excludedtags=@version,@author,@todo mergeDir=${project.build.outputDirectory} destDir=${project.build.outputDirectory} fileset dir=${ project.build.sourceDirectory} include name=**/*.java / /fileset hibernate version=2.0 mergeDir=${project.build.outputDirectory} destDir=${project.build.outputDirectory} / /hibernatedoclet /tasks /configuration /execution /executions /plugin I like this to be executed in every child project with jar packaging. Thanks in advance, Akbarr -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [M2] How to change log level of maven?
On Fri, 2 Jun 2006, Szczepan Faber wrote: How to change log level of maven? I mean the output on the console when you launch mvn goal. By default I guess that 'INFO' level is applied. Yes, the default is INFO. You can enable DEBUG by specifying the '-X' option. Currently these are the only loglevels that are accessible through the commandline. -- kenney - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] XDoclet generated resources problem
On Thu, 1 Jun 2006, ozeebee wrote: Hi, Ok thanks I was just wondering why the xdoclet plugin was adding the generated-sources/xdoclet dir to the maven sources but not the generated-resources/xdoclet to the resources It's because I'm lazy. :) File a JIRA issue and it'll get fixed. Thanks, Kenney -- View this message in context: http://www.nabble.com/-m2-+XDoclet+generated+resources+problem-t1685663.html#a4660881 Sent from the Maven - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: site child module listing
On Wed, 31 May 2006, Mike Perham wrote: you're not running 'mvn -N site' by any chance? do the sites for the modules get generated? Do the modules define the correct parent version in the parent section? try ${modules} instead of menu ref=modules/ and see if that works - might be a bug, although it should work. -- kenney I have the following in my site.xml: menu ref=parent/ menu ref=modules/ menu ref=reports/ When the site is generated, I see the parent and I see the reports but I do not see the child modules list. The associated POM does have a modules list and each entry in that module list has the associated POM as its parent. So what do I need to do to get the child modules to show up? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: changelog null pointer exeception
] Thanks, Raghu -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] assembly from parent
On Tue, 30 May 2006, Deane Morrow wrote: Hi, just add a phasepackage/phase to the execution tag and it should work just fine. -- Kenney Hi, I have an application that follows the standard Maven project layout: parent--modules. Each module produces a jar. There is an additional module that contains the scripts required to run and configure the application. I am attempting to use the assembly plugin to bundle up the scripts with all the module jars to produce the final application artifact. I can use the assembly plugin fine from within a module. I can't seem to get the assembly plugin to fire from the parent however. Ideally, I'd like to be able to: - configure an assembly descriptor in the parent - run 'mvn package' from the parent - have Maven package each module, then - have the assembly from the parent produce the (parent) application artifact Does anyone know if this is possible? It seems that the 'pom' packaging type in the parent may be hindering the assembly. If this is the case, is there any way to achieve the above? The assembly plugin is configured in the parent as follows. I believe it binds to the package phase by default? build ... plugins ... plugin artifactIdmaven-assembly-plugin/artifactId executions execution idassemble/id configuration descriptors descriptorsrc/main/assembly/descriptor.xml/descriptor /descriptors /configuration goals goalassembly/goal /goals /execution /executions /plugin ... /plugins ... /build Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to locate local repo in Mac-OSX(how to call ant from maven)
On Mon, 29 May 2006, Chandrika wrote: Hi, First, you've got a typo in the /configuration tag ('confiiguration') so I doubt you're getting a 'build successful'. Next, you're missing the plugin definition; you need artifactIdmaven-antrun-plugin/artifactId in the plugin tag. Finally, I assume your pom.xml contains a project tag around the build tag, and your build.xml contains a project tag around the target tag? If all the above are fixed, then it should work just fine. My guess is that you've hand-modified your original pom and build.xml in pasting to this E-Mail, so something else might be wrong. -- Kenney Hi, running mvn compile invokes maven's style of compilation which results in creating maven's directory structure as target/classes etc...im ok to have my pjt to follow the structure...but, i need my war file to get deployed directly in my app-server...for which im using ant build scripts...however,maven's install does it in local_repository... if maven cannot invoke ant's build script, what is the purpose of the plugin antrun:run??? 'compile' is the phase under which im trying the goal 'run'...i tried a simple projectsay, Sample...under sample i have pom.xml and build.xml...my build script echoes 'hello world'... my pom.xml follows as build plugins plugin executions execution phasecompile/phase configuration tasks ant inherit='true' antfile=build.xml target='prepare'/ /tasks /confiiguration goals goalrun/goal /goals /execution /execution /plugin /plugins /build My build.xml is as follows target name='prepare' echoHello world/echo /target Running mvn antrun:run from project's root directory gives the o/p as build successful...but, it is not running my build script...my echo is not seen in output any one could really help me on how to execute ant's build script with maven??? Thanks in advance Chandrika -- View this message in context: http://www.nabble.com/Unable+to+locate+local+repository+in+Mac-OSX-t1698478.html#a4621068 Sent from the Maven - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to locate local repo in Mac-OSX(how to call ant from maven)
On Mon, 29 May 2006, Chandrika wrote: hias u expect i had hand modified iti have the proper typo and artifactId in my pomthere are no syntax/typo or missing tag errors...but, let me know invoking antrun really runs the build.xml also, is there any other tasks that i can try for debugging the problem? or any other goal i can try to run...could u give a simple example that invokes the antrun plugin??? Sure.. pom.xml: --- project xmlns=http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdtesting/groupId artifactIdtestantrun/artifactId packagingwar/packaging version0.1-SNAPSHOT/version nameTestAntRun/name build plugins plugin artifactIdmaven-antrun-plugin/artifactId executions execution phasecompile/phase configuration tasks echo message=Hello world from pom.xml!/ ant antfile=build.xml target=test inheritAll=true property name=warFile value=${project.build.directory}/${project.build.finalName}.war/ /ant /tasks /configuration goals goalrun/goal /goals /execution /executions /plugin /plugins /build /project -- build.xml: project name=Test target name=test echoHello world, from build.xml file! (warFile: ${warFile})/echo /target /project Output from 'mvn compile': [INFO] Scanning for projects... [INFO] [INFO] Building TestAntRun [INFO]task-segment: [compile] [INFO] [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] [INFO] No sources to compile [INFO] [antrun:run {execution: default}] [INFO] Executing tasks [echo] Hello world from pom.xml! test: [echo] Hello world, from build.xml file! (warFile: /vol/home/forge/work/sandbox/m2test/antrun/test/target/testantrun-0.1-SNAPSHOT.war) [INFO] Executed tasks [INFO] [INFO] BUILD SUCCESSFUL [INFO] [INFO] Total time: 1 second [INFO] Finished at: Tue May 30 07:39:35 CEST 2006 [INFO] Final Memory: 4M/7M [INFO] but if I were you i'd link the ant task to the 'package' phase, so it can operate on the .war file. -- Kenney Thanks Chandrika -- View this message in context: http://www.nabble.com/Unable+to+locate+local+repository+in+Mac-OSX-t1698478.html#a4621311 Sent from the Maven - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Subclassign AbstractAntMojo
On Sat, 27 May 2006, Wilfred Springer wrote: Hi, take a look at xdoclet-maven-plugin, it subclasses the antrun plugin. See https://svn.codehaus.org/mojo/trunk/mojo/xdoclet-maven-plugin. -- Kenney All, I tried to subclass AbstractAntMojo for another project, and I fail to see how to configure it correctly. I figured that either the existing components.xml fiel in maven-antrun-plugin would be picked by the classloader, or otherwise add a components.xml file of my own to src/main/resources in my own file. No matter what I try, my own plugin gets an NPE somewhere in executeTasks, and I don't see why. Since I have been working from my intuition only, I assume that I just don't have a clue on how to do this properly. So the question is if anybody has ever given this a try and knows what to do to make it work? Thanks, Wilfred -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] Getting SNAPSHOT information into a webapp
On Tue, 23 May 2006, Mark Chaimungkalanont wrote: Maven writes a property file in the jar or war at /META-INF/maven/groupId/artifactId/pom.properties. For jars you can use a classloader to find that resource, but in the case of a WAR the META-INF is not part of the classpath so you'd have to use the servlet api to get the path to that file. Code snippet: public static String getVersion( String groupId, String artifactId ) throws IOException { ClassLoader cl = Thread.currentThread().getContextClassLoader(); Properties props = new Properties(); String propFileName = META-INF/maven/ + groupId.replace( '.', '/' ) + / + artifactId + /pom.properties; InputStream a = cl.getResourceAsStream( propFileName ); if ( a == null ) throw new IOException( Cannot find ' + propFileName + ' ); props.load( a ); return props.getProperty( version ); } -- Kenney Guys, We're using Maven2 and wanted to know the best way to get version information (including the SNAPSHOT timestamp, e.g. 1-0-SNAPSHOT-20050622 or sth) into a webapp that was built with the mvn package? My guess is that there is a property ${maven.snapshot.version} or something that we can use to generate a properties file so that the app can read this information. Perhaps a filter copy plugin against one of the goals? Does anything know any references around this area? Have anyone got examples they can share? Thanks, Mark C - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to notify developers that test(s) fail?
On Mon, 22 May 2006, Dave Hoffer wrote: You might want to take a look at continuus integration systems, like Continuum (or CruiseControl or). I'm sure you wouldn't want to send a mail from the pom itself, because then somebody will be spammed on each build by anyone.. ;) -- Kenney What is the best practice in m2 of notifying developers that a test(s) failed? I am working on generating the surefire test reports and I have found that a recent file check-in has broke 1 test. How can I continue with the build process and notify the developer that he broke the build? Ideally, this hate mail could go to just the offending developer but in any case I need an HTML report that shows what test failed and why. What is the best way to do this? -dh -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2.0.4] -Dmaven.test.skip=false won't override settings.xml -- bug or intentional?
On Fri, 19 May 2006, Max Cooper wrote: I have maven.test.skip set to true in my settings.xml. The tests are still skipped when I run 'mvn -Dmaven.test.skip=false install'. Is this a bug or is it intentional? After examining the code it seems that it's a bug. The code in MavenCli states that 'System properties are most dominant'. However, the PluginParameterExpressionEvaluator tries the system properties as a final resort. Since this is used everywhere in Maven changing this will have a huge impact. I wouldn't count on it to be fixed soon, but you should file a JIRA issue for this anyway. In trying to find a workaround I found another 'bug': if you add a second profile, not activated by default, say 'blah2', with the maven.test.skip property set to false, then you should be able to specify -Pblah2 to reset that property to false. However, this currently doesn't work either. But I've fixed that in svn, so this workaround should work for 2.0.5. (see MNG-2309). For now, I suggest the following workaround: define a profile that activates if a certain system property X is NOT set. That profile defines maven.test.skip=true. If you specify -DX=.. then that profile is NOT activated and maven.test.skip will be it's default value: false. X could ofcourse be defined as 'maven.test.skip'. -- Kenney SAME QUESTION, MORE DETAIL: === I have maven.test.skip set to true in my ~/.m2/settings.xml file. I did it like this: settings profiles profile idblah/id properties maven.test.skiptrue/maven.test.skip /properties /profile /profiles activeProfiles activeProfileblah/activeProfile /activeProfiles /settings Sometimes, I would like to set it to false, overriding the setting from my profile. I would like to do this on the command line, like so: mvn -Dmaven.test.skip=false install However, my setting on the command line seems to be ignored. The tests are still skipped, even if I set maven.test.skip=false in this manner. I find this behavior to be surprising. I would expect the value I expressed on the command line to override any settings from pom.xml or settings.xml. So I wondered if perhaps the surefire plugin was ignoring the value of the property and just checking if the property was set or not. In other words, I wondered if setting maven.test.skip to 'false' (or 'carrots', or anything) would have the same effect as setting it to true. To test, I removed maven.test.skip from my settings.xml file and set the value on the command line. I found that surefire does indeed pay attention to the value. Setting maven.test.skip=true would skip the tests, but setting maven.test.skip=false would not skip the tests. So it seems that the value in my settings.xml file cannot be overridden on the command line. Is this a bug, or is this intentional? If it is intentional, why? It seems to me that property values specified explicitly on the command line should override any property values from pom.xml or settings.xml files. Thanks, -Max - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: project.properties and outputDir
On Sat, 20 May 2006, Marco Mistroni wrote: Hi, Hello all, sorry i pressed 'Send' befor efinishing the message m wrote: hi all, i m trying to build an .ear and output to a deploy directory specified in my project.properties, but M2 keeps on cojmplaining that either i put in outputDirectory the value of hte property or i specify the property via commandline -D project.properties does not work in M2. i have written a settings.xml file and i have placed it in my DocumentAndSettings\Me\m2, It should probably be in ..\Me\.m2\ but still maven is complaining i am using maven-2.0.4, here's my pom.xml and settings.xml [snip] You defined outputDirectory${deploy.directory}/outputDirectory. Maven would probably create a directory ./${deploy.directory}... ** settings.xml ** settings profiles profile activation activeByDefault/ Remove these lines: property namedeployDir/name valueC:\Sw\jboss-4.0.4RC1\server\default\deploy/value /property /activation and this one: properties/ and put this here: properties deploy.directoryc:\/deploy.directory /properties /profile /profiles /settings -- Kenney i am running evrything by typing mvn clean install anyone could help? thanks and regards marco -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: project.properties and outputDir
On Sat, 20 May 2006, Marco Mistroni wrote: Hi, Hello Kenney, thanx for suggestion,but still getting [snip] settings profiles profile You should add a profile id: idsomething/id activation activeByDefault/ Sorry, missed this. You should put activateByDefaulttrue/activeByDefault here. /activation properties deploy.directoryC:\Sw\jboss-4.0.4RC1\server\default\deploy /deploy.directory /properties /profile /profiles Or you can put activeProfiles activeProfilesomething/activeProfile /activeProfiles here. /settings -- Kenney - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cannot find jar
On Thu, 18 May 2006, Adrian Pillinger wrote: Not really a Maven question, but: groupId: avalon-framework artifactId: avalon-framework-api Version: 4.5.1 although avalon is dead for about 8 years now IIRC.. Using Jacorb by any chance? -- Kenney Does anyone know which jar in the maven repo contains the following package? org.apache.avalon.framework.configuration Thanks! -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Maven2 versus JAXB
On Wed, 17 May 2006, Franz Fehringer wrote: Hello, You perhaps missed this part in the instructions: 'Download This plugin will be added to the Maven 2 ibiblio repository and also to the java.net repository but we would like your feedback first. If you have praises or problems with this plugin please post your email by joining the mailing list for [EMAIL PROTECTED] by registering here https://jaxb.dev.java.net/servlets/ProjectMailingListList. In the meantime you can download the lastest plugin version from this link and expand the .zip contents into your local %HOMEPATH%/.m2/repository directory.' The repository does indeed not contain the plugin, so you must download it manually. By the way, the repository is a Maven 1 repository, so the layoutlegacy/layout is needed. If this doesn't work, you can also try the jaxb2 plugin @ http://mojo.codehaus.org/jaxb2-maven-plugin. I wonder which one was first.. maybe the two plugins can be merged somehow? -- Kenney Hello, I followed the instructions on https://jaxb.dev.java.net/jaxb-maven2-plugin/ without success. On mvn -U compile i get ERROR] BUILD ERROR INFO] INFO] The plugin 'com.sun.tools.xjc.maven2:maven-jaxb-plugin' does not exist or no valid version could be found This is with Maven 2.0.4. There is neither com.sun.tools.xjc.maven2 nor maven-jaxb-plugin on https://maven-repository.dev.java.net/repository, but there are javax.xml.bind and maven-javanet-plugin. Could i use these in an appropriate way (how?)? My pom.xml is project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdde.isogmbh.aoo/groupId artifactIdiso-app/artifactId packagingjar/packaging version1.0-SNAPSHOT/version nameMaven Quick Start Archetype/name urlhttp://maven.apache.org/url repositories repository idjava.net/id namejava.net Maven Repository/name urlhttps://maven-repository.dev.java.net/repository/url !-- layoutlegacy/layout -- /repository /repositories dependencies dependency groupIdjaxb/groupId artifactIdjaxb-api/artifactId version2.0/version /dependency dependency groupIdjaxb/groupId artifactIdjaxb-impl/artifactId version2.0/version /dependency dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency /dependencies build plugins plugin groupIdcom.sun.tools.xjc.maven2/groupId artifactIdmaven-jaxb-plugin/artifactId executions execution goals goalgenerate/goal /goals /execution /executions /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId configuration source1.5/source target1.5/target /configuration /plugin /plugins /build /project -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why does Maven 2 keep trying to download stuff that i put in my local repository
On Sat, 13 May 2006, Alexandre Poitras wrote: Well Maven usually tell you when there is a new plugin available and ask you if you want to install it but if you answer no, I guess you are never asked again. Also, you have to be sure you haven't declared which plugin version to use in your pom. I haven't seen Maven 2 ask me anything like that, yet. Maven 1 does, IIRC. :) Updating plugins is pretty easy in m2: just specify the '-cpu' argument (see mvn --help). -- Kenney On 5/12/06, Stefan Arentz [EMAIL PROTECTED] wrote: On 5/12/06, Kenney Westerhof [EMAIL PROTECTED] wrote: Have you checked your local repo? The pom should be there. It is :-) Thanks! I guess it is good practice to dump the local repository once in a while to get new versions of the plugins. S. -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why does Maven 2 keep trying to download stuff that i put in my local repository
On Fri, 12 May 2006, Stefan Arentz wrote: I think that, even though you specified -DgeneratePom=true, there's no ~/.m2/repository/javax/persistence/ejb/3.0/ejb-3.0.pom. [snip] [INFO] Installing /Users/stefan/Development/Java/hibernate- entitymanager-3.1.0.Beta8/lib/ejb3-persistence.jar to /Users/stefan/.m2/repository/javax/persistence/ejb/3.0/ejb-3.0.jar there should be another line telling you that the pom was installed. [snip] I think you're somehow stuck with an old maven-install-plugin. Try deleting ~/.m2/plugin-registry.xml (or just the lines for the maven-install-plugin), and delete the ~/.m2/repository/org/apache/maven/plugins/maven-install-plugin/ directory, then mvn install again. -- Kenney On 5/12/06, Wayne Fay [EMAIL PROTECTED] wrote: Reinstall the file and specify -DgeneratePom=true. Wayne On 5/12/06, Mike Perham [EMAIL PROTECTED] wrote: Is the pom in your repo or just the jar? -Original Message- From: Stefan Arentz [mailto:[EMAIL PROTECTED] Sent: Friday, May 12, 2006 11:29 AM To: Maven Users List Subject: Why does Maven 2 keep trying to download stuff that i put in my local repository This question will probably have a one line answer, but I seriously can't find any hints. I put the EJB3 jar in my own local repository. Works great. However, every time I run Maven it still does this: Downloading: http://repo1.maven.org/maven2/javax/persistence/ejb/3.0/ejb-3.0.pom [WARNING] Unable to get resource from repository central ( http://repo1.maven.org/maven2) There is really no point. But it keeps trying :-) Is there any way to turn this off? S. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why does Maven 2 keep trying to download stuff that i put in my local repository
On Fri, 12 May 2006, Stefan Arentz wrote: [snip] Yup. No ~/.m2/repository/javax/persistence/ejb/3.0/ejb-3.0.pom I don't have a plugin-registry.xml. There is a ~/.m2/repository/org/apache/maven/plugins/maven-install-plugin/2.0 though. And I just deleted it. Now when I add the EJB3 jar, I see this: [snip] [INFO] Installing /Users/stefan/Development/Java/hibernate- entitymanager-3.1.0.Beta8/lib/ejb3-persistence.jar to /Users/stefan/.m2/repository/javax/persistence/ejb/3.0/ejb-3.0.jar It did get a newer version of the maven-install-plugin, 2.1, but it did not install a pom file. My bad, it doesn't print 2 lines - memory corruption :) Have you checked your local repo? The pom should be there. -- Kenney - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Plugin to compile C and C++ projects
On Fri, 12 May 2006, Vandermi Joao da Silva wrote: Hi, http://mojo.codehaus.org/maven-native/native-maven-plugin/ -- Kenney HI everyone, is there a plugin to compile and generate documentation and reports for C and C++ using Maven2? If yes , where can I find the plugin and documentation? Best Regards Vandermi Silva RD MAO - Core Engines BenQ Eletroeletr�nica Ltda. TEL +55(92) 2127-8015 Mobile: +55(92) 8125-2248 FAX +55(92) 2127-8102 [EMAIL PROTECTED] www.BenQMobile.com Av. Djalma Batista, 536 - S�o Geraldo Manaus-AM Brasil -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] release:prepare - subversion problem
On Thu, 11 May 2006, Jos van der Heiden wrote: Hoi Jos, I'm having a problem with release:prepare. [snip] When maven tries to create a tag, it gets an error back from subversion: svn: Source url 'svn://myhost/myrepo/trunk' is from different repository [snip] developerConnectionscm:svn:svn://myhost/myrepo/trunk/developerConnection Any ideas what is going on here? Yes: your checkout is from another repository than you specified in the pom. Try this: grep url .svn/entries (or look at a line with 'url=...' in the file if you're on windows). Either you used a different protocol, for instance https, to check it out, or you're using a different hostname (an alias maybe?). Groeten, Kenney - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven-source-plugin 2.0.1
On Thu, 11 May 2006, Roland Asmann wrote: The source plugin needs to run the generate-sources phase, else it might miss something in creating a jar. This was indeed fixed in 2.0.1. If you do 'mvn clean source:jar' on a source-generating project, the jar won't contain the generated sources. Usually the sources are only generated when you deploy, so if you run 'mvn source:jar deploy' it won't generate the sources twice. Neither will it do that if you bind it to package. -- Kenney Hi, I've noticed that the new version of this plugin forks a new lifecycle... Can anybody clarify why this has been done? My builds are getting very slow because of this, since I have a pretty large source-code generator in the generate- sources phase... Are there any other changes compared to 2.0? If not, I think I'll move back to that one... Thanks, Roland - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven-source-plugin 2.0.1
On Thu, 11 May 2006, Roland Asmann wrote: The way I see it, it runs through the generate-sources phase no matter what! The 2.0.1 is per default bound to the package phase, and I just run 'mvn clean install', which triggers everything up to 'package' twice... Ok, but package implies that generate-sources is run anyway. It shouldn't run things twice, though. Are you using maven 2.0.4? Btw, IIRC the sources plugin skips execution if you're not doing a release (-DperformRelease=true). So even without the source plugin you end up generating the sources, but you know that. So, are you telling me that if you use maven-sources-plugin 2.0 an 'mvn clean install' only generates the sources once, and if you use 2.0.1, they get generated twice? When is the sources-plugin run anyway? Did you bind it to a phase in the pom, or are you specifing -DperformRelease=true, or..? -- Kenney Roland On Thursday 11 May 2006 19:48, Kenney Westerhof wrote: On Thu, 11 May 2006, Roland Asmann wrote: The source plugin needs to run the generate-sources phase, else it might miss something in creating a jar. This was indeed fixed in 2.0.1. If you do 'mvn clean source:jar' on a source-generating project, the jar won't contain the generated sources. Usually the sources are only generated when you deploy, so if you run 'mvn source:jar deploy' it won't generate the sources twice. Neither will it do that if you bind it to package. -- Kenney Hi, I've noticed that the new version of this plugin forks a new lifecycle... Can anybody clarify why this has been done? My builds are getting very slow because of this, since I have a pretty large source-code generator in the generate- sources phase... Are there any other changes compared to 2.0? If not, I think I'll move back to that one... Thanks, Roland - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [1.1] Hung build - threaddump
) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java :95) at org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag( MavenGoalTag.java:78) at org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.performAction (MavenGoalTag.java:109) at org.apache.maven.werkz.Goal.fire(Goal.java:656) at org.apache.maven.werkz.Goal.attain(Goal.java:592) at org.apache.maven.werkz.WerkzProject.attainGoal(WerkzProject.java :210) at org.apache.maven.jelly.tags.werkz.MavenAttainGoalTag.doTag( MavenAttainGoalTag.java:114) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java :95) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java :186) at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:42) -- Esse quam videri (to be rather than to seem) -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: M2 Assembly pack files into root
On Sun, 7 May 2006, Martin Vysny wrote: Yes, add includeBaseDirectoryfalse/includeBaseDirectory to the descriptor file. -- Kenney Hello, the assembly plugin creates an archive with the filestructure rooted in a /$artifactId-$version/ directory. However I am trying to build an eclipse plugin .jar which requires files to be placed in the root of the archive. Is there a way to achieve this? Sincerely, Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Parent Pom: Needs some do as I say, not as I do
On Sat, 6 May 2006, Brett Porter wrote: Isn't this behaviour the default anyway? Appending the module's artifactId to the parent's url? -- Kenney I think this would be a worthwhile addition to JIRA. I'm not sure if it's already in there. I know it was pointed out as an issue a while ago and we were going to look at changing the behaviour from automatic append to controlled appending by expressions like you've highlighted in a future version of the POM. Would you mind filing it? - Brett On 5/6/06, Howard Lewis Ship [EMAIL PROTECTED] wrote: I think there needs to be some additional POM elements that allows a parent POM to provide defaults to a child POM that are different from the values used by the parent POM itself. Here's an example: In my parent POM, I want to say urlhttp://tapestry.apache.org/tapestry5//url But I want all my child modules to use the URL: urlhttp://tapestry.apache.org/tapestry5/${pom.artifactId}/url I could see this expressed, in my parent pom, as something like: project ... urlhttp://tapestry.apache.org/tapestry5//url ... childDefaults urlhttp://tapestry.apache.org/tapestry5/${pom.artifactId}/url /childDefaults ... -- Howard M. Lewis Ship Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Jakarta HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Parent Pom: Needs some do as I say, not as I do
On Sat, 6 May 2006, Torsten Curdt wrote: There's logic behind that.. project URL and scm URL's are indeed modified in the children, but that's necessary. If they didn't you'd get collisions, i.e. 2 module's sites overwriting each others html files, or 2 modules sources being overwritten in a repository. I think these are sensible defaults that can be overridden. But the urls mentioned above MUST be different for modules, so just inheriting by default will produce problems. Everything that doesn't have to be different is 'straightly inherited'. -- Kenney Isn't this behaviour the default anyway? Appending the module's artifactId to the parent's url? AFAIU it currently depends on the semantics of the tag whether there is straight inheritance or not ...which is IMO not very consistent cheers -- Torsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] Plugin and SNAPSHOT woes
On Wed, 3 May 2006, Toni Price wrote: Hi, Hello Maven users I am new to Maven 2 (and Maven itself), trying to set up a basic project infrastructure for a multi-module project. It is a great tool but I am bumping into many problems with plugins: for example trying something like 'mvn jxr:jxr' results in a failed build because the plugin does not seem to be available. Browsing the Maven site and repositories generally does not help because there are many broken links which lead nowhere. In any event, I have made some progress by enabling a Snapshot profile in my settings.xml and managed to download snapshot versions of some plugins. One of the problems I now have is that since I've specified the versions for my own project modules as snapshots, every time I run a build Maven tries to get updates of my own modules from the central repository. I don't know how to keep the Snapshot profile activated, yet prevent this behaviour for my own project modules. Can anyone help me with this? For now, there's no solution to that. Maven _should_ check once a day but it might do so on every build. This is already fixed in SVN and will be fixed in 2.0.5 or 2.1. As for specifying which repositories to use for which artifacts, that's currently being worked on. One way to make Maven faster is to run with '-o'. It'll still print 'checking for updates for...' but it doesn't connect to ibiblio. Also, I have tried putting in a dependencyManagement section to specify a preference for certain plugin versions but this does not have any effect. For example, I've found through trial and error that I need version 2.1-SNAPSHOT of the maven-checkstyle-plugin to get it to work together with jxr (I want the checkstyle report to create links to the jxr docs), but even when I put the version in the dependencyManagement section Maven still tries to download and use version 2.0 of the plugin (which doesn't seem to support the integration with jxr?). Plugins are not really dependencies. You can set a default version for plugins in the pluginManagement section. Another problem I've had is that trying to run 'mvn pmd:check' as set out on pg. 181 of the Maven 2 Book gives the error 'Required goal not found: pmd:check'. Does anyone know if this is a typo or am I doing something wrong? (The book's errata page on the Mergere website is currently empty). I tried to find the source code to see if I could gain any insight but went round in circles a lot with broken links etc. (and I can't always tell whether I'm looking at something that relates to Maven 1 or Maven 2 ...) Hm, it doesn't work here either. 'mvn pmd:pmd' works though. You'll need a newer version than 2.0-beta-1, though there's no newer release. The author of that part must have used a locally built version. What links are broken, exactly? I'm sure a lot of these things are simply a result of not understanding how to configure Maven correctly ... any help with it would be appreciated! So far it seems you're doing OK.. -- Kenney Thanks and regards, Toni -- View this message in context: http://www.nabble.com/-m2-Plugin-and-SNAPSHOT-woes-t1548994.html#a4207684 Sent from the Maven - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] Plugin and SNAPSHOT woes
On Wed, 3 May 2006, Toni Price wrote: snip What links are broken, exactly? Well here I've been pretty bad and not noted them. One I do remember specifically (though this is plugin documentation, but I think I have also had some problems trying to get to Subversion-related URLs), if you go to http://maven.apache.org/plugins/ and click on the jxr link (http://maven.apache.org/plugins/maven-jxr-plugin) then you get a Page Not Found response. I have the impression (though this may be magnified in my mind ...) that this seems to happen quite a lot. Indeed. Somebody messed up! :) Also, on a related note, I am very confused by whether plugins are called (for example) maven-jxr-plugin or jxr-maven-plugin. The Maven 2 book says clearly to use the former, yet the only way I could get it to work was by fiddling until Maven somehow downloaded a plugin called jxr-maven-plugin. Do you know of any documentation that sheds some light on this? I think there's some wiki doco on this, but generally the rules are this: - maven core plugins use maven-XXX-plugin, groupId org.apache.maven.plugins - mojo.codehaus.org plugins use XXX-maven-plugin, groupId org.codehaus.mojo - your own plugins can be named whatever you like, but generally maven-XXX-plugin with your company's groupId is used. We've been moving some plugins from mojo to maven core, so some of them are renamed. There are also some older plugins on mojo.codehaus.org that still use the old naming convention (maven-XXX-plugin). Hope this sheds some light on the situation! -- Kenney Thanks for your help! Toni -- View this message in context: http://www.nabble.com/-m2-Plugin-and-SNAPSHOT-woes-t1548994.html#a4208553 Sent from the Maven - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Probelm with persistence.xml
On Tue, 2 May 2006, Anshuman Srivastava wrote: Hi, Every ejb module has its own persistence manager, so you really need 2 persistence.xml files (unless I'm wrong..) I've got one in src/main/par/META-INF/persistence.xml - you're using the packagingpar/packaging, right? -- Kenney Hi I have a multi module project.My problem is that 2 of my ejb modules have the depedency upon peristence.xml, which is at the same location as pom.xml. How to define the dependency in pom.xml for peristence.xml?? My persistence.xml is like-- ?xml version=1.0 encoding=UTF-8? persistence persistence-unit name=dms transaction-type=JTA providerorg.hibernate.ejb.HibernatePersistence/provider jta-data-sourcejava:/OracleDS/jta-data-source classcom.dms.dao.RepositoryDAO/class properties property name=hibernate.dialect value=org.hibernate.dialect.SQLServerDialect / property name=hibernate.hbm2ddl.auto value=none / property name=hibernate.show_sql value=false / /properties /persistence-unit /persistence Pleasehelp. Thanks in advance Anshuman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Probelm with persistence.xml
On Tue, 2 May 2006, Anshuman Srivastava wrote: Thanks Kenny for your reply.I am not using packagingpar/packaging.I am using packagingjar/packaging as I thought that building jar is sufficient for my final deployable war file. well, that depends. You don't need par, jar works fine too. For a war, you need packaging war but you already knew that. If you want to use persistence archives from a WAR you'll need to add a dependency from the war to the par, and you need to separately deploy the par (or put it in an ear). And you are correct that every ejb module has its own persistence manager,I have 2 persistence.xml in 2 ejb modules. Ah ok, I misunderstood your mail then. Do I need to change packaging as par ?Any other changes required i pom.xmlfor depenedncy on persitsence.xml?I am a first time user of Maven and dont know much about EJB. No you don't need packaging par, since a par is just a jar. The par plugin is still in the sandbox anyway. If you need to automagically get your persistence.xml in the archive, then just put it in src/main/resources/META-INF/persistence.xml and it'll end up in the correct place. You don't need a dependency to do that. -- Kenney Anshuman On 5/2/06, Kenney Westerhof [EMAIL PROTECTED] wrote: On Tue, 2 May 2006, Anshuman Srivastava wrote: Hi, Every ejb module has its own persistence manager, so you really need 2 persistence.xml files (unless I'm wrong..) I've got one in src/main/par/META-INF/persistence.xml - you're using the packagingpar/packaging, right? -- Kenney Hi I have a multi module project.My problem is that 2 of my ejb modules have the depedency upon peristence.xml, which is at the same location as pom.xml. How to define the dependency in pom.xml for peristence.xml?? My persistence.xml is like-- ?xml version=1.0 encoding=UTF-8? persistence persistence-unit name=dms transaction-type=JTA providerorg.hibernate.ejb.HibernatePersistence /provider jta-data-sourcejava:/OracleDS/jta-data-source classcom.dms.dao.RepositoryDAO /class properties property name=hibernate.dialect value=org.hibernate.dialect.SQLServerDialect / property name= hibernate.hbm2ddl.auto value=none / property name=hibernate.show_sql value=false / /properties /persistence-unit /persistence Pleasehelp. Thanks in advance Anshuman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2/m2-book] MANIFEST.MF and Class-Path.
On Tue, 2 May 2006, Sean McNamara wrote: On page 45 of the new maven book, it states: The original contents of src/main/resources can be found starting at the base of the JAR and the application.properties file is there in the META-INF directory. You will also notice some other files there like META-INF/MANIFEST.MF, as well as a pom.xml and pom.properties file. These come standard with the creation of a JAR in Maven. You can create your own manifest if you choose, but Maven will generate one by default if you don't. I'm in a situation where I need to specify entries in the Class-Path attribute in MANIFEST.MF. Putting the manifest file in src/main/resources/META-INF/ results in a manifest being generated by maven, and the one in resources being stored under WEB-INF/classes/META-INF. Did I misunderstand this portion of the book? No, but war packaging is different. The normal contents of a JAR go in WEB-INF/classes/ if packaging is a war. Normally compiled classes are put in /, but not in the case of a war. So maybe the book was being to general in this case. Ideally, I would be able to accomplish what I'm after by specifying the addClasspath attribute for the WAR archiver, but doing this includes all jars with the default scope in the classpath which is not what I'm after. Default scope items should be bundled inside the WEB-INF/lib folder of the war as normal, but there are a couple that are provided inside the application EAR and these are what I'd like to add to the manifest classpath. What do you mean by 'default scope'? addClasspath will add all dependencies with scope compile/runtime. If you want other jars, you'll have to wait a bit for a new Maven version as this is not configurable yet. Btw, it's not that bad to have too many jars in the manifest; only the ones that exist will be used. On the other hand, usually all needed jars for a WAR should be in WEB-INF/lib - in your case, the war only works when it's deployed within an ear, and is no longer usable as a standalone webapp (using remote or local interfaces). Also classloading for enterprise modules differs per container, so it's not a given that this classpath idea will even work properly. -- Kenney Any pointers? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JUnit Eclipse vs. Maven Question
On Tue, 2 May 2006, Stephen Duncan wrote: Sorry, forgot to mention that I tried with forkMode set to once with it set to pertest. Still didn't work. Could it be that systemProperties aren't passed to the JVM when it's forked? They are only set afterwards? Took me some digging, but the system properties are loaded after the jvm is started. The only way to define them in time is to define command line arguments to the jvm: argLine-Djava.library.path=/argLine AND use forkMode once or pertest. You could also configure environment vars like LD_LIBRARY_PATH but that's not really portable. Hope this helps, -- Kenney -Stephen On 5/2/06, Kenney Westerhof [EMAIL PROTECTED] wrote: On Tue, 2 May 2006, Stephen Duncan wrote: Hi, The library path is only scanned on JVM startup; you can't modify it later and expect the JRE to load any additional libraries. You'll have to use forked tests for that to work. Try configuring the surefire plugin to have forkModeonce/forkMode, for instance. -- Kenney I have a colleague with a problem running a JUnit test. It works in Eclipse, but not with Maven. Basically, he uses a class that needs to load a native library. The location of a directory to look for this native .so object is specified with java.library.path. Initially, this value was not being set correctly because you must specify it using systemProperties, not argLine. We fixed that, and now a debug output indicates that System.getProperty(java.library.path) does return correctly. However, the error indicating that the native library could not be found persists. Any ideas on where else to look or tips on troubleshooting? -- Stephen Duncan Jr www.stephenduncanjr.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Stephen Duncan Jr www.stephenduncanjr.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with Continuum and Maven
On Mon, 1 May 2006 [EMAIL PROTECTED] wrote: Try running it from the machine/user that continuum is running from, with -e, and see what the error is. There's probably some mirror configured in settings.xml on either your account or continuums. Maybe DNS or firewalling is not working properly on the machine running continuum? Can't really tell without the stacktraces you get when running with -e. -- Kenney I try to have Continuum do a build with clean install as the tasks. mvn clean install works just fine from the command line, but it absolutely refuses to work inside Continuum. Here is the output. Hopefully somebody can help! Thanks and sorry if I'm posting to the wrong mailing list... I wasn't sure if this was a Maven problem or a Continuum one! [INFO] artifact org.apache.maven.plugins:maven-clean-plugin: checking for updates from dotsrc [WARNING] repository metadata for: 'artifact org.apache.maven.plugins:maven-clean-plugin' could not be retrieved from repository: dotsrc due to an error: Error transferring file [INFO] Repository 'dotsrc' will be blacklisted [INFO] artifact org.apache.maven.plugins:maven-clean-plugin: checking for updates from ibiblio [WARNING] repository metadata for: 'artifact org.apache.maven.plugins:maven-clean-plugin' could not be retrieved from repository: ibiblio due to an error: Error transferring file [INFO] Repository 'ibiblio' will be blacklisted [INFO] artifact org.apache.maven.plugins:maven-clean-plugin: checking for updates from codehaus-plugins [WARNING] repository metadata for: 'artifact org.apache.maven.plugins:maven-clean-plugin' could not be retrieved from repository: codehaus-plugins due to an error: Error transferring file [INFO] Repository 'codehaus-plugins' will be blacklisted [INFO] artifact org.apache.maven.plugins:maven-clean-plugin: checking for updates from apache-plugins [WARNING] repository metadata for: 'artifact org.apache.maven.plugins:maven-clean-plugin' could not be retrieved from repository: apache-plugins due to an error: Error transferring file [INFO] Repository 'apache-plugins' will be blacklisted [INFO] artifact org.apache.maven.plugins:maven-clean-plugin: checking for updates from central [WARNING] repository metadata for: 'artifact org.apache.maven.plugins:maven-clean-plugin' could not be retrieved from repository: central due to an error: Error transferring file [INFO] Repository 'central' will be blacklisted [INFO] [ERROR] BUILD ERROR [INFO] [INFO] The plugin 'org.apache.maven.plugins:maven-clean-plugin' does not exist or no valid version could be found [INFO] [INFO] For more information, run Maven with the -e switch [INFO] -j --- Justin Fung [EMAIL PROTECTED] Sr. Analyst, Business Systems IT Banking Systems, e-Business HSBC Bank Canada http://www.hsbc.ca p: (604) 643-6605 f: (604) 643-6727 *** This email may contain confidential information, and is intended only for the named recipient and may be privileged. Distribution or copying of this email by anyone other than the named recipient is prohibited. If you are not the named recipient, please notify us immediately and permanently destroy this email and all copies of it. Internet email is not private, secure, or reliable. No member of the HSBC Group is liable for any errors or omissions in the content or transmission of this email. Any opinions contained in this email are solely those of the author and, unless clearly indicated otherwise in writing, are not endorsed by any member of the HSBC Group. *** Ce courriel peut renfermer des renseignements confidentiels et privil�gi�s et s'adresse au destinataire d�sign� seulement. La distribution ou la copie de ce courriel par toute personne autre que le destinataire d�sign� est interdite. Si vous n'�tes pas le destinataire d�sign�, veuillez nous en aviser imm�diatement et d�truire de fa�on permanente ce courriel ainsi que toute copie de celui-ci. La transmission de courriel par Internet ne constitue pas un mode de transmission confidentiel, s�curitaire ou fiable. Aucun membre du Groupe HSBC ne sera responsable des erreurs ou des omissions relatives au contenu ou � la transmission de ce courriel. L'auteur de ce courriel est seul responsable des opinions �mises dans ce courriel, lesquelles, � moins d'un avis contraire fourni par �crit, ne sont pas endoss�es par aucun membre du Groupe HSBC. *** -- Kenney Westerhof http://www.neonics.com GPG
Re: [M2-book]
On Sun, 30 Apr 2006, Eric Redmond wrote: I've just confirmed this. It's a bug in maven. When you specify filtering on resources, you NEED to have a filter file. The filter file may be empty, but it has to be defined and has to exist for maven to filter resources - even system properties (${user.home}) and commandline properties (-Dx=y) won't get filtered unless you have a filter file. So, it's not a bug in the book, but in maven. It might have worked in pre-2.0.4 releases, though. I'll file a JIRA issue. -- Kenney Are you running Windows? If you're running *nix, the quote syntax probably won't work (shell dependant, of course). Try it with only one word, hello, and no quotes. -Dcommand.line.prop=hello If that does not work, did you type the values into the file, and also into the command line (rather than copy-and-paste)? I can't see why it wouldn't work if you tried the above property argument, short of a character encoding difference. Eric On 4/30/06, Sebastien Arbogast [EMAIL PROTECTED] wrote: I'm just going through Better Builds With Maven book and once again, I can't help being amazed by the quality of it ! Nevertheless, there are a few small errata here and there and for I'm tagging them as I'm reading so that I can provide feedback when I've them all. But here I'm stuck on some more important issue: in page 49, just before section 2.6.3, it's said that Filtering resources can also retrieve values from system properties; either the system properties built into Java (like java.version or user.home), or properties defined on the command line using the standard Java -D parameter. To continue the example, change the application.properties file to look like the following: # application.properties java.version=${java.version} command.line.prop=${command.line.prop} Now, when you execute the following command (note the definition of the command.line.prop property on the command line), the application.propertiesfile will contain the values from the system properties. mvn process-resources -Dcommand.line.prop=hello again Unfortunately, here is what I get in my generated application.propertiesfile: # application.properties java.version=1.0-SNAPSHOT command.line.prop=${command.line.prop} So the problem is that: - system property java.version is actually replaced by my project's version - command.line.prop is not taken into account on the command line. I tried a different syntax, putting the double quotes around hello again only, but it didn't work either. Has anyone got an idea of what I may have done wrong ? -- S�bastien Arbogast The Epseelon Project : http://www.epseelon.net Blog : http://sebastien-arbogast.epseelon.net TagSpot : http://www.tagspot.org -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [M2-book]
On Sun, 30 Apr 2006, Sebastien Arbogast wrote: I've done some research and it appears that the latest version in SVN of the plugin does no longer have this bug. The next release of maven-resources-plugin is 2.2. -- Kenney I confirm ! I just added a filter file and it worked fine. That's precisely the kind of situation where I love Open Source! Maven rocks! And huge thanks to all the people who participated in the redaction of this excellent book. And to all the Maven community as well! 2006/4/30, Kenney Westerhof [EMAIL PROTECTED]: On Sun, 30 Apr 2006, Eric Redmond wrote: I've just confirmed this. It's a bug in maven. When you specify filtering on resources, you NEED to have a filter file. The filter file may be empty, but it has to be defined and has to exist for maven to filter resources - even system properties (${user.home}) and commandline properties (-Dx=y) won't get filtered unless you have a filter file. So, it's not a bug in the book, but in maven. It might have worked in pre-2.0.4 releases, though. I'll file a JIRA issue. -- Kenney Are you running Windows? If you're running *nix, the quote syntax probably won't work (shell dependant, of course). Try it with only one word, hello, and no quotes. -Dcommand.line.prop=hello If that does not work, did you type the values into the file, and also into the command line (rather than copy-and-paste)? I can't see why it wouldn't work if you tried the above property argument, short of a character encoding difference. Eric On 4/30/06, Sebastien Arbogast [EMAIL PROTECTED] wrote: I'm just going through Better Builds With Maven book and once again, I can't help being amazed by the quality of it ! Nevertheless, there are a few small errata here and there and for I'm tagging them as I'm reading so that I can provide feedback when I've them all. But here I'm stuck on some more important issue: in page 49, just before section 2.6.3, it's said that Filtering resources can also retrieve values from system properties; either the system properties built into Java (like java.version or user.home), or properties defined on the command line using the standard Java -D parameter. To continue the example, change the application.properties file to look like the following: # application.properties java.version=${java.version} command.line.prop=${command.line.prop} Now, when you execute the following command (note the definition of the command.line.prop property on the command line), the application.propertiesfile will contain the values from the system properties. mvn process-resources -Dcommand.line.prop=hello again Unfortunately, here is what I get in my generated application.propertiesfile: # application.properties java.version=1.0-SNAPSHOT command.line.prop=${command.line.prop} So the problem is that: - system property java.version is actually replaced by my project's version - command.line.prop is not taken into account on the command line. I tried a different syntax, putting the double quotes around hello again only, but it didn't work either. Has anyone got an idea of what I may have done wrong ? -- S�bastien Arbogast The Epseelon Project : http://www.epseelon.net Blog : http://sebastien-arbogast.epseelon.net TagSpot : http://www.tagspot.org -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Sébastien Arbogast The Epseelon Project : http://www.epseelon.net Blog : http://sebastien-arbogast.epseelon.net TagSpot : http://www.tagspot.org -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How are people getting around the lack of custom scopes?
module depending on yours would specify any of them they need. The config declaration for Spring Web Flow looks like this: configurations conf name=default extends=mvc / conf name=globalvisibility=private / conf name=buildtime visibility=private/ conf name=test visibility=private / !-- publicwebflowconfigurations other projects may use -- conf name=mvc visibility=public extends=global/ conf name=portlet visibility=public extends=mvc/ conf name=strutsvisibility=publicextends=global/ conf name=jsf visibility=public extends=global/ /configurations This just declares the configuration names and visibility, then actual dependencies are declared and added into one or more configs. A project needing Spring Web Flow including the JSF capabilities would declare that dependency as dependency org=springframework name=spring-webflow rev=latest.integration conf=global-default,jsf/ basically it is saying, for it's own 'global' config, it needs Spring Web Flow's 'default' and 'jsf' configs. How are people handling this kind of need in Maven. I am not happy with the options I see: - use profiles: this implies publishing a separate jar for each profile, not something I wish to do - declare minimal dependencies and force people to manually include: this implies that a module like spring web flow would declare only the minimal sets of dependencies, and then users of the module would manually add in other dependencies. This seems unacceptable. - declare all possible dependencies and force people to manually exclude: this implies a module like Spring Web Flow would declare all dependencies, and then users of the module would manually exclude some dependencies. This seems unacceptable. There are lots of projects out there which have optional dependencies (hibernate, etc.). Short of manual inclusions/exclusions, how are people handling this in Maven2? Regards, Colin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven proxy settings - security hazard
On Wed, 26 Apr 2006, Shukla, Sanjay wrote: Maven needs proxy server url and credential information. However this poses a security risk as your password is in a plain text format. Is there some way to circumvent this ? I don't think so. But you can use unix file/directory permissions to disallow anybody but you access to that file. Ofcourse root can always access your files but they usually also manage the proxy accounts. -- Kenney .m2/settings.xml proxies proxy id1001/id activetrue/active protocolhttp/protocol usernameme/username passwordpass/password hostip/host portport/port nonProxyHostslocalhost/nonProxyHosts /proxy /proxies Sanjay Shukla, HPI Product Engineering, 2 Penn Plaza, NY. 212 904 3629 Office 732 692 4419 Cell - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] Xdoclet fails
On Wed, 19 Apr 2006, J-F Daune wrote: I don't know what the output is you get, but I think you have to add an mkdir dir=${project.build.directory}/generated-sources/xdoclet/ before the ejbdoclet tag. I'm hoping to streamline this in future versions. -- Kenney Hi, I am starting with M2, and am trying to use XDoclet to generate EJB stuff. I followed instructions found on this mailing list, and declare this: build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-ejb-plugin/artifactId configuration generateClienttrue/generateClient /configuration /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdxdoclet-maven-plugin/artifactId executions execution phasegenerate-sources/phase goals goalxdoclet/goal /goals configuration tasks ejbdoclet destDir=${project.build.directory}/generated-sources/xdoclet excludedtags=@version,@author force=true verbose=true fileset dir=${basedir}/src/main/java includes=**/*Bean.java/ remoteinterface/ homeinterface/ localinterface/ localhomeinterface/ /ejbdoclet /tasks /configuration /execution /executions /plugin /plugins /build I have a TestServiceBean.java declaring ejb.bean and one ejb.interface-method. Unfortunately, when invoking mvn package, no code is generated. Any help is welcome, as for me, everything has been configured correctly. Cheers, J-F - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] Xdoclet fails
On Wed, 19 Apr 2006, J-F Daune wrote: Kenney, I added the mkdir, but still don't get any output (no file generated) Ok. You're telling xdoclet to generate local/remote/home/localhome interfaces. Did you specify @ejb.home etc. too in the *Bean.java sources? -- Kenney For info, here is the log: [INFO] [xdoclet:xdoclet {execution: default}] [INFO] Initializing DocletTasks!!! [INFO] Executing tasks 19-avr.-2006 16:24:05 xdoclet.XDocletMain start INFO: Running remoteinterface/ 19-avr.-2006 16:24:05 xdoclet.XDocletMain start INFO: Running homeinterface/ 19-avr.-2006 16:24:05 xdoclet.XDocletMain start INFO: Running localinterface/ 19-avr.-2006 16:24:05 xdoclet.XDocletMain start INFO: Running localhomeinterface/ INFO:Some classes refer to other classes that were not found among the sourc es or on the classpath. (Perhaps the referred class doesn't exist? Hasn't been generated yet?) The referring classes do not import any fully qualified classes matchin g these classes. However, since no packages are imported, xjavadoc has assumed that the referred classes belong to the same package as the referring class. The classes are: F:\common\projects\m2\logic\ejb\src\main\java\be\banksys\tams\logic\TestServiceB ean.java -- TestService qualified to be.banksys.tams.logic.TestService [INFO] Executed tasks On Wed, 19 Apr 2006, J-F Daune wrote: I don't know what the output is you get, but I think you have to add an mkdir dir=${project.build.directory}/generated-sources/xdoclet/ before the ejbdoclet tag. I'm hoping to streamline this in future versions. -- Kenney Hi, I am starting with M2, and am trying to use XDoclet to generate EJB stuff. I followed instructions found on this mailing list, and declare this: build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-ejb-plugin/artifactId configuration generateClienttrue/generateClient /configuration /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdxdoclet-maven-plugin/artifactId executions execution phasegenerate-sources/phase goals goalxdoclet/goal /goals configuration tasks ejbdoclet destDir=${project.build.directory}/generated-sources/xdoclet excludedtags=@version,@author force=true verbose=true fileset dir=${basedir}/src/main/java includes=**/*Bean.java/ remoteinterface/ homeinterface/ localinterface/ localhomeinterface/ /ejbdoclet /tasks /configuration /execution /executions /plugin /plugins /build I have a TestServiceBean.java declaring ejb.bean and one ejb.interface-method. Unfortunately, when invoking mvn package, no code is generated. Any help is welcome, as for me, everything has been configured correctly. Cheers, J-F - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: M2: Assembling modules in an ear
On Wed, 19 Apr 2006, Gunzenreiner Simon wrote: - Drop the scopecompile/scope - it's the default anyway, and not needed for compilation of the ear - the modules section is only needed for modules that need special configuration, like a war module usually gets a contextRoot - do you provide your own application.xml somewhere or do you use the GenerateApplicationXmlMojo? - Did you specify the configuration at the global level or in executions? If you could paste your plugin configuration in the mail, that would be helpful. -- Kenney I am trying to create an ear by assembling multiple other projects in Maven 2.0.4. My ear config files are located in a separate project with packagingear/packaging. All dependent projects are listed as dependency with scope scopecompile/scope. In addition, I added the modules configuration as described here: http://maven.apache.org/plugins/maven-ear-plugin/howto.html. I am facing two problems now: - I get an Error message if I add my EJB project to the modules list: Artifact[myGroupId:sample-ejb:ejb] is not a dependency of the project. although I added this project to the dependency list as well as to the module list. - Java (client) modules are not added to the generated application.xml Any hints really appreciated. Thanks Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] Xdoclet fails
On Wed, 19 Apr 2006, J-F Daune wrote: Ah, ok. I think I remember someone on this list saying that XDoclet doesn't work well if you don't directly implement javax.ejb.SessionBean. Try adding an 'implements' to the class and see if that works. -- Kenney Ok. You're telling xdoclet to generate local/remote/home/localhome interfaces. Did you specify @ejb.home etc. too in the *Bean.java sources? -- Kenney Kenney, thank you for your time. Here is the class: package be.banksys.tams.logic; import javax.ejb.CreateException; import org.springframework.ejb.support.AbstractStatelessSessionBean; /** * @ejb.bean * name=TestService * description=Test service * local-jndi-name=ejb/local/tams/TestService * jndi-name=ejb/tams/TestService * type=Stateless * view-type=both * @ejb.interface * extends=javax.ejb.EJBObject * local-extends=javax.ejb.EJBLocalObject, be.banksys.tams.logic.TestService * @ejb.home * extends=javax.ejb.EJBHome * local-extends=javax.ejb.EJBLocalHome */ public class TestServiceBean extends AbstractStatelessSessionBean implements TestService { private TestService delegate; /** * @ejb.interface-method * view-type=both */ public String echo(String s) { return delegate.echo(s); } protected void onEjbCreate() throws CreateException { delegate = (TestService ) getBeanFactory().getBean(testService); } } For info, here is the log: [INFO] [xdoclet:xdoclet {execution: default}] [INFO] Initializing DocletTasks!!! [INFO] Executing tasks 19-avr.-2006 16:24:05 xdoclet.XDocletMain start INFO: Running remoteinterface/ 19-avr.-2006 16:24:05 xdoclet.XDocletMain start INFO: Running homeinterface/ 19-avr.-2006 16:24:05 xdoclet.XDocletMain start INFO: Running localinterface/ 19-avr.-2006 16:24:05 xdoclet.XDocletMain start INFO: Running localhomeinterface/ INFO:Some classes refer to other classes that were not found among the sourc es or on the classpath. (Perhaps the referred class doesn't exist? Hasn't been generated yet?) The referring classes do not import any fully qualified classes matchin g these classes. However, since no packages are imported, xjavadoc has assumed that the referred classes belong to the same package as the referring class. The classes are: F:\common\projects\m2\logic\ejb\src\main\java\be\banksys\tams\logic\TestServiceB ean.java -- TestService qualified to be.banksys.tams.logic.TestService [INFO] Executed tasks On Wed, 19 Apr 2006, J-F Daune wrote: I don't know what the output is you get, but I think you have to add an mkdir dir=${project.build.directory}/generated-sources/xdoclet/ before the ejbdoclet tag. I'm hoping to streamline this in future versions. -- Kenney Hi, I am starting with M2, and am trying to use XDoclet to generate EJB stuff. I followed instructions found on this mailing list, and declare this: build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-ejb-plugin/artifactId configuration generateClienttrue/generateClient /configuration /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdxdoclet-maven-plugin/artifactId executions execution phasegenerate-sources/phase goals goalxdoclet/goal /goals configuration tasks ejbdoclet destDir=${project.build.directory}/generated-sources/xdoclet excludedtags=@version,@author force=true verbose=true fileset dir=${basedir}/src/main/java includes=**/*Bean.java/ remoteinterface/ homeinterface/ localinterface/ localhomeinterface/ /ejbdoclet /tasks /configuration /execution /executions /plugin /plugins /build I have a TestServiceBean.java declaring ejb.bean and one ejb.interface-method. Unfortunately, when invoking mvn package, no code is generated. Any help is welcome, as for me, everything has been configured correctly. Cheers, J-F - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] Xdoclet fails
On Wed, 19 Apr 2006, J-F Daune wrote: That 'works', in the sense that XDoclet now tries to generate something. But I unfortunately got other exceptions. What strikes me, is that the example is taken from a project using M1, to evaluate impact of switching to M2. With M1, it works without the 'implements', and I am reluctant changing my source code for M2. Could it be a classpath issue? I've looked at the code for xjavadoc, and any dependencies are not used. Each source class is represented by an XClass instance, which knows about implementing interfaces and such. The dependency is represented by an UnknownClass, and does not contain any information. A big shortcoming of XDoclet, since this information can easily be extracted using reflection. Nothing I can do, I'm sorry. I really don't know why/how that worked in Maven 1 - maybe it used an old version of XDoclet that worked differently. Maybe the XDoclet2 plugin is something to look at? -- Kenney J-F - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: AW: M2: Assembling modules in an ear
On Wed, 19 Apr 2006, Gunzenreiner Simon wrote: That has helped a lot - was not aware of the type in dependency. Regarding not having to include typeejb-client/type: I think generateClient is false for the ejb goal. Anyway, I have my client interfaces in a separate project (and I think as long as deployed in the same ear and referenced through Class-Path this is still ok with the spec ..). No it is not. The spec says that ejb modules must have impl + api in the same jar. But you can try, maybe your container doesn't honor the spec :) So I tried with to add my client module with either 1) typeejb-client/type in the dependency, and get Missing: -- 1) winterthur.jackpot.sample:sample-ejb-client:ejb-client:client:1.0-SNAPSHOT That can be right - you don't have an artifact with that type. You need generateClient=true in an ejb-packaging project for that. I first started out by separating the client classes from the bean classes, but soon had to merge them. I think you will have to do that too after you find out that your beans don't work.. 2) typejar/type in the dependency and modules javaModule groupIdwinterthur.jackpot.sample/groupId artifactIdsample-ejb-client/artifactId Add includeInApplicationXmltrue/includeInApplicationXml /javaModule /modules where the java client module is not added to the generated application.xml You see, this is false by default, another indication that this is not the normal way to do things.. ;) Any ideas? Thanks a lot again. No problem! -- Kenney Simon -Ursprüngliche Nachricht- Von: Kenney Westerhof [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 19. April 2006 18:18 An: Maven Users List Betreff: Re: AW: M2: Assembling modules in an ear On Wed, 19 Apr 2006, Gunzenreiner Simon wrote: Hi Kenny Thanks a lot. I removed the modules config, and set generateApplicationXml to true. Please find my pom.xml attached. Now the ear is created with the dependent libraries, but the generated application.xml is simply ?xml version=1.0 encoding=UTF-8? !DOCTYPE application PUBLIC -//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN http://java.sun.com/dtd/application_1_3.dtd; application display-namesample/display-name /application I expected it to list my ejb module. Ok. Normal 'jar' dependencies are NOT added to the EAR by default; for those you need to specify a modulesjavaModule (and add them as a dependency). Next, you don't seem to add any J2EE jars at all - the dependencies don't specify a type tag. If you want to include a .war you have to specify typewar/type for the dependency. If you want to include an ejb archive you need to specify typeejb/type. You should NOT include any ejb-client (typeejb-client/type) dependencies: if you have a project with packagingejb/packaging, the contents of the ejb-client version are already present in the main ejb artifact. That is a J2EE requirement: the bean implementations and the local/home/remote interfaces should all be in one jar. That said, I don't think you'll need to include any jars at all. Hope this helps a bit! -- Kenney Thanks, Simon -Ursprngliche Nachricht- Von: Kenney Westerhof [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 19. April 2006 17:41 An: Maven Users List Betreff: Re: M2: Assembling modules in an ear On Wed, 19 Apr 2006, Gunzenreiner Simon wrote: - Drop the scopecompile/scope - it's the default anyway, and not needed for compilation of the ear - the modules section is only needed for modules that need special configuration, like a war module usually gets a contextRoot - do you provide your own application.xml somewhere or do you use the GenerateApplicationXmlMojo? - Did you specify the configuration at the global level or in executions? If you could paste your plugin configuration in the mail, that would be helpful. -- Kenney I am trying to create an ear by assembling multiple other projects in Maven 2.0.4. My ear config files are located in a separate project with packagingear/packaging. All dependent projects are listed as dependency with scope scopecompile/scope. In addition, I added the modules configuration as described here: http://maven.apache.org/plugins/maven-ear-plugin/howto.html. I am facing two problems now: - I get an Error message if I add my EJB project to the modules list: Artifact[myGroupId:sample-ejb:ejb] is not a dependency of the project. although I added this project to the dependency list as well as to the module list. - Java (client) modules are not added to the generated application.xml Any hints really appreciated. Thanks Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e
Re: Problem with eclipse plugin
On Tue, 11 Apr 2006 [EMAIL PROTECTED] wrote: Hi, Maven tries to download a SNAPSHOT of the eclipse plugin from the central repository. The central repository does not contain any snapshots. Either add a snapshot repository 'snapshots.maven.codehaus.org', id 'snapshots', with snapshots enabled, or check your pom files to see if they specify a version for the eclipse plugin. -- Kenney Hi When I try to use the eclipse plugin, I am getting an error that prevents me from using it. Noboby else here is able to run it either. E:\IT-01 Mavenmvn -U eclipse:eclipse [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'eclipse'. [INFO] no.dnbnor.it01.plugins: checking for updates from central [INFO] org.apache.maven.plugins: checking for updates from central [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '0ef900db5a 850e0cd09cc19309cbb8fba969ec82'; remote = '93cdb51bd390398811529269b9d7f3a0b73b2 c71' - RETRYING [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '0ef900db5a 850e0cd09cc19309cbb8fba969ec82'; remote = '93cdb51bd390398811529269b9d7f3a0b73b2 c71' - IGNORING [INFO] org.codehaus.mojo: checking for updates from central [INFO] artifact org.apache.maven.plugins:maven-eclipse-plugin: checking for upda tes from central [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Error building POM (may not be this project's POM). Project ID: org.apache.maven.plugins:maven-eclipse-plugin Reason: Error getting POM for 'org.apache.maven.plugins:maven-eclipse-plugin' fr om the repository: Failed to resolve artifact, possibly due to a repository list that is not appropriately equipped for this artifact's metadata. org.apache.maven.plugins:maven-eclipse-plugin:pom:2.2-SNAPSHOT from the specified remote repositories: central (http://repo1.maven.org/maven2) [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 48 seconds [INFO] Finished at: Tue Apr 11 10:15:55 CEST 2006 [INFO] Final Memory: 1M/3M [INFO] Hermod * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This email with attachments is solely for the use of the individual or entity to whom it is addressed. Please also be aware that DnB NOR cannot accept any payment orders or other legally binding correspondence with customers as a part of an email. This email message has been virus checked by the virus programs used in the DnB NOR Group. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Deploying 3rd Party Libraries with sources
On Tue, 11 Apr 2006, Roland Asmann wrote: I assume you have the source jars present, and you install the files with mvn install:install-file or mvn deploy:deploy-file ? If so, you can deploy/install the source jars too, by specifying -Dpackaging=java-source. -- Kenney Hi, I was wondering if it is possible (and how) to deploy 3rd party Libraries with a source-jar into our company's central repository. We are using the maven-proxy tool to retrieve libraries from ibiblio and codehaus repositories, but as we all know there are some libs that can't be found on there. Now I know how to install the Libs themself into our repository, but since we somtimes need to debug through those libs, we would like to have the source-code that goes with them as well. Roland - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Deploying 3rd Party Libraries with sources
On Tue, 11 Apr 2006, Roland Asmann wrote: Thanks! This seems to have done the trick... Although I think it's better to use the '-DgeneratePom=false' on this, otherwise it will rewrite the POM to packaging 'java-source'. Ah, I didn't know that was on by default now. Thanks for the update ;) -- Kenney Roland On Tuesday 11 April 2006 12:25, Kenney Westerhof wrote: On Tue, 11 Apr 2006, Roland Asmann wrote: I assume you have the source jars present, and you install the files with mvn install:install-file or mvn deploy:deploy-file ? If so, you can deploy/install the source jars too, by specifying -Dpackaging=java-source. -- Kenney Hi, I was wondering if it is possible (and how) to deploy 3rd party Libraries with a source-jar into our company's central repository. We are using the maven-proxy tool to retrieve libraries from ibiblio and codehaus repositories, but as we all know there are some libs that can't be found on there. Now I know how to install the Libs themself into our repository, but since we somtimes need to debug through those libs, we would like to have the source-code that goes with them as well. Roland - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help whit site-deploy
On Tue, 11 Apr 2006, John Casey wrote: Another way would be to record what files constituted the last site deployment. IIRC a 'deploy.zip' is uploaded and then unpacked. A list of files in that zip could be recorded. Your proposal for a new clean flag would then take this list into account and only delete the files for that project. This might be safe enough? -- Kenney Are you wondering why the deployment target location isn't removed before re-deploying the site? That operates on the assumption that all the content in or under that remote location is published by the current project, or that you will be fine with redeploying all of the content when you do this site-deploy...which IMO is dangerous. For example, Maven itself publishes site content to multiple locations, with the topmost being the main site project. Modules publish their reports, etc. into subdirectories of the remote location referenced by the site project...if we removed this top directory, we'd not only lose all of the reports published by the modules, but all of the historical versions of these reports too. This is a lot to republish. Perhaps an optional clean parameter would help, but I'm not sure whether the underlying APIs currently support it. HTH, John On 4/11/06, Chucho [EMAIL PROTECTED] wrote: I'm using site-deploy on maven whit continuum and its work fine, but when I'm do it again and the folder already exits, the site can be deploy, I'll use clean, but don't clean the deploy site. if a change the POM distributionManagement section then it would make the deploy whit out problem, but i want the deploy overwrites the file or delete the site deploy folder and deploy again. i have check the permissions on the folder and have write permissions. the command its: clean install site-deploy and the arguments: --batch-mode --non-recursive How can i do to make site-deploy once and again on the same folder? POM.xml distributionManagement site idWNserver/id urlfile:C:\Inetpub\wwwroot\continuum\prueba2/url /site /distributionManagement -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ear file and classpath entry in Manifest file ...
On Tue, 11 Apr 2006, Christian Sauer wrote: Hi, i've built an ear file and wondered why the manifest file did not contain the classpath entry ... Because you don't need one. Does anyone know how I can get Maven to generate that entry? If you must have one, for instance to support a J2EE implementation that does not conform to the standards, use this: plugin artifactIdmaven-ear-plugin/artifactId configuration archive manifest addClasspathtrue/addClasspath /manifest /archive /configuration /plugin -- Kenney Cheers, Chris -- Giniality AG - Christian Sauer; Steinenberg 21, CH-4051 Basel P: +41 61 226 99 66 - F: +41 61 226 99 69 - M: +41 79 828 9416; E-Mail: [EMAIL PROTECTED]; WWW: http://www.giniality.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: sharing artifacts without repositories???
On Sat, 1 Apr 2006, raja bangaru wrote: You can't. Repositories are a core maven concept; it is the only way to share artifacts. Why don't you want to put A in a repository? (mvn install - local repository, no problem, right? it's just a 'temporary' directory anyway). -- Kenney I find that we can share any number of artifcats withing mulitple projects thru the repository. i mean we can take repository as a common place,... For example, If the built artifact of project A is to be needed for another project B,..we can place the built artifact of A in the repository so that project B can use it.. My question : What if i dont want to put the built artifact of Project A in a repository and still it should be available to my project B Any maven goals to handle this scenario??? Thanks, Raja. -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] Improper build number after deploying a snapshot of maven-javadoc-plugin
On Thu, 23 Mar 2006, Odea Ching wrote: Hi Thorsten, I remember a bug like this, but it was fixed long ago. Perhaps you're using an old version of Maven 2? Maybe your proxy needs updating.. What version of maven2 are you using? What version of the deploy plugin is used? (run mvn -X to find out.) -- Kenney Hi Thorsten, mvn deploy automatically appends the timestamp when it deploys the jar file in the repository when it is a snapshot version. If you want to disable this, you would have to specify a version of the plugin instead of specifying it as a snapshot. Thanks, Odea Thorsten Heit wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I'm trying to use the beta-4 snapshot of the maven-javadoc-plugin and wanted to deploy it on my local proxy. The plugin is deployed via: $ mvn compile jar:jar (lots of messages) $ cd target $ mvn deploy:deploy-file -DrepositoryId=my_proxy - -Durl=file://H:/maven-proxy/target/repo-local -DpomFile=exported-pom.xml - -Dfile=maven-javadoc-plugin-2.0-beta-4-SNAPSHOT.jar (lots of messages) The plugin jar gets copied to the proxy, and so far everything seems to be fine. In another project, I added the following lines to my pom.xml: build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-javadoc-plugin/artifactId version2.0-beta-4-SNAPSHOT/version configuration tagcreated/tag maxmemory256m/maxmemory /configuration /plugin ... /plugins /build Unfortunately the plugin cannot be downloaded from my proxy: $ mvn clean [INFO] Scanning for projects... [INFO] - [INFO] Building base Repository [INFO]task-segment: [clean] [INFO] - Downloading: http://maven_proxy:/repository/org/apache/maven/plugins/maven-javadoc-plugin/2.0-beta-4-SNAPSHOT/maven-javadoc-plugin-2.0-beta-4-20060322.180042-2.jar [INFO] - [ERROR] BUILD ERROR [INFO] - [INFO] Failed to resolve artifact. GroupId: org.apache.maven.plugins ArtifactId: maven-javadoc-plugin Version: 2.0-beta-4-20060322.180042-2 Reason: Unable to locate resource in repository org.apache.maven.plugins:maven-javadoc-plugin:maven-plugin:2.0-beta-4-20060322.180042-2 from the specified remote repositories: central (http://repo1.maven.org/maven2), bender (http://maven_proxy:/repository), snapshots-codehaus-org (http://snapshots.maven.codehaus.org/maven2) which is strange because I just deployed it. I looked into the proxy directories and wondered that the files are named differently: * maven-javadoc-plugin-2.0-beta-4-20060322.180042-1.jar * maven-javadoc-plugin-2.0-beta-4-20060322.180042-1.jar.md5 * maven-javadoc-plugin-2.0-beta-4-20060322.180042-1.jar.sha1 * maven-javadoc-plugin-2.0-beta-4-20060322.180042-2.pom * maven-javadoc-plugin-2.0-beta-4-20060322.180042-2.pom.md5 * maven-javadoc-plugin-2.0-beta-4-20060322.180042-2.pom.sha1 When I manually rename the -1.jar* files to -2.jar* the plugin is downloadable, and mvn clean above will work... Is there a reason for this behaviour? Is this a bug? Regards Thorsten -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (MingW32) iD8DBQFEIZVlQvObkgCcDe0RAjz7AJ9InFVTGyFAvwOSuy5W8BGujTkUHwCglbtO 9S4ieHuxassG1Cmg4sDUots= =37Im -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [M2]Maven Ear Plugin did not recognize the RAR Sub Project
the specified remote repositories: central (http://repo1.maven.org/maven2), http-repository (http://jianwu-pc.us.oracle.com/maven2repository/repositoryroo t) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTra nsitively(DefaultArtifactResolver.java:251) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTra nsitively(DefaultArtifactResolver.java:211) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTra nsitively(DefaultArtifactResolver.java:182) at org.apache.maven.plugin.DefaultPluginManager.resolveTransitiveDepende ncies(DefaultPluginManager.java:1120) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:369) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:531) ... 16 more [INFO] [INFO] Total time: 11 seconds [INFO] Finished at: Wed Mar 22 15:16:17 PST 2006 [INFO] Final Memory: 5M/17M [INFO] What I found is that this problem can be temporarily fixed by manually creating target/classes directory under RAR Project, my guess is that Ear Plugin is checking this directory as part of validation. But, I think that should be a bad practice by altering Rar Plugin to work around this problem. Should I file a bug against Ear Plugin for this issue? Thanks a lot! Jian -- View this message in context: http://www.nabble.com/-M2-Maven-Ear-Plugin-did-not-recognize-the-RAR-Sub-Project-t1327696.html#a3544394 Sent from the Maven - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: provided dependendcy still packed in webapp
On Mon, 13 Mar 2006, Stephen Duncan wrote: (I'm cc-ing the dev list, maybe continue there?) It's Maven's decision: http://jira.codehaus.org/browse/MNG-1978 Brett still hasn't been convinced that provided status should be transitive. I don't have any particular use case to argue one way or another... I do. The compiler requires it. Maybe the semantics of 'provided' need to be changed; it should indicate 'provided in the RUNTIME environment'. Maven itself is NOT the runtime environment (except when running plugins perhaps). Dependencies _could_ end up in the runtime environment, for instance, dependencies of plugins. In that case, maven _is_ the runtime environment, and it can simply discard all provided dependencie when building a runtime classpath for the plugin. Provided deps, like j2ee api's, when not transitive, cause compilation errors - Sun's Javac even reports an 'Internal Compiler Error' in this case. It's because the binaries, that depend on that 'provided' dependency, either use the dep in their api's, in annotations, or extend from it, or use it in any other way. The compiler must be able to resolve those classes. Provided scope simply tells maven that the runtime environment, whatever that may be, already has that jar in the classpath. So when maven has to PACKAGE something, like a war or ear, it shouldn't include that dependency. But it is still very much needed for compilation (build-time). I've argued this case several times before in the past, and I certainly hope we can convince the rest of the team anytime soon.. :) Splitting up the scope system into 2 scopes: 'compile' and 'runtime', and a set of flags: - transitive - test will allow people to decide wheter a dependency should be transitive or not. This might cover all the possible use-cases. (perhaps even add a 'build' scope which maps nicely to the current 'extensions' scheme so we can keep dependencies in one neat list.). -- Kenney -Stephen On 3/13/06, Mario Ivankovits [EMAIL PROTECTED] wrote: Hi! I started using maven 2 to build our project and maybe hit a bug now. The project layout is: project +-project-app +-project-web where project-web depends on project-app. One of the dependency is jfreechart which itself depends on e.g. gnujaxp. Now I dont want to package the gnujaxp and so I though I override its scope to provided in project-app. But project-web still package it. Other dependencies defined as provided work, it looks like its only a problem if a dependency declares it. I worked around this problem by defining the dependency gnujaxp in project-web too as provided and not its not packaged any more. I think this should not be necessary, no? Is it my or mavens fault? Thanks! Ciao, Mario - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Stephen Duncan Jr www.stephenduncanjr.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] Database/SQL plugin? Generating DB from schema?
On Tue, 21 Feb 2006, andrew cooke wrote: The simplest solution is to use the antrun plugin, and the sql/ task. Be sure to add an extensionsextension under the plugin tag that defines antrun containing a dependency to the jdbc driver. But there might also be an sql plugin out there. -- Kenney no, they're just databases (SQL) (by schema i mean definitions of tables and stored procedures) andrew Piéroni Raphaël wrote: Do your database schema use Torque oà r hibernate ? Raphaël 2006/2/21, andrew cooke [EMAIL PROTECTED]: Hi, I have a DB schema that defines a database. I'd like Maven to manage this (so that I can delete/re0create the database before tests, for example). How do I do this? Thanks, Andrew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to specify external jars
On Wed, 4 Jan 2006, Pagadala Baskar, Kiran Kumar (Cognizant) wrote: My guess is that there's no .pom next to the jar.. You need to create a small pom listing the groupId, artifactId and version (same filename as the jar except ending in .pom, not .jar). Is that it? -- Kenney Hi, I am still stuck with this issue. Could someone please let me know what could possibly be wrong? Regards, Kiran -Original Message- From: Pagadala Baskar, Kiran Kumar (Cognizant) [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 03, 2006 5:40 PM To: Maven Users List Subject: How to specify external jars Hi, I have a couple of external jars that I need for my Project compilation. I have uploaded them to the local repository using: mvn install:install-file -Dfile=File Path\JAR_NAME.jar -DgroupId=groupId -DartifactId=JAR_NAME -Dversion=1.0 -Dpackaging=jar I tried adding the jar as a dependency to my POM.xml. When I try to compile the project using mvn compile, it is still not detected. I even tried to add the jars to my CLASSPATH manually. Even that doesn't help. Could someone please let me know where I am going wrong? Thanks and Regards, Kiran This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful. Visit us at http://www.cognizant.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful. Visit us at http://www.cognizant.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]