Re: Can mvn release:prepare be overridden to allow SNAPSHOTs?

2007-08-22 Thread Steven Rowe
Hi Matthew,

I have gotten around this problem by deploying the SNAPSHOT projects in
question to an internal repository, after first renaming their versions
from X.X.X-SNAPSHOT to X.X.X-myco-X (or something similar).  This can
get messy, since SNAPSHOTs sometimes depend on other SNAPSHOTs, and
those have to also be fixed in the respective POMs.  But it works.  And
it's worth it - maven-release-plugin rocks!

Steve

Matthew McCullough wrote:
 Mavenites,
 
 I have a project in which we depend on SNAPSHOTs.  Unfortunately, three of
 them are not actively being developed at the moment, however we still have
 to use them.  I realize it is a very bad practice to depend on these since
 you never know what is going to be changed.  However, is there any way I can
 override release:prepare from FORCING me to have all dependencies as
 non-snapshots?
 
 I've reviewed all the documentation I can find on:
 http://maven.apache.org/plugins/maven-release-plugin/examples/prepare-release.html
 and cannot find anything that seems to allow overriding this behavior of
 requiring all concrete version numbers for dependencies.
 
 Thanks for any pointers.
 
 Matthew McCullough
 Ambient Ideas, LLC
 [EMAIL PROTECTED]
 www.ambientideas.com


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



Re: Invoke a plug-in/goal configured in a pom.xml from cmd line

2007-08-16 Thread Steven Rowe
Hi Farhan,

I don't know how to do exactly what you want, but you can do something
close with a profile.

If you put the antrun execution (or any other execution) in a profile
with no explicit activation spec, and bind it to a really early phase
(say, the initialize phase), then you can invoke it from the command
line like this:

   mvn -P profile-id initialize

Steve

Farhan Sarwar wrote:
 Hi All,
 
 
 
 Is there a way I can invoke a plug-in/goal (not linked with any phase)
 configured in a project's pom.xml (within an execution tag) from the command
 line directly, also the idea is to invoke the goal irrespective of the maven
 build cycle.
 
 
 
 To be more precise let's say if I have a maven-ant-run: run (plug-in:goal)
 configured (as below) with 2 executions (i.e. execution1 associated with
 validate phase and execution2 not linked to any phase) how can I invoke the
 configuration as configured in id=execution2 from command line directly e.g.
 something like mvn antrun:run execution2 so that it gets executed
 independent of maven phase(s)/build-cycle.
 
 
 
 build
 
   plugins
 
 plugin
 
   artifactIdmaven-antrun-plugin/artifactId
 
   executions
 
 execution
 
   idexecution1/id
 
   phasevalidate/phase
 
   configuration
 
 tasks
 
   delete file=lib/test1.txt/
 
 /tasks
 
   /configuration
 
   goals
 
 goalrun/goal
 
   /goals
 
 /execution
 
 execution
 
   idexecution2/id
 
   configuration
 
 tasks
 
   delete file=lib/test2.txt/
 
 /tasks
 
   /configuration
 
   goals
 
 goalrun/goal
 
   /goals
 
 /execution
 
   /executions
 
 /plugin
 
   /plugins
 
 /build
 
 
 
 Thanks and Regards,
 
 
 
 Farhan.
 


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



Re: More than one test source directory

2007-08-16 Thread Steven Rowe
Hi Vihung,

What you want is build-helper-maven-plugin:add-test-source

http://mojo.codehaus.org/build-helper-maven-plugin/

Steve

Vihung Marathe wrote:
 Am I missing something, or is it not possible to specify more then one
 directory as a test source directory?
 
 I am working with an existing project that has two separate
 directories for tests - one for unit tests and one for integration
 tests
 
 -- Vihung
 _
 
 This e-mail may contain confidential information and/or copyright material. 
 This e-mail is intended for the use of the addressee only. Any unauthorised 
 use may be unlawful.
 
 If you receive this e-mail by mistake please advise the sender immediately by 
 using the reply facility in your e-mail software.
 
 The Friends Provident group of companies includes these Friends Provident plc 
 subsidiary companies:
 
 Friends Provident Life and Pensions Limited. Registered number 4096141.
 Friends Provident Life Assurance Limited. Registered number 782698.
 Friends Provident Pensions Limited. Registered number 475201.
 Friends Provident Marketing Limited. Registered number 5059179.
 
 Each of the above subsidiary companies is authorised and regulated by the 
 Financial Services Authority.
 
 Friends Provident Management Services Limited. Registered number 983330
 
 The ultimate holding company is Friends Provident plc. Registered number 
 4113107.
 
 All are incorporated companies limited by shares and registered in England.
 Registered and Head Office: Pixham End, Dorking, Surrey RH4 1QA.
 
 www.friendsprovident.com
 
 _
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: [m2] ant-contrib in Maven?

2007-08-16 Thread Steven Rowe
Hi Mick,

According to the Sonatype book
http://www.sonatype.com/book/lifecycle.html#a_structure_for_goal_execution,
the artifactId should be ant-contrib.

Steve


Mick Knutson wrote:
 I want to use the ant-run plugin and my ant task relies upon ant-contrib but
 I can seem to find it in ibiblio in a way that I can get it into my project
 this does not work:
 
 
 dependency
 groupIdant-contrib/groupId
 artifactIdjars/artifactId
 version1.0b3/version
 /dependency


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



Re: Associate an ID with a goal and call it independently

2007-08-15 Thread Steven Rowe
Hi Farhan,

I think you can do what you want with a profile:

http://maven.apache.org/guides/introduction/introduction-to-profiles.html

If you put your plugin's settings in a profile, then you could then use
a cmdline something like:

  mvn -P profile-id plugin:goal

Steve

Farhan Sarwar wrote:
 Basically I would want to run some maven goal for which I have provided the
 configuration (e.g. the parameters it expects and other stuff) in a pom for
 a project. Now what I would want to achieve is somehow associate a unique id
 (which I guess in ant is called a target) associated with these settings I
 have defined (like the plugin-name, the goal to execute, and the parameters
 required for that goal) and call it directly (giving it just the id)  like
 mvn [uniqueID] and hence run that plugin/goal associated with that id
 instead of running an entire build and process everything defined in that
 pom (or otherwise where I could still achieve the objective)? I know maven
 does provide a way to call a goal directly but I would want to further
 xmlify the settings/parameters for that goal (within a plugin) and run it
 independently.


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



Re: Remote respository

2007-08-15 Thread Steven Rowe
Hi Mathias,

In Maven parlance, what you want is called an Internal Repository.
See the Maven intro to repos for some discussion:

http://maven.apache.org/guides/introduction/introduction-to-repositories.html

Steve

Mathias P.W Nilsson wrote:
 I think I better explain this a little better :wistle:
 
 When I have created my project with maven and I want some other programmers
 to be able to use my project as a dependency, how can I accomplish this?
 
 Local harddrive doesn't work. I probably need a server of some sort that is
 exposed to the internet. but I don't know how this can be done.
 
 // Mathias


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



Re: Resources and JUnit

2007-08-14 Thread Steven Rowe
Ray Wenderlich wrote:
 I am using Maven 2.0.8.

Wow, where can I get me one of them?  :)

(2.0.7 is the most recent release.)

Steve

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



Re: Code Obfuscator

2007-08-06 Thread Steven Rowe
Proguard:

http://pyx4me.com/pyx4me-maven-plugins/proguard-maven-plugin/introduction.html

Steve

Vihung Marathe wrote:
 Does anyone know of a code obfuscator [commercial or otherwise] plugin
 that can be incorporated into a Maven build? It seems to make sense to
 do this as part of a release (obviously, for a non-open-source
 enterprise app).
 
 -- Vihung
 _
 
 This e-mail may contain confidential information and/or copyright material. 
 This e-mail is intended for the use of the addressee only. Any unauthorised 
 use may be unlawful.
 
 If you receive this e-mail by mistake please advise the sender immediately by 
 using the reply facility in your e-mail software.
 
 The Friends Provident group of companies includes these Friends Provident plc 
 subsidiary companies:
 
 Friends Provident Life and Pensions Limited. Registered number 4096141.
 Friends Provident Life Assurance Limited. Registered number 782698.
 Friends Provident Pensions Limited. Registered number 475201.
 Friends Provident Marketing Limited. Registered number 5059179.
 
 Each of the above subsidiary companies is authorised and regulated by the 
 Financial Services Authority.
 
 Friends Provident Management Services Limited. Registered number 983330
 
 The ultimate holding company is Friends Provident plc. Registered number 
 4113107.
 
 All are incorporated companies limited by shares and registered in England.
 Registered and Head Office: Pixham End, Dorking, Surrey RH4 1QA.
 
 www.friendsprovident.com
 
 _
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: Passing System Variables to Maven

2007-07-31 Thread Steven Rowe
Hi David,

I have used an antrun plugin execution to generate a timestamp
properties file in the initialize phase, like this:

properties
  ...
  generated-resources-dir
target/generated-resources
  /generated-resources-dir
  ...
/properties
build
  ...
  plugins
...
plugin
  artifactIdmaven-antrun-plugin/artifactId
  executions
execution
  idgenerate-timestamp-properties-file/id
  phaseinitialize/phase
  goalsgoalrun/goal/goals
  configuration
tasks
  mkdir dir=${generated-resources-dir}/
  tstamp
format property=timestamp
pattern=MM/dd/ HH:mm:ss/
  /tstamp
  delete
file=${generated-resources-dir}/timestamp.properties
failonerror=false/
  echo message=timestamp=${timestamp}
file=${generated-resources-dir}/timestamp.properties/
/tasks
  /configuration
/execution
...
  /executions
/plugin
...
  /plugins
  ...
/build


Hope it helps,
Steve

David Williams wrote:
 Guys,
 
 Thanks for your responses.  What I really want to do is pass the current
 system date and or time to a properties file.  I already know what I need to
 do to filter in maven but I'm trying to figure out the best way to get these
 variables in a build.properties file for example.  I'm currently using Maven
 2.0.6.  Some projects are building with java 1.4 and some with java 1.5.
 
 Thanks again for your responses,
 
 David
 
 On 7/31/07, Eric Redmond [EMAIL PROTECTED] wrote:
 That's fine, then stick them in the settings.xml. But you missed my point:
 env access via properties won't be around in the next version of Maven,
 so
 they aren't a good suggestion.

 Eric

 On 7/31/07, Graham Leggett [EMAIL PROTECTED] wrote:
 Eric Redmond wrote:

 I would stick to -D options. env variables are going away in Maven
 soon.

 -D options are simply command line options, they are not an environment.

 Trying to create a pretend environment using -D violates the principle
 of least astonishment in a big way, and is a major headache if you have
 system specific information that maven requires, such as the location of
 eclipse for the pde-maven-plugin.

 Regards,
 Graham

 --
 Eric Redmond
 http://blog.propellors.net


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



Re: Generate Version class

2007-07-23 Thread Steven Rowe
Hi Francois,

Francois Fernandes wrote:
 for some time now I've been looking for a easy way to generate a simple
 class containing version information of our artifact. I know that it is
 possible to filter resources. But to avoid any resource loading issues I
 would like maven to generate such a class.
 Does anyone have a idea how to solve this? I'm sure that using resource
 filtering of a specific class template and then attaching the generated
 source(-folder) using the build-helper-maven-plugin, but is this a
 elegant way?

I needed this for a project of mine, and ended up using
maven-antrun-plugin to do the heavy lifting.

aside
BTW, in other projects I have used the Maven-populated
META-INF/org/example/pkg/pom.properties to do version discovery.  Note
that pom.properties is scoped by the project's groupId, so if you have
sufficiently distinguishable groupIds, you don't have to worry about
getting the wrong information.
/aside

Here's a (simplified) excerpt from the POM that generates a Version
class - the antrun plugin instructs Maven to include the generated
source using the sourceRoot tag in its configuration:

build
  ...
  plugins
...
plugin
  artifactIdmaven-antrun-plugin/artifactId
  executions
execution
  iditerpolate-Version.java/id
  phasegenerate-sources/phase
  goalsgoalrun/goal/goals
  configuration
tasks
  mkdir dir=${generated-java-dir}/org/cnlp/tt /
  copy file=src/main/java-templates/Version.java
todir=${generated-java-dir}/org/example/pkg
filterset
  filter token=VERSION
  value=${project.version} /
/filterset
  /copy
/tasks
sourceRoot
  target/generated-sources/main/java
/sourceRoot
  /configuration
/execution
  /executions
/plugin
...
  /plugins
  ...
/build
...
properties
  generated-java-dir
target/generated-sources/main/java
  /generated-java-dir
  ...
/properties

And here is src/main/java-templates/Version.java:

  package org.example.pkg;

  public class Version {
private static final String VERSION = @VERSION@;
public static String getVersion() { return VERSION; }
private TTVersion() {}
  }

Hope it helps,
Steve

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



Re: Maven dependencies issues

2007-07-23 Thread Steven Rowe
Hi Dmitry,

Dmitry wrote:
 My application is a jar file and when I run mvn package it generates my
 jar ok.
 
 But I need to distribute my app with all the related jar dependencies so
 I wonder how could I do it with maven2..
 
 Actually, I did an ant task that at package cycle copy my project
 depdenciens from mvnrepository to a lib folder inside target folder. It
 works well but force me to make the list of files to be copied by hand.
 I want to see maven doing this job automatically...
 
 Is this posible ?

Have you looked at appassembler-maven-plugin
http://mojo.codehaus.org/appassembler/appassembler-maven-plugin/introduction.html?

Steve


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



Re: Maven Source filtering issue

2007-07-23 Thread Steven Rowe
Hi Dmitry,

Dmitry wrote:
 I want to be able to interpolate ${pom.version} in Java source code
 before compilation. How can I do this (Eclipse IDE)?
 
 I see that there is a simple way to turn on resource filtering, but that
 does not appear to be applicable to source code.
 
 I also see that the process-sources phase is where source filtering
 should be done, but I can find no description of how to do this.
 
 What am I missing?

I have used maven-antrun-plugin for this kind of thing - for an example,
see my earlier post from today entitled Re: Generate Version class.

Steve

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



Re: Rép. : RE: may not be thi s project's POM [ from cocoon-users ]

2007-07-20 Thread Steven Rowe
Hi Robin,

Have you tried turning off all of your anti-virus, anti-spyware, etc.
software?  Sometimes these helpers silently disable network functionality.

Once you've determined that it is one of these, you should be able to
figure out how to tell it to allow traffic through for the apps you care
about (e.g. your JRE).

Steve

Robin Rigby wrote:
 What SSO could there be?  I don't have to sign on for anything, at least,
 not for any component of this problem.  Only Windows Login.
 
 I am at home. I have one machine, a simple wireless box and a phone socket.
 All normal domestic security.  There is no proxy here.  I would know,
 wouldn't I? 
  
 Robin
 
 -Original Message-
 From: Eric LECOCQ [mailto:[EMAIL PROTECTED] 
 Sent: 20 July 2007 13:35
 To: Maven Users List
 Subject: Rép. : RE: may not be this project's POM [ from cocoon-users ]
 
 
 It looks like you have a SSO for your browsers but not for the wget.
 
 You have to provide your proxy and the authentication.
 
 Robin Rigby [EMAIL PROTECTED] 07/20/07 2:30  
 Thanks for your help.  No, mvn -U ... has the same problem.  So does mvn
 clean.  Only mvn --version is OK.
 
 I don't think this is a transitory problem.  It has been 36 hours now. 
 
 - Summary ---
 
 Maven seems to fail when looking for
 
 http://repo1.maven.org/maven2/org/apache/apache/4/apache-4.pom 
 
 The file is there -  I can read it with Firefox or Internet Explorer but
 wget fails with a 403 error.
 
 However, wget has no problem reading other files such as
 
 http://maven.apache.org/guides/getting-started/index.html 
 
 - End summary -
 
 Baffled.  Something on the server?
 
 I am going back to a fresh installation of Maven.
 
 Thanks for your help.
 
 Robin
  
 
 -Original Message-
 From: Wayne Fay [mailto:[EMAIL PROTECTED] 
 Sent: 19 July 2007 21:14
 To: Maven Users List
 Subject: Re: may not be this project's POM [ from cocoon-users ]
 
 No, Maven does not expect calls over the internet from a remote server
 into this machine. It works basically like wget.
 
 I really don't know why you're having troubles. I'd assume a transient
 network failure. Try mvn -U ... and see if things are working now.
 
 Wayne
 
 On 7/19/07, Robin Rigby [EMAIL PROTECTED] wrote:
 No proxy.  I am working at home.  I have a firewall built into the
 wireless
 modem ...

 I looked through 'Configuring Maven' and 'Configuring a HTTP Proxy'.

 Maven has successfully written a number of files to C:\Documents and
 Settings\username\.m2\repository\.

 Does Maven expect calls over the internet from a remote server into this
 machine?  Or on special ports?  It looks like straight HTTP on port 80,
 which is not a problem with wget and other servers.

 Robin

 -Original Message-
 From: Wayne Fay [mailto:[EMAIL PROTECTED] 
 Sent: 19 July 2007 18:18
 To: Maven Users List
 Subject: Re: may not be this project's POM [ from cocoon-users ]

 I was not suggesting that you change the pom to include packaging in
 the parent, simply cut and paste some text from the pom file you were
 getting a 403 on.

 It sounds like you are behind a corporate web proxy or something, as
 IE and Mozilla work but wget and mvn fail. Can you confirm this? If
 so, you will need to configure your proxy before proceeding
 successfully with Maven.

 http://maven.apache.org/guides/mini/guide-proxies.html 

 Wayne


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



Re: property dependent resources

2007-07-17 Thread Steven Rowe
Hi Severin,

Here's an undocumented profiles trick:

profiles
  profile
idundefined-property-value/id
activation
  property
name!my.property.name/name
  /property
/activation
properties
  my.property.namedefault-value-here/my.property.name
/properties
  /profile
  ...
/profiles

The ! in front of my.property.name in the activation section triggers
the profile if my.property.name is not defined.  This trick also works
with property value-based activation - you can activate a profile when a
named property has some value other than that specified, by prepending
an exclamation point to the value.

Note that profiles in POMs can also have resources sections, so you
could set up your property-based inclusions/execlusions/filtering there.

Steve

Severin Ecker wrote:
 hi,
 
 i was looking for a possibility to include/exclude (and filter) my
 resources depending on the value of a property.
 reading around in different documents and tutorials i found out that i
 can filter my resources using system properties.
 
 so far so good, but what i couldn't find out is, how to set this system
 property to a default value within the pom file if it wasn't specified
 on the command line (afaik one can only specify/create project
 properties but not system properties in the pom file under
 build/properties right?), or fail to execute any lifecycle if said
 property was not specified.
 what i don't want is to have maven look for resources like
 ${failed.to.specify.property}.
 
 is there a way to do this?
 
 oh and a second question.
 how do i exclude all subdirectories of a directory in the resources but
 still include the directory i'm in?
 excludes
 excludemydirwithsubdirs/**/*.*/exclude
 /excludes
 
 also excludes 'mydirwithsubdirs' and all its containing files. problem
 is, i don't know/want to explicitely specify the names of all subdirs in
 the pomfile.
 
 thanks in advance!
 
 cheers,
 severin



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



Re: Profile activation - release

2007-07-17 Thread Steven Rowe
Hi Barrett,

Here's what I do in this situation:

plugin
  artifactIdmaven-release-plugin/artifactId
  configuration
...
arguments-Pmy.release.profile/arguments
  /configuration
/plugin

the -Pprofile-id argument activates profile-id when the release:*
goals are run.

Steve

Barrett Nuzum wrote:
 Hi everyone.
  
 I have a plugin that needs to be executed in two different configurations.
 One configuration is for when being released with the release plugin only.
 Another is for all other times.
  
 I've figured out the profiles configuration for the execution of the plugins 
 -- but the
 activation is killing me. 
  
 I noticed the Super POM has a releasePerform activation.
 I tried to copy it, but it did not work.
  
 I also tried just using the existence of a property, but that did not seem to 
 work.
 That is to say --
 profiles
 profile
 id1/id
 activation
 property
name!someProperty
 [...]
 profile
 id2/id
 activation
 property
namesomeProperty
  
 Any suggestions? 
  
 Barrett


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



Re: property dependent resources

2007-07-16 Thread Steven Rowe
Hi Severin,

Here's an undocumented profiles trick:

profiles
  profile
idundefined-property-value/id
activation
  property
name!my.property.name/name
  /property
/activation
properties
  my.property.namedefault-value-here/my.property.name
/properties
  /profile
  ...
/profiles

The ! in front of my.property.name in the activation section triggers
the profile if my.property.name is not defined.  This trick also works
with property value-based activation - you can activate a profile when a
named property has some value other than that specified, by prepending
an exclamation point to the value.

Note that profiles in POMs can also have resources sections, so you
could set up your property-based inclusions/execlusions/filtering there.

Steve

Severin Ecker wrote:
 hi,
 
 i was looking for a possibility to include/exclude (and filter) my
 resources depending on the value of a property.
 reading around in different documents and tutorials i found out that i
 can filter my resources using system properties.
 
 so far so good, but what i couldn't find out is, how to set this system
 property to a default value within the pom file if it wasn't specified
 on the command line (afaik one can only specify/create project
 properties but not system properties in the pom file under
 build/properties right?), or fail to execute any lifecycle if said
 property was not specified.
 what i don't want is to have maven look for resources like
 ${failed.to.specify.property}.
 
 is there a way to do this?
 
 oh and a second question.
 how do i exclude all subdirectories of a directory in the resources but
 still include the directory i'm in?
 excludes
 excludemydirwithsubdirs/**/*.*/exclude
 /excludes
 
 also excludes 'mydirwithsubdirs' and all its containing files. problem
 is, i don't know/want to explicitely specify the names of all subdirs in
 the pomfile.
 
 thanks in advance!
 
 cheers,
 severin


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



Re: Installer Scripts Best Practice

2007-07-13 Thread Steven Rowe
Hi Rogrigo,

Rodrigo Madera wrote:
 I was wondering if anyone has a suggestion on the best practice to
 execute post-build scripts, such as copying output files to a
 template directory for installer generation.

 Right now I'm using a shell script to do the copying and calling my
 installer-generating scripts, but I'm sure there is another (and less
 painful) way of doing this.

I don't know about best practices, but you could automate these tasks
with Maven 2 by binding plugin executions to the phase you use to build.

For example, if you run the lifecycle through the package phase (i.e.,
mvn package is how you perform your build), you could bind an antrun
plugin[1] execution for the copying[2], and exec plugin[3] execution(s)
to invoke the installer generation script(s).

Something like (caveat: untested):

build
  ...
  plugins
...
plugin
  artifactIdmaven-antrun-plugin/artifactId
  executions
execution
  idcopy-files-for-installer-generation/id
  phasepackage/phase
  goals
goalrun/goal
  /goals
  configuration
tasks
  copy todir=${project.build.dir}/installer
fileset dir=${project.build.dir}
  includes
include${artifactId}-${version}.jar/include
...
  /includes
/fileset
  /copy
  ...
/tasks
  /configuration
/execution
  /executions
/plugin
plugin
  groupIdorg.codehaus.mojo/groupId
  artifactIdexec-maven-plugin/artifactId
  executions
execution
  idcall-first-installer-generator-script/id
  phasepackage/phase
  goals
goalexec/goal
  /goals
  configuration
executable
  /path/to/first/installer/generator/script
/executable
workingDirectory
  ${project.build.directory}/installer
/workingDirectory
arguments
  argument.../argument
  ...
/arguments
  /configuration
/execution
execution
  idcall-second-installer-generator-script/id
  phasepackage/phase
  goals
goalexec/goal
  /goals
  configuration
executable
  /path/to/second/installer/generator/script
/executable
...
  /configuration
/execution
...
  /executions
/plugin
...
  /plugins
  ...
/build


Steve

[1] http://maven.apache.org/plugins/maven-antrun-plugin/
[2] http://ant.apache.org/manual/CoreTasks/copy.html
[3] http://mojo.codehaus.org/exec-maven-plugin/

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



Re: Installer Scripts Best Practice

2007-07-13 Thread Steven Rowe
Hi Rodrigo,

On 7/13/07, Rodrigo Madera [EMAIL PROTECTED] wrote:
 Is using Ant scripts really acceptable from a Maven good-practice point of
 view?

maven-antrun-plugin copy tasks are the conventional means for moving
files around, mostly because Maven 2 does not provide a generalized
facility for doing so, except for when the destination is under
target/classes/ or target/test-classes/; in those cases,
maven-resources-plugin handles the job.

So to answer your question, yes, it is acceptable to use Ant facilities
where Maven is lacking.

This particular gap will hopefully be filled by native Maven
functionality at some point in the not-too-distant future, but it's
probably hard for people to be motivated to fix this problem, because
Ant's copy task is so flexible, well-known, thoroughly tested, tight
syntactically, etc.

Steve

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



Re: Failed to validate POM warning

2007-07-12 Thread Steven Rowe
Hi Joël,

Have you tried using the -X option to mvn?  It might give more details
on the problem.

I checked your SapiensCommonsCore POM against maven-4.0.0.xsd, and it
appears to be valid, but you don't have a groupId there - are you
expecting to inherit it from the parent?

It might also be useful to run mvn help:effective-pom agianst the
SapiensCommonsCore POM, to see if its parent POM is introducing
something that's causing a problem.

Steve

Joel COSTIGLIOLA (Services DPT SYSTEME D INFORMATION METIER) wrote:
 Hi,
 
 One of my project (ObjetTrouveService) depends on another project of mine 
 (SapiensCommonsCore).
 
 When building ObjetTrouveService I have a warning telling me that 
 SapiensCommonsCore pom is not valid.
 
 Here's the trace : 
 
[...]
 [WARNING] POM for 'sapiens:SapiensCommonsCore:pom:2.6.0:compile' is invalid. 
 It will be ignored for artifact resolution. Reason: Failed to validate POM f
 or project sapiens:SapiensCommonsCore at Artifact 
 [sapiens:SapiensCommonsCore:pom:2.6.0:compile]
[...]
 And here's SapiensCommonsCore-2.6.0.pom as found in local repository : 
 
 project
parent
   groupIdsapiens/groupId
   artifactIdSocleSapiens/artifactId
   version2.6.0/version
/parent
modelVersion4.0.0/modelVersion
artifactIdSapiensCommonsCore/artifactId
packagingjar/packaging
nameSapiens Core/name
dependencies
   dependency
  groupIdcommons-net/groupId
  artifactIdcommons-net/artifactId
   /dependency
/dependencies
 
build
   sourceDirectorysrc/java/sourceDirectory
   testSourceDirectorysrc/test/testSourceDirectory
/build
 /project


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



Re: How to diagnose false unsatisfied dependency messages?

2007-07-11 Thread Steven Rowe
Hi Brian,

Sounds like you're using Maven 1.X (I'm guessing because you refer to
.maven/cache/, a 1.X phenomenon) - you should know that at least 95% of
the traffic on this mailing list has to do with Maven 2.X, and that
people will assume that that's what you're using unless you say otherwise.

If you're using Maven 2.0.X, did you try nuking your local repository
(~/.m2/repository/ by default)?

If you're using Maven 1.X, then your .maven/cache/ directory contains
only plugins - you need to nuke your .maven/repository/ directory to
make sure that you have cleaned up local abnormalities.

Steve

Deacon, Brian wrote:
 So my build just started complaining of the lack of commons-io-1.2.jar,
 which is obviously not something we internally build.  Furthermore, it
 IS available on our internal repository from which the script
 succesfully downloads other dependencies.  Even further furthermore, I
 just hacked at .maven/repository and plopped commons-io-1.2.jar and it's
 .md5 into the right place and the script still complains of an
 unsatisfied dependency.
 
 Nuked .maven/cache just for fun and it seemed to make no difference.  We
 have no explicit dependencies on commons-io, it appears to be something
 that one of the reporting plugins wants to use.
 
 Did nothing to the repository or cache prior to the problem cropping up,
 but I did nuke the entire source directory, as we were suspicious that
 there was some cruft lying around (and surviving clean calls) breaking
 other things.  Apparently some of that cruft was duct-taping things
 together.
 
 Thoughts on how to diagnose what's really going on?
 
 TIA,
 Brian
 


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



Re: Almost done

2007-07-11 Thread Steven Rowe
Hi Jon,

release:perform mostly does what you want - it checks out a clean
working copy from the tag created by release:prepare, and then does the
stuff you tell it to.

So, you can tell it to do stuff like you want.  Take a look at the
goals parameter to the maven-release-plugin:

http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html#goals

Below is the configuration I have for one of my projects that does
something similar.  I don't show it here, but elsewhere in the POM, I
bind an appassembler:assemble execution to the package phase.  In the
configuration below, release:perform is told to execute the lifecycle up
to that phase, and then also to run a custom plugin to check the
resulting application assembly into Subversion.  Note that I tell the
release plugin to invoke Maven with the release profile (via
arguments-Prelease/arguments), where I put configuration for
my:custom-plugin.

I think you'd be all set if you bind appassembler::assemble and
assembly:assembly to the package phase, and in a profile activated by
the release plugin, bind an antrun task to do the copying for you to the
package phase; then you could use just goalspackage/goals in the
release plugin config.  The command line invocation would then be just
mvn release:prepare release:perform.  (I usually put clean
release:clean in there before those, too, to be careful not to carry
anything over from previous attempts.)

My release plugin config:

build
  ...
  plugins
...
plugin
  artifactIdmaven-release-plugin/artifactId
  configuration
useReleaseProfilefalse/useReleaseProfile
goalspackage my:custom-plugin/goals
arguments-Prelease/arguments
  /configuration
/plugin
...
  /plugins
  ...
/build

Steve

Jon Strayer wrote:
 I'm converting from Maven 1.0 (with a custom plugin for deploying tarballs)
 to Maven 2.0.
 
 I previously discovered that this set of comands does what my M1 plugin
 did:
 
 mvn clean package appassembler:assemble assembly:assembly wagon:deploy
 
 That is, it collects all the dependencies, creates a run script and tars
 everything up.  That's great.  That's one plug-in I don't have to rewrite.
 
 Just today I got releasing to work correctly.  So, here is what I did:
 
 mvn release:prepare
 mvn release:perform
 mvn clean package appassembler:assemble assembly:assembly wagon:deploy
 
 Everything work fine except I need a tarball named something like
 project-1.2.3.tar.gz.  What I got (of course, now that I think of it) was
 project-1.2.4-SNAPSHOT.tar.gz.
 
 So, what I need is a way to either tie appassembler:assemble
 assembly:assembly wagon:deploy to release:perform or I need a way to pull
 version 1.2.3 out of CVS and package it up.
 
 What I'll like is something that would pull the pom out of the local
 repository and then pull the source for the lable in the pom from cvs.  Is
 such a thing possible?  If I can't do this, how can I tie my tarball
 creation commands to release:perform?


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



Re: Problem using custom announcement with changes plugin

2007-07-09 Thread Steven Rowe
Hi Dennis,

Why not use /src/changes/ instead of /src/main/resources/ ?

By default, for jar packaging anyway, everything /src/main/resources/
will be put into the artifact, but why would anybody ever want an email
announcement template in the artifact?

Just curious,
Steve

Dennis Lundberg wrote:
 Hi Paul,
 
 I committed a new page for the site that explains how to create and use
 a custom template for the announcement. As you sort of figured out
 already, the templateDirectory starts from /src/main/resources, i.e. not
 from ${basedir}.
 
 I have not deployed a new site yet, but you can have a look at the apt
 file in svn, until the site is deployed:
 
 
 http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/using-a-custom-announcement-template.apt
 
 
 Paul Spencer wrote:
 I am trying to configure the changes plugin, version 2.0-beta-2, to
 use a custom
 announcement.vm file.  Setting templateDirectory in to
 /src/main/resources does
 not work.  The command mvn changes:announcement-generate always
 fails with the
 following error message:

   ResourceManager : unable to find resource
 '/src/main/resources/announcement.vm' in any resource loader

 Belows is additional information related the the problem:

 ***
 * From POM.XML
 ***
   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-changes-plugin/artifactId
 configuration
   templateannouncement.vm/template
   templateDirectory/src/main/resources/templateDirectory
 /configuration
   /plugin

 ***
 * Directory output
 ***
  Directory of C:\cvs\reporting-jsf\src\main\resources

 04/20/2007  01:45 PMDIR  .
 04/20/2007  01:45 PMDIR  ..
 04/20/2007  01:45 PM 1,848 announcement.vm
 04/18/2007  10:01 AM69 application.properties
 09/20/2006  11:56 AM   206 implementations.properties
 04/12/2007  04:40 PM 1,109 log4j.xml
4 File(s)  3,232 bytes
2 Dir(s)  67,573,653,504 bytes free

 C:\cvs_apms\apms-reporting-jsf
 ***
 * Maven debug output
 ***
 [INFO] **
 [INFO] Starting Jakarta Velocity v1.4
 [INFO] RuntimeInstance initializing.
 [INFO] Default Properties File:
 org\apache\velocity\runtime\defaults\velocity.properties
 [INFO] Default ResourceManager initializing. (class
 org.apache.velocity.runtime.resource.ResourceManagerImpl)
 [INFO] Resource Loader Instantiated:
 org.apache.maven.plugin.resource.loader.ProjectResourceLoader
 [INFO] ProjectResourceLoader : initialization starting.
 [INFO] path :C:\cvs\reporting-jsf\src\main\resources\
 [INFO] ProjectResourceLoader : adding path
 'C:\cvs\reporting-jsf\src\main\resources\'
 [INFO] ProjectResourceLoader : initialization complete.
 [INFO] Resource Loader Instantiated:
 org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
 [INFO] ClasspathResourceLoader : initialization starting.
 [INFO] ClasspathResourceLoader : initialization complete.
 [INFO] ResourceCache : initialized. (class
 org.apache.velocity.runtime.resource.ResourceCacheImpl)
 [INFO] Default ResourceManager initialization complete.
 [INFO] Loaded System Directive:
 org.apache.velocity.runtime.directive.Literal
 [INFO] Loaded System Directive:
 org.apache.velocity.runtime.directive.Macro
 [INFO] Loaded System Directive:
 org.apache.velocity.runtime.directive.Parse
 [INFO] Loaded System Directive:
 org.apache.velocity.runtime.directive.Include
 [INFO] Loaded System Directive:
 org.apache.velocity.runtime.directive.Foreach
 [INFO] Created: 20 parsers.
 [INFO] Velocimacro : initialization starting.
 [INFO] Velocimacro : adding VMs from VM library template :
 VM_global_library.vm
 [ERROR] ResourceManager : unable to find resource
 'VM_global_library.vm' in any resource loader.
 [INFO] Velocimacro : error using  VM library template
 VM_global_library.vm :
 org.apache.velocity.exception.ResourceNotFoundException: Unable to
 find resource 'VM_global_library.vm'
 [INFO] Velocimacro :  VM library template macro registration complete.
 [INFO] Velocimacro : allowInline = true : VMs can be defined inline in
 templates
 [INFO] Velocimacro : allowInlineToOverride = false : VMs defined
 inline may NOT replace previous VM definitions
 [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline
 will be  global in scope if allowed.
 [INFO] Velocimacro : messages on  : VM system will output logging
 messages
 [INFO] Velocimacro : autoload off  : VM system will not automatically
 reload global library macros
 [INFO] Velocimacro : initialization complete.
 [INFO] Velocity successfully started.
 [DEBUG] Configuring mojo
 'org.apache.maven.plugins:maven-changes-plugin:2.0-beta-2:announcement-generate'
 --
 [DEBUG]   (s) artifactId = reporting-jsf
 [DEBUG]   (s) developmentTeam = reporting-jsf-team
 [DEBUG]   (s) finalName = reporting-jsf-1.0.2-SNAPSHOT.war
 [DEBUG]   (f) 

Re: how to get pom name into site documentation?

2007-07-09 Thread Steven Rowe
Hi Mick,

From http://docs.codehaus.org/display/MAVENUSER/MavenPropertiesGuide:

   ${project.name} or ${pom.name} refers to the name of the project.

Steve

Mick Knutson wrote:
 I want to take:
 nameMIS File Intake/name
 
 and add it to site.xml:
 
 menu name=${name}
 
 But want to know what to use? ${name} is not correct





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



Re: Use native CVS by default

2007-07-09 Thread Steven Rowe
Hi Daniel,

The plugin docs reveal all; from
http://maven.apache.org/scm/plugins/examples/scm-advance-features.html:

   If you want to change the default scm provider
   implementation, for exemple you want to use the
   native cvs instead of the pure java implementation,
   you must configure your plugin like that:

   [...]
 build
 [...]
   plugins
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-scm-plugin/artifactId
   configuration
 providerImplementations
   cvscvs_native/cvs
 /providerImplementations
   /configuration
 /plugin
 [...]
   /plugins
 [...]
 /build
   [...]

Steve

Siegmann Daniel, NY wrote:
 How can I configure my POM so the SCM plugin will use the native CVS
 implementation by default? I'd rather not set this on the command line
 each time.
 
 Thanks,
 --
 Daniel Siegmann
 FJA-US, Inc.
 512 Seventh Ave., New York, NY  10018
 (212) 840-2618 ext. 139


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



Re: Current CVS tag

2007-07-05 Thread Steven Rowe
Hi Peter,

Just to make sure terminology is in sync: local repository in
Maven-speak is the cache Maven uses for project dependencies (plugins
and external libraries), and is managed by Maven.  Is this what you mean
when you say local repository?

If so, then what are you doing with CVS and tagging and a Maven-managed
cache?  And why?

If not, what *do* you mean by local repository?  The CVS sandbox
containing the checked-out project?

Steve

Peter Yuill wrote:
 Hi,
 
 Is there a way to get the CVS tag of the local repository into a Maven
 property?
 
 Regards,
 Peter


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



Re: Missing poms

2007-07-05 Thread Steven Rowe
Hi Niraj,

I can't claim to know what's going on, but until you provide Maven
version numbers for before and after the strict checking started
happening, I'm certain that no-one will be able to help.

Steve

Alok, Niraj wrote:
 Hi,
 
 We found an issue where we had pom files missing from the remote
 repository but the jar files would still get downloaded to the local .m2
 
 Now we are seeing that the checks are stricter and if the pom is
 missing, the jar doesn't get downloaded. 
 
 What could have changed ? 
 
 Thanks,
 Niraj


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



Re: To replace M4 files and Make files using Maven

2007-07-03 Thread Steven Rowe
Nagesh,

Please keep the discussion on the mailing list, rather than sending mail
to my personal address.

It's not clear to me what part of this process you want Maven to
perform.  Do you still envision using Perl/M4 to generate content, and
want to know how Maven can be used to orchestrate the process?  Or do
you want to know whether Maven can do everything?

I agree with Wayne in general, that profiles (environmentally triggered
alternative configuration) and filtering (template interpolation using
property mappings) should do what you want.

But I'm afraid that unless you provide more details about the process
you want to create/replicate, I can't help you any further than I
already have.

Steve

[EMAIL PROTECTED] wrote:
 Steve,
 M4 is kind of template stuffed with conetnt and based on whether it
 is a SSL or NON SSL info comes from a configuration file.M4 will
 generate the actual file.
 
 The reason we do this is we build the tar ball on one build box push
 it on to PROD servers. We run a make on each PROD server which will
 invoke M4 and the M4 will generate the files specific to that server.
 
 Regards,
 Nagesh
 
 Steven Rowe wrote:
 Nagesh,

 If you could be more concrete about what you're trying to accomplish, we
 could be more concrete about how you might accomplish it.

 For example, where does the information about whether a server is ssl or
 non-ssl come from?  And what sort of file is produced by M4 with your
 current build system?  Is it a template with stuff filled in based on
 the answer to the question about the (non-)ssl nature of the server? [...]

 Steve

 Wayne Fay wrote:
 Profiles + Filtering makes results comparable to what you're doing
 with the M4 files.

 Wayne

 On 7/2/07, nash4403 [EMAIL PROTECTED] wrote:
 Thanks Steve.
  But the other question is we have couple of M4 files.
 The use of M4 is to have variable substitution.When we run make the m4
 file
 is executed and generates a file based on whether on ssl or non-ssl
 server.

 Does Maven have anything to replace my M4s

 Regards,
 Nagesh


 Steven Rowe wrote:
 Hi Nagesh,

 Here are some places to start:

 http://maven.apache.org/guides/introduction/introduction-to-profiles.html
 http://www.sonatype.com/book/profiles.html

 Steve

 nash4403 wrote:
 We have different environments like DEV,QA,STAGE and PRODUCTION.
 We have m4 files which generate the content based on different
 variables.
 So the m4 files get the input from config file .
 We have perl scripts to generate the variables to be used by M4
 files to
 generate the config files for different environments?.

 How can MAVEN help me to maintain different environments and
 different
 applications?
 Any examples on the net on how maven can help manage different
 environments?

 Nagesh


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



Re: problem in release:prepare

2007-07-03 Thread Steven Rowe
Hi Javier,

Specify tagBasehttp://server/autentia/tags/tagBase in the
configuration for maven-release-plugin, and make sure that this
directory exists in the repository - Subversion refuses to make a tag in
a directory which is not already in the repository.

Steve

javijava wrote:
 Thanks to reply Andy,
 
  I quit all the references to repositorys at the POm file except the SCM, I
 include /trunk
 in the scm:svn:http://  connection string, but i have the same error!! :(
 
 Maven try to tag release with  the label
 svn://localhost:80/svn/autentia/trunk/autentia-1.0
 
 
 More ideas Andrew???
 
 Javier F.

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



Re: Deploy Jar to maven repo without sources and pom being exposed

2007-07-03 Thread Steven Rowe
Try adding useReleaseProfilefalse/useReleaseProfile to the
configuration for maven-release-plugin.

According to:

http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html

useReleaseProfile: boolean [default: true]
   Whether to use the release profile that adds sources
   and javadocs to the released artifact, if appropriate.

Steve

sarat.pediredla wrote:
 I have a requirement where our core JAR with system classes needs to be
 deployed to a maven repo.
 
 mvn release:perform does this well but ends up uploading both the source JAR
 and original POM. Is there anyway in which I can deploy only my binary JAR
 and prevent the source JAR and POM from being deployed?
 
 I guess we could live with the POM being deployed but deploying the source
 JAR is a definite no-no for our commercial project. 


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



Re: To replace M4 files and Make files using Maven

2007-07-02 Thread Steven Rowe
Hi Nagesh,

Here are some places to start:

http://maven.apache.org/guides/introduction/introduction-to-profiles.html

http://www.sonatype.com/book/profiles.html

Steve

nash4403 wrote:
 We have different environments like DEV,QA,STAGE and PRODUCTION.
 We have m4 files which generate the content based on different variables.
 So the m4 files get the input from config file .
 We have perl scripts to generate the variables to be used by M4 files to
 generate the config files for different environments?.
 
 How can MAVEN help me to maintain different environments and different
 applications?
 Any examples on the net on how maven can help manage different environments?
 
 Nagesh


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



Re: To replace M4 files and Make files using Maven

2007-07-02 Thread Steven Rowe
Nagesh,

If you could be more concrete about what you're trying to accomplish, we
could be more concrete about how you might accomplish it.

For example, where does the information about whether a server is ssl or
non-ssl come from?  And what sort of file is produced by M4 with your
current build system?  Is it a template with stuff filled in based on
the answer to the question about the (non-)ssl nature of the server? [...]

Steve

Wayne Fay wrote:
 Profiles + Filtering makes results comparable to what you're doing
 with the M4 files.
 
 Wayne
 
 On 7/2/07, nash4403 [EMAIL PROTECTED] wrote:

 Thanks Steve.
  But the other question is we have couple of M4 files.
 The use of M4 is to have variable substitution.When we run make the m4
 file
 is executed and generates a file based on whether on ssl or non-ssl
 server.

 Does Maven have anything to replace my M4s

 Regards,
 Nagesh


 Steven Rowe wrote:
 
  Hi Nagesh,
 
  Here are some places to start:
 
 http://maven.apache.org/guides/introduction/introduction-to-profiles.html
 
  http://www.sonatype.com/book/profiles.html
 
  Steve
 
  nash4403 wrote:
  We have different environments like DEV,QA,STAGE and PRODUCTION.
  We have m4 files which generate the content based on different
 variables.
  So the m4 files get the input from config file .
  We have perl scripts to generate the variables to be used by M4
 files to
  generate the config files for different environments?.
 
  How can MAVEN help me to maintain different environments and different
  applications?
  Any examples on the net on how maven can help manage different
  environments?
 
  Nagesh


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



Re: Using Maven to Rename a Package

2007-06-29 Thread Steven Rowe
Hi Jason,

Ferguson, Jason M TSgt 375 CSPTS/SCE wrote:
   executions
 execution
   phaseinitialize/phase
   configuration
   goals
  goalrun/goal
   /goals

The goals tag should not be inside the configuration - move the
configuration tag below the /goals line, and you should be set.

Steve

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



Re: Including other files in site

2007-06-29 Thread Steven Rowe
Hi Daniel,

Siegmann Daniel, NY wrote:
 I tried placing a .doc file in the ./src/site directory, and in the
 ./src/site/xdoc directory. However, it was not copied over to the target
 directory when I run site. Any idea what I'm doing wrong?

From http://maven.apache.org/guides/mini/guide-site.html:

Adding Extra Resources

You can add any arbitrary resource to your site by including them in a
resources directory as shown below. Additional CSS files will be picked
up when they are placed in the css directory within the resources directory.

+- src/
   +- site/
  +- resources/
 +- css/
 |  +- site.css
 |
 +- images/
+- pic1.jpg

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



Re: [M2] cobertura-maven-plugin: cobertura.ser does not exist

2007-06-28 Thread Steven Rowe
Hi R.C.,

If your project has no real sources, then you don't need the reporting
provided by coberatura-maven-plugin, right?  Just remove mention of it
from the buildreporting section of your POM.

Steve

CodingPlayer wrote:
 Hi,
 
 i'm trying to run 'mvn site' for my archetype-project, but always get the
 following error.
 
 The  archetype itself has no REAL sources, but defines some source
 templates.
 
 I believe the cobertura-maven-plugin detects those sources and beliefs that
 they are part of the project.
 
 
 
 [INFO]
 
 [INFO] Building Project Archetype
 [INFO]task-segment: [clean, deploy, site, site:deploy]
 [INFO]
 
 [INFO] [clean:clean]
 [INFO] Deleting directory
 /usr/local/continuum-1.0.3/apps/continuum/workdir/22/target
 [INFO] Deleting directory
 /usr/local/continuum-1.0.3/apps/continuum/workdir/22/target/classes
 [INFO] Deleting directory
 /usr/local/continuum-1.0.3/apps/continuum/workdir/22/target/test-classes
 [INFO] Deleting directory
 /usr/local/continuum-1.0.3/apps/continuum/workdir/22/target/site
 [INFO] [cobertura:clean {execution: clean}]
 [INFO] artifact org.apache.maven.plugins:maven-plugin-plugin: checking for
 updates from sat-maven-repository-http
 [INFO] artifact org.apache.maven.plugins:maven-plugin-plugin: checking for
 updates from central
 [INFO] artifact org.apache.maven.plugins:maven-resources-plugin: checking
 for updates from sat-maven-repository-http
 [INFO] artifact org.apache.maven.plugins:maven-resources-plugin: checking
 for updates from central
 [INFO] [plugin:descriptor]
 [INFO] Using 2 extractors.
 [INFO] Applying extractor for language: java
 [INFO] Extractor for language: java found 0 mojo descriptors.
 [INFO] Applying extractor for language: bsh
 [INFO] Extractor for language: bsh found 0 mojo descriptors.
 [INFO] [resources:resources]
 [INFO] Using default encoding to copy filtered resources.
 [INFO] [compiler:compile]
 [INFO] Nothing to compile - all classes are up to date
 [INFO] [resources:testResources]
 [INFO] Using default encoding to copy filtered resources.
 [INFO] [compiler:testCompile]
 [INFO] Nothing to compile - all classes are up to date
 [INFO] [surefire:test]
 [INFO] Surefire report directory:
 /usr/local/continuum-1.0.3/apps/continuum/workdir/22/target/surefire-reports
 
 ---
  T E S T S
 ---
 There are no tests to run.
 
 Results :
 
 Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
 
 [INFO] [jar:jar]
 [INFO] Building jar:
 /usr/local/continuum-1.0.3/apps/continuum/workdir/22/target/sat-archetype-1.1-SNAPSHOT.jar
 [INFO] [plugin:addPluginArtifactMetadata]
 [INFO] [jar:test-jar {execution: default}]
 [INFO] Building jar:
 /usr/local/continuum-1.0.3/apps/continuum/workdir/22/target/sat-archetype-1.1-SNAPSHOT-tests.jar
 [INFO] Preparing source:jar
 [WARNING] Removing: jar from forked lifecycle, to prevent recursive
 invocation.
 [INFO] No goals needed for project - skipping
 [INFO] [source:jar {execution: attach-sources}]
 [INFO] Building jar:
 /usr/local/continuum-1.0.3/apps/continuum/workdir/22/target/sat-archetype-1.1-SNAPSHOT-sources.jar
 [INFO] Preparing source:test-jar
 [WARNING] Removing: jar from forked lifecycle, to prevent recursive
 invocation.
 [WARNING] Removing: test-jar from forked lifecycle, to prevent recursive
 invocation.
 [INFO] No goals needed for project - skipping
 [INFO] [source:test-jar {execution: attach-sources}]
 [INFO] Building jar:
 /usr/local/continuum-1.0.3/apps/continuum/workdir/22/target/sat-archetype-1.1-SNAPSHOT-test-sources.jar
 [INFO] [install:install]
 [INFO] Installing
 /usr/local/continuum-1.0.3/apps/continuum/workdir/22/target/sat-archetype-1.1-SNAPSHOT.jar
 to
 /home/continuum/.m2/repository/at/researchstudio/sat/sat-archetype/1.1-SNAPSHOT/sat-archetype-1.1-SNAPSHOT.jar
 [INFO] Installing
 /usr/local/continuum-1.0.3/apps/continuum/workdir/22/target/sat-archetype-1.1-SNAPSHOT-tests.jar
 to
 /home/continuum/.m2/repository/at/researchstudio/sat/sat-archetype/1.1-SNAPSHOT/sat-archetype-1.1-SNAPSHOT-tests.jar
 [INFO] Installing
 /usr/local/continuum-1.0.3/apps/continuum/workdir/22/target/sat-archetype-1.1-SNAPSHOT-sources.jar
 to
 /home/continuum/.m2/repository/at/researchstudio/sat/sat-archetype/1.1-SNAPSHOT/sat-archetype-1.1-SNAPSHOT-sources.jar
 [INFO] Installing
 /usr/local/continuum-1.0.3/apps/continuum/workdir/22/target/sat-archetype-1.1-SNAPSHOT-test-sources.jar
 to
 /home/continuum/.m2/repository/at/researchstudio/sat/sat-archetype/1.1-SNAPSHOT/sat-archetype-1.1-SNAPSHOT-test-sources.jar
 [INFO] [plugin:updateRegistry]
 [INFO] [deploy:deploy]
 altDeploymentRepository = null
 [INFO] Retrieving previous build number from sat-maven-repository
 Uploading:
 

Re: URGENT: Renaming files during compile time

2007-06-28 Thread Steven Rowe
How about maven-antrun-plugin, using the Ant copy task?

About the variable naming, it depends on where the information comes
from - can it be set on the cmdline?  Is it available as an environment
variable?

Profiles are a standard Maven mechanism to get the build to respond
differently to different conditions:

http://maven.apache.org/guides/introduction/introduction-to-profiles.html

Steve

Vaidya, Supriya A (US - Chicago) wrote:
 Hi:
  
 Here is what needs to be achieved:
  
 I have 3 different configuration files: application-dev.properties,
 application-int.properties, application-prod.properties. Depending on
 the value taken by a certain variable (where and how do shoudl I define
 this variable??), I need to have one of the above files copied to a
 certain directory, and renamed.
  
 How do I achieve this with Maven?
  
 I have tried using the maven-dependency-plugin, but am not sure how to
 define the artifacts...
  
   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-dependency-plugin/artifactId
 executions
   execution
 idcopy/id
 phasepackage/phase
 goals
   goalcopy/goal
 /goals
 configuration
 artifactItems
   artifactItem
  groupIdmy-application/groupId 
 artifactIdapplication-prod.xml/artifactId
  typefile/type
  overWritefalse/overWrite
  
 outputDirectory${project.build.directory}/outputDirectory
  destFileNameapplication.xml/destFileName
/artifactItem
  /artifactItems
 /configuration
   /execution
 /executions
   /plugin 
 
 
 This message (including any attachments) contains confidential information 
 intended for a specific individual and purpose, and is protected by law.  If 
 you are not the intended recipient, you should delete this message. 
 
 
 Any disclosure, copying, or distribution of this message, or the taking of 
 any action based on it, is strictly prohibited. [v.E.1]
 


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



Re: conditional reporting ...

2007-06-27 Thread Steven Rowe
Hi Giovanni,

Giovanni Azua wrote:
 ... I wanted to activate the SCM report plugin only on demand
 
 e.g.
 
 mvn clean install site -Dgenerate.statsvn=true

...

 reporting
   plugins
 j:if test=${context.getVariable('generate.scm')=='true'}
   ant:echoGenerating StatSVN report using stat-scm/ant:echo

First off, you're attempting to use Jelly scripting in a Maven 2 POM,
and sir, this will not stand.  Since the advent of Maven 2, Jelly is no
longer supported in the POM.  Declarative syntax only.  Well, except for
embedded Ant scripts via maven-antrun-plugin[1] executions.

Anyway, there is a standard M2 way to do what you want: wrap the
reporting plugin configuration in a profile[2], and activate the profile
based on the value of a property, something like:

project
  ...
  profiles
profile
  activation
propertynamegenerate.statsvn/name/property
  /activation
  reporting
plugin
  groupIdnet.sf/groupId
  artifactIdstat-scm/artifactId
/plugin
  /reporting
  build
plugins
  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-antrun-plugin/artifactId
executions
  execution
phasepre-site/phase
goalsgoalrun/goal/goals
configuration
  tasks
echoGenerating StatSVN report using stat-scm/echo
  /tasks
/configuration
  /execution
/executions
  /plugin
/plugins
  /build
/profile
  /profiles
  ...
/project


Steve

[1] http://maven.apache.org/plugins/maven-antrun-plugin
[2]
http://maven.apache.org/guides/introduction/introduction-to-profiles.html

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



Re: CDATA in properties

2007-06-25 Thread Steven Rowe
Hi Greg,

Greg Thompson wrote:
 In my javadoc-plugin configuration, I currently have something along the
 lines of:
 
 bottom![CDATA[somestuff copy; 2007 somestuff.]]/bottom
 
 For various reasons, I'd like to move the value into a property.  So
 I've added this to my pom's properties:
 
 jdBottom![CDATA[somestuff copy; 2007 somestuff.]]/jdBottom
 
 and changed the javadoc-plugin configuration to:
 
 bottom${jdBottom}/bottom
 
 while help:effective-pom says that the property has the proper value:
 
 jdBottomsomestuff amp;copy; 2007 somestuff./jdBottom
 
 the expansion of the property is being parsed as XML, yielding this in
 the javadoc-plugin configuration:
 
 bottomsomestuff © 2007 somestuff./bottom
 
 This is most definitely NOT what I want.  Of course, the first thing I
 tried was to wrap the use of the property in the javadoc-plugin
 configuration in another CDATA:
 
 bottom![CDATA[${jdBottom}]]/bottom
 
 This has no effect.
 
 Is there any way to do what I want here?  Thanks.


Have you tried to add one or more levels to the entity expansion?

E.g., specify the following in your properties section:

 jdBottom![CDATA[somestuff amp;copy; 2007 somestuff.]]/jdBottom

Or equivalently:

 jdBottomsomestuff amp;amp;copy; 2007 somestuff./jdBottom

Steve

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



Re: CDATA in properties

2007-06-25 Thread Steven Rowe
Greg Thompson wrote:
 Steven Rowe wrote:
 Have you tried to add one or more levels to the entity expansion?

 E.g., specify the following in your properties section:

  jdBottom![CDATA[somestuff amp;copy; 2007 somestuff.]]/jdBottom

 Or equivalently:

  jdBottomsomestuff amp;amp;copy; 2007 somestuff./jdBottom
 
 Thanks for the reply, Steven.  The trouble with your suggestion is that
 I want the property's value to be precisely somestuff amp;copy; 2007
 somestuff. since the same property is being used in another context.

How about composing the components:

 preamblesomestuff/jdBottomPreamble
 postamble2007 somestuff./jdBottomPostamble
 jdBottom${preamble} amp;amp;copy ${postamble}/jdBottom
 elsewhere${preamble} amp;copy ${postamble}/elsewhere

That way, you get a single place to set the components, and can use
elsewhere in another context.

Steve

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



Re: Interpolated expression to reference configuration elements of another plugin

2007-06-21 Thread Steven Rowe
Hi Olivier,

Olivier Dehon wrote:
 What ${} expression should I use in my POM or Mojo to reference
 configuration values of another plugin?

This doesn't directly answer your question, but since it's not clear
exactly what problem you're trying to solve, here's a solution to a
different problem :) :

If you define a property in the POM, and then use ${} syntax to refer to
the property in the configuration for one plugin, you can refer to this
same property value anywhere else in the POM, including in another
plugin's configuration.  E.g.:

...
properties
  mypropmy value/myprop
/properties
...
build
  ...
  plugins
...
plugin
  groupIdmy-group-id/groupId
  artifactIdmy-first-artifact-id/artifactId
  configuration
config-item${myprop}/config-item
  /configuration
/plugin
plugin
  groupIdmy-group-id/groupId
  artifactIdmy-second-artifact-id/artifactId
  configuration
another-config-item${myprop}/another-config-item
  /configuration
/plugin
...
  /plugins
  ...
/build


Steve

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



Re: What is this? What I have to do to fix?

2007-06-21 Thread Steven Rowe
Maybe you're talking about transitive dependencies?

Here's an interesting blog entry from Carlos Sanchez that describes the
situation:

http://jroller.com/page/carlossg?entry=using_transitive_dependecies_the_right

Steve

ScottBrank wrote:
 other thing i want to know..
 
 my project has a lot of dependencies... a lot of other jars that i need to
 my appplication...
 so, i have read that i hae to declare these dependencies in my pom.xml...
 but i have read too that i have only to declare the basiest level of m
 dependencies..
 well..
 what is this anyway?
 
 thank's for help... 


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



Re: Set alternate location for .m2

2007-06-18 Thread Steven Rowe
Hi Brian,

Ehmann, Brian wrote:
 Can someone tell me how to specify a custom location of the .m2
 directory?  I need to put this folder outside of the user.home
 directory.

PROMPT$ mvn --help

usage: mvn [options] [goal(s)] [phase(s)]

Options:
[snip]
 -s,--settings Alternate path for the user settings file
[snip]

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



Re: scm checkout with specific tag

2007-06-15 Thread Steven Rowe
Hi Gonzalo,

Gonzalo Vásquez Sáez wrote:
 I've followed the instructions using scmType / scmVersion, but have had no
 success at all, any hints please?

What is no success?  Did you get any error messages?  Or any output at
all?

Steve

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



Re: scm checkout with specific tag

2007-06-15 Thread Steven Rowe
Did you specify scmVersionType=tag ?

Also, what type of repository are you trying to download from?

Gonzalo Vásquez Sáez wrote:
 I just got checked out the latest version of every file, not the specified
 in the scmVersion parameter.
 
 On 15/06/07, Steven Rowe [EMAIL PROTECTED] wrote:

 Hi Gonzalo,

 Gonzalo Vásquez Sáez wrote:
  I've followed the instructions using scmType / scmVersion, but have had
 no
  success at all, any hints please?

 What is no success?  Did you get any error messages?  Or any output at
 all?

 Steve

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


 


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



Re: scm checkout with specific tag

2007-06-15 Thread Steven Rowe
Have you seen this page?:

http://maven.apache.org/scm/cvs.html

You could try using the native client option, maybe in combination with
settings in $user.home/.scm/cvs-settings.xml.

Steve

Gonzalo Vásquez Sáez wrote:
 It's from a CVS, and yes Sir, I added both scm parameters as:
 
 mvn scm:checkout -DscmVersion=myversion -DscmVersionType=tag
 
 On 15/06/07, Steven Rowe [EMAIL PROTECTED] wrote:

 Did you specify scmVersionType=tag ?

 Also, what type of repository are you trying to download from?

 Gonzalo Vásquez Sáez wrote:
  I just got checked out the latest version of every file, not the
 specified
  in the scmVersion parameter.
 
  On 15/06/07, Steven Rowe [EMAIL PROTECTED] wrote:
 
  Hi Gonzalo,
 
  Gonzalo Vásquez Sáez wrote:
   I've followed the instructions using scmType / scmVersion, but have
 had
  no
   success at all, any hints please?
 
  What is no success?  Did you get any error messages?  Or any output
 at
  all?
 
  Steve


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



Re: [Maven Properties] : Using a filter property directly in my pom.xml

2007-06-14 Thread Steven Rowe
Hi David,

Bernier David wrote:
 I'm a new user on Maven since few weeks and i'd like to know how can i
 use a property defined in a filter properties file directly in my
 pom.xml ?
[snip]
 How can i use an external file containg my property used in the pom.xml
 in an another ways than defining this property in the user's
 settings.xml file ?

properties-maven-plugin might do the trick for you:

  http://arsenalist.com/2007/02/07/maven-properties-plugin-download/

Steve


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



Re: How to parse pom.version

2007-06-14 Thread Steven Rowe
Hi Libor,

Libor Kramoliš wrote:
 Is it possible to make some properties hook to enhance set of
 properties after pom reading and before starting of first goal
 execution of any lifecycle/phase?

You could take a look at the source for the properties-maven-plugin,
which injects properties read from files:

  http://arsenalist.com/2007/02/07/maven-properties-plugin-download/

If you bind this (or rahter your version of it) to an early phase, say,
initialize, it should achieve the desired effect.

As far as version string parsing, this has to be implemented somewhere
in the Maven source code, since Maven has to do version comparisons all
the time.

Anybody know in what source module Maven does this kind of decomposition?

Steve

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



Re: Comprehensive list of packaging types?

2007-06-13 Thread Steven Rowe
Hi Greg,

Greg Thompson wrote:
 Is there a complete list of packaging types?

There's a bigger list (though perhaps a bit dated) here:

http://cvs.peopleware.be/training/maven/maven2/buildLifecyclePhases.html

Steve

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



Re: Lifecycle Question

2007-06-13 Thread Steven Rowe
Hi Jens,

Jens Hohl wrote:
 when i only compile my multiproject which also contains an war module I
 get an error when the WAR is module ist compiled that there are missing
 dependencies.
 
 Is that correct ? The war simply have to compile small amount of code
 against already compiled sourcecode from other modules.

Did you try to run mvn install?  This places the depended-on artifacts
in your local repository and makes them available to further modules.

Steve

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



Re: Mail on release

2007-06-13 Thread Steven Rowe
Hey Y.,

gc134728 wrote:
 If i perform a release using the maven release plugin can automate it to send
 a mail to a developers list?  and I like to have different mailing lists some
 projects need to inform everybode on release and some project just by a select
 number of people. 

I use the maven-changes-plugin for this - works great:

build
  ...
  plugins
...
plugin
  artifactIdmaven-release-plugin/artifactId
  configuration
...
goalsdeploy site-deploy changes:announcement-generate
changes:announcement-mail/goals
  /configuration
/plugin
plugin
  artifactIdmaven-changes-plugin/artifactId
  configuration
smtpHostmailserver.example.com/smtpHost
smtpPort implementation=java.lang.Integer25/smtpPort
toAddresses
  toAddress[EMAIL PROTECTED]/toAddress
/toAddresses
  /configuration
/plugin
...
  /plugins
  ...
/build

Steve

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



Re: Tag source code in CVS with Maven version number

2007-06-11 Thread Steven Rowe
Hi Shoe,

The maven-release-plugin has functionality to do this sort of thing,
though I'm not sure how you would combine it with continuous integration:

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

Steve

Shoe wrote:
 Gang
 
 Thanks in advance for your help.
 
 I want to set up my environment so that all maven deploy's are done
 from my continuous integration environment(cruise control) and not
 developer machines.  I also would like to
 tag the source code in cvs when CC performs a mvn deploy with the
 approproate maven version number.
 
 
 In other words if my pom file looks like the following
 
 ?xml version=1.0?
 project xmlns=http://maven.apache.org/POM/4.0.0;
 xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
 http://maven.apache.org/maven-v4_0_0.xsd 
 modelVersion4.0.0/modelVersion
 groupIdcom.foo.bar/groupId
 artifactIdmymodule/artifactId
 version1.1.1/version
 
 I'd like to issue mvn scm:tag with a lable like this
 CC_mymodule_1.1.1.  Currently I'm throwing a tag in that offers the
 build number and the cctimestamp.  It's decent but having the maven
 version number would be perfect.
 
 My current cruisecontrol config.xml looks like this.
 
 schedule interval=600
maven2 mvnhome=${maven.home}
pomfile=projects/${project.name}/pom.xml
flags=-Dtag=CC_${label}_${cctimestamp}
goal=clean scm:update|compile deploy/
/schedule
 
 Can I do this?  I've gurgled for more than an hour now and can't find
 anyone doing this.
 
 Thanks in advance.

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



Re: M2 classpath generation

2007-06-06 Thread Steven Rowe
This Appassembler plugin will do this and more:

  http://mojo.codehaus.org/appassembler/appassembler-maven-plugin/

Jon Strayer wrote:
 I'm currently using maven 2. Most of our applications are batch 
 applications that run from cron via a bash script. I've written a
 plugin that (among other things) will read through the pom and
 generate a file that sets the class path correctly for this
 application. Is there anything like this for Maven 2?


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



Re: M2 classpath generation

2007-06-06 Thread Steven Rowe
Hi Jon,

This JIRA issue sounds similar:

   http://jira.codehaus.org/browse/MOJO-714

Also, you should be running this goal like so:

   mvn package appassembler:assemble

Steve

Jon Strayer wrote:
 I'm getting this exception when I try  mvn appassembler:assemble
 
 [INFO] Trace
 java.lang.NullPointerException
at
 org.apache.maven.artifact.installer.DefaultArtifactInstaller.install(
 DefaultArtifactInstaller.java:71)
at org.codehaus.mojo.appassembler.AssembleMojo.installArtifact(
 AssembleMojo.java:361)
at org.codehaus.mojo.appassembler.AssembleMojo.execute(
 AssembleMojo.java:299)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
 DefaultPluginManager.java:443)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
 DefaultLifecycleExecutor.java:539)
 
 
 I suspect a configuration error, but I don't know where.
 
 On 6/6/07, Steven Rowe [EMAIL PROTECTED] wrote:

 This Appassembler plugin will do this and more:

   http://mojo.codehaus.org/appassembler/appassembler-maven-plugin/

 Jon Strayer wrote:
  I'm currently using maven 2. Most of our applications are batch
  applications that run from cron via a bash script. I've written a
  plugin that (among other things) will read through the pom and
  generate a file that sets the class path correctly for this
  application. Is there anything like this for Maven 2?



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



Re: Overriding Plugin settings in a child POM

2007-06-04 Thread Steven Rowe
Hi Jerome,

This JIRA issue looks like it's related (suggestion of adding a
reportingManagement section to the POM):

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

Steve

Jerome Thibaud wrote:
 Hi All,
 
 using: Maven 2.0.4
 
 I defined the checkstyle reporting plugin in my parent pom, and for a
 specific child project I want to skip the generation of this report.
 I tried this:
 
 parent pom:
 
 reporting
  plugins
...
  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-checkstyle-plugin/artifactId
  /plugin
 ...
  /plugins
 /reporting
 
 and in the child pom
 
 reporting
  plugins
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-checkstyle-plugin/artifactId
configuration
  skiptrue/skip
/configuration
/plugin
  /plugins
 /reporting
 
 
 hoping that this would override the parent settings but it persists to
 generate the report.
 
 Any idea ?
 
 regards
 
 Jerome T.
 


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



Re: m2: add new project to scm:svn

2007-06-04 Thread Steven Rowe
Hi Robert,

I don't directly use the scm plugin, but Subversion's usage model
requires you to add things before you can checkin them.  So maybe
what you're looking for is scm:add?:

   http://maven.apache.org/scm/plugins/add-mojo.html

Why aren't you using the subversion executable directly, instead of
going through Maven?

Steve

Robert Blixt wrote:
 
  Hi,
 
 I'm trying to get maven2 and subversion to
 work. But I've stumbled upon a problem.
 
 I have created my project locally with a
 pom.xml (which includes the scm with all needed
 subtags).
 
 Now I would like to add this project to subversion
 source control. I thought that all I would need
 to do was to launch:
 
 mvn -Dmessage=Initial commit. scm:checkin
 
 But this won't work, I get the following error:
 [ERROR] svn: Commit failed (details follow):
 svn: File not found: transaction '49-1', path '/trunk/myProject/.classpath'
 
 What should I do to add my maven2 project to Subversion?
 
 
 Kind Regards,
 Robert
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: maven-release-plugin: Unable to find the mojo perform

2007-06-04 Thread Steven Rowe
Hi Graham,

I'm guessing that the exception started soon after you upgraded the
version of the release plugin installed in your local repository
(probably via mvn -U or -cpu).

Wierdnesses like this seem to often have at their root a corrupted local
repository.  Have you tried removing your local repo, then letting Maven
rebuild it?

Steve

Graham Leggett wrote:
 Hi all,
 
 I am suddenly getting the following exception below when attempting to
 perform a release of our project using maven v2.0.4 on Windows.
 
 I see there is a directory within the repository called 2.0-beta-6.rip -
 is this somehow relevant?
 
 [INFO]
 
 [ERROR] BUILD ERROR
 [INFO]
 
 [INFO] Internal error in the plugin manager executing goal
 'org.apache.maven.plugins:maven-release-plugin:2.0-beta-6:perform': Unable
 to find the mojo
 'org.apache.maven.plugins:maven-release-plugin:2.0-beta-6:perform' in the
 plugin 'org.apache.maven.plugins:maven-release-plugin'
 org/jdom/filter/Filter
 [INFO]
 
 [INFO] Trace
 org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in
 the plugin manager executing goal
 'org.apache.maven.plugins:maven-release-plugin:2.0-beta-6:perform': Unable
 to find the mojo
 'org.apache.maven.plugins:maven-release-plugin:2.0-beta-6:perform' in the
 plugin 'org.apache.maven.plugins:maven-release-plugin'
 at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
 ultLifecycleExecutor.java:538)
 at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
 Goal(DefaultLifecycleExecutor.java:488)
 at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
 ltLifecycleExecutor.java:458)
 at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
 dleFailures(DefaultLifecycleExecutor.java:306)
 at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
 ts(DefaultLifecycleExecutor.java:219)
 at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
 fecycleExecutor.java:140)
 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
 at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
 java:39)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
 sorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at
 org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
 at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
 at
 org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
 
 at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
 Caused by: org.apache.maven.plugin.PluginManagerException: Unable to find
 the mo
 jo 'org.apache.maven.plugins:maven-release-plugin:2.0-beta-6:perform' in
 the plu
 gin 'org.apache.maven.plugins:maven-release-plugin'
 at
 org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(Defaul
 tPluginManager.java:533)
 at
 org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
 nManager.java:390)
 at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
 ultLifecycleExecutor.java:534)
 ... 16 more
 Caused by:
 org.codehaus.plexus.component.repository.exception.ComponentLookupExc
 eption: Unable to lookup component
 'org.apache.maven.plugin.Mojoorg.apache.maven
 .plugins:maven-release-plugin:2.0-beta-6:perform', it could not be started
 at
 org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai
 ner.java:339)
 at
 org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai
 ner.java:440)
 at
 org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(Defaul
 tPluginManager.java:524)
 ... 18 more
 Caused by:
 org.codehaus.plexus.component.repository.exception.ComponentLifecycle
 Exception: Error starting component
 at
 org.codehaus.plexus.component.manager.AbstractComponentManager.startC
 omponentLifecycle(AbstractComponentManager.java:109)
 at
 org.codehaus.plexus.component.manager.AbstractComponentManager.create
 ComponentInstance(AbstractComponentManager.java:95)
 at
 org.codehaus.plexus.component.manager.PerLookupComponentManager.getCo
 mponent(PerLookupComponentManager.java:48)
 at
 org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai
 ner.java:331)
 ... 20 more
 Caused by:
 org.codehaus.plexus.personality.plexus.lifecycle.phase.PhaseExecution
 Exception: Error composing 

Re: plugin shorthand not working as expected

2007-06-01 Thread Steven Rowe
Have you tried removing your entire local repo?  That seems to fix lots
of problems...

Steve

ertnutler wrote:
 I've read through and followed this:
 http://maven.apache.org/guides/introduction/introduction-to-plugin-prefix-mapping.html
 
 I have a custom plugin whose groupId I've configured in a custom pluginGroup
 in my m2_home/conf/settings.xml like so:
 
 pluginGroups
 pluginGroupcom.mycompany.maven.plugin/pluginGroup
 /pluginGroups
 
 In the generated plugin.xml, I have goalPrefixpromotion/goalPrefix and
 goalpromote/goal.  The problem is that unless I install this file to my
 local repo by building it locally, I can't use the shorthand notation to
 invoke it.  In other words, when I install the plugin to my local repo, this
 command works fine:
 
 mvn promotion:promote
 
 But when I delete the artifact from my local repo and run the same command,
 I get the following output.  (Using the fully qualified notation results in
 the plugin being invoked as normal, so I  know that the plugin is in my
 central repo.)
 
 Here's the relevant output:
 
 [INFO] Searching repository for plugin with prefix: 'promotion'.
 [INFO] com.mycompany.maven.plugin: check for updates from central
 [INFO]---
 [ERROR] BUILD ERROR
 [INFO]---
 [INFO] The plugin 'org.apache.maven.plugins:maven-promotion-plugin' does not
 exist'
 
 It appears that the pluginGroup is being resolved, but I can't figure out
 why Maven doesn't resolve the shorthand unless I install locally.  Any
 ideas?


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



Re: Doing multiple filters

2007-05-29 Thread Steven Rowe
Hi Ian,

[Warning: Following is untested.]

I don't know about the best way, but I think you should be able to set
up an execution for each of the filterings you want to do, something like:

build
  ...
  plugins
...
plugin
  artifactIdmaven-resources-plugin/artifactId
  executions
execution
  idone/id
  goalsgoalresources/goal/goals
  configuration
resources
  resource
...  !-- same syntax as buildresources? --
  /resource
/resources
filters
  filter
...  !-- same syntax as buildfilters? --
  /filter
/filters
outputDirectory
  ${project.build.outputDirectory}/one
/outputDirectory
  /configuration
/execution
execution
  idtwo/id
  ...
/execution
...
  /executions
/plugin
...
  /plugins
/build

Steve

Ian Rowlands wrote:
 Just wondering what is the best way to do multiple filters over a set of
 files.  The context of the question is:
 
 I have a set of configuration files, and 6 different environments they
 could be deployed in.  There is one properties file for each environment.
 I'd like to generate the configuration files for all of the environments
 during the build, stored in different sub-directories.  Then when I deploy,
 I'll extract the set of files which is appropriate and deploy them.  But I
 need to have the files for all environments upfront.
 
 From my understanding of maven filtering, I can only filter the files once.
 
 Any ideas?


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



Re: automatically download dependecies

2007-05-22 Thread Steven Rowe
Hi Advait,

How about:

   mvn initialize myplugin:mygoal

(where you fill in myplugin and mygoal with your specific info)

Steve

Advait Trivedi wrote:
 I have a POM containing dependencies. I run some plugin goals which are not
 bound to any lifecycle phase from this directory. Maven does not download
 dependencies specified in POM. My requirement is to download all
 dependencies specified in POM at this time. I understand that invoking mvn
 install from this directory will download all the dependencies. But I don't
 want to do that. I also tried antlib, but that too downloads only when I
 invoke mvn install. Is there a possible solution?
 
  
 
 Thanks  Regards,
 
 Advait Trivedi, 
 
 Sr. Software Engineer,
 
 Mphasis Ltd.


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



Re: [m2] Specify modules on command line?

2007-05-22 Thread Steven Rowe
Hi Richard,

As far as I know, Maven does not have direct support for what you want.

But lots of people have been asking for just this functionality recently.

See http://www.nabble.com/Specify-a-dynamic-profile-t3754208s177.html
for a discussion of some workarounds.

Steve

Richard Allen wrote:
 We have a good size multi-module build. To reduce the development cycle
 time I would like to be able to say to Maven only include these modules
 in the build. That way we could reduce the amount of time it takes to
 build the project when testing only a single module. Is that possible?
 
 Thanks,
 Richard
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: [m2] Problem extending a MOJO: incongruency in default @parameter value

2007-05-21 Thread Steven Rowe
Hi Alessio,

I'm a Maven newbie, and am only responding because no one else has...

I have seen a couple of messages to the effect that plugin extension is
not supported by the Maven architecture.

See this thread for a couple of workarounds:

  http://www.nabble.com/Reuse-plug-in-code-tf3564036s177.html#a9954824

Also, though this particular question is more about Maven than any one
plugin, it may be useful for you to ask questions about Mojo Project
plugins on the Codehaus Mojo Project mailing lists:

  http://mojo.codehaus.org/mail-lists.html

Steve

Alessio Pace wrote:
 Hi,
 
 I'm trying to write a MOJO as an extension of the exec-maven-plugin, the
 only purpose of it is to allow application specific parameter names in the
 pom, instead of the various argument tags.
 
 So, my project has the exec-maven-plugin as a dependency, and subclasses
 one of the classes of the former
 plugin (specifically, the ExecJavaMojo class). Code compiles and builds but
 strangely, a default parameter value declared as such in the original MOJO:
 
 /* @parameter expression=${exec.includeProjectDependencies}
 default-value=true
 */
 private boolean includeProjectDependencies;
 
 has value *false* when it is evaluated in mysubclass!! No manipulations are
 made on that field by the super class, it's only read in order to do
 something or something else.
 
 I can't really explain what happens, can someone give me a clue?
 
 Thanks in advance,
 


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



Re: jaxb2-maven-plugin

2007-05-21 Thread Steven Rowe
Hi Vidya,

You will probably get a quicker response from the Mojo Project mailing
lists for questions about Mojo Project plugins:

   http://mojo.codehaus.org/jaxb2-maven-plugin/mail-lists.html

Steve

Vidya Mahavadi wrote:
 Hi,
 
 I am using jaxb2-maven-plugin and in the application I would like to 
 validate the xml. And for that I would like to include schema in the 
 artifact. 
 Is it possible to configure the plugin for that?
 
 Regards,
 Vidya
 
 This e-mail is subject to a disclaimer, available at
 http://www.rmb.co.za/web/elements.nsf/online/disclaimer-communications.html
 
 


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



Re: Add and Label Artifact in SCM after Release:Perform

2007-05-21 Thread Steven Rowe
Hi Neil,

My approach for a similar issue was to create a plugin with the
necessary functionality, then add the goal to the configuration for
maven-release-plugin in my POM, e.g.:

plugin
  artifactIdmaven-release-plugin/artifactId
  configuration
goalsdeploy site-deploy myplugin:mygoal/goals


Since I didn't know how to get the release tag directly from the release
plugin, I had my new plugin read in the release.properties file that
release:prepare generates.

Steve

Hall, Neil (CBC) wrote:
 We are in the process of converting our build lifecycle from using ANT to 
 Maven and are using Subversion as a SCM repository.  Our desire is to version 
 in SCM the project source and Pom.xml.  However, not the Target directory.  
 This is already working by using the release:prepare and release:perform 
 goals.  We are able to perform a complete build, label the source in SCM and 
 move our artifacts to our Proximity repository.  
 
 Our problem:
 However, after the release:perform, we desire to add the project artifact 
 (ProjectName.war) in our Subversion repository (without the version number), 
 tag the artifact, and copy the artifact to a specific directory (Tomcat 
 webapps).  Can anyone provide assistance how to perform this task?  Lastly, 
 if a new goal is necessary, any recommendation how to bind this new goal to 
 the lifecycle to run after the release:perform?  
 
 Any assistance is appreciated.  Thanks in advance...
 
 Regards,
 Neil Hall
 
 Confidentiality Notice:
 
 This e-mail is intended only for the personal and confidential use of the 
 individual to whom it is addressed and may contain information that is 
 privileged, confidential and protected by law. If you are not the intended 
 recipient, you are hereby notified that any use or disclosure of this 
 information is strictly prohibited. If you have received this message in 
 error, please notify the sender immediately by reply e-mail and delete the 
 original message. Your compliance is appreciated.  


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



Re: Novice User Question

2007-05-16 Thread Steven Rowe
Hi Averill,

What exactly do you mean by append each jar?  To what?  What outcome
are you looking for?

I think (over)writing the jar file in the repository is exactly what
is meant by adding jar files to the local repository.  Maybe your
terminology is causing miscommunication.

The main point of putting .jar files in your local repository is to make
them available for Maven's dependency resolution mechanism - do you have
something else in mind?

Steve

Averill Cate Jr wrote:
 Thanks.  I tried that, but all it does is keep overwriting the jar file
 in the repository.  It doesn't append each jar that I need.  Is there a
 setting or command line arg that I should be using?  Thanks again.
 
 acatejr
 
 [EMAIL PROTECTED] wrote:
 Use maven install:install command

 -Original Message-
 From: Averill Cate Jr [mailto:[EMAIL PROTECTED] Sent: Tuesday,
 May 15, 2007 5:07 PM
 To: users@maven.apache.org
 Subject: Novice User Question

 Hi,

 I am relatively new to Maven and hope to try and use it for a
 project.  I am using another vendors jar files (many) for my web-app
 project.  I
 would like to add all of this vendor's jar files to my local repository.
 I am not sure how to do this.  Can someone help?  Thanks in advance.

 acatejr


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



Re: Determining project.version from maven-release-plugin

2007-05-16 Thread Steven Rowe
Hi William,

The way I do this is by reading in the release.properties file that
release:prepare generates, something like:

  import java.util.Properties;
  ...
Properties releaseProps = new Properties();
releaseProps.load(new FileInputStream(release.properties));
String releaseVersion = releaseProps.get
(project.rel. + groupId + : + artifactId);

Steve

William Ferguson wrote:
 I have a plugin that needs to run either during after the
 maven-release-plugin has doen a prepare.
 I suspect after will be easier to manage.
 
 My plugin needs as a minimum the ${project.version} at which the project
 was released. Ie not the SNAPSHOT version either before or after.
 
 How do I get that intermediate ${project.version}?
 
 William
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: Maven throwing Exception

2007-05-16 Thread Steven Rowe
Hi Smitha,

[EMAIL PROTECTED] wrote:
 I am getting the following exception when trying to execute mvn clean
 install

[...]

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

Looks to me like Maven can't connect to the central repository.  Are you
behind a proxy?  If so, here's a good place to start:

   http://maven.apache.org/guides/mini/guide-proxies.html

Steve

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



Re: Please help - why doesn't my index.html get generated when generating my site?

2007-05-07 Thread Steven Rowe
Hi Ian,

I think (though you haven't said anything about your setup) that you
don't have a site descriptor, the default location for which is
src/site/site.xml.

See http://maven.apache.org/guides/mini/guide-site.html for info about
what can go in there.

Here's a quick vanilla site descriptor that should get you started:

?xml version=1.0?
project name=My Project
  bannerLeft
nameMy Project/name
  /bannerLeft
  body
menu ref=reports/
  /body
/project

Hope it helps,
Steve

Ian Rowlands wrote:
 
 
 
 I'm using Maven 2.0.5.  My sites have no customisation (which I won't do
 until I get this to work).  I am getting the following generated:
 Apart from subdirectories, I get:
 checkstyle.html (plus checkstyle.rss)
 cpd.html and cpd.xml
 dependencies.html
 integration.html
 issue-tracking.html
 jdepend-report.html
 pmd.html and pmd.xml
 project-info.html
 project-reports.html
 surefire-report.html
 
 I'm using version 2.0-beta-5 of the web site plugin.
 
 I have been told that an index.html should be generated, and it is not.
 This is an issue because it is a multi-module project, and links on the
 parent project all link to the index.html of the sub-projects.  So
 without the index.html nobody can navigate the site correctly.
 
 Any suggestions?
 
 Regards,
 
 Ian Rowlands
 
 
 
 Disclaimer: The information transmitted is intended only for the person or
 entity to which it is addressed and may contain confidential and/or
 privileged material. Any review, retransmission, dissemination or other use
 of, or taking of any action in reliance upon, this information by persons
 or entities other than the intended recipient is prohibited. If you
 received this in error, please contact the sender and delete the material
 from your computer.
 Privacy: If you are responding to this email or providing personal
 information to the SRO for the purposes of one of the Acts it administers,
 such information is used only for the purpose for which it was collected
 ( administration of SRO legislation ) and is protected by the Information
 Privacy Act 2000 and secrecy provisions contained in legislation
 administered by SRO. It is not disclosed otherwise than in accordance with
 the law. If you would like a copy of the SRO Privacy Policy please refer to
 SRO website (www.sro.vic.gov.au) or contact SRO on 9628 0556 and request a
 copy.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: Getting maven to run a file after install

2007-05-07 Thread Steven Rowe
Are you using Mevenide2-Netbeans (and hence Maven 2.0.X)?  If so, you
can use the exec-maven-plugin[1], bound (in pom.xml) to the install
(compile) phase to achieve what you want.

If you're using Mevenide for Maven 1.X, you could set up a pre-goal to
do what you want, in maven.xml.

Hope it helps,
Steve

[1] http://mojo.codehaus.org/exec-maven-plugin/

Arrowx7 wrote:
 Hello,
 Is it possible to have maven execute a bash file after it finished
 installing (compiling)?
 I have mavenide in NetBeans, and i'd like it to run a bash script that
 deploys the project.  I'm not sure how to make it run that bash script after
 install...or anywhere from netbeans.  Thanks


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



Re: Cleaning before assembly

2007-05-03 Thread Steven Rowe
Hi Jose,

maven-clean-plugin's clean goal can clean other directories besides
the default - see
http://maven.apache.org/plugins/maven-clean-plugin/examples/delete_additional_files.html

Steve

Jose Alberto Fernandez wrote:
 Hi,
 
 Can someone point me at the correct way to tell Maven's assembly or cleaning
 plug-in to clean the assembly area before assembling a new. Currently as the
 assembly area is not cleaned up we finish with old jars still there from
 older builds.
 
 Any hints will be appreciated.
 
 Jose Alberto


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



Re: command line variable overrides

2007-05-01 Thread Steven Rowe
Hi Adam,

You could interpolate ${url} in your tomcat-maven-plugin configuration:

build
  plugins
plugin
  groupIdorg.codehaus.mojo/groupId
  artifactIdtomcat-maven-plugin/artifactId
  configuration
url${url}/url
  /configuration
/plugin
  /plugins
/build

and then provide a property value for url on the cmdline:

  mvn -Durl=myurl tomcat:deploy

As an alternative, for example in case you have a fixed list of URLs to
which you want to deploy, you could use profiles to provide more
convenient aliases, e.g.:

profiles
  profile
idFirstURL/id
plugins
  plugin
groupIdorg.codehaus.mojo/groupId
artifactIdtomcat-maven-plugin/artifactId
configuration
  urlhttp://first.example.org/url
/configuration
  /plugin
/plugins
  /profile
  profile
idSecondURL/id
plugins
  plugin
groupIdorg.codehaus.mojo/groupId
artifactIdtomcat-maven-plugin/artifactId
configuration
  urlhttp://second.example.org/url
/configuration
  /plugin
/plugins
  /profile
  ...
/profiles

And then activate the appropriate profile on the cmdline, e.g.:

   mvn -PSecondURL tomcat:deploy

Hope it helps,
Steve

Adam Fisk wrote:
 This seems like a ridiculously simple problem, but I'm pulling my hair out
 just specifying a property on the command line.  I'd like my properties
 defined on the command line to register at all with various plugins, but I
 just can't get it to work.  For example, I'd like to do the following:
 
 mvn -Durl=myurl tomcat:deploy or
 mvn tomcat:deploy -Durl=myurl
 
 In my understanding, the plugin should use the myurl value for the url
 property.  Is that not correct?  I can't get the tomcat plugin to
 understand
 the url change, nor can I get my own test plugins to use command line
 properties instead of properties defined in the pom.  Is there some special
 annotation I need to use in the plugin?
 
 I can configure this fine in the pom or in the settings.xml, but I'm
 deploying to multiple servers and would therefore like to do it on the
 command line with a script.
 
 Thanks very much.
 
 -Adam



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



Source filtering

2007-04-25 Thread Steven Rowe
Hi,

I want to be able to interpolate ${pom.version} in Java source code
before compilation.  How can I do this?

I see that there is a simple way to turn on resource filtering, but that
does not appear to be applicable to source code.

I also see that the process-sources phase is where source filtering
should be done, but I can find no description of how to do this.

What am I missing?

Steve

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



Test classpath

2007-04-23 Thread Steven Rowe
Under Maven v2.0.6, with Surefire plugin v2.3, the directory containing
the .class files generated by the test-compile phase
(${basedir}/target/test-classes/) is not included in java.class.path
when I run mvn test.  (I got this info from the
target/surefire-reports/TEST-MyClass.xml file for a failing test class.)

This is a problem for me because one of my tests expects to be able to
find the test .class files in the classpath, but can't under Maven 2,
and so is failing.

Under both Maven 1.1-beta-3 and IntelliJ IDEA, the generated test class
files directory is included in java.class.path, so my test is succeeding.

Is there anything I can do to change this?  Explicitly including
testClassesDirectorytarget/test-classes/testClassesDirectory in the
surefire plugin's configuration seems to have no effect.

Thanks,
Steve


-
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 Steven Rowe
Hi Adrian,

How are you invoking Maven?  mvn package?  (or some lifecycle phase
after process-test-resources)?

Steve

Adrian Herscu wrote:
 Hi all,
 
 I am using the exec-maven-plugin to run some Java program.
 The java goal is bound to the process-test-resource build phase.
 
 The exec-maven-plugin:java runs at the designated phase but no other
 thing runs afterwards -- the build finishes with this message:
 BUILD SUCCESSFUL
 Total time: 1 second
 
 Please help,
 Adrian.


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



RE: NPE in PluginXDocGenerator while creating plugin site

2007-04-20 Thread Steven Rowe
I'm running into (what appears to be) the exact same problem that Tom
Huybrechts described a few months ago, with Maven v2.0.6 and
maven-site-plugin v2.0-beta-5.

Tom, did you ever resolve this problem?  I also attempted (without
success) to use maven-site-plugin v2.0-SNAPSHOT, but it failed with
errors about not being able to find one of its own mojos, but for
v2.0-beta-3-SNAPSHOT...

Anyway, here's the output I get:

[INFO] [site:site]
[INFO] Skipped About report, file index.html already exists for the
English version.
[INFO] Skipped Maven Surefire Report report, file
surefire-report.html already exists for the English version.
[INFO] Generate Plugin documentation report.
[INFO] Using 2 extractors.
[INFO] Applying extractor for language: java
[INFO] Extractor for language: java found 3 mojo descriptors.
[INFO] Applying extractor for language: bsh
[INFO] Extractor for language: bsh found 0 mojo descriptors.
[INFO]

[ERROR] FATAL ERROR
[INFO]

[INFO] null
[INFO]

[INFO] Trace
java.lang.NullPointerException
at
org.apache.maven.tools.plugin.generator.PluginXdocGenerator.filterParameters(PluginXdocGenerator.java:253)
at
org.apache.maven.tools.plugin.generator.PluginXdocGenerator.writeGoalParameterTable(PluginXdocGenerator.java:239)
at
org.apache.maven.tools.plugin.generator.PluginXdocGenerator.writeBody(PluginXdocGenerator.java:122)
at
org.apache.maven.tools.plugin.generator.PluginXdocGenerator.processMojoDescriptor(PluginXdocGenerator.java:61)
at
org.apache.maven.tools.plugin.generator.PluginXdocGenerator.execute(PluginXdocGenerator.java:49)
at
org.apache.maven.plugin.plugin.PluginReport.generatePluginDocumentation(PluginReport.java:192)
at
org.apache.maven.plugin.plugin.PluginReport.executeReport(PluginReport.java:141)
at
org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:98)
at
org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:67)
at
org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:239)
at
org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:115)
at
org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:124)
at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:92)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
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)


On 2007-01-03, Tom Huybrechts wrote:
 Hi folks,
 
 I'm getting aNPE when generating a site for a plugin. It looks like
 the java mojos get processed OK, but when it looks for bsh mojos
 (which I don't have) the NPE is thrown.
 
 Running 2.0.4 with the latest releases of all plugins
 
 Any tips ?
 
 [INFO] [site:site]
 [WARNING] No URL defined for the project - decoration links will not be 
 resolved
 [INFO] Generate Plugin documentation report.
 [INFO] Using 2 extractors.
 [INFO] Applying extractor for language: java
 [INFO] Extractor for language: java found 15 mojo descriptors.
 [INFO] Applying extractor for language: bsh
 [INFO] Extractor for language: bsh found 0 mojo descriptors.
 [INFO] 
 

Re: pass-in external variables to be used by POM

2007-04-18 Thread Steven Rowe
How about:

   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-ear-plugin/artifactId
 configuration
   archive
 manifestEntries
   Build-Version${version}/Build-Version
 /manifestEntries
   /archive
 /configuration
   /plugin

And then:

mvn -Dversion=10.2.0.0 install

Steve

Piyush Hari wrote:

 I have created a POM that includes the following tag for version :
 
 plugins
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-ear-plugin/artifactId
configuration
   archive
  manifestEntries
 Build-Version10.1.3.3/Build-Version
  /manifestEntries
/archive
  /configuration   /plugin
 /plugins
 
 Now, instead of 10.1.3.3 I want to pass an external value say version.
 How can I go about doing it ? And can I do something like mvn install
 version= ?
 
 Take care,
 Piyush


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



release plugin lifecycle binding

2007-04-18 Thread Steven Rowe
Hello,

I want to bind a custom plugin goal to a phase in the
maven-release-plugin's lifecycle, but when I attempt to do so, the
binding appears to be ignored:

  build
plugins
  plugin
groupIdmy.group/groupId
artifactIdmy-maven-plugin/artifactId
executions
  execution
phasescm-commit-release/phase
goalsgoalmy-goal/goal/goals
  /execution
/executions
  /plugin
/plugins
  /build

In the above example, I'm attempting to bind to the scm-commit-release
phase, which I see defined in maven-release-plugin's components
descriptor [1].  But when I run mvn release:prepare,
my-maven-plugin:my-goal is not invoked.

Is this not possible?  I'm using Maven v2.0.6 with maven-release-plugin
v1.0-alpha-1.

Thanks,
Steve Rowe

[1]
http://svn.apache.org/viewvc/maven/release/tags/maven-release-manager-1.0-alpha-1/src/main/resources/META-INF/plexus/components.xml?revision=528665view=markup

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



Re: q on mvn dependency plugin

2007-04-13 Thread Steven Rowe
Hi Davis,

There is source code for a plugin named maven-buildinfo-plugin, included
with the free book Better Builds with Maven, that seems to do
something like what you want (and then some).  The source is in the
Chapter5 .zip file[1].  Caveat coder: you may need to read Chapter 5 to
understand how to use it (I myself have not attempted to do so).

It looks like this plugin is also in the mojo sandbox at codehaus.org[2].

Steve

[1] http://www.mergere.com/files/no.reg/code/Code_Ch05.zip
[2]
https://svn.codehaus.org/mojo/trunk/mojo/mojo-sandbox/maven-buildinfo-plugin/


Davis Ford wrote:
 hi, i know that mvn depenendency:resolve depdendency:build-classpath will
 dump a classpath list of all transitive/non-transitive jars.
 
 i was wondering if there was some other way, either with the dependency
 plugin, or with any other plugin, to generate the same output but in nicely
 formatted xml:
 
 /artifactId
 /groupId
 /version
 
 ?
 
 Thanks,
 Davis


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



release:perform vs. scm:bootstrap

2007-04-09 Thread Steven Rowe
Hi,

I'm in the process of converting my (small) organization's Maven 1.X
infrastructure to Maven 2.

As a Maven 2 newbie, I'm curious about the differences between
release:perform and scm:bootstrap, and the reasons why both of these
apparently very similar goals co-exist in Maven2.  The latter seems to
be more Maven-1.X-like, in that you specify a list of actions to perform
(the bootstrap goals), as opposed to the former, which appears to be
more Maven2-like (actions are declared via lifecycle bindings).

Are these differences cosmetic only?  Does anyone use either one or the
other exclusively (and why)?  Or sometimes one, sometimes the other
(again, rationale?)?

Steve

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



Re: Release plugin: able to create branches?

2007-04-09 Thread Steven Rowe
I'm guessing that you use a non-Subversion repository, since Subversion
 makes no distinction between branches and tags (or any other directory,
for that matter) -- the distinction is maintained outside the
repository, in the minds of the people who adopt a policy to associate
branching activity with a directory labeled branches, and similarly
with tags.

Graham Leggett wrote:
 Hi all,
 
 We have been using the release plugin very successfully to create tags
 and keep version numbers up to date for us.
 
 We need similar behaviour to create branches - ie to update the version
 number, then create the branch.
 
 Does anything like this exist in the release plugin, or in another plugin?
 
 Regards,
 Graham
 -- 


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



Re: Getting frustrated with maven2

2007-04-06 Thread Steven Rowe
You should create a plugins tag inside your build tag, then put the
plugin tag for xdoclet configurion inside of the plugins tag.

See http://maven.apache.org/pom.html.

Steve

Peter L. Berghold wrote:
 On Fri, 2007-04-06 at 11:10 -0700, Carlos Sanchez wrote:
 for what you say your frustrations come from the xdoclet plugin, not
 maven itself

 
 True enough. 
 your config doesn't look like the docs
 http://mojo.codehaus.org/xdoclet-maven-plugin/usage.html
 
 
 OK.. I tried pasting that into my pom.xml, and this is where my
 understanding is no doubt flawed.  Where in the pom.xml does it fit in? 
 
 I tried a few different things with pretty much the same result. Maven
 complained about plugin being an unknown tag. 
 


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