Re: maven assembly plugin - the artefact size is multiplied by 2

2009-12-15 Thread Jerome Lacoste
On Mon, Dec 14, 2009 at 7:43 PM, le squere, vincent
vincent.lesqu...@capgemini.com wrote:
 I've tried to use winzip, 7-zip, and to extract with the jar command.
 It's always the same message, this archive is not a valid archive.

 So I can't see its contents.

 Just a precision, my assembly work fine on windows, the problem is just on 
 debian.
 The JDK I use is  1.6.0_16-b01

Do you mean that on Windows, your assembly size isn't doubled ? Or
that it is also doubled but can be opened properly by Winzip ?

can you try:
* from the module that fails
  mvn clean install
  file target/path_to_your_assembled_file
  unzip -l target/path_to_your_assembled_file

and look at the output contents. Feel free to send it here if you
don't make any progress.

* try again building from scratch from the root of your multi-module project


    But, when the size of my ear is more than 20Mo, the size is multiplied by
 2 in the destination folder.
    I thought that it just makes a copy.

double size sounds like it included the EAR + all the dependencies of
the EAR. How are you using the maven assembly plugin exactly ?

J

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



[ANN] mojo plugin ideauidesigner 1.0-beta-1 has been released

2009-11-27 Thread Jerome Lacoste
Hi,

On behalf of the Mojo team, I would like to announce the release of
the 1.0-beta-1 version of the ideauidesigner plugin.

The site is at http://mojo.codehaus.org/ideauidesigner-maven-plugin.

The new version supports IDEA 7.0.3. Idea 8.x will be supported in a
forthcoming release.

Version 1.0-beta-1 has been deployed to the codehaus repository. It should
appear in the main repository in a few hours.

Thanks,
--
Jerome

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



workaround for MNG-3119/MSOURCES-13

2009-11-04 Thread Jerome Lacoste
Hei,

[I've found a work-around. Sending this to the list in case it saves
someone else's time]

I am trying to remove source:jar from being invoked and attaching the
sources.jar to the build without success.

The reason I don't want it is that when I run e.g.

  mvn --batch-mode release:prepare release:perform

the sources are attached twice, deployed twice and our artifact
repository complains and thus doesn't accept the build.

In particular I see

[INFO] [INFO] [source:jar-no-fork {execution: attach-sources}]
[INFO] [INFO] Building jar:
/home/jerome/Code/CHECKOUTS/maven-test-trunk/target/checkout/core/target/core-1.6-sources.jar
[INFO] [INFO] Preparing source:jar
[INFO] [WARNING] Removing: jar from forked lifecycle, to prevent
recursive invocation.
[INFO] [INFO] [source:jar {execution: attach-sources}]

I wasn't able to prevent the source:jar plugin to run, but I managed
to desactivate it using

  attachfalse/attach

Full config below.

Here's some related links/issues:
* http://jira.codehaus.org/browse/MNG-3119
* http://jira.codehaus.org/browse/MSOURCES-13
* http://maven.apache.org/plugins/maven-source-plugin/usage.html
* bottom of 
http://old.nabble.com/Removing:-jar-from-forked-lifecycle,-to-prevent-recursive-invocation-td22054923.html



Details:

My pom structure is as follow:

* corporate-super-pom (no plugin configuration)
* team-super-pom references source-jar in a couple of places

project
  build
pluginManagement
  plugins

plugin
  artifactIdmaven-source-plugin/artifactId
  version2.1.1/version
/plugin
  /plugins
/pluginManagement
plugins
  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-source-plugin/artifactId
execution
  execution
idattach-sources2/id
goals
  goaljar-no-fork/goal
/goals
  /execution
  execution
idattach-sources/id
goals
  goaljar/goal
/goals
configuration
  attachfalse/attach
/configuration
  /execution
/executions
  /plugin
/plugins
  /build
/project

* project pom


With or without the second execution, the source:jar mojo is still
executed and causes my deployment to fail. attach=false was the only
way I found to prevent it from attaching the sources.

Jerome

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



Re: Maven Webstart Plugin - unprocessed POM in WAR

2009-08-10 Thread Jerome Lacoste
On Mon, Aug 10, 2009 at 8:12 PM, bwarrenbrad.war...@usairways.com wrote:

 Yes I don't need the POM, just the dependencies.

Mmmm the code is supposed to only copy the artifacts of type jar or ejb-client

String type = artifact.getType();
if ( jar.equals( type ) || ejb-client.equals( type ) )
{

cf 
webstart/webstart-maven-plugin/src/main/java/org/codehaus/mojo/webstart/AbstractJnlpMojo.java

I need more time to test this properly and I am extremely busy this
week. Are you able to provide an small test case ?

If you could write one along those found under

webstart/webstart-maven-plugin/src/it/itxxx/

jerome

PS: the webstart mojo is usualy supported on the mojo user list (cf.
mojo.codehaus.org)

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



Re: Maven Webstart Plugin - unprocessed POM in WAR

2009-08-09 Thread Jerome Lacoste
On Thu, Aug 6, 2009 at 2:57 AM, bwarrenbrad.war...@usairways.com wrote:

 I have a Webstart application that I'm generating a WAR file to deploy on
 JBoss using the Maven Webstart plugin.

 I have included the JBoss client POM in my application POM to grab the JBoss
 client dependencies for JNDI and EJB.  When the plugin creates the WAR file,
 it is including the POM with unprocessed_ prepended to the file name.  The
 plugin is also putting the POM in as a jar dependency in the JNLP file.

 So when the JNLP download servlet goes to pull the JAR dependencies for my
 webstart application, it tries to grab the POM, which has been renamed, and
 fails.  Does anyone know why that file is getting renamed?  I saw some
 emails about JARs getting unprocessed stuck in the name when signing is
 turned off.  It appears that the plugin isn't designed for POM dependencies.

 Here's the JBoss client dependency in my webstart application's POM:

    dependency
      groupIdorg.jboss.jbossas/groupId
      artifactIdjboss-as-client/artifactId
      version5.0.1.GA/version
      scopecompile/scope
      typepom/type
    /dependency

 I included that POM because it has dependencies to the client JARs I need to
 call over to JBoss.  Reference -
 https://jira.jboss.org/jira/browse/JBAS-6320

 Here's the webstart plugin config from my WAR POM:

    plugins
      plugin
        groupIdorg.codehaus.mojo.webstart/groupId
        artifactIdwebstart-maven-plugin/artifactId
        executions
          execution
            phaseprocess-resources/phase
            goals
              goaljnlp-download-servlet/goal
            /goals
          /execution
        /executions
        configuration
          outputDirectoryNameapplication/outputDirectoryName
          outputFilenamelaunch.jnlp/outputFilename
          jnlpFiles
            jnlpFile
              templateFilenamejnlp-template.vm/templateFilename
              jarResources
                jarResource
                  groupIdcom.usairways.cbro/groupId
                  artifactIdreal-time-departure-swing/artifactId
                  version1.0.0.a2/version
                  mainClasscom.usairways.cbro.rtd.swing.Main/mainClass
                /jarResource
              /jarResources
            /jnlpFile
          /jnlpFiles
        /configuration
      /plugin
    /plugins

 How can I get it to not rename the jboss-as-client POM to
 unprocessed_jboss-as-client?  Or alternatively, how do I keep it from adding
 the jboss-as-client POM as a JAR dependency in the JNLP, but keep the
 transitive dependencies of the jboss-as-client POM in there?

If the POM file isn't added to the target directory but the transitive
dependencies added, that should fix it for you, right ?

Jerome

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



Re: Maven Jaxb plugin?

2008-12-12 Thread Jerome Lacoste
On Wed, Dec 10, 2008 at 12:33 PM, Anders Hammar and...@hammar.net wrote:

 Hi,

 Try the 'schemaDirectory' parameter. It's documented here:
 http://mojo.codehaus.org/jaxb2-maven-plugin/xjc-mojo.html

There are many jaxb plugins. We have tried

the codehaus mojo one, this one

   groupIdcom.sun.tools.xjc.maven2/groupId
artifactIdmaven-jaxb-plugin/artifactId

and

groupIdorg.jvnet.jaxb2.maven2/groupId
artifactIdmaven-jaxb2-plugin/artifactId

We've settled on the last one as it allowed us to easily pass jaxb extensions:

  args
arg-Xdefault-value/arg
  /args
  plugins
plugin
  groupIdorg.jvnet.jaxb2_commons/groupId
  artifactIddefault-value/artifactId
  version0.1-20071022/version !-- Downloaded from
https://jaxb2-commons.dev.java.net/ Version number defined after last
change in CVS... --
/plugin

J

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



Re: Avoiding a parent project from being installed into the repository

2008-06-23 Thread Jerome Lacoste
On Mon, Jun 23, 2008 at 1:25 PM, Vincent Thévenin
[EMAIL PROTECTED] wrote:
 Hello,

 I'm using Maven 2.0.9. I have a project with the following layout:

 project
 |-- pom.xml (packaging = pom)
 |-- ejb_subproject
 |   |-- pom.xml (packaging = ejb)
 |   `-- . . .
 `-- ear_subproject
   |-- pom.xml (packaging = ear)
   `-- . . .

 The two subprojects are declared as modules of the top pom.xml. Invoking
 Maven on the top pom.xml first launches a build on the ejb_project (which
 creates two artifacts, a Jar and an EJB client Jar), then on the ear_project
 (which creates an Ear using the Jar of the ejb_project).

 My issue is that installing the artifacts into the repository by invoking
 'mvn install' on the top pom.xml creates three entries in the repository,
 one for the ejb_subproject, one for the ear_subproject and finally one for
 the top pom.xml, the latter being actually empty.
 Is it possible to inform Maven that the pom.xml of type 'pom' should not be
 installed into the repository, but just exists to make an entry point for
 the build of the two other projects?

and why is installing the parent POM a problem ? This POM is a
dependency of the sub modules. They reference it as their parent.
Maven has no knowledge of you using an empty parent. You could have
e.f. defined elements in the dependencyManagement or pluginManagement
sections. You need that POM in your local repository.

Jerome

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



Re: Signing dependencies during a war build

2008-06-10 Thread Jerome Lacoste
2008/6/10 Fabio Braga de Oliveira [EMAIL PROTECTED]:
 Hi list,

 I'm developing a 3-tier system, and I want to distribute the desktop using
 the Java Webstart. Until now, I already did great progresses in my quest.

 In the server side I'm deploying a web application using Spring, and I
 publish some services using RMI.

 In the desktop, I'm using the Netbeans RCP, packaging all the code and
 libraries using the webstart-maven-plugin. To give the necessary
 permissions, I'm using the sign/sign configuration section, signing all
 the jars with a valid certificate, and everything works well.

 But now some problems: I'm using hibernate, and the hibernate use the cglib
 library to do some bytecode manipulations. The code in the client side is
 signed, and the SecurityManager doesn't allow this unknown,
 runtime-generated code to run in the desktop. Every time I query the
 database and try to use one database mapped object, everything blows up.

 To fix the mess, I did, manually, a war file with the domain libraries,
 hibernate.jar and cglib.jar signed. And everything worked!

 But know I want to do automatically. Does someone know how to create a war
 where each dependency jar file is signed? Something like what the
 webstart-maven-plugin do while generating the jnlp application.

 Thanks in advance, and I apologize my English mistakes.

I wrote both the jar:sign and webstart mojos and I am not aware of an
off the shelf war-with-signed-dependencies solution. If you find one,
or end up creating yours, please let us know :)

Jerome

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



Re: integration-test practices

2008-05-27 Thread Jerome Lacoste
On Mon, May 26, 2008 at 1:41 AM, Kaizer H. Sogiawala [EMAIL PROTECTED] wrote:
 A while back I came across a note about integration test - From a
 single project POM you can only choose to execute either unit or the
 integration test, not both. Could that be a factor in the outcome you
 see?

Are you sure of that ? Maven doesn't limit you. You can attach your
mojos to the phase you want.

I have a project under my eyes that binds surefire to the test phase,
and easyb tests to the integration-test one.

J

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



Re: integration-test practices

2008-05-27 Thread Jerome Lacoste
On Tue, May 27, 2008 at 11:34 PM, Wendy Smoak [EMAIL PROTECTED] wrote:
 On Tue, May 27, 2008 at 1:57 PM, Jerome Lacoste
 [EMAIL PROTECTED] wrote:
 On Mon, May 26, 2008 at 1:41 AM, Kaizer H. Sogiawala [EMAIL PROTECTED] 
 wrote:
 A while back I came across a note about integration test - From a
 single project POM you can only choose to execute either unit or the
 integration test, not both. Could that be a factor in the outcome you
 see?

 Are you sure of that ? Maven doesn't limit you. You can attach your
 mojos to the phase you want.

 I have a project under my eyes that binds surefire to the test phase,
 and easyb tests to the integration-test one.

 The limitation is that there is only one testSourceDirectory in the
 pom.  If you use Surefire in both the test and integration-test
 phases, you have to configure includes and excludes to get it to use
 the right code for each set of tests.

You're right: there's at least one big limitation is the compiler
plugin. testCompile only uses the test source directory defined in the
POM:

/**
 * The source directories containing the test-source to be compiled.
 *
 * @parameter expression=${project.testCompileSourceRoots}
 * @required
 * @readonly
 */
private List compileSourceRoots;

 My guess is that 'easyb' is using a different default or configuration
 for its test source directory.

yep. And all tools I've used for integration-tests had their own source dirs.

So the problem is probably not that you can chose to execute it or
unit test, it's that you can only compile one of them easily.

Cheers,

Jerome

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



Re: Certification build question

2008-05-24 Thread Jerome Lacoste
On 5/22/08, Chris Helck [EMAIL PROTECTED] wrote:
 Rich,
  It's very common for corperations to implement this sort of thing. It
  helps ensure that the products can be rebuilt from the source code, and
  that helps certain audit/security processes. In any case, this is what
  my company does, and they pay me every two weeks.

  I do what you suggest for internal and informal releases of test tools
  and report generators.

From my experience, the reproduceability problems can happen from
various factors, but most of them will be detected by using a build
server. Some will still go throught: e.g. that can easily happen with
maven 2.0.x when using non versionned plugins in the POMs. Happened to
me again today: http://jira.codehaus.org/browse/MNG-3594

If you really want to double check things, you should do it in a
different manner, and compare the results. That's what back up systems
do for critical systems. But that is very costly. It is certainly
possible to have one build server monitoring the CSM and another
trying to reproduce the builds e.g. from information found in the
released POMs and artifacts. That's a lot of trouble for not much gain
to my point of view. Except if you work for the NASA :)

One simple idea: use 2 build environments, one for your development
team, one from your 'secure' team. Build all the time, and compare the
produced artifacts (maybe using some sort of checksums). Make sure
each artifact contains enough information (e.g. make it include the
revision number the artifact was built from).

Another idea: add a build server to rebuild your past tagged project.
That's particularly useful for long lived branches. Always add a build
triggered by time instead of just commits.

Finally make sure that any tool used in the build, from the SDK to the
zip tool, has a locked down version number, and a check that ensures
potential problems are detected early. Make your build tool write
those versions in the log.

And keep your build logs.

Jerome

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



[clover:instrument forked lifecyle] modified project artifacts list do not get propagated to the WAR/EAR mojos. Is this expected ?

2008-05-21 Thread Jerome Lacoste
Clovered EAR / WAR artifacts lacks clovered versions of transitive
dependencies. Cf:  http://jira.codehaus.org/browse/MCLOVER-70. This
issue still exists in the maven clover plugin 3.7 from atlassian.
We've tested maven 2.0.6 and 2.0.9.

The issue is caused apparently as the clover plugins tries to modify
the project artifacts list in a forked lifecycle, but the change is
not propagated to the mojos executed later on. My understanding is
that the way clover tries to achieve this is not possible, as the
forked lifecycle ends before the war/ear mojos are executed.

Can someone confirm this reasoning, and maybe provide an alternative
solution to this problem ?

Details:
***
The clover instrument mojo forks its own lifecycle. This lifecyle then
triggers the clover instrumentInternal after the validate phase. In
this forked lifecycle, the instrumentInternal mojo is bound to the
install phase.

In 
http://svn.atlassian.com/svn/public/contrib/clover/maven-clover-plugin/trunk/src/main/java/com/atlassian/maven/plugin/clover/CloverInstrumentMojo.java
 * @goal instrument
 * @execute phase=install lifecycle=clover

Then
http://svn.atlassian.com/svn/public/contrib/clover/maven-clover-plugin/trunk/src/main/resources/META-INF/maven/lifecycle.xml

lifecycle
  idclover/id
phases
  phase
 idvalidate/id
 
executionsexecutiongoalsgoalinstrumentInternal/goal/goals/execution/executions


So when we run clover:instrument as part of a WAR project we see the
following things happening.

[INFO] [clover:instrument]
[...]
[INFO] [clover:instrumentInternal]
[...]
[INFO] [resources:resources]
[...]

[INFO] [war:war]

As part of clover:instrumentInternal, clover tries to override the
project artifacts and dependency artifacts.
This is done here:

http://svn.atlassian.com/svn/public/contrib/clover/maven-clover-plugin/trunk/src/main/java/com/atlassian/maven/plugin/clover/CloverInstrumentInternalMojo.java

 * @goal instrumentInternal
 * @phase validate
 * @requiresDependencyResolution test

 private void swizzleCloverDependencies()
{
getProject().setDependencyArtifacts(
swizzleCloverDependencies(
getProject().getDependencyArtifacts() ) );
getProject().setArtifacts(
swizzleCloverDependencies( getProject().getArtifacts() ) );
}


According to the debug logs, the swizzleCloverDependencies does the
thing properly:

[INFO] [clover:instrumentInternal]
[...]
DEBUG] [Clover]  source root
[C:\b2bdev\projects\helloWorld\webapp\src\test\java]
[DEBUG] [Clover] List of dependency artifacts after changes:
[DEBUG] [Clover]   Artifact [junit:junit:jar:3.8.1], scope = [test]
[DEBUG] [Clover]   Artifact [com.cenqua.clover:clover:jar:2.1.0],
scope = [compile]
[DEBUG] [Clover]   Artifact [com.test.helloworld:app:jar:clover:1.0],
scope = [compile]
[DEBUG] [Clover] List of artifacts after changes:
[DEBUG] [Clover]   Artifact [junit:junit:jar:3.8.1], scope = [test]
[DEBUG] [Clover]   Artifact [com.test.helloworld:app1:jar:clover:1.0],
scope = [compile]
[DEBUG] [Clover]   Artifact [com.test.helloworld:app:jar:clover:1.0],
scope = [compile]
[DEBUG] Configuring mojo
'org.apache.maven.plugins:maven-resources-plugin:2.2:resources' --

The problem is when the war mojo is invoked later on, the list of
artifacts is still the old one. I.e. we miss some clovered artifacts.

Did the forked life cycle stop after the execution of the
instrumentInternal mojo and did the changes setArtifacts() get lost ?

Or should I expect maven to appropriately pass the appropriate
artifacts to the war mojo, as invoked as part of this special lifecyle
?

Cheers,

Jerome

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



Re: [SURVEY] How does your team retrieve artifacts?

2008-05-21 Thread Jerome Lacoste
On Wed, May 21, 2008 at 8:15 AM, Jason van Zyl [EMAIL PROTECTED] wrote:
 Hi,

 [X ] Our team uses HTTP to retrieve our artifacts

Jerome

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



Re: java webstart plugin: sign (one/all) depnendencies?

2008-05-17 Thread Jerome Lacoste
On Sat, May 17, 2008 at 7:02 PM, Jan Torben Heuer
[EMAIL PROTECTED] wrote:
 HI, I generate a webstart application with:

 mvn org.codehaus.mojo.webstart:webstart-maven-plugin:jnlp

 I used the example config from:
 http://coffeebreaks.org/tmp/maven-staging/webstart/site/jnlp-mojos-overview.html

 How can I tell the plugin to also sign all dependencies - or at minimum one
 of them? They want to access the filesystem so (AFAIK) they have to be
 signed, too.

The plugin should sign all your dependencies. If it doesn't:

* try to use the jnlp-inline mojo instead
* try to use -X to see the debugging information

Jerome

PS:

* mailing list for mojo plugins is [EMAIL PROTECTED]

* official site for plugin documentation is
http://mojo.codehaus.org/webstart/webstart-maven-plugin/index.html

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



Re: Problem with exec mojo after update

2008-05-14 Thread Jerome Lacoste
On Wed, May 14, 2008 at 4:37 PM, alex.g [EMAIL PROTECTED] wrote:

 I am using netbeans ide 6.1 and this morning I upgraded my maven plugin to
 3.1.1.

version 3.1.1 doesn't exist.

[...]

 [ERROR]
 The following mojo encountered an error while executing:
 Group-Id: org.codehaus.mojo
 Artifact-Id: exec-maven-plugin
 Version: 1.1-beta-1
 Mojo: exec

It looks like you are using 1.1-beta-1. Can you try version 1.1
(released earlier this week).
There were some known issues with spaces already fixed since
1.1-beta-1. E.g. http://jira.codehaus.org/browse/MEXEC-44

Thanks,

Jerome

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



Re: Problem signing a jar

2008-05-13 Thread Jerome Lacoste
On Tue, May 13, 2008 at 5:08 PM, Software Developer
[EMAIL PROTECTED] wrote:
 Hi

  I am trying to sign a jar, but build fails.
  The funny thing is that if I copy the same command from maven trace and
  execute it over the command line, it works OK.
  I hope someone could lend me a hand, thanks!

  Dan

  Here goes the info.

  So, this command executes OK:
  D:\WORKSPACES\USERS_ALERTS\usersC:\Program
  Files\Java\j2sdk1.4.2_15\jre\..\bin
  \jarsigner.exe -keystore C:\Documents and Settings\danmayolo/.keystore
  -storep
  ass password1 -keypass password1
  D:\WORKSPACES\USERS_ALERTS\users\target\users-1
  .0.2-20080511.jar mykey
  --
  This is my POM:
  ?xml version=1.0 encoding=UTF-8?
  project
 parent
 artifactIdmaven/artifactId
 groupIdnet.excelsystems/groupId
 version1.0/version
 relativePath../maven/relativePath
 /parent
 modelVersion4.0.0/modelVersion
 groupIdnet.excelsystems.framework/groupId
 artifactIdusers/artifactId
 version1.0.2-20080511/version
 nameExcelsystems Users/name
 descriptionUser administration module/description
 build
 sourceDirectorysrc/sourceDirectory
 plugins
 plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-jar-plugin/artifactId
 version2.1/version
 executions
 execution
 goals
 goalsign/goal
 /goals


Problem is known and fixed in jar plugin 2.2:
http://jira.codehaus.org/browse/MJAR-49

Upgrade to maven-jar-plugin version 2.2.

Jerome

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



Re: Maven exec plugin

2008-05-10 Thread Jerome Lacoste
On Fri, May 9, 2008 at 4:50 AM, avin98 [EMAIL PROTECTED] wrote:

 I'm trying to run a shell script from a maven goal.

 Here's my definition

 build
plugins
  plugin
groupIdorg.codehaus.mojo/groupId
artifactIdexec-maven-plugin/artifactId
executions
  execution
goals
  goalexec/goal
/goals
  /execution
/executions
configuration
  executable/bin/sh/executable
  arguments
argumentrun.sh/argument
  /arguments
/configuration
  /plugin
/plugins
  /build

 When I call mvn exec:exec I get the following error

 [INFO] One or more required plugin parameters are invalid/missing for
 'exec:exec'

 [0] inside the definition for plugin: 'exec-maven-plugin'specify the
 following:

 configuration
  ...
  executableVALUE/executable
 /configuration

 -OR-

 on the command line, specify: '-Dexec.executable=VALUE'

 [INFO]
 
 [INFO] Trace
 org.apache.maven.lifecycle.LifecycleExecutionException: Error configuring:
 org.codehaus.mojo:exec-maven-plugin. Reason: Invalid or missing parameters:
 [Mojo parameter [name: 'executable'; alias: 'null']] for mojo:
 org.codehaus.mojo:exec-maven-plugin:1.1-beta-1:exec
at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:568)
at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
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.PluginParameterException: Error
 configuring: org.codehaus.mojo:exec-maven-plugin. Reason: Invalid or missing
 parameters: [Mojo parameter [name: 'executable'; alias: 'null']] for mojo:
 org.codehaus.mojo:exec-maven-plugin:1.1-beta-1:exec
at
 org.apache.maven.plugin.DefaultPluginManager.checkRequiredParameters(DefaultPluginManager.java:907)
at
 org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:612)
at
 org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:421)
at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
... 16 more
 [INFO]
 
 [INFO] Total time: 1 second
 [INFO] Finished at: Thu May 08 19:49:56 PDT 2008
 [INFO] Final Memory: 3M/6M
 [INFO]
 



I cannot reproduce the problem (see below. I used maven 2.0.8).

* exec mojo issues are reported on the mojo user list
* please create a test case that reproduces the issuer and tell us
more of your environment

[EMAIL PROTECTED]:/tmp$ cat run.sh
echo Working
[EMAIL PROTECTED]:/tmp$ cat pom.xml
project
  modelVersion4.0.0/modelVersion
  groupIdorg.cb.maven.plugins.exec/groupId
  artifactIdtest/artifactId
  version0.1/version
  packagingjar/packaging

  build
   plugins
 plugin
   groupIdorg.codehaus.mojo/groupId
   artifactIdexec-maven-plugin/artifactId
   version1.1-beta-1/version
   executions
 execution
   goals
 goalexec/goal
   /goals
 /execution
   /executions
   configuration
 executable/bin/sh/executable
 arguments
   argumentrun.sh/argument
 /arguments
   /configuration
 /plugin
   /plugins
 /build
/project
[EMAIL PROTECTED]:/tmp$ mvn exec:exec
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'exec'.
[INFO] 

Re: How to instruct Maven to run more than one script?

2008-05-10 Thread Jerome Lacoste
On Sat, May 3, 2008 at 2:20 AM, Tawfik, Sameh E
[EMAIL PROTECTED] wrote:

 Hi,

 I've two Perl scripts, Before_Build.pl, and After_Build.pl  that I
 need to run the first one before the build starts and the other one
 after the build is complete.

 So, what is the command line syntax to run a full build with the above
 requirements?

Extract from the soon to be published FAQ of the exec mojo:

Q: How to execute the plugin multiple times ?

Use several execution nodes each with a different id. Don't forget
to bind each execution to a phase.

Read the full answer here:
http://article.gmane.org/gmane.comp.java.maven-plugins.mojo.user/1307




 I've the following code in my pom.xml:

 plugin
   groupIdorg.codehaus.mojo/groupId
   artifactIdexec-maven-plugin/artifactId
   executions
 execution
   goals
 goalexec/goal
   /goals
 /execution
   /executions
   inheritedfalse/inherited
   configuration
 executableBefore_Build.pl/executable
 arguments
   argument20/argument
 /arguments
   /configuration
 /plugin

 plugin
   groupIdorg.codehaus.mojo/groupId
   artifactIdexec-maven-plugin/artifactId
   executions
 execution
   goals
 goalexec/goal
   /goals
 /execution
   /executions
   inheritedfalse/inherited
   configuration
 executableAfter_Build.pl/executable
 arguments
   argument20/argument
 /arguments
   /configuration
 /plugin

 I can successfully execute the first Perl script Before_Build.pl from
 the command line, by running the following command:

  C:\projectsmvn -N exec:exec -Dexec.executable= Before_Build.pl


   Thanks,

 Sameh
 This email and any files transmitted with it are confidential, proprietary
 and intended solely for the individual or entity to whom they are addressed.
 If you have received this email in error please delete it immediately.


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





-- 
Jerome Lacoste, +47 40867729, Daglig Leder, CoffeeBreaks AS

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



Re: webstart question

2008-04-04 Thread Jerome Lacoste
On Thu, Apr 3, 2008 at 12:42 PM, walterw [EMAIL PROTECTED] wrote:

  Hi,

  Here is my pom.xml that corresponds to the webstart:

Walter

I also highly recommend you to look at the various integration tests

http://svn.mojo.codehaus.org/browse/mojo/trunk/mojo/webstart/webstart-maven-plugin/src/it

it002, it003 and it006 deal with webstart + WARs (some with the jnlp,
others with jnlp for download servlet).

As for your code, have you tried with the jnlp-inline mojo instead ?

There a bit of confusion in the naming of the mojos and when to use
them. I need to clean this up, but I wonder if the least confusing is
not to rename them completely.

J

  [code]
  !--WebStart Application for administration --

 !--

 plugin

 groupIdorg.codehaus.mojo/groupId

 artifactIddependency-maven-plugin/artifactId

 executions

 execution

 phaseprocess-resources/phase

 goals

 goalunpack/goal

 /goals

 /execution

 /executions

 configuration

 artifactItems

 artifactItem

 groupIdcom.walterjwhite/groupId

 artifactIdadministration-jnlp/artifactId

 version1.0/version

 typezip/type

 /artifactItem

 /artifactItems


  
 outputDirectory${project.build.directory}/${project.build.finalName}/webstart/outputDirectory

 /configuration

 /plugin

 --

 !--

 plugin

 groupIdorg.codehaus.mojo/groupId

 artifactIdwebstart-maven-plugin/artifactId

 executions

 execution

 goals

 goaljnlp/goal

 /goals

 /execution

 /executions

 configuration


  
 inputTemplateResourcePath${project.basedir}/src/main/webapp/jnlp/inputTemplateResourcePath

 libPathlib/libPath

 jnlp

 outputFileadministration.jnlp/outputFile

 
 mainClasscom.walterjwhite.gui.AdministrationForm/mainClass

 /jnlp

 sign

 keystore/keystore

 keypass/keypass

 storepass/storepass

 storetype/storetype

 alias/alias

 validity/validity



 dnameCn/dnameCn

 dnameOu/dnameOu

 dnameO/dnameO

 dnameL/dnameL

 dnameSt/dnameSt

 dnameC/dnameC



 verifytrue/verify

 /sign



 pack200true/pack200

 gziptrue/gzip

 outputJarVersionstrue/outputJarVersions

 verbosetrue/verbose



 /configuration

 /plugin

 --
  [/code]


  Thanks,
  Walter
  --
  View this message in context: 
 http://www.nabble.com/webstart-question-tp16302197s177p16467388.html


 Sent from the Maven - Users mailing list archive at Nabble.com.


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





-- 
Jerome Lacoste

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



default checksumPolicy is warn. Can we switch to fail ?

2008-03-29 Thread Jerome Lacoste
Hei,

I think there's a problem somewhere in the artifact downloading process. And
I also wonder why the default checksumPolicy is warn.

Because of a flaky internet line, my local repository got badly corrupted
and basic things didn't work at all in very strange ways. The cause: jars
were incompletely downloaded. This happened with maven 2.0.6. I will try
with 2.0.8 or .9rc if I can.

Here's a way to identify invalid jars in your local repo:

$ cat isbrokenjar.sh
#!/bin/bash
jar tf $1 21  /dev/null || echo INVALID $1
$ find ~/.m2/repository/ -name *.jar | xargs -l1 ./isbrokenjar.sh
INVALID /home/jerome/.m2/repository/com/jcraft/jzlib/1.0.7/jzlib-
1.0.7-javadoc.jar
[...]

These download errors went unnoticed. The only thing maven detected was a
checksum failure. I would argue that the problem should have been detected
before the checksum verification. I am not yet sure where the problem lies,
so I haven't yet opened an issue. Maybe httpclient underneath wagon http
provider ?

But I have a question regarding the checksum policy.

I've tracked down the original decision for the default checksum policy
setting: http://jira.codehaus.org/browse/MNG-339 which states that the
default was warn because of problems with bad checksums being a problem for
bootstrapping [2]. This was in 2005. Are these problems still valid ? Could
maven switch to a fail default policy ?

[1]
http://maven.apache.org/ref/2.0.8/maven-settings/settings.html#class_releases
[2]
http://svn.apache.org/viewvc/maven/components/trunk/maven-artifact/src/test/java/org/apache/maven/artifact/ArtifactComponentTestCase.java?rev=191536content-type=text/vnd.viewcvs-markup


Re: Is there a tool that can dowload and package the dependencies from Maven repository?

2008-01-23 Thread Jerome Lacoste
On Jan 24, 2008 7:59 AM, Ryan H. [EMAIL PROTECTED] wrote:
 Hello,

 I have a need to download some of dependencies off maven repository and then
 package all of them to a zip file for distribution because my customers
 don't use maven. Is there such off-shelf tool that can accomplish such need?


Yes: maven


Create a pom that list your dependencies, and use the dependency plugin:

http://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-project-dependencies.html

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



Re: How to avoid creating a jar?

2008-01-20 Thread Jerome Lacoste
On Jan 18, 2008 5:39 PM, Joshua ChaitinPollak [EMAIL PROTECTED] wrote:
 Hello,

 we have a few projects we are building with Maven which do not result
 in jar's being the final output. For those projects we are using the
 maven-assembly-plugin, but when we run 'mvn package' we still end up
 with both our assembly and a jar. How can we prevent the jar from
 being created?

 Thanks, and sorry if this is a silly question.

what about using pom packaging ?

J

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



Re: Maven Variable to take the system date?

2007-12-31 Thread Jerome Lacoste
On Dec 31, 2007 9:26 AM, amit kumar [EMAIL PROTECTED] wrote:
 Oh, can I cope up with this?Any workaround?

change your format:

format{0,date,-MM-dd HH:mm:ss}/format

to something that suits your OS.

Jerome

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



Re: an mvn setup:diagnose would be nice at times like this :)

2007-12-30 Thread Jerome Lacoste
On Dec 30, 2007 3:01 AM, Pete Carapetyan [EMAIL PROTECTED] wrote:
 Thanks Stuart  for the idea on running the java program to make sure.
 Of course that works perfectly. But at least one more issue taken care
 of.

 So recapping, here is what it does NOT appear to be
 - proxy problem
 - java permission problem
 - firewall problem
 - network problem
 - JAVA_HOME problem

 Anyone else got any other brilliant ideas ?

Not brillant but things you could try:

* using another user from the same machine
* start by looking at your effective pom: mvn help:effective-pom
** ensure that you don't use a mirror, that your global
.m2\settings.xml are empty
* try forcing to go through a maven mirror
* try forcing to go through a proxy
* force central to be localhost and see how this goes.

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



Re: an mvn setup:diagnose would be nice at times like this :)

2007-12-29 Thread Jerome Lacoste
On Dec 29, 2007 1:39 PM, Pete Carapetyan [EMAIL PROTECTED] wrote:
 answer is inline below question:

 On Dec 29, 2007 6:30 AM, Tom Huybrechts [EMAIL PROTECTED] wrote:
  The UnknownHostException make this look like a network issue. Can you do a
  ping repo1.maven.org ?

 $ ping repo1.maven.org
 Pinging repo1.maven.org [63.246.20.112] with 32 bytes of data:

 Reply from 63.246.20.112: bytes=32 time=46ms TTL=52
 Reply from 63.246.20.112: bytes=32 time=46ms TTL=52
 Reply from 63.246.20.112: bytes=32 time=44ms TTL=52
 Reply from 63.246.20.112: bytes=32 time=45ms TTL=52

 Ping statistics for 63.246.20.112:
 Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
 Approximate round trip times in milli-seconds:
 Minimum = 44ms, Maximum = 46ms, Average = 45ms

Things that comes to mind:
* firewall or anti-virus
* something bad under %HOME%\.m2

You said you tried those, but I would tripple check (maybe you have 2
firewalls on the machine ? XP + separate one ? :)

If you have multiple users on that machine, try with them.

Jerome

PS: do you really log as Administrator on your machine ?

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



distributing files / set of files to remove server (maven wagon plugin ???)

2007-12-26 Thread Jerome Lacoste
Hei,

anyone knows if there's an easy and generic way to distribute a file
or a set of files to a remote server ?

Basically, I am searching for something that would wrap wagon and
understand the concept of server(s) (so that connection information
doesn't need to be in the POM).

The use case is for http://jira.codehaus.org/browse/MWEBSTART-25

Cheers,

-- 
Jerome Lacoste

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



Re: distributing files / set of files to remove server (maven wagon plugin ???)

2007-12-26 Thread Jerome Lacoste
On Dec 26, 2007 10:11 PM, Tom Huybrechts [EMAIL PROTECTED] wrote:
 If you need to deploy to application servers, take a look at Cargo.

cargo won't do it. I need to deploy to a file system through anything
available: ssh, ftp, webdav etc...

Cheers,

Jerome

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



Re: distributing files / set of files to remove server (maven wagon plugin ???)

2007-12-26 Thread Jerome Lacoste
On Dec 27, 2007 6:49 AM, Dirk Olmes [EMAIL PROTECTED] wrote:
 Jerome Lacoste wrote:
  Hei,
 
  anyone knows if there's an easy and generic way to distribute a file
  or a set of files to a remote server ?

 You want to look at the wagon plugin:
 http://myfaces.apache.org/wagon-maven-plugin/usage.html

That looks like what I am searching for. I had searched for maven
wagon plugin in Google but it looks like order of the words mattered.

Thanks !

J

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



Deploying multi-module third-party dependencies into a corporate repository. How to handle versionning (and sources and patches)

2007-12-19 Thread Jerome Lacoste
Hei,

I often have to build an external dependency and deploy it in our
corporate repository. For that I tend to use the deploy plugin
specifying the alternative repository using -DaltDeploymentRepository.
For complex projects, I need to deploy multiple artifacts, so the
deploy-file mojo isn't up to the task. If I use the deploy mojo, then
I run into a problem: I cannot specify the version, especially when
those are SNAPSHOTs.

I end up usually modifying the various POMs to specify the version
number I want my project to have when deploying (often suffixing the
number with a company id and patch number, and replacing SNAPSHOT with
the current date). This can be tedious if I don't script it, which I
usually do.

I am trying to see if there's a better way...

Has anyone a better solution ? Would a patch to the deploy mojo that
adds the part of the release:prepare mojo that changes the version
numbers be a good idea ? Any suggestion ?

A side problem is that I often have to track the changes made to the
project before being able to deploy. I end up making a code diff
manually and placing this diff somewhere, along with a description of
the changes. This patch might be interesting to deploy to the
artifactory, together with the sources, as part of the deploy plugin.
Maybe adding a set of flags -Ddeploysources -Ddeploydiff

-- 
Jerome Lacoste

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



Re: webstart-maven-plugin: jnlp configuration element missing.

2007-12-18 Thread Jerome Lacoste
On Dec 18, 2007 6:48 PM, Farrukh Najmi [EMAIL PROTECTED] wrote:

 I am trying to generate a webstart distribution for my UI using
 org.codehaus.mojo:webstart-maven-plugin:1.0-alpha-2-SNAPSHOT:jnlp

 I created my plugin configuration based upon examples provided. I am
 currently getting an error suggesting that the jnlp element is missing.
 But its not missing. What could be wrong?

please post questions related to the webstart mojo plugin to the mojo user list.

Thanks,

J

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



Re: Surefire can't find resource if forkMode=once

2007-12-18 Thread Jerome Lacoste
On Dec 18, 2007 8:21 PM, vetalok [EMAIL PROTECTED] wrote:

 Hi all
 I have maven 2.0.7 and the latest surefire plugin.
 Surefire can't find resource if forkMode=once ( if forkMode=never it works)
 Here is snip of code:
 BaseStandaloneTest.class.getResource(/login.conf).toString();

Class#getResource delegates to the class ClassLoader getResource method.

I.e. the above code is similar to:

  BaseStandaloneTest.class.getClassLoader().getResource()...

Try using the Context ClassLoader.

i.e.

Thread.currentThread().getContextClassLoader().getResource()

J

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



Re: Multi-modules execution order

2007-12-12 Thread Jerome Lacoste
On Dec 11, 2007 10:12 AM, Jeff MAURY [EMAIL PROTECTED] wrote:
 Hello,

 I have the following problem:
 A multi module POM (called M) has tow modules A and B.
 If I run Maven on M, then the execution order is A,B and M.

 Now, let assume that M is the parent of A and B.
 The execution order is changed to M,A and B
 This causes me some trouble because I want to run plugins when M is builded
 that need to get stuff from A and B in the local repository.
 Another case is that you want to generated Javadoc with M and A or B cause
 generation of source files : if M is executed before A and B, then the
 Javadoc may be incomplete !!!

 Does everyone has experienced the same problem and is it a Maven bug or a
 Maven feature ?

 Thanks
 Jeff

By making the parent module also contain build operations that depend
on the children, you basically created some sort of dependencies
cycle.

Move the files to build (probably all src/main src/test src/it...)
from M into a new sub-module (called C) and make C depend on A and B.
Keep your parent POM a simple 'aggregator' that doesn't contain
anything to build and just reference all the sub-modules.

Cheers,

Jerome

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



Re: release of maven jar plugin 2.2 in the near future ?

2007-12-08 Thread Jerome Lacoste
On Dec 6, 2007 1:44 AM, Jerome Lacoste [EMAIL PROTECTED] wrote:

 Hei,

 The latest maven jar plugin release was in August 2006. Is there any plan
 to make a release this year ? :)

 http://jira.codehaus.org/browse/MJAR/fixforversion/12878

 I see 5 issues still targeted for 2.2 (among which 2 MJAR-78, MJAR-84 have
 a patch).


Olivier made some fixes and there are now only 2 remaining issues (that
sound like new features to me).

http://jira.codehaus.org/browse/MJAR/fixforversion/12878

Olivier, is your plan to fix the 2 remaining issues then call for a release
? If so, I can allocate some time tomorrow for them.

If not, what will be the release plans for the plugin ?

Cheers,

Jerome


Re: Maven 2 JNLP

2007-12-07 Thread Jerome Lacoste
On Dec 7, 2007 8:57 AM, Ahmet Aytekin [EMAIL PROTECTED] wrote:

 Hi

 what is the right plugin for jnlp. I have tried maven-webstart-plugin
 with no luck. I also saw the maven 2 plugin list that there is maven-
 jnlp-plugin but I couldn't find any documentation. Appreciate any help.



The plugin is alive. The next webstart plugin will be released soon with the
following changes:
http://jira.codehaus.org/browse/MWEBSTART/fixforversion/13112

I am waiting for a release of the maven jar plugin.

If you have issues with the webstart plugin, feel free to ask exactly what
are your problems with it.

Cheers,

Jerome


release of maven jar plugin 2.2 in the near future ?

2007-12-05 Thread Jerome Lacoste
Hei,

The latest maven jar plugin release was in August 2006. Is there any plan to
make a release this year ? :)

http://jira.codehaus.org/browse/MJAR/fixforversion/12878

I see 5 issues still targeted for 2.2 (among which 2 MJAR-78, MJAR-84 have a
patch).

There are also many issues that are waiting, some with patches.

I can help triaging/fixing the remaining issues as long as there's a plan
for the release. Otherwise I will have to temporarily fork the sign mojo
into the webstart plugin to be able to properly release it.

Any takers ?

Cheers,

-- 
Jerome Lacoste


Re: Java doc generation

2007-10-22 Thread Jerome Lacoste
On 10/20/07, Vincent Siveton [EMAIL PROTECTED] wrote:
 Hi,

 The problems should be fixed in svn. Could you try again with a
 SNAPSHOT version?

Vincent,

did you release a new snapshot after making those changes ?

The last since to be from the 11th of Octover:

http://people.apache.org/repo/m2-snapshot-repository/org/apache/maven/plugins/maven-javadoc-plugin/2.4-SNAPSHOT/

(and I am now seeing MJAVADOC-156 on my projects)

Cheers,

jerome

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



Re: Problem with Webstart Plugin

2007-08-25 Thread Jerome Lacoste
On 7/27/07, David C. Hicks [EMAIL PROTECTED] wrote:
 I have an intermittent problem with the WebStart plugin that I hope
 someone might be able to help me with.  Occasionally, but more often
 than not, I get the following exception from the plugin:

 java.lang.IllegalStateException: the number of signed artifacts differ
 from the number of modified artifacts.

 This same build works great on my machine at the office, but fails often
 on my machine at home.  I'm running JDK 1.4.2_13, but using the JDK
 1.5.0_12 jar signer because it runs faster.  (A simple symlink redirects
 to the jar signer from my 1.4.2 installation.)

 The exception I see when I add the -e flag to my maven build doesn't
 really give me any additional information.  Any ideas?

 Thanks,
 David

David, use the Mojo users list to report problems about the webstart plugin.

The failure you have is an internal check inside the webstart plugin.

Can you try to use maven -X and port a log of the failed execution ?

mvn -X   mvn.log

Jerome

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



webstart plugin users: please test the latest snapshot (1.0-alpha-2 around the corner)

2007-08-23 Thread Jerome Lacoste
Hei,

I want to release a new version of the webstart plugin, so all those
interested this plugin should  make sure the latest SNAPSHOT works for
them.

I've uploaded the latest snapshot:

http://snapshots.repository.codehaus.org/org/codehaus/mojo/webstart-maven-plugin/1.0-alpha-2-SNAPSHOT/

webstart-maven-plugin-1.0-alpha-2-20070823.210958-8.jar

Report any issue to Jira. Thank you.

Cheers,

-- 
Jerome Lacoste

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



not possible to use empty values in Collection for plugin configuration.

2007-08-09 Thread Jerome Lacoste
Hei,

[This question is highly related to plexus]

How does one pass an empty value in the configuration of a plugin ? I
am facing the problem using the exec plugin where I need to
conditionally enable a parameter based on a profile. It looks like
maven doesn't differentiate between empty elements in an array.

in argumentsargument/argument/arguments

I've tried

argument/argument
argument /argument
argument![CDATA[ ]]/argument (I also tried with tabs)

argument /argument
argument' '/argument

The first 3 are treated identically and the argument is filled with
null in the plugin config.
The last two break the command to execute.

I followed the maven code and it looks like a limitation in
plexus-container, probably because of overzealous trimming. To me this
is a limitation. Why is the parser removing content from my config ?

Is this something we want to fix ? I doubt as it would not be backward
compatible.

Any workaround to achieve my goal ? I know I can create a different
configuration in my profile but that duplicate a lots of code for not
much gain.

In the worst case, I can change the exec mojo to just ignore those
empty values. But that will only solve the problem for my plugin.

Cheers,

Jerome

ExecMojo code extract:

http://mojo.codehaus.org/exec-maven-plugin/xref/org/codehaus/mojo/exec/ExecMojo.html

134 if ( arguments != null )
135 {
136 for ( int i = 0; i  arguments.size(); i++ )
137 {
138 Object argument = arguments.get( i );
139 String arg;
140 if ( argument == null )
141 {
142 throw new MojoExecutionException(
143 Misconfigured argument, value is
null. Set the argument to an empty value
144 +  if this is the required behaviour. );


Cheers,

Jerome

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



Re: [POLL] maven-enforcer-plugin rules

2007-06-13 Thread Jerome Lacoste

On 6/12/07, Brian E. Fox [EMAIL PROTECTED] wrote:

I don't see why it could be rolled into a new rule. Call it the
beanshell rule or something.


you meant I don't see why it couldn't be rolled into a new rule, right ?

:)

J

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



Re: [POLL] maven-enforcer-plugin rules

2007-06-12 Thread Jerome Lacoste

On 6/12/07, ehsavoie [EMAIL PROTECTED] wrote:


Hi,
While the rule system provded is good for complex rules, I have found easier
to build an enforcer like plugin using java expressions as rules that are
evaluated at runtime using beanshell.
I have not enough time to port it to your rule system but i can send it to
you if you feel interested.
It gives an easy way to produce simple rules.


could that be retrofitted as an implementation to the official enforcer plugin ?

That way we can use the best of both worlds.

Jerome

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



Re: maven-clover-plugin

2007-06-01 Thread Jerome Lacoste

On 5/23/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

Hi Everyone,

I'm running the maven-clover-plugin with the instrument goal on a pom that
has modules.  The plugin fails on the ear project because it does not
contain java files.  Can I pass an exclude argument to the clover plugin
to skip this child project?


My understanding is that this is a regression in Clover 2.4 fixed in
2.5-SNAPSHOT

See http://jira.codehaus.org/browse/MCLOVER-74

Unfortunately there's no new snapshot of MCLOVER-75 and going back to
2.3 is not possible due to the expired license. This blocked my
evaluation of clover until I built my own version of the plugin. Maybe
the clover developers will want to push a release out soon to work
around this regression ?

Jerome

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



Re: Looking for a Build Team perspective

2007-05-24 Thread Jerome Lacoste

On 5/24/07, Ashwin E [EMAIL PROTECTED] wrote:


I'm not looking from a developer's perspective,i'm looking from a build team
perspective...Dev teanm continously submits new/updated files and I need to
deploy it into the application.I've identified the process that i can
implement using Maven-Continnum...I'll list the process...correct me or add
your inputs to it..

1.Dev checks in files into CVS
2.Maven runs :deploy goal, and deploys into the remote location
3.Now that the new/updated files have been deployed.How do I restart the
server?So that the changes can be reflected?

Is the process correct?



1. dev checks new files into CVS

2. your CI server monitors CVS and triggers a build when a change
happens. It notifies the users of the build results. Build encompasses
running some tests, usually the unit tests and maybe some or all of
your integration tests. You can decide there to deploy the snapshots
into your corporate snapshot repository and make them available to all
your developers (this could happen upon change, or at a specific time.
E.g. daily, or every hour. Whatever suits you best).

3. periodically you run a full integration test build. This is usually
slower and thus happens less often than the simple build. The
integration test build will typically use your latest snapshots, start
the target server, run the integration tests and stop the integration
test server.

now if you want to deploy your latest application onto a live server,
it depends if this is going to be a test or production server. With a
production server, you probably want to be able to rollback if you
have a problem. See
http://www.martinfowler.com/articles/continuousIntegration.html#AutomateDeployment
You can look into capistrano from rails, it should give you some ideas
as well. http://manuals.rubyonrails.com/read/book/17

Now how to trigger this automatic deployment? You can make this
operation part of any of these CI triggered builds or you can decide
to make it manual only. Hint:automated is good. This is usually done
periodically but depends on your usage of the target server (you don't
want to necessary redeploy while people are using the server for
tests). So you could make this part of your integration build, e.g. at
the end of it.

If you need to restart the server (either as part of your integration
tests or as part of your deployment onto your test/production server),
cargo may be an option (http://cargo.codehaus.org/).

Also look into the Book JUnit in Action (Manning, V.Massol)
(http://www.manning.com/massol/)

Cheers,

Jerome

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



meta-meta information in the POM (was Re: RequireMavenVersion failed)

2007-05-04 Thread Jerome Lacoste

On 5/3/07, A. Kevin Baynes [EMAIL PROTECTED] wrote:

Brian, you're right : there's a comment in the POM.xml also (found it
later), so the developers did a good job of trying to warn me... No
besmirchment of the Apache FTP team intended.


That's something I miss from maven: meta-meta data.

Often I take a decision that I will comment in the POM. E.g. the
reason why we choose a particular dependency version, etc... This
information is not available to the user nor the generated report,
forcing to read the POM.

It would be great if there was a way to comment any element in the POM
in such a way that these comments become available to the plugins.

Maybe something like: node comment=/node ?

Cheers,

Jerome

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



Re: Releasing from multiple modules

2007-05-01 Thread Jerome Lacoste

On 5/1/07, James Abley [EMAIL PROTECTED] wrote:

Sorry, another follow-up.

Is there a clean way to deploy the resulting zip file into a repository?

http://maven.apache.org/pom.html#maven_coordinates

The specified packaging types imply that it isn't possible.

Similarly, this indicates that the discussion is still on-going.

http://jira.codehaus.org/browse/MNG-1683

Otherwise, I have a locally built zip file which I have to manually
deploy into our internal repository, which would seem to be the wrong
way to do it.


see http://mojo.codehaus.org/build-helper-maven-plugin/attach-artifact-mojo.html

J

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



Re: Exclude some classes when package a jar.

2007-04-30 Thread Jerome Lacoste

On 4/25/07, Trevor Torrez [EMAIL PROTECTED] wrote:

How would you post process a jar and what phase would that process
be bound to?


using the assembly plugin during the package phase ?

J

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



war plugin: making optional optinal ?

2007-04-27 Thread Jerome Lacoste

Hi,

our project has several wars all bundled in an ear. In order to reduce
the size, we moved most of the dependencies to the ear using
optionaltrue/optional.

Now we would like the developers to be able to test  deploy the wars
independently and it is not possible due to the now 'missing'
dependencies.

I can see 2 options:

* use profiles. Not very flexible and project specific

* add an option to ignore the optional recommendations in the war
plugin. Later on perhaps create a new fullwar mojo that ignores the
optional recommendation by default and store the results in a
different war file. Attach the artifact.

mvn war -DignoreOptional=true
mvn war:fullwar // creates target/$warname-$version-fullwar.war ??

Maybe there's a third solution? Anyone doing similar today ? Comments ?

Cheers,

--
Jerome Lacoste

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



Re: war plugin: making optional optinal ?

2007-04-27 Thread Jerome Lacoste

On 4/27/07, Gregory Kick [EMAIL PROTECTED] wrote:

I think that instead of using optional, you have been meaning to use
scopeprovided/scope.  This would indicate that the jars are
necessary, but won't include them in your war because it is assumed
that it will be provided by the container, or in your case, the ear.


Nope. Cf last part of
http://maven.apache.org/plugins/maven-war-plugin/examples/war-manifest-guide.html


As far as your testing, you could setup a container that has those
artifacts as part of the common libraries and deploy to that.  For
example, if you're using the jetty plugin,
http://ramblingabout.wordpress.com/2007/01/12/jsf-on-jetty-and-maven/
says that you can just add them as dependencies for the plugin.  I
haven't tried it, but it seems reasonable.


That's not satisfying. I will have to put this environment each time
my dependencies are changed. That's just pushing the problem away.

Cheers,

Jerome

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



Re: war plugin: making optional optinal ?

2007-04-27 Thread Jerome Lacoste

On 4/27/07, Gregory Kick [EMAIL PROTECTED] wrote:

On 4/27/07, Jerome Lacoste [EMAIL PROTECTED] wrote:
 On 4/27/07, Gregory Kick [EMAIL PROTECTED] wrote:
  I think that instead of using optional, you have been meaning to use
  scopeprovided/scope.  This would indicate that the jars are
  necessary, but won't include them in your war because it is assumed
  that it will be provided by the container, or in your case, the ear.

 Nope. Cf last part of
 
http://maven.apache.org/plugins/maven-war-plugin/examples/war-manifest-guide.html

Ouch, that's a little disconcerting.  Here's what the pom reference
has to say about optional:

optional: Marks optional a dependency when this project itself is a
dependency. Confused? For example, imagine a project A that depends
upon project B to compile a portion of code that may not be used at
runtime, then we may have no need for project B for all project.

Since it sounds like none of your dependencies are optional in either
the english or maven senses of the word, I don't see the justification
for the way the war manifests are configured.What you've done
makes sense in terms of getting the desired effect, but not so much in
terms of the meaning of the metadata.


agreed


What I'd rather see is an option in the ear plugin for removing
artifacts from dependencies that are already present in APP-INF/lib.
That way, you can remove the optional tag completely, still have your
manifests the way you want, be able to test and still have your lean
ears.


That would be better as I would have to make a single change to my
project (the optimization could almost be on by default in a next
major release of the plugin).

The solution should also update the wars MANIFEST files.

Cheers,

Jerome

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



Re: How to execute a system command from maven 2?

2007-04-26 Thread Jerome Lacoste

On 4/26/07, Baz [EMAIL PROTECTED] wrote:

When i put in the following code, and run mvn exec:exec I receive
errors, do you know what is the issue?


for some reason the executable value is not passed. That can happen
e.g. if you specified the wrong groupId or artifactId.

I don't see the issue right now but it's probably something simple
like that. Anyway see below for better alternatives.


Do i need to run mvn exec:exec?


Yes. Or attach it to a particular phase



Can I incoroperate this into mvn clean so when i execute
clean, it will clean up specific directories for me?


There are simpler options:

http://maven.apache.org/plugins/maven-clean-plugin/examples/delete_additional_files.html

or

Maybe 
http://maven.apache.org/plugins/maven-dependency-plugin/purge-local-repository-mojo.html

Jerome

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



Re: m2.0.6 with false transitive dependencies fails on windows, works on linux

2007-04-25 Thread Jerome Lacoste

On 4/25/07, Geoffrey De Smet [EMAIL PROTECTED] wrote:

Since 2.0.6 maven is reacting differently on windows in linux for our poms.

We have some false transitive dependencies: transitive dependencies
that should be direct dependencies.
(We currently do this to avoid having to duplicate the version number as
the different projects don't have a common superpom.)

On linux, our poms compile fine,
on windows, our poms sometimes don't compile as some of those false
transitive dependencies start to go missing from our compile classpath.

The problem is that if someone commits something on linux, he's unsure
if it will build on windows.

Is this a known issue since 2.0.6?
Has anyone else seen this problem occur?


Are you sure something else is not creating the problem ?

Are you using the exact same build environment on both machines (e.g.
plugin versions are exactly identical, local caches contain the exact
same versions) ?

I would start by cleaning up the local repository and making sure both
machines use the exact same dependencies. One way to verify it, if you
cannot change all your poms right away, is to remove your local
repository, make a full build on both machines, compare results and
local repositories.

Cheers,

Jerome

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



Re: [m2] exec-maven-plugin java goal stops the build lifecycle

2007-04-22 Thread Jerome Lacoste

On 4/22/07, Adrian Herscu [EMAIL PROTECTED] wrote:

Hi Steven,

I am invoking Maven as usual:
mvn clean install

If I am removing the exec-maven-plugin then the build lifecycle
completes as expected.

Adrian.


1- report problems releated to the exec mojo project on the mojo user
list ( [EMAIL PROTECTED])

2- which version of the exec mojo are you using ?

3- what if you only do mvn install ? Is there still a problem of
shortened build lifecycle ?

4- can you send the relevant extract of your pom.xml as well as from
the ouput of mvn -X clean install ?

5- can you send a test project that reproduces the problem ?

Cheers,

Jerome

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



Re: Starting a new java process from within a test case is hanging the maven JVM

2007-04-20 Thread Jerome Lacoste

On 4/20/07, Balasubramanian, Ravi Shankar [EMAIL PROTECTED] wrote:

Hi,
Following is my test class that starts a notepad process from within:
 public void startProcessNotepad() throws IOException {
Process p = Runtime.getRuntime().exec(notepad);
System.out.println(NOTEPAD STARTED);
}


When I execute this test through maven using mvn test through the
surefire plugin, maven does not exit until the notepad process is
closed/terminated.
I have attached the thread dump long along with this mail. Please look
into it and let me know if there is a way to work around this. I will
want to be starting a server process in one of my test cases and wants
maven to continue with other builds for whose test cases, the server
needs to be running.


maven forks the test execution. This forked execution doesn't
terminate so maven doesn't terminate.

As to why the forked execution doesn't terminate, it's because you
didn't spaw a new process independent of the original one.

To achieve this you will have to use a cmd and special options. You
will also have to be careful at what your executed process does with
stdin/stdout/stderr

I suggest you to read this:
http://forums.java.net/jive/thread.jspa?threadID=24837

Jerome

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



Re: Starting a new java process from within a test case is hanging the maven JVM

2007-04-19 Thread Jerome Lacoste

On 4/19/07, Balasubramanian, Ravi Shankar [EMAIL PROTECTED] wrote:

Hi all,
I did work on this and found that maven's java process is not waiting
until all other processes started during the build is completed /
terminated. Following is what I did:

In one of my test cases, I start a new process using the java Runtime
class. For experimentation I executed the command notepad on windows
which would start a separate process for me. The test case is as
follows:
Process p = Runtime.getRuntime().exec(notepad);

When I do a mvn test, the java process started by the maven build does
not exit until the notepad is closed or terminated.

Is there a way or configuration in maven to work around such a setting
or is maven designed like this? I might want to be starting a server
like process in one of my test cases and would want maven to complete
the build which currently is not happening.


Again, can you provide a thread dump log ?

That will help us identify where maven hangs, and help us give you an answer.

Jerome

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



Re: Starting a new java process from within a test case is hanging the maven JVM

2007-04-18 Thread Jerome Lacoste

On 4/17/07, Balasubramanian, Ravi Shankar [EMAIL PROTECTED] wrote:

Hi all,

We use maven-surefire-plugin to run our testng test cases. I encountered
a problem where in the maven VM is hanging when one of the test cases
start a separate java process from within it using the java
ProcessBuilder class(which I think is inconsequential here). What I am
doing in the test case is starting a server which I need to be running
throughout my maven builds across different projects. (Some sort of
integration tests.). Following is the structure for my build:

[...]


Can one of you please let me know if there is any glitch anywhere in the
way I have coded my test case or in my setup?


Your problem can come from several places. The best way to
troubleshoot it is to obtain a thread dump from you JVM.

kill -3 PID under Unix, CTRL+Break on Windows I think.

J

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



Re: M2 : Controlling WEB-INF/lib contents in war

2007-04-17 Thread Jerome Lacoste

On 4/17/07, Shute, James [EMAIL PROTECTED] wrote:


The target layout I'm after is:

ear
|
|-lib
|  |-a.jar
|  |-b.jar
|
|-webapp
   |
   |-WEB-INF
   |-web.xml
   |-lib
   |-c.jar

I can't use warSourceExcludes as AFAIK excludes take precedence over


james,

I think you need to look at the bottom of
http://maven.apache.org/plugins/maven-war-plugin/examples/war-manifest-guide.html

in particular:

dependencies
   dependency
 groupIdorg.foo/groupId
 artifactIdbar-jar1/artifactId
 version${pom.version}/version
 optionaltrue/optional
 !-- goes in manifest classpath, but not included in WEB-INF/lib --
   /dependency
   dependency
 groupIdorg.foo/groupId
 artifactIdbar-jar2/artifactId
 version${pom.version}/version
 !-- goes in manifest classpath, AND included in WEB-INF/lib --
   /dependency
   dependency
 groupIdorg.foo/groupId
 artifactIdbar-jar1/artifactId
 version${pom.version}/version
 scopeprovided/scope
 !-- excluded from manifest classpath, and excluded from WEB-INF/lib --
   /dependency

Jerome

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



Re: [m2] exec-maven-plugin fails because path containing spaces

2007-04-17 Thread Jerome Lacoste

On 4/17/07, Adrian Herscu [EMAIL PROTECTED] wrote:

Good idea! Only problem is that antrun doesn't know about Ant 1.7...
(and I need a specific feature of a specific task which is available
only in Ant 1.7)


http://jira.codehaus.org/browse/MANTRUN-68

You can fix it yourself. You probably just need to update the pom, as
long as ant 1.7. is on ibiblio.

Jerome

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



Re: Add files to site upload

2007-04-17 Thread Jerome Lacoste

On 4/6/07, Wim Deblauwe [EMAIL PROTECTED] wrote:

Hi,

I use the site:deploy plugin to upload my site, which works great. However,
I now want to add some additional files to the site that are generated (by
the webstart-maven-plugin). The only way that I can currently do that, is by
letting those files get generated into src/site/resources/jnlp. I would like
to have them generated in target/site/jnlp so those generated files are not
mignled with my sources. Is this possible with the current site plugin or
should I file an enhancement request?


Wim,

I looked at the SiteMojo and SiteDeployMojo and I see nothing in them
that could . The first one creates the reports under
${project.reporting.outputDirectory} the second one copies this
directory using wagon on the remote server.

You should try to make the webstart plugin generate your files under

${project.reporting.outputDirectory}/jnlp

and it should work. Be sure to pick the right phase. You should use
the 1.0-alpha-2 SNAPSHOT release of the plugin and pick the right
mojo.

If that doesn't work, can you provide a test project ?

Cheers,

Jerome

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



Re: M2 enforcer plugin 1.0-alpha-2

2007-04-16 Thread Jerome Lacoste

On 4/16/07, Ian Springer [EMAIL PROTECTED] wrote:

Would someone please upload alpha-2 to the snapshots repo?

http://people.apache.org/maven-snapshot-repository/org/apache/maven/plugins/maven-enforcer-plugin/


alpha-2 is a release not a snapshot.

You will find it under:

http://ibiblio.org/maven2/org/apache/maven/plugins/maven-enforcer-plugin/

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



Re: q on mvn dependency plugin

2007-04-13 Thread Jerome Lacoste

On 4/13/07, franz see [EMAIL PROTECTED] wrote:


Good,

AFAIK, there's none. But please feel free to file a request in the jira for
that :-)


and send a patch !

J

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



Re: Analyze dependency tree without compiling

2007-04-13 Thread Jerome Lacoste

On 4/13/07, Geoffrey De Smet [EMAIL PROTECTED] wrote:

Hi all,

Is it possible to analyze the dependency tree without compiling?

Compiling gives a build failure, so the following commands don't work:
mvn dependency:analyze
mvn site


I think the analyzer uses the class files to identify unused dependencies...

It is build on top of asm (http://asm.objectweb.org/).
http://maven.apache.org/plugins/maven-dependency-plugin/dependencies.html

Not sure how this works with reflection though... But i guess the
relevant libs should be marked as runtime anyway.

Jerome

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



Re: Reuse plug-in code

2007-04-12 Thread Jerome Lacoste

On 4/12/07, Goel, Deepak [EMAIL PROTECTED] wrote:

How can I reuse existing plug-in code in writing my own plug-in? For
example, I wanted to reuse the existing install plug-in and tried to
extend my plug-in from InstallMojo. Since source code of InstallMojo
wasn't present, the generated plugin.xml didn't contain the proper
dependencies. So when I tried to call a method in base class
(InstallMojo), I got a NullPointerException as the properties it needs
weren't injected.


I am not sure that it is possible to reuse plugins that way.

The plexus friendly code that wires the maven/POM information into the
various properties doesn't seem to be reusable.

I usualy solve that by making the mojo to allow you to reuse the
reusable part. E.g. by adding setters:

E.g. 
http://svn.codehaus.org/mojo/trunk/mojo/keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/GenkeyMojo.java

Look at the bottom: these setters are not really required for plexus,
but I use them for tests and to reuse the mojo into another plugin.

If there's a better way, I am all ears.

Jerome

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



Re: How to generate manifest ClassPath entries for a web project?

2007-04-12 Thread Jerome Lacoste

On 4/12/07, Johan Eltes [EMAIL PROTECTED] wrote:


I'd like have all dependent jars of all modules of my enterprise
application bundled in the ear - not in WEB-INF/lib directories of my
war files. Is this possible with maven 2? I would also like maven to
generate the required ClassPath entries in the war manifest file.
I've found out how to accomplish the same tasks for ejb projects, but
haven't found any hints on war projects.




Read

http://maven.apache.org/plugins/maven-war-plugin/examples/war-manifest-guide.html

J


Re: Did webstart-maven-plugin 1.0-alpha-2-SNAPSHOT change the artifact type?

2007-04-12 Thread Jerome Lacoste

On 4/10/07, Mykel Alvis [EMAIL PROTECTED] wrote:

I just updated to 1.0-alpha-2-SNAPSHOT of the webstart mojo.  Did the
artifact type change?  The behavior I see now is similar to pom processing,
which makes sense since the artifact type is pom.


[Please post issues to the Mojo users list.]

There may be an issue with regard to binding the jnlp mojo to the
package phase. See the threads there.

Note that both plugins are not compatible and you will have to use the
right mojo depending to your needs. Look at the doc in the trunk (not
the online one).

Jerome

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



Re: Maven users in the industry

2007-04-11 Thread Jerome Lacoste

On 4/11/07, Gilles Scokart [EMAIL PROTECTED] wrote:


Hi,

Next week I have to make a presentation to my collegues.  I will try to
'sell' maven, and I would like to say something like Look, Maven is now
very used in the industry, It's for instance used by 

Did you know any companies using Maven, more particularily in Belgium and
Europe, but worlwide would be ok also?


You should ask the BeJUG. I am sure they can give you some numbers.

I remember seeing more than 30 persons on a talk on maven 
cruisecontrol last year. Most if not all of them were already using
maven.

Jerome

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



Re: Exclude some classes when package a jar.

2007-04-11 Thread Jerome Lacoste

On 4/11/07, JesseLiu [EMAIL PROTECTED] wrote:

All,
I have a jar project.  When packaging,  I want  some specified class excuded 
from the jar file. How should I do ?

Thanks for any suggestions!


not sure if this is possible before the packaging. You can always
post-process your jar to remove some classes,  but I wonder why you
need that

What kind of classes do you need to remove ?

Jerome

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



Re: incorrect dependencies in assembly

2007-04-11 Thread Jerome Lacoste

On 4/11/07, kelvin goodson [EMAIL PROTECTED] wrote:

I'm just coming back to look at this.  I'm interested to know whether my
question did not make sense or whether no-one has the answer.  Please help
if you can.


tracking down unwanted dependencies is usualy done using mvn -X.
I believe the assembly plugin to display information there.

Do you use the latest stable assembly plugin ?

J

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



Re: Project Inheritance reference to parent dependency?

2007-04-10 Thread Jerome Lacoste

On 4/10/07, DI Kurt Edegger [EMAIL PROTECTED] wrote:

Hi,

I do have a question regarding referencing the parent pom of a multi module project as 
described in chapter 3 of Better Builds With Maven.
If a project consists of multiple modules (e.g.: api, core,  model, ..), these 
modules reside in sub-directories of a top level directory. Each module has 
it's own pom.xml and the top level directory
holds a pom.xml where project global settings are defined. Each module's pom 
sets a reference to the parent, by defining the following snippet:
parent
   groupId/
   artifactId/
   version/
/parent

Is there a way to reference the parent module without explicitly specifying the 
version? In a scenario where all modules are released at the same time, their 
version should be the same, so the
application version is defined in the parent pom.xml. But whenever this version 
changes, all references in the sub-modules need to be updated.

It's cumbersome to manually edit every pom.xml in every sub-directory, just 
because the application version has changed.

Do I miss something here?


Yes: http://maven.apache.org/plugins/maven-release-plugin/

The plugin will take care if the POM updates for you.

Jerome

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



Re: Problem with replaceregexp in maven 2

2007-04-07 Thread Jerome Lacoste

On 4/6/07, Lacoste, Dana [EMAIL PROTECTED] wrote:

Testing this has been exceedingly difficult (our project takes
over an hour to build and some components are failing for me,
so I keep tracking down changes rather than moving on to my
testing :)

But this SEEMS to work:

In the parent pom (and all parent poms of affected antruns)
add a build section that does nothing but call antrun.

So if project looks like:

project/pom.xml
project/component1/pom.xml
project/component1/libraryA/pom.xml
project/component2/pom.xml
project/component2/libraryB/pom.xml

If I need to add an antrun with dependencies in LibraryB, but
that Library depends on Library A (so if I'm building the whole
project, LibraryA will always run first, but if I'm building LibraryB
by itself, I can do so direct in its pom.

I added the code below to project/pom.xml, project/component2/pom.xml,
and project/component2/libraryB/pom.xml (well, technically that last
one already worked, so I used the existing code, but the concept's
the same.)

This seems to make sure my dependencies are set, regardless of where
I start the build or what order it's run in.  It's silly and redundant,
but it seems to work :)

  build
plugins
  plugin
artifactIdmaven-antrun-plugin/artifactId
dependencies
  dependency
groupIdant/groupId
artifactIdant-nodeps/artifactId
version1.6.5/version
  /dependency
  dependency
groupIdjakarta-regexp/groupId
artifactIdjakarta-regexp/artifactId
version1.4/version
  /dependency
  dependency
groupIdant/groupId
artifactIdant-jakarta-regexp/artifactId
version1.6.1/version
  /dependency
/dependencies
  /plugin
/plugins
  /build

What do you think?  I'm fairly new to maven, so I'm trying
to learn the intricacies of how it's supposed to work while
I go along :)

Thanks,

Dana


Let's stay on list :)

You implemented the work-around proposed by Brett:

http://jira.codehaus.org/browse/MNG-1323#action_54948

So it looks like it should work.Kenney said underneath that there's no
working work-around. I am not sure if that applies to your particular
case.

Hope for you that future version of maven won't break your solution...
If I were you I would try maven 2.0.5 or 2.0.6 to see if that still
works. If that still works, you should also probably follow the list
and try any future release candidates for maven: you really want to
catch regressions before they get into an official release.

Cheers,

Jerome

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



Re: Problem with replaceregexp in maven 2

2007-04-05 Thread Jerome Lacoste

On 4/5/07, Lacoste, Dana [EMAIL PROTECTED] wrote:

OK, well, I still don't have a solution as to why this doesn't work :)

But I've figured out a way to make it go at least :)

http://www.nabble.com/Classloader-issue-with-ant-optional-tasks-in-a-hie
rarchical-structure-tf2431669s177.html#a6780357

That earlier post (October 12, 2006) showed someone with a similar
problem.
The problem appears to be that if the maven-antrun-plugin is called
BEFORE
you declare the dependencies as in below (i.e. from a different level
pom
in the project), then these dependencies will be IGNORED

So you have to include the dependencies mentioned in the above link,
in the format in the above link, in the first call to
maven-antrun-plugin
in the project.

So, basically, you need to do it in the super pom.

And if you want it to work in the child pom, I guess you have to do it
there too.

Any suggestions on how to make that work easier?  Perhaps a way of
defining plugin dependencies in the parent pom without calling them, so that if
the plugin is called anywhere in the child, it will inherit those
dependencies properly?


Hei Dana,

http://jira.codehaus.org/browse/MNG-1323

One of the most voted issue I think.

Seems like there's no solution today. At least I don't have a work-around.

I would probably try to use a different approach when trying to
generate this file. Avoid using the ant run plugin and a regular
expression altogether. Can't you just use the standard resource
filtering (maybe filtering it twice, once for 'define VERSION' once
for 'define TEST') ?

If that doesn't work, you can also write your own maven2 regexp
plugin... That shouldn't be too much work.

Cheers,

Jerome (also Lacoste, from the other side of the ocean)

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



Re: Classloader issue?

2007-04-04 Thread Jerome Lacoste

On 4/3/07, James CE Johnson [EMAIL PROTECTED] wrote:

I'm writting a MoJo that uses a utility Iwhich, in turn, uses Spring. When I
invoke the utility (with the correct classpath) from the command line
everything works fine. When I invoke the MoJo from Eclipse everything still
works fine. However, when I invoke the MoJo from mvn it tells me:

org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected
exception parsing XML document from class path resource
[com/myco/foo/util/myUtility/engine.xml]; nested exception is
java.lang.IllegalArgumentException: Class
[org.springframework.beans.factory.xml.SimplePropertyNamespaceHandler] does
not implement the NamespaceHandler interface
Caused by: java.lang.IllegalArgumentException: Class
[org.springframework.beans.factory.xml.SimplePropertyNamespaceHandler] does
not implement the NamespaceHandler interface

A capture of the mvn invocation is at http://rafb.net/p/fOEW5I52.html

It smells like a classloader issue but I'm too new to m2 to know which way
to jump. Any ideas?


Sounds like a classpath issue. If you can, try to see what classpath
the following code sees:

at com.myco.foo.util.myUtility.ContextLoader.load(ContextLoader.java:14)
at com.myco.foo.util.myUtility.Main.execute(Main.java:47)

You may need to override the classpath given by maven to achieve your needs.

See also http://forum.springframework.org/showthread.php?t=35232

J

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



Re: ver number conflict in transitive dependency

2007-04-04 Thread Jerome Lacoste

On 4/4/07, Thinkboy [EMAIL PROTECTED] wrote:

hi,

my servlet-api version is conflict due to transitive dep

e.g.

i)  commons-logging-1.0.3.jar  - servlet-api-2.2.jar
ii) jetty-6.1.1.jar - servlet-api-2.2.jar


same version in both cases ?
Commons-logging depends on servlet-api ?


after I packaged all to /lib directory, in which both
servlet-api-2.2.jar and servlet-api-2.2.jar are located.
 when I try to run application which is built with Jetty. it throws
Exception bcos, jetty app loaded servlet-api-2.2.jar API instead of
servlet-api-2.2.jar


You mean you deployed your application under the jetty lib directory ?
Don't do that, use a war file.

Or you put the servlet API jars inside WEB-INF/lib ? What about using
scopeprovided/scope ?

Jerome

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



Re: Classloader issue?

2007-04-04 Thread Jerome Lacoste

On 4/4/07, James CE Johnson [EMAIL PROTECTED] wrote:

Hi Jerome,

My latest nohup.out is http://rafb.net/p/seMDUu17.html. I've dumped the
classloader of my app as well as the system classloader. It appears that I
have a RealmClassloader loading my classes and it has everything it needs.

However, http://rafb.net/p/qC12GT63.html captures my execution from within
Eclipse. Here we see that all of the dependencies are in the system
classloader.

Perhaps Spring is looking to the (mostly empty) system classloader in the
case where it fails?

Any insights would be appreciated.


In the xfire maven plugin, i've had to override the class loader,
otherwise Spring would not find the appropriate classes/resources. See

http://svn.codehaus.org/mojo/trunk/mojo/mojo-sandbox/xfire-maven-plugin/src/main/java/org/codehaus/mojo/xfire/WsdlgenMojo.java

I would guess that you need to do something similar in your plugin.

Cheers,

J

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



Re: Deployment on IBM WebSphere Application Server

2007-04-03 Thread Jerome Lacoste

On 4/3/07, Wayne Fay [EMAIL PROTECTED] wrote:

I don't use Websphere, but Cargo is a tool which helps deploy
applications into various app servers, and it has an M2 plugin you
might find useful.

http://cargo.codehaus.org/


That's indeed one way of doing, but to my knowledge cargo doesn't yet
support websphere...

Cheers,

Jerome

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



Re: Problem with Tools.jar when building a project with SUN JDK 1.5

2007-03-31 Thread Jerome Lacoste

On 3/31/07, Victor Katte [EMAIL PROTECTED] wrote:

Hello

I am having trouble building with Maven 2 using Sun JDK 1.5. The build is
looking for the Sun jar Tools.jar, but I have not got this in the JDK
distribution I installed on my system. The JAVA_HOME environment variable is
set to point to the location of my JDK( ie JAVA_HOME=c:\SDKs\jdk1.5.0.11)
and my platform is Windows XP. The output of the build is given below. Has
anyone encountered this problem before?


Are you sure it shouldn't be c:\SDKs\jdk1.5.0_11 instead ?

can you run

%JAVA_HOME%\bin\javac -version

?

J

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



Re: exec-maven-plugin: Swing app disappears immediately?

2007-03-30 Thread Jerome Lacoste

On 3/23/07, jason r tibbetts [EMAIL PROTECTED] wrote:

 I haven't tried this, but from reading
 http://mojo.codehaus.org/exec-maven-plugin/java-mojo.html 
http://mojo.codehaus.org/exec-maven-plugin/java-mojo.html
 I believe that
 cleanupDaemonThreads 
https://webmail.valtech.com/exchange/Barrett.Nuzum/Drafts/RE:%20exec-maven-plugin:%20Swing%20app%20disappears%20immediately_x003F_.EML/1_text.htm#cleanupDaemonThreads
  = false
 is what you want.

Thanks, Barrett. I didn't try that, but I did set keepAlive to true,
and that did the trick--despite the fact that the documentation says
that keepAlive is deprecated!


Please do NOT depend on a deprecated element. It will be removed in
the next version.

Second maven should stop. The even thread is not a daemon thread so
maven should not go on until the thread is terminated.

Maybe the event thread doesn't have the time to be fully started
before maven takes control again ?

If so, adding a Sleep(1 sec) at the end of your main() should solve it
until we find a better way to solve this.

Please open an issue in the Jira issue tracker.

Cheers,

Jerome

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



Re: How is CruiseControl compare to Continuum?

2007-03-27 Thread Jerome Lacoste

On 3/26/07, Baz [EMAIL PROTECTED] wrote:


All,

How is Cruisecontrol compare to Continuum? I am working on Maven 2
project and it seems to be pretty much integrated with Maven 2.

Considerations:

1. Integration with M2.

2. Control:
a. Does the interface allow both release engineers and developers to
start and monitor builds easily?
b. How does it compare in general?

3. Archive:
a. I am planning to perform varies builds. Nightly, ad-hoc and
continuous. How can we easily archive ad-hoc and nighly builds? This
will include both build output and maven 2.0 reports.




This was crossposted to the CC user list

http://thread.gmane.org/gmane.comp.java.cruise-control.user/16443

I answered there

Jerome


Re: Maven 2 can't find war plugin

2007-03-21 Thread Jerome Lacoste

On 3/22/07, Wayne Fay [EMAIL PROTECTED] wrote:


This is an interesting situation and certainly feels like a bug. I'd
say that Maven should *not* write the metadata file unless it actually
downloaded the plugin or successfully used it.

Has this been filed in JIRA, Wendy?




I reported an issue a couple of weeks ago (on the list), where maven was
unable to download some plugins until I did mvn -U.

Search for mvn 2.0.5 doesn't downlado plugin when missing ? (typo...)

http://www.nabble.com/mvn-2.0.5-doesn't-downlado-plugin-when-missing---t3387755s177.html

Could that be related ?

I've never seen that pre-2.0.5.

J


Re: Linux build Windows build asynchron

2007-03-20 Thread Jerome Lacoste

On 3/20/07, Christian Clauss [EMAIL PROTECTED] wrote:


Hello everybody,



I'm trying to do an asynchron build process. I have to build my files on a
Linux environment and on a Windows environment. Actually these two build
processes run one and then the other. I copy the files via the ant
scp-task
to the Linux machine and start the build process by running a shell
script.
When finished are the files copied back to Windows using the ant scp-task
again. Subsequently the build process on the Windows environment is
started.
The code is written in C++ so it's necessary that it is compiled on both
environments.

My question: is it possible in Maven2 that the build process on a Linux
environment is started and at the same time the Windows build is started?
After one of the two builds has finished, Maven2 has to wait for the other
process to finish and then continue. Is this possible to realise?



Thanks a lot for your endeavours to assist.




As Wayne said, I think you should be able to achieve this using a CI server.

I think the CruiseControl (http://cruisecontrol.sf.net) distributed
extension might help. There are perhaps other open source CI servers that
support distributed builds,

Jerome


Re: evangelising maven from the business benefits point of view

2007-03-18 Thread Jerome Lacoste

On 3/18/07, Adam Hardy [EMAIL PROTECTED] wrote:


I want the software house where I work to go to the next level with maven
from
where we are at the moment, which is a case of gross under-utilisation. We
use
maven as a glorified ant script to run tests and build jars.

There are several other projects in-house which have not been mavenised
but
could be, there is a great opportunity to implement maven's release cycle
management, and the need for configuration, filtering and profiles is
huge.

No-one on the project management side though has much interest in all the
reports, the QA, test coverage, continuous integration or release
management. I
have a meeting with a chief PM lined up and I have to present hard data in
terms
of developer-days saved if we put maven into place.

What is the best way to nail down potential future gains from mavenization
into
easily grasped cost savings? Are there any good stories out there on this
sort
of stuff? Does anyone have some experiences they would like to share in
this area?



Introducing a new technology will always incur a cost. And resistance to
change. So focus on the maven benefits and on the strategy to make these
changes happen.

Maybe can you start moving all projects to maven then improve your use of
maven. Or maybe you should start. Probably a mix of both.

* on projects not using maven. Compare them to those using maven. If maven
is already helping, and people in the team already recognize the benefits,
then this case is easier to argue. Further, you reduce the amount of
technology used across projects making it easier to move people around (or
when you take in new employees), or have site technology champions. Try to
first migrate the projects which are related to the ones that already use
maven (maybe because they use similar, or they share a pool of developers,
or are on the same network and share the same development server).

* on projects already using maven, you identify the gap doing 2 things:
** for each plugin listed under maven.apache.org and mojo.codehaus.org, see
if you're using it. If not, estimate what would be the cost of introducing
it, how often you would use it and what it would bring. Select the 4-5 most
relevant plugins. I guess the release one should happen there.
** look at your process, and identify areas where automation/uniformisation
would help. The plugin might exist, but it may not. Where do people make
recurrent costly errors (during development/deployment/maintainance/...)?
Can those be detected ? Think how you could make this part of the build.

* identify one project and start adding the things yourself. Don't start
with a too big of a project. Do this on your own time if you don't get
approval. Make it in a branch if necessary. After some weeks, compare the
before  after states. Be objective. Still for each costs look if these
costs would go down if you were to share them across projects. If the boss
is not happy for you to taking initiative, consider that you at least
improved your own knowledge.

* Look at indirect savings. Do they have problem to hire the right people ?
Do people leave because they feel they don't learn new things? Is the
motivation low because of problems that this change could address (at least
in part)? Etc...


3 last things:
* identify the right people to convince. Sometime to convince your boss you
have to convince the right coworker. Or a respected person in your company
* know the person you are talking to and identify the words he wants to
hear.
* be patient.

Hope that helped. And come back with a summary of how it went !

Cheers,

Jerome


enforcing plugin writting guidelines at build time

2007-03-16 Thread Jerome Lacoste

On 3/15/07, Jerome Lacoste [EMAIL PROTECTED] wrote:


Hi,

further care must be taken when writing plugins considering that maven can
be embedded. Maven sort of acts as a container for code. And maven itself
can be embedded.




This isn't limited to embedding. As I said Kaare yesterday, maven plugin
developers all make the same mistake. They don't make the plugin
multi-module ready, they forget to use the proxy configuration, etc...

I believe these recurring problems can be detected programatically and
prevented. AOP can help.

So it's just an idea. Sorry I don't have time to code it now. Maybe someone
will take on it.

Maybe a candidate for http://wiki.apache.org/general/SummerOfCode2007 ??

Jerome


guidelines to writing maven plugins considering that maven might be embeded

2007-03-15 Thread Jerome Lacoste

Hi,

further care must be taken when writing plugins considering that maven can
be embedded. Maven sort of acts as a container for code. And maven itself
can be embedded.

In particular, I haven't seen any documentation that clearly states what the
plugin developers should do to ensure their plugin is a good maven citizen.


We had this little asynchronous Jira chat on the MEXEC-20 issue:



Are there any guidelines to thread / memory management when it comes to

potential embedding ? There should be.

Miklos kleint said:

yup. there should be some docs, but so far it's a moving target generally
and I keep figuring out things that are bad for embedding on the run...

1. use of System.getProperty() in plugins or non-forked threads are bad.
(both get and set)
2. Runtime's shutdownhooks are problematic.
3. setting a context classloader is bad.
4. assuming a working directory (by constructing java.io.File with relative
path) is also troublesome.
5. static memory caches are problem but mostly for components, plugins are
ok there.


This should probably be expanded and moved to a wiki or the doc. Comments ?

For discussion background see:
http://jira.codehaus.org/browse/MEXEC-20#action_89457

Cheers,

J


mvn 2.0.5 doesn't downlado plugin when missing ?

2007-03-12 Thread Jerome Lacoste

mvn idea:idea failed on me this morning:

[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] The plugin 'org.apache.maven.plugins:maven-idea-plugin' does not
exist or no valid version could be found
[INFO]

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

[INFO] Total time: 1 second
[INFO] Finished at: Mon Mar 12 08:59:53 CET 2007
[INFO] Final Memory: 3M/6M

The machine I am using is freshly setup with maven 2.0.5. So the plugin
wasn't already there. Yet I expected maven to download it from the web ! (It
did for the others I used so far)

I solved it by doing mvn -U idea:idea

In the past I don't remember having to do that. Is that a regression in
2.0.5 ? Is that new expected behavior or am I doing something wrong ?
Could that be related to the don't check plugin updates more than once per
day fix that went in 2.0.5 ?

[INFO] Searching repository for plugin with prefix: 'idea'.
[INFO] org.apache.maven.plugins: checking for updates from central
[INFO] org.codehaus.mojo: checking for updates from central
[INFO] artifact org.apache.maven.plugins:maven-idea-plugin: checking for
updates from central
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-idea-plugin/2.0/maven-idea-plugin-2.0.pom
2K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-idea-plugin/2.0/maven-idea-plugin-2.0.jar
37K downloaded

I've tried to reproduce the problem (but removing my
~/.m2/repository/org/apache/maven/plugins/maven-idea-plugin
but mvn redownloaded the file correctly this time.

Others seem to have had the same problem:

http://www.nabble.com/Missing-maven-idea-plugin--t3252807.html

Jerome


Re: [m2] disappearing dependency

2007-03-08 Thread Jerome Lacoste

On 3/6/07, Guillaume Lederrey [EMAIL PROTECTED] wrote:

  Might be ... but it did work correctly before I added the dependency
on ojdbc ... strange ... I'll check and let you know.


what does happen if you build your web module only (after installing
your root pom using mvn -N if necessary) ?

Does it solve your problem ?

I am currently troubleshooting a similar problem where I've moved some
dependency declarations in a dependencyManagement section in a root
pom, and now one dependency disappeared from the maven classpath in
the sub module build although the dependency is listed in the
sub-module POM !!

So my build fails.

Yet if I go in the sub-module, the dependency is resolved correctly
and my build works.

I am reviewing the mvn -X install log of the full build and find
nothing particular yet.

Strange...

Jerome

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



Re: [m2] disappearing dependency

2007-03-08 Thread Jerome Lacoste

On 3/8/07, Jerome Lacoste [EMAIL PROTECTED] wrote:

On 3/6/07, Guillaume Lederrey [EMAIL PROTECTED] wrote:
   Might be ... but it did work correctly before I added the dependency
 on ojdbc ... strange ... I'll check and let you know.


[...]

I am reviewing the mvn -X install log of the full build and find
nothing particular yet.


Just forget it...

J

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



Re: How to change the invoked goals at runtime

2007-03-08 Thread Jerome Lacoste

On 3/8/07, Daniel Beland [EMAIL PROTECTED] wrote:

Hi,


I am trying to migrate our projects to maven 2.0.5 (have been using maven 1
for 2 years now).

I would like to know how I can invoke maven to package the artifact only
when the version does not contain SNAPSHOT, and install it if it contains
SNAPSHOT.
In maven 1 I was using a goal like this:

goal name=jar:cruisecontrol
j:if test=${not(pom.currentVersion.endsWith('SNAPSHOT'))}
ant:echo message=Create jar only/
attainGoal name=jar/
/j:if

j:if test=${pom.currentVersion.endsWith('SNAPSHOT')}
ant:echo message=Install SNAPSHOT jar/
attainGoal name=jar:install/
/j:if
/goal


This is because I do not want cruise control to install an artifact if it is
not a SNAPSHOT. (Released version should always be downloaded from our
central repository).


install will only happen under the local repository of the user
running your cruisecontrol instance. Why is that affecting you ?


It happened too many times that developers forget to change the version to
SNAPSHOT after a release, and we overwrite the local artifact and break the
build of other modules.


If that's the root of your problem, use the release plugin and it
should disappear.

J

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



Re: How to change the invoked goals at runtime

2007-03-08 Thread Jerome Lacoste

On 3/8/07, Daniel Beland [EMAIL PROTECTED] wrote:

Ok let me explin it with more details.

I have projects A, B and C, giving artifacts a-1.0.jar, b-1.0.war and
c-1.0.war.

B as a dependency on a-1.0.jar
C as a dependency on a-1.0.jar.


We modify A and B only = (A version should become a-1.1-SNAPSHOT.jar)
But the developer commit it and forget to change the version, the local lib
a-1.0.jar is installed over with what should have been a-1.1-SNAPSHOT.jar.

The build of B breaks because a-1.1-SNAPSHOT.jar cannot be found, he
realizes it and change it. Everything seems ok from now on, no harms done.

We make a modification to C later, build of C breaks, we don't understand
why and can spend a long time trying to find out the reason (because the
local lib a-1.0.jar is not the same as on the central repository). We have
to delete it from the local repository to make sure it is downloaded
properly next time.


To make sure this kind of situation does not happen again, I would like to
install the artifacts only when the version is SNAPSHOT. With cruise control
I cannot configure it to build the project only when the version is
SNAPSHOT. I need to find a way to do it within the maven build lifecycle.


OK got it.

If you use the release plugin then your developpers won't make the
mistake again as the version change in the pom will happen
automatically.

I personally empty the local repository under my profile (and CC's
one) every now and then because I want to avoid caching issues.

J

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



Re: How to change the invoked goals at runtime

2007-03-08 Thread Jerome Lacoste

On 3/8/07, Daniel Beland [EMAIL PROTECTED] wrote:

I had a look at the new release plugin, saw what you mean, It will update
the version back to SNAPSHOT, nice little feature that was missing in maven
1.


Thanks for your help


and another thing that might help you is the dependency plugin.
In particular:  dependency:purge-local-repository

http://maven.apache.org/plugins/maven-dependency-plugin/purge-local-repository-mojo.html

(I've never used it)

J

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



Re: Maven Webstart Plugin - some remarks

2007-03-04 Thread Jerome Lacoste

On 3/1/07, Andy DePue [EMAIL PROTECTED] wrote:

I've just started using the webstart plugin, and I have one little
issue. :)  On my linux machine, things work fine, but when I try to
build on a windows machine, the space in the path to the keytool.exe
causes problems.  I get this error when it attempts to use the keytool:
'c:\Program' is not recognized as an internal or external command...etc...
The thing is, I can see in the output that it is trying to put quotes
around the executable path: c:\Program Files\Java\..., but the quotes
still must be getting stripped somewhere.
  - Andy



Bug in plexus-utils. Same as MJAR-49.

If I got it right, this should get fixed when one upgrades to maven 2.0.6.

J

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



Re: Maven Webstart Plugin - some remarks

2007-03-01 Thread Jerome Lacoste

On 2/25/07, Mark Donszelmann [EMAIL PROTECTED] wrote:

Any estimate on the release of 1.0-alpha-2 release?


If possible around the release of maven 2.0.6. I need more feedback
from users. It's pretty scarce today :)

Any help appreciated...

Jerome

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



Re: Maven Webstart Plugin - some remarks

2007-02-25 Thread Jerome Lacoste

On 2/22/07, Roland Klein [EMAIL PROTECTED] wrote:

Jerome Lacoste schrieb:
 Please use the MOJO mailing list for comments on a MOJO project plugin.

 On 1/30/07, Mark Donszelmann [EMAIL PROTECTED] wrote:
 Hi

 2. It would be handy if the $version could be added to the jnlp
 parsed values.

 this is fixed in 1.0-alpha-2-SNAPSHOT

Hi,


i tried the mentioned version of the plugin (1.0-alpha-2-SNAPSHOT), but the 
resolution of the
$version in template.vm is not working.

I just added the variable $version to the template file, or do i have to do 
something else?


try $project.Version

See
https://svn.codehaus.org/mojo/trunk/mojo/webstart-maven-plugin/plugin/src/test/projects/

for example of variable substitution (in particular project2)
.
Jerome

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



Re: [m2] exec-maven-plugin = path with spaces is truncated

2007-02-25 Thread Jerome Lacoste

On 2/21/07, bkbonner [EMAIL PROTECTED] wrote:


It seems that 1.1-SNAPSHOT on codehaus repository fixes this problem.

Is there any chance of a 1.1 release for this exec-maven-plugin?


Some of the threading management semantics introduced in 1.1-SNAPSHOT
have to be revised before the plugin is ready for release. I will see
when I get the time to fix that.

Jerome

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



Re: how to run a program build with maven

2007-02-16 Thread Jerome Lacoste

On 2/15/07, Patrick Kimber [EMAIL PROTECTED] wrote:


Hi Jerome
The JIRA issue ID is:
http://jira.codehaus.org/browse/MEXEC-5




OK then it's fixed in 1.1 and I hope we can get 1.1 out within the next few
weeks.

Jerome


Re: how to run a program build with maven

2007-02-15 Thread Jerome Lacoste

On 2/13/07, Patrick Kimber [EMAIL PROTECTED] wrote:


Hi Ute

You can use the Maven 2 Exec plugin...
http://mojo.codehaus.org/exec-maven-plugin/

Although there is a bug which will prevent you passing parameters to
the application.




Patrick

can you say more about the mexec bug ? Maybe an issue ID ?

Jerome


Re: [M2] Finding the Maven exec plugin

2007-02-07 Thread Jerome Lacoste

On 2/7/07, Siegmann Daniel, NY [EMAIL PROTECTED] wrote:


I am trying to use the exec-maven-plugin, but when I run exec:exec I get
the following:

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'exec'.
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] The plugin 'org.apache.maven.plugins:maven-exec-plugin' does not
exist or no valid version could be found

There is no plugin there, but there is a plugin
org.codehaus.mojo:exec-maven-plugin.




try to fully specify the plugin on the command line. That should make sure
that maven downloads the right plugin:

mvn org.codehaus.mojo:exec-maven-plugin:exec

while you're at it, feel free to test the 1.1-SNAPSHOT release of the
plugin. Report any problem to the mojo user list / Jira.

Thanks

Jerome


Re: webstart-plugin: dependencies

2007-02-06 Thread Jerome Lacoste

A little bit late but might be helpful to someone else.

On 11/7/06, Valerio Schiavoni [EMAIL PROTECTED] wrote:


hello everyone,
one of the configuration parameters of the webstart plugin looks like the
following:

!-- transitive dependencies filter --
   dependencies
 !-- Note that only groupId and artifactId must be specified
here. because of a limitation of the Include/ExcludesArtifactFilter --
 includes
includecommons-logging:commons-logging/include
includecommons-cli:commons-cli/include
 includes
 !-- excludes
exclude/exclude
 excludes--
   /dependencies

what is the main intent of the includes or excludes ?



To give your fine control over the dependencies you want to package in your
webstart package. By default the plugin will take all relevant dependencies
(those taken from the POM + those resolved transitively).

At first, i added my application (the one that has to be distributed via

webstart) as a dependency: then, it seems like I have to add in the
includes
block all its dependencies..but then what happen with transitive
dependencies ?...



If you don't need to fine control your dependency list, don't use it.



any one can clarify this ?



Hope that's clear...

Jerome


Re: JAXB 2.0-SNAPSHOT with exec Maven plugin

2007-01-31 Thread Jerome Lacoste
   -   jar
org.springframework spring-dao  2.0.1   -   jar
org.springframework spring-remoting 2.0.1   -   jar
org.springframework spring-support  2.0.1   -   jar
oro oro 2.0.8   -   jar
ostermiller ostermillerutils1.05.00 -   jar
rhino   js  1.5R4.1 -   jar
slide   webdavlib   2.0 -   jar
vtours  VtoursBusinessConfiguration 3.3.14FK-   jar
vtours  VtoursBusinessobjectModel   3.3.14FK-   jar
vtours  VtoursConstants 3.3.14FK-   jar
vtours  VtoursDatastore 3.3.14FK-   jar
vtours  VtoursUtil  3.3.14FK-   jar
vtours  VtoursXMixUtil  3.3.16FK-   jar
xalan   xalan   2.7.0   -   jar
xerces  xercesImpl  2.4.0   -   jar
xerces  xmlParserAPIs   2.2.1   -   jar
xml-apisxml-apis1.0.b2  -   jar


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





--
Jerome Lacoste

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



Re: missing resources in .jnlp

2007-01-30 Thread Jerome Lacoste

On 1/16/07, Dmitry Beransky [EMAIL PROTECTED] wrote:

Hi,

Can't figure out what I'm doing wrong.  I've set up a project for
building a WebStart app.  Copied template.vm from the plugin's svn.
When I run webstart:jnlp goal, I get a zip containing all dependencies
properly signed, but the index.jnlp file only has the following:


?xml version=1.0 encoding=utf-8?
jnlp
codebase=$$codebase
href=$outputFile.name
  resources
  /resources
  application-desc main-class=${config.jnlp.mainClass}/
/jnlp

so, why is ther resources section empty (and why
${config.jnlp.mainClass} didn't get expanded)?

any thoughts?


Don't look at the
src/main/resources/org/codehaus/mojo/webstart/template/jnlp.vm  file.
This file is obsolete and was removed from the trunk. For examples on
template.vm files, look at the various template.vm files found under
src/test/projects/

E.g. look at:

http://svn.mojo.codehaus.org/browse/mojo/trunk/mojo/webstart-maven-plugin/plugin/src/test/projects/

Try to use something like this in your template.vm:

[...]
 resources
$dependencies
 /resources
 application-desc main-class=$mainClass
  [...]
 /application-desc
[...]

As for resources, if you use the latest snapshot, they should be under:

src/main/jnlp/resources

Cf the documentation:
http://svn.mojo.codehaus.org/browse/mojo/trunk/mojo/webstart-maven-plugin/plugin/src/site/apt/howto.apt?r=3014

If you still have problems, please open an issue in Jira.

J

PS: please use the mojo user mailing list for questions regarding a mojo plugin.

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



Re: Webstart and Upload

2007-01-30 Thread Jerome Lacoste

On 1/16/07, Massimiliano Amato [EMAIL PROTECTED] wrote:

Hello,

I ported my application into maven2 using Webstart plugin and i have the zip
file generated, but i have a couple question

1) I have the zip file produced, is there a way to upload to the ftp site
where my JWS runs automatically or i have to do it manually?


This is not something the webstart plugin will do for you, but you can
reuse any other file tranfer plugin (or write your own plugin) to do
so.

I would probably try to reuse the antplugin  to do something like that.



2) I have a complex system, basically i first use filtering to generate not
only template.vm but also all the sets of development/testing/production
html files that will ship to the site. All those files are put in
target/classes of course and then template.vm is used to generate app.jnlp
When the zip is generated i have to include, dependency, app.jnlp and all
other extra file that for me stays in the same directory as
template.vm(target/classes). Any way not to include it? Is not a big
dela just trying
to understand if this can be done


by default the plugin takes everything under the src/main/jnlp/resources dir

So change the mojo config to force the webstart plugin to use the
place where your processed resource files will be (e.g.
target/classes).

configuration
 jnlp
   resourcesHERE/resources

I think that should work.

J

PS: use the mojo user list to report problems on mojo project plugins.

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



Re: Maven Webstart Plugin

2007-01-30 Thread Jerome Lacoste
/plugins
  /build
  dependencies
dependency
  groupIdcom.holub/groupId
  artifactIdholub/artifactId
  version${project.version}/version
/dependency
dependency
  groupIdlog4j/groupId
  artifactIdlog4j/artifactId
  version1.2.14/version
  scopecompile/scope
/dependency
dependency
  groupIdcom.idds.clientapi4/groupId
  artifactIdclientapi4/artifactId
  version4.2-SNAPSHOT/version
  /dependency
  dependency
  groupIdcom.jgoodies/groupId
  artifactIdlooks/artifactId
  version2.1.1/version
  /dependency
  dependency
groupIdorg.jdesktop/groupId
  artifactIdswing-layout/artifactId
  version1.0/version
  /dependency
  dependency
  groupIdcommons-logging/groupId
  artifactIdcommons-logging/artifactId
  version1.0.4/version
/dependency
dependency
  groupIdcommons-cli/groupId
  artifactIdcommons-cli/artifactId
  version1.0/version
/dependency
  /dependencies

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





--
Jerome Lacoste

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



  1   2   3   >