Re: How to customize the Snapshot pattern?

2007-02-14 Thread Alexis Midon

1. what do you mean??

2. yep, this solution crossed my mind but doing that we lose the snapshot
feature : automatic artifact updates, etc.

3. crossed my mind too.

Thanks for your answer.

On 2/14/07, Wayne Fay [EMAIL PROTECTED] wrote:


1. Do *not* cross-post.

2. Could you perhaps use real versions every time, rather than
snapshots? Then you could control the version with your build-id ie
1.2.1-16.

3. Perhaps look into changing the Maven code (make Snapshot an
interface, etc) and contributing your changes back for inclusion in
future Maven releases.

Wayne

On 2/14/07, Alexis Midon [EMAIL PROTECTED] wrote:
 Hi all,

 Here is my problem: I would like to customize the Snapshot pattern.

 The reason is that my maven project is a small part of a bigger project.
The
 global continious build generates a build-id I want to use as the
snapshot
 identifier.
 So that my artifacts and all others external components are tagged in
the
 same way.

 I ckecked the maven code but didn't find anything interesting. Snapshot
is
 not an interface, so custom implementations cannot be provided :(
 Moreover using a timestamp instead of a specific class/interface is a
real
 constraint because custom Comparator couldn't be implemented to compare
 snapshots.

 I tried to use the finalName tag by appending my build-id, but
 unfortunately the final name is not exported to repositories.

 So it seems I had reached an impasse, except if one of you has a great
 idea!!

 Thanks in advance for your help.

 Alexis


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




How to customize the Snapshot pattern?

2007-02-14 Thread Alexis Midon

Hi all,

Here is my problem: I would like to customize the Snapshot pattern.

The reason is that my maven project is a small part of a bigger project. The
global continious build generates a build-id I want to use as the snapshot
identifier.
So that my artifacts and all others external components are tagged in the
same way.

I ckecked the maven code but didn't find anything interesting. Snapshot is
not an interface, so custom implementations cannot be provided :(
Moreover using a timestamp instead of a specific class/interface is a real
constraint because custom Comparator couldn't be implemented to compare
snapshots.

I tried to use the finalName tag by appending my build-id, but
unfortunately the final name is not exported to repositories.

So it seems I had reached an impasse, except if one of you has a great
idea!!

Thanks in advance for your help.

Alexis


Re: aggregate project and dependency versions in a single property

2006-09-06 Thread Alexis Midon

Hi all,

I've got a classical multi module project with pom inheritance and inter
modules dependencies.
However my modules are always released together and thus have the same
version.
Moreover the whole project is always checkout and the relativePath tags
are correctly set.

As a result what I'd like to do is set the version in a single place. Of
course the parent pom seems to be the relevant place.
Let's create a property named my.version1.0/my.version and use it in the
version tag of the pom and in the parent tag og the child pom.
Call this property in the dependency tag too.

An example project is attached:

test0\pom.xml
test0\test1\pom.xml [jar]
test0\test2\pom.xml [jar] depends on test 1
test0\sub\pom.xml   [pom]
test0\sub\test3\pom.xml   [jar] depends on test 1

So far, you can successfully test any goal on the root pom.

Now what is really weird is that:
After installing test1-1.0.jar , a compile goal (for example) on test2 fails
because Maven cannot resolve test1-${my.version}!
Everything looks like the ${my.version} property is not set.

To understand what was going on I ran mvn help:effective-pom on test2 and
the result is really surprising: the property is correctly set!
I get:
   dependency
 groupIdcom.foobar/groupId
 artifactIdtest1/artifactId
 version1.0/version !-- instead of ${ my.version} --
   /dependency

Do you have any explanations?
Thanks in advance for your help!

Alexis


ps: in the mergere book, page 261, one can read:
If a user has specified a property mapping this expression to a specific
value in the current POM, an ancestor POM, or an active profile, it will be
resolved as the
parameter value at this point.


Re: aggregate project and dependency versions in a single property

2006-09-06 Thread Alexis Midon

you get the point!
hrrr, damned!
do you know any workaround? or version can definitely not be aggregated?

On 9/6/06, Jörg Schaible [EMAIL PROTECTED] wrote:


Hi Alexis,

Alexis Midon wrote on Wednesday, September 06, 2006 10:36 AM:

 Hi all,

 I've got a classical multi module project with pom
 inheritance and inter
 modules dependencies.
 However my modules are always released together and thus have the
 same version. Moreover the whole project is always checkout and the
 relativePath tags are correctly set.

 As a result what I'd like to do is set the version in a
 single place. Of
 course the parent pom seems to be the relevant place.
 Let's create a property named my.version1.0/my.version
 and use it in the
 version tag of the pom and in the parent tag og the child pom.
 Call this property in the dependency tag too.

 An example project is attached:

 test0\pom.xml
 test0\test1\pom.xml [jar]
 test0\test2\pom.xml [jar] depends on test 1
 test0\sub\pom.xml   [pom]
 test0\sub\test3\pom.xml   [jar] depends on test 1

 So far, you can successfully test any goal on the root pom.

 Now what is really weird is that:
 After installing test1-1.0.jar , a compile goal (for example)
 on test2 fails
 because Maven cannot resolve test1-${my.version}!
 Everything looks like the ${my.version} property is not set.

 To understand what was going on I ran mvn
 help:effective-pom on test2 and
 the result is really surprising: the property is correctly set!
 I get:
 dependency
   groupIdcom.foobar/groupId
   artifactIdtest1/artifactId
   version1.0/version !-- instead of ${ my.version} --
 /dependency

 Do you have any explanations?
 Thanks in advance for your help!

Look into your local repo. I am quite sure, that the installed pom still
has the inresolved property and this one cannot be resolved anymore ...

- Jörg

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




Re: aggregate project and dependency versions in a single property

2006-09-06 Thread Alexis Midon

Actually for dependecies I already use the dependencyManagement, but is
there any solution for the parent declaration?
Manat thanks for your answers Joerg!

Alexis


On 9/6/06, Jörg Schaible [EMAIL PROTECTED] wrote:


Alexis Midon wrote on Wednesday, September 06, 2006 10:55 AM:

 you get the point!
 hrrr, damned!
 do you know any workaround? or version can definitely not be
 aggregated?

Use a dependencyManagement section for this in your parent POM and drop
the version in the module's POM at all.

I am not sure, why  Better builds with Maven recommends such an
approach, since you might even find POMs with such weird versions on
ibilio ...

- Jörg

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




Re: Why would Maven Not look in local repo?

2006-09-06 Thread Alexis Midon

By the way have you ever used the webapp version of maven-proxy?

I always get this null pointer exception:

VelocityServlet: Error processing the template

java.lang.NullPointerException
at 
org.apache.maven.proxy.servlets.MavenProxyServlet.handleRequest(MavenProxyServlet.java:37)
at 
org.apache.velocity.servlet.VelocityServlet.doRequest(VelocityServlet.java:358)
at 
org.apache.velocity.servlet.VelocityServlet.doGet(VelocityServlet.java:317)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)



On 9/6/06, Rahul Thakur [EMAIL PROTECTED] wrote:


You can also set up a Maven Proxy on your network.

See here: http://maven-proxy.codehaus.org/

HTH,
Rahul


- Original Message -
From: Lakshman Srilakshmanan
[EMAIL PROTECTED]
To: Maven Users List users@maven.apache.org
Sent: Wednesday, September 06, 2006 11:51 AM
Subject: RE: Why would Maven Not look in local repo?


Hi,

I know the frustration. :) I was there ...

Maven looks for updates daily at ibiblio using a reserved repository
id central. Maven is configured to look at this daily for updates.
Hence, even if you have the plugins/jar file in your Local Repo it looks
for new version daily at central and any other repositories you may have
setup.

How to prevent this ? I hear you asking.

There is a updatePolicy which must be set to never for every
repository including central. This will cause maven to look at ibiblio
only if the plugin/jar does not exist in your Local Repo.

Thanks
Lakshman


 -Original Message-
 From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
 Sent: Wednesday, 6 September 2006 7:46 AM
 To: users@maven.apache.org
 Subject: Why would Maven Not look in local repo?
 Importance: High

 It seems that Maven is looking directly into the Ibiblio repo for
items it
 should be finding in the local repo.  They are there right where they
were
 yesterday.  Now the builds are failing because it can't find local
 versions of components when it looks in the central repo.  There's
nothing
 in the history or log that shows it tried and failed to get these
items
 from the local repo!!!

 Any ideas; some config issue?



 -
 This e-mail and any attachments are intended only for the
 individual or company to which it is addressed and may contain
 information which is privileged, confidential and prohibited from
 disclosure or unauthorized use under applicable law.  If you are
 not the intended recipient of this e-mail, you are hereby notified
 that any use, dissemination, or copying of this e-mail or the
 information contained in this e-mail is strictly prohibited by the
 sender.  If you have received this transmission in error, please
 return the material received to the sender and delete all copies
 from your system.


-
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: plugin configuration with a fileset possible ?

2006-09-06 Thread Alexis Midon

AFAIK, the configuration tag will use reflection to load your settings.
So your tags and classes must comply to the javabeans naming conventions.
(see section A.2.3, p2.6.1 of the Mergere book)

I do not really know the fileset class structure, but it should be
straightforward to compare with the xml structure.
By the way, it would be great if it matches!
let me know.

Alexis

On 9/6/06, fabrice.j [EMAIL PROTECTED] wrote:



Hi,

i know maven but i'm a newbie in maven2 plugin development

i'm trying to develop a maven-plugin and i was wondering if it was
possible
to define a plugin parameter with a fileset like in ant


sample :

build
   ...
   plugins
   plugin
groupIdcom.mergere.mvnbook.plugins/groupId
artifactIdmaven-buildinfo-plugin/artifactId
executions
  execution
   idextract/id
   configuration
 !-- fileset parameter --
 fileset dir=mydir
  include name=**/*.java/
  exclude name=**/*Test*/
 /fileset
   /configuration

 /plugin

Thanks,
Fabrice
--
View this message in context:
http://www.nabble.com/plugin-configuration-with-a-fileset-possible---tf2228329.html#a6175457
Sent from the Maven - Users forum at Nabble.com.


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




Re: deactivating a profile

2006-09-04 Thread Alexis Midon

Hi Adam,

we've got the same needs.
Unfortunately I haven't found out the way to do this.

As a result I use the activate by property feature. But event his way
doesn't not work smoothly.
Actually in a parent pom, if I set the property activate.profile1 for
example, its value is correctly passed to the child poms but nevertheless
profile1 is not active! :(
Only the property set in the command line makes it work.

Hope this helps,

Alexis

On 9/4/06, Adam Hardy [EMAIL PROTECTED] wrote:


I'm trying to use two profiles and to switch between them for
occasionally.

I've seen a couple of emails on this in the archives which don't resolve
this issue for me so here is my problem:

(1) if I set one profile to activationactiveByDefaulttrue ... then I
cannot de-activate it by any means. Is this intended?

(2) on windows, activationfilemissingc:/this-profile.txt/
doesn't work for me. I wanted to use it in combination with exists on
the second profile, so that I could create or delete the file to toggle
the profiles.

(3) the most practical way at the moment is to use the command line
-PmyProfile parameter, but it seems tedious with the knowledge that I
should be able to make it automatic.


Can anyone give me some insight into this problem?

Thanks
Adam

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




Re: How to set custom Plugin Parameters?

2006-09-01 Thread Alexis Midon

thanks all for your answers, actually the problem as not due to 'protected'
modifier nor to 'expression' attribute.
Something was wrong with my pom.

The command I use is: mvn mygroupId:foobar:copyfile

Configuration was not taken into account when I write:

   plugin
   groupIdmygroupId/groupId
   artifactIdmaven-foobar-plugin/artifactId
   executions
   execution
   idcopy:file/id
   goals
   goalcopyfile/goal
   /goals
   configuration
   sourceDirectorytarget/sourceDirectory
   outputDirectory${project.build.directory
}/toto/outputDirectory
   includes
   include*.jar/include
   /includes
   excludes
   exclude**/exclude
   /excludes
   /configuration
   /execution
   /executions
 /plugin


But everything works fine if we remove the executions tag and move upward
configuration  like:

   plugin
   groupIdmurex.maven.plugins/groupId
   artifactIdmaven-production-plugin/artifactId
   configuration
   sourceDirectorytarget/sourceDirectory
   outputDirectory${project.build.directory
}/toto/outputDirectory
   includes
   include*.jar/include
   /includes
   excludes
   exclude**/exclude
   /excludes
   /configuration
 /plugin


I do not really understand what's wrong, is it the lake of phase tag (the
plugin  does not set a default phase)?
Explanations would be very appreciate.

Thanks all,

Alexis


On 8/31/06, Jared Bunting [EMAIL PROTECTED] wrote:


Another thought - the guide here talks about using private fields for mojo
configuration - i noticed that yours is protected.  It specifically
mentions
that setters can be used in place of private fields, but makes no mention
of
protected fields.  Now, while it would make sense to me that the protected
field should work, it might be something worth trying...

On 8/31/06, Ovidio Mallo [EMAIL PROTECTED] wrote:

 Hi Alexis,

 you may try with

@parameter expression=${excludes}

 in the annotation of your array. I can't test it right now, but I
 guess this should work.

 Regards,
Ovidio

 Alexis Midon wrote:
  Hi all,
 
  I'm currently writting a custom plugin, but I've got a problem with
the
  parameter settings.
  Here is it:
 
  My plugin declares a String array as follow:
 
 
 /**
  * The collection of exclude patterns to be applied on the
  sourceDirectory
  *
  * @parameter
  */
 protected String[] excludes;
 
 
  In the pom file I add the following tag:
 
 execution
  ...
 configuration
  ...
 excludes
 exclude*.jar/exclude
 exclude**/.foo/exclude
 /excludes
 /configuration
 /execution
 
 
  Unfortunately the String array remains null :(
  Where's the hell is the bug please?!
 
  Thanks a lot for your help,
 
  Alexis
 


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






Re: How to set custom Plugin Parameters?

2006-09-01 Thread Alexis Midon

What you say is right but my pb is the following:

my plugin is an aggregator style, which means I want only one execution on
the root pom.
If I set a phase this behavior does not happen!

my plugin will be executed once per sub-pom :(


On 9/1/06, Jared Bunting [EMAIL PROTECTED] wrote:


Sounds like the phase thing might point at the problem - say you had two
executions defined.  This is useful if you want to define the same goal
(or
different goals) to be run in different phases.  But, just running it from
the command line, how would maven know which one to use?  Following this
logic, it would make sense that only the base plugin configuration, not
the
configuration of individual executions, would apply when running the goal
directly from the command line.

Maybe somebody with a bit more knowledge could confirm whether this makes
sense, or I'm way off base?

On 9/1/06, Alexis Midon [EMAIL PROTECTED] wrote:

 thanks all for your answers, actually the problem as not due to
 'protected'
 modifier nor to 'expression' attribute.
 Something was wrong with my pom.

 The command I use is: mvn mygroupId:foobar:copyfile

 Configuration was not taken into account when I write:

 plugin
 groupIdmygroupId/groupId
 artifactIdmaven-foobar-plugin/artifactId
 executions
 execution
 idcopy:file/id
 goals
 goalcopyfile/goal
 /goals
 configuration
 sourceDirectorytarget/sourceDirectory
 outputDirectory${project.build.directory
 }/toto/outputDirectory
 includes
 include*.jar/include
 /includes
 excludes
 exclude**/exclude
 /excludes
 /configuration
 /execution
 /executions
   /plugin


 But everything works fine if we remove the executions tag and move
 upward
 configuration  like:

 plugin
 groupIdmurex.maven.plugins/groupId
 artifactIdmaven-production-plugin/artifactId
 configuration
 sourceDirectorytarget/sourceDirectory
 outputDirectory${project.build.directory
 }/toto/outputDirectory
 includes
 include*.jar/include
 /includes
 excludes
 exclude**/exclude
 /excludes
 /configuration
   /plugin


 I do not really understand what's wrong, is it the lake of phase tag
 (the
 plugin  does not set a default phase)?
 Explanations would be very appreciate.

 Thanks all,

 Alexis


 On 8/31/06, Jared Bunting [EMAIL PROTECTED] wrote:
 
  Another thought - the guide here talks about using private fields for
 mojo
  configuration - i noticed that yours is protected.  It specifically
  mentions
  that setters can be used in place of private fields, but makes no
 mention
  of
  protected fields.  Now, while it would make sense to me that the
 protected
  field should work, it might be something worth trying...
 
  On 8/31/06, Ovidio Mallo [EMAIL PROTECTED] wrote:
  
   Hi Alexis,
  
   you may try with
  
  @parameter expression=${excludes}
  
   in the annotation of your array. I can't test it right now, but I
   guess this should work.
  
   Regards,
  Ovidio
  
   Alexis Midon wrote:
Hi all,
   
I'm currently writting a custom plugin, but I've got a problem
with
  the
parameter settings.
Here is it:
   
My plugin declares a String array as follow:
   
   
   /**
* The collection of exclude patterns to be applied on the
sourceDirectory
*
* @parameter
*/
   protected String[] excludes;
   
   
In the pom file I add the following tag:
   
   execution
...
   configuration
...
   excludes
   exclude*.jar/exclude
   exclude**/.foo/exclude
   /excludes
   /configuration
   /execution
   
   
Unfortunately the String array remains null :(
Where's the hell is the bug please?!
   
Thanks a lot for your help,
   
Alexis
   
  
  
  
-
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 






Re: maven-assembly-plugin: weird life cycle

2006-08-31 Thread Alexis Midon

Thanks a lot for your so helpful answer Barrie!

Alexis

On 8/31/06, Barrie Treloar [EMAIL PROTECTED] wrote:


On 8/30/06, Alexis Midon [EMAIL PROTECTED] wrote:
 here is what I have in my parent pom:

  plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-assembly-plugin/artifactId
 configuration
 descriptors
 descriptorsrc/assembly/assembly-2.1.2m.xml
 /descriptor
 /descriptors
 /configuration
 /plugin

Examples, sure.

But before I start, Wilfred suggested using attached but this goal
will fail in an aggregated environment. You have to use single
instead.

In my parent pom I have, ROOT/pom.xml:
groupIdmy.company/groupId
artifactIdproduct/artifactId
packagingpom/packaging
version1.0-SNAPSHOT/version
...
build
pluginManagement
plugins
plugin
groupIdorg.apache.maven.plugins
/groupId


artifactIdmaven-assembly-plugin/artifactId
executions
execution


idassembly:package/id

phasepackage/phase
goals
!--
Work
around for http://jira.codehaus.org/browse/MASSEMBLY-97
as
the goal should be attached.
--


goalsingle/goal
/goals
configuration

descriptors


descriptor


src/main/assembly/bin.xml


/descriptor

/descriptors
/configuration
/execution
/executions
/plugin

This binds the maven-assembly-plugin to the package phase of the
lifecycle (
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
)
and runs the single goal of the plugin.

The configuration section provides the configuration details needed
for the plugin. In this case, that the descriptor file in
src/main/assembly/bin.xml should be used.  I write my own descriptor
as I have found the built in descriptors to not be complete enough for
my environment.

By using the pluginManagement section you are telling maven then
whenever someone includes the plugin in their build section that there
are some common behaviours you want to apply and this information is
inherited if this pom is used as a parent. Not all modules will want
to create an assembly so the parent pom does not define this plugin in
the build section. So unless the module explicitly lists this plugin
in the build section having this declaration in the pluginManagement
section does nothing.

Now in one of my modules pom.xml I have, ROOT/moduleA/pom.xml:
parent
groupIdmy.company/groupId
artifactIdproduct/artifactId
version1.0-SNAPSHOT/version
/parent
groupIdmy.company/groupId
artifactIdmoduleA/artifactId
packagingjar/packaging
version1.0-SNAPSHOT/version
...
build
plugins
plugin
groupIdorg.apache.maven.plugins
/groupId

artifactIdmaven-assembly-plugin/artifactId
/plugin

Notice that I have not provided any phase binding, configuration or
anything else in this declaration.  I merely state I want to use the
plugin.  This is because this pom declares a parent and therefore will
inherit this plugin configuration from the parent.

In my ROOT/moduleA/src/main/assembly/bin.xml I have:
assembly
  idbin/id
  formats
formatdir/format
formatzip/format
  /formats
  includeBaseDirectorytrue/includeBaseDirectory
  fileSets
fileSet
  directorysrc/main/config/directory
  outputDirectoryconfig//outputDirectory
  includes
include*/include
  /includes
/fileSet

How to set custom Plugin Parameters?

2006-08-31 Thread Alexis Midon

Hi all,

I'm currently writting a custom plugin, but I've got a problem with the
parameter settings.
Here is it:

My plugin declares a String array as follow:


   /**
* The collection of exclude patterns to be applied on the
sourceDirectory
*
* @parameter
*/
   protected String[] excludes;


In the pom file I add the following tag:

   execution
...
   configuration
...
   excludes
   exclude*.jar/exclude
   exclude**/.foo/exclude
   /excludes
   /configuration
   /execution


Unfortunately the String array remains null :(
Where's the hell is the bug please?!

Thanks a lot for your help,

Alexis


Re: maven-assembly-plugin: weird life cycle

2006-08-30 Thread Alexis Midon

Many thanks for your answer Barrie but could you provide some examples,
please?

I'm completely lost in this maze :(

On 8/29/06, Barrie Treloar [EMAIL PROTECTED] wrote:


 Included module: murex.middleware:middleware-gui:jar:3.1 does not have
an
 artifact with a file. Please ensure the package phase is run before the
 assembly is generated.

 but when I add the package goal my jars are always built twice, once by
the
 package goal and once by assembly after the following console output:

 [INFO] Preparing assembly:assembly

This is a well documented problem.

You probably want to be running assembly:single (as assembly:attached
doesn't work in a multi-module environment).

I have added assembly:single to my build lifecyle (I did not have to
specify which lifecyle) and when I run mvn package it correctly builds
my artifacts so that they are available for the assembly which gets
run in the package phase.

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




Re: maven-assembly-plugin: weird life cycle

2006-08-30 Thread Alexis Midon

here is what I have in my parent pom:

plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-assembly-plugin/artifactId
   configuration
   descriptors
   descriptorsrc/assembly/assembly-2.1.2m.xml
/descriptor
   /descriptors
   /configuration
   /plugin

On 8/30/06, Alexis Midon [EMAIL PROTECTED] wrote:


Many thanks for your answer Barrie but could you provide some examples,
please?

I'm completely lost in this maze :(


On 8/29/06, Barrie Treloar  [EMAIL PROTECTED] wrote:

  Included module: murex.middleware:middleware-gui:jar:3.1 does not have
 an
  artifact with a file. Please ensure the package phase is run before
 the
  assembly is generated.
 
  but when I add the package goal my jars are always built twice, once
 by the
  package goal and once by assembly after the following console output:
 
  [INFO] Preparing assembly:assembly

 This is a well documented problem.

 You probably want to be running assembly:single (as assembly:attached
 doesn't work in a multi-module environment).

 I have added assembly:single to my build lifecyle (I did not have to
 specify which lifecyle) and when I run mvn package it correctly builds
 my artifacts so that they are available for the assembly which gets
 run in the package phase.

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





Extending a plugin and parameter inheritance

2006-08-30 Thread Alexis Midon

Hi all,

I'm developping a custom plugin, its main features already are already
implemented by the antrun plugin, my only wish is to add an aggregator like
behaviour.
To do so my pojo extends the AntRunMojo, my mojo does nothing except adding
the @aggregator annotation.

Unfortunately when I package the jar, the generated plugin descriptor has no
parameters. So at runtime a NullPointerException occurs complaining that
AntRunMojo attributes are not set!

Does anybody know how to solve this problem?
Is there a neat way to extend an existing plugin?

Thanks for your help,

Alexis


maven-assembly-plugin: weird life cycle

2006-08-29 Thread Alexis Midon

Hi all,

While using the maven-assembly-plugin, I'm always stuck by the fact that if
I do not run the package goal in the same build the assembly plugin
complains with the following message:

Included module: murex.middleware:middleware-gui:jar:3.1 does not have an
artifact with a file. Please ensure the package phase is run before the
assembly is generated.

but when I add the package goal my jars are always built twice, once by the
package goal and once by assembly after the following console output:

[INFO] Preparing assembly:assembly

Did I miss something?

Thanks for your help.

Alexis


ps:
used command lines are
mvn package assembly:assembly
and mvn assembly:assembly


looking for maven-dependency-plugin

2006-08-29 Thread Alexis Midon

Hi all,

I'd like to use the maven-dependency-plugin but I can't find out its latest
release in any repositories!
I've checked out ibiblio, maven1.
I only found the snapshots on people.apache.org

Thanks for your help.


Alexis


Snapshot Locations for maven-plugins a maven-assembly-plugin

2006-08-25 Thread Alexis Midon

Hi all,

I'd like to use a snapshot version of the assembly plugin, but I can't found
out a snapshot repository.
Can someone tell me if such a repo is available or should I build a snapshot
by myself?

Thanks in advance,

Alexis


Assembly including binaries: Bug on a n depth hierarchy

2006-08-03 Thread Alexis Midon

Hi all,

I have the following complex but common pom hierarchy (sample) :
The syntax is packaging:pom:level.#

pom:pom0.0
   /\
  /  \
 /\
/  \
   /\
   jar:pom1.0   pom:pom1.1
   /\
  /  \
 /\
/  \
   /\
jar:pom2.0  jar:pom2.1


I'd like to use the assembly plugin to gather all the output jars in a
single directory.
(So every child/target/artifact.jar must copy to root/target/assembly/...)

To do so I execute the assemby:assembly goal with the following descriptor :

assembly
   idcollect-alljars/id
   formats
   formatdir/format
   /formats
includeBaseDirectoryfalse/includeBaseDirectory
   moduleSets
   moduleSet
   binaries
   unpackfalse/unpack
   /binaries
   /moduleSet
   /moduleSets
/assembly

Unfortunately this always fails into an exception: pom:pom1.1 does not have
an artifact with a file. Please ensure the package phase (...)

This use case highlights 2 problems I think:

  1. the assembly plugin does not support n depth hierarchy
  Actually pom:pom1.1 should not be included in the module list while
  jar:pom2.0 and jar:pom2.1 should.
  2. the binaries/ tag must not throw an exception if there is no
  file, I think


To understand what's going on with bug #1, I decided to debug the plugin.
The problem occurs in AbstractAssemblyMojo.processModules (...) line 471
The getModulesFromReactor() method is invoked but with recurse set to false!

As a result when jar:pom2.0 is tested, the isProjectModule() method returns
false, which is not correct (in our case).
May be 'recurse' could be a plugin parameter?

I don't know if everybody will call this a bug, nor if this list is the
right place to report but I hope it will help.

Thanks in advance if you have any workaround.

Alexis


Re: [Review] Please review French FAQ for Maven 2

2006-08-03 Thread Alexis Midon

  1. Dans la Table des matières:
 - Qu'est ce que c'est que le POM ? lourd?
 - Qu'est ce que c'est que le groupId/artifactId ?
 - Qu'est ce que c'est quun SNAPSHOT?
 -  Ou/Où se trouvent les dépendances ?
 - Comment utiliser une dépendance qui n'est pas sur/dans le
 repository central ?
  2. Dans la section Qu'est ce que c'est que le POM
?http://java.developpez.com/faq/maven/?page=terminologie#documentation3
  ,
 - modelVersion: (...) il/elle est obligatoire (..)
  3. Quelle est la structure des répertoires préconisée par Maven
?,http://java.developpez.com/faq/maven/?page=utilisation#utilisation1
 - Descripteur pour les assemblées/és Maven
 4. Qu'est-ce que le dependencyManagement
?http://java.developpez.com/faq/maven/?page=projet#projet2
 - celle déclarée dans le dependeNcyManagement sera utilisée.



Bravo pour cette traduction!

Alexis

On 8/3/06, Cabasson Denis [EMAIL PROTECTED] wrote:



For those of you speaking french, a new Maven 2 FAQ has just been
launched,
and I would be interested in feedback about this faq:
http://java.developpez.com/faq/maven/
http://java.developpez.com/faq/maven/

Are there any errors? What do you feel is missing?

You can either contact me through this thread, or through the
Developpez.com
forums.

Thanks a lot for any of you taking time to look at this FAQ.

Denis.




Re: Assembly including binaries: Bug on a n depth hierarchy

2006-08-03 Thread Alexis Midon

I forgot to add that there is a real bug in
AbstractAssemblyMojo.isProjectModule() method.
A return statement is missing line716


   private boolean isProjectModule( String parentId, MavenProject
reactorProject, boolean recurse )
   {
   MavenProject parent = reactorProject.getParent();

   if ( parent != null )
   {
   if ( parent.getId().equals( parentId ) )
   {
   return true;
   }
   else if ( recurse )
   {
   return isProjectModule( parentId, parent, true );
   }
   }

   return false;
   }

On 8/3/06, Alexis Midon [EMAIL PROTECTED] wrote:



Hi all,

I have the following complex but common pom hierarchy (sample) :
The syntax is packaging:pom:level.#

 pom:pom0.0
/\
   /  \
  /\
 /  \
/\
jar:pom1.0   pom:pom1.1
/\
   /  \
  /\
 /  \
/\
 jar:pom2.0  jar:pom2.1


I'd like to use the assembly plugin to gather all the output jars in a
single directory.
(So every child/target/artifact.jar must copy to root/target/assembly/...)


To do so I execute the assemby:assembly goal with the following descriptor
:

assembly
idcollect-alljars/id
formats
formatdir/format
/formats
 includeBaseDirectoryfalse/includeBaseDirectory
moduleSets
moduleSet
binaries
unpackfalse/unpack
/binaries
/moduleSet
/moduleSets
/assembly

Unfortunately this always fails into an exception: pom:pom1.1 does not
have an artifact with a file. Please ensure the package phase (...)

This use case highlights 2 problems I think:

   1. the assembly plugin does not support n depth hierarchy
   Actually pom:pom1.1 should not be included in the module list while
   jar:pom2.0 and jar:pom2.1 should.
   2. the binaries/ tag must not throw an exception if there is no
   file, I think


To understand what's going on with bug #1, I decided to debug the plugin.
The problem occurs in AbstractAssemblyMojo.processModules (...) line 471
The getModulesFromReactor() method is invoked but with recurse set to
false!

As a result when jar:pom2.0 is tested, the isProjectModule() method
returns false, which is not correct (in our case).
May be 'recurse' could be a plugin parameter?

I don't know if everybody will call this a bug, nor if this list is the
right place to report but I hope it will help.

Thanks in advance if you have any workaround.

Alexis



Profiles.xml

2006-08-02 Thread Alexis Midon
Hi all,can some one tell me what's wrong with my Profiles.xml file?I always get the following root error:Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: Unrecognised tag: 'build' (position: START_TAG seen .../id\r\n build... @5:20)
 at org.apache.maven.profiles.io.xpp3.ProfilesXpp3Reader.parseProfile(ProfilesXpp3Reader.java:620) at org.apache.maven.profiles.io.xpp3.ProfilesXpp3Reader.parseProfilesRoot(ProfilesXpp3Reader.java:664)
 at org.apache.maven.profiles.io.xpp3.ProfilesXpp3Reader.read(ProfilesXpp3Reader.java:1190) at org.apache.maven.profiles.io.xpp3.ProfilesXpp3Reader.read(ProfilesXpp3Reader.java:1201) at org.apache.maven.profiles.DefaultMavenProfilesBuilder.buildProfiles
(DefaultMavenProfilesBuilder.java:74) at org.apache.maven.project.DefaultMavenProjectBuilder.loadProjectExternalProfiles(DefaultMavenProjectBuilder.java:1229) ... 18 moreIt drives me crazy!
I check the BetterBuild... Book and my file seems valid (see attchament or below)I only have a tiny doubt about the profilesXml/ tag, it comes from the book but doesn't appear on the website.Quite confusing.
Thanks for your helpAlexisprofilesXml
 profiles profile
 ididea/id build
 plugins
 plugin groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-idea-plugin
 /artifactId configuration
 jdkNamejava version 1.4.2_08/jdkName
 dependenciesAsLibrariestrue/dependenciesAsLibraries /configuration
 /plugin
 /plugins /build
 /profile /profiles
 activeProfiles activeProfileidea/activeProfile
 /activeProfiles/profilesXml
profilesXml
profiles
profile
ididea/id
build
plugins
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-idea-plugin
/artifactId
configuration
jdkNamejava version 1.4.2_08/jdkName
dependenciesAsLibrariestrue/dependenciesAsLibraries
/configuration
/plugin
/plugins
/build
/profile
/profiles
activeProfiles
activeProfileidea/activeProfile
/activeProfiles
/profilesXml
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Profiles.xml

2006-08-02 Thread Alexis Midon

many htanks for your answer John.

The website mentions this restriction:

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

Profiles specified in external files (i.e in settings.xml or profiles.xml)
are not portable in the strictest sense. (...) Therefore, you will only be
able to modify the *repositories* and *pluginRepositories* sections, plus an
extra *properties* section.

But the book is confusing: check out the page 63

Thanks again John.

Alexis



On 8/2/06, John Casey [EMAIL PROTECTED] wrote:


Well, it's giving you the correct feedback in that error message. In fact,
there are two distinct types of profile in Maven. Those which are embedded
in the POM have access to many more configuration points, since they will
always travel with the POM (traversing a remote deployment, for example),
and therefore don't constitute a portability issue. On the other hand,
profiles which are declared in either the settings.xml or a
project-specific
profiles.xml will not be distributed with a project's artifact when it's
deployed to the remote repository. Therefore, to keep these external
profiles from affecting the build configuration represented by the
project's
POM, they are not allowed to do anything more than specify properties,
pluginRepositories, and repositories.

The short answer is that you cannot specify a build/ section in an
external profile. If the book doesn't make mention of this, it should be
corrected.

HTH,

-john

On 8/2/06, Alexis Midon [EMAIL PROTECTED] wrote:

 Hi all,

 can some one tell me what's wrong with my Profiles.xml file?
 I always get the following root error:

 Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException:
 Unrecognised tag: 'build' (position: START_TAG seen .../id\r\n
 build... @5:20)
 at
 org.apache.maven.profiles.io.xpp3.ProfilesXpp3Reader.parseProfile(
 ProfilesXpp3Reader.java:620)
 at
 org.apache.maven.profiles.io.xpp3.ProfilesXpp3Reader.parseProfilesRoot(
 ProfilesXpp3Reader.java:664)
 at org.apache.maven.profiles.io.xpp3.ProfilesXpp3Reader.read(
 ProfilesXpp3Reader.java:1190)
 at org.apache.maven.profiles.io.xpp3.ProfilesXpp3Reader.read(
 ProfilesXpp3Reader.java:1201)
 at
 org.apache.maven.profiles.DefaultMavenProfilesBuilder.buildProfiles (
 DefaultMavenProfilesBuilder.java:74)
 at

org.apache.maven.project.DefaultMavenProjectBuilder.loadProjectExternalProfiles
 (DefaultMavenProjectBuilder.java:1229)
 ... 18 more


 It drives me crazy!
 I check the BetterBuild... Book and my file seems valid (see attchament
or
 below)

 I only have a tiny doubt about the profilesXml/ tag, it comes from the
 book but doesn't appear on the website.
 Quite confusing.

 Thanks for your help

 Alexis


 profilesXml
 profiles
 profile
 ididea/id
 build
 plugins
 plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-idea-plugin
 /artifactId
 configuration
 jdkNamejava version 1.4.2_08/jdkName

 dependenciesAsLibrariestrue/dependenciesAsLibraries
 /configuration
 /plugin
 /plugins
 /build
 /profile
 /profiles
 activeProfiles
 activeProfileidea/activeProfile
 /activeProfiles
 /profilesXml

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







Re: Aggregate profiles

2006-08-01 Thread Alexis Midon

you can activate many profiles with -Pprofile1,profile2,profile3 etc. as
explained in mvn -h:
-P,--activate-profilesComma-delimited list of profiles to activate

On 8/1/06, Roland Asmann [EMAIL PROTECTED] wrote:


I've been looking for something similar and found that it is possible, but
atm only for
a maximum of 2 profiles.
Use the property-activation for your profiles and activate 'p6spy' when
the property
is set. Then activate one of the other profiles when this property is set
to a specific
value:

profile
idp6spy/id
activation
property
namedb/name
/property
/activation

/profile
profile
idhsql/id
activation
property
namedb/name
valuehsql/value
/property
/activation

/profile
profile
idpostgres/id
activation
property
namedb/name
valuepostgres/value
/property
/activation

/profile

Now, if you run 'mvn -Ddb=postgres' or '-Ddb=hsql' p6spy is ALWAYS
activated.

Hope this helped.

Roland




On Tuesday 01 August 2006 01:39, Laurie Harper wrote:
 Is it possible to activate multiple profiles at once, as in 'mvn
 -Pprofile1 -Pprofile2', and have one profile override properties in the
 other? I'm trying to make it easy to enable p6spy, something like

profiles
  profile
idhsql/id
activation
  activeByDefaulttrue/activeByDefault
/activation
properties
  databaseTypehsqldb/databaseType
  databaseDriverorg.hsqldb.jdbcDriver/databaseDriver
  ...
/properties
  /profile
  profile
idpostgres/id
properties
  databaseTypepostgresql/databaseType
  databaseDriverorg.postgresql.Driver/databaseDriver
  ...
/properties
  /profile
  profile
idp6spy/id
properties
  databaseDriver...P6SpyDriver/databaseDriver
/properties
  /profile
/profiles

 the idea being that you can switch databases with '-Ppostgres' and
 enable P6Spy for either database with, for example, '-Ppostgres
-Pp6spy'.

 Unfortunately, it seems that Maven only sets the properties defined in
 *one* of the two profiles. Is there a way to get both?

 Alternatively, is there another way to conditionally set properties in
M2?

 L.


 -
 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]




How to include generated-sources directory in compilation?

2006-07-31 Thread Alexis Midon

Hi all,

during the generate-sources, an ant task generates a source file.
I'd like to know if the source files under generated-sources are automacilly
included is the compilation?
or should I use the build-helper:add-source ?

thanks in advance,

Alexis


Re: [maven-antrun-plugin] How to pass default Maven Properties to ant/ ?

2006-07-28 Thread Alexis Midon

Hi Toli,

I post my question on my blog http://jroller.com/page/alexismtoo and I got
a useful answer from
Rubenhttp://jroller.com/page/alexism?entry=maven2_antrun_plugin#comment3
He suggests me to use the maven ant-task inside the build.xml itself.

http://maven.apache.org/ant-tasks.html

Actually the pom task http://maven.apache.org/ant-tasks.html#POM will load
a POM file and make it available as a reference for the other tasks or as
properties.
That could be a neat solution, don't you think?

Alexis


On 7/27/06, Toli Kuznets [EMAIL PROTECTED] wrote:


Alexis,

i've experimented with this as well and ended up with the same
solution as you. I'm afraid that may be the only option for now.

On 7/27/06, Alexis Midon [EMAIL PROTECTED] wrote:
 Hi all,

 As recommended by the antrun
 plugin
http://maven.apache.org/plugins/maven-antrun-plugin/introduction.html,
 I'd like to move all my Ant tasks to a build.xml file and just call it
from
 the POM using Ant's ant/ task
http://ant.apache.org/manual/CoreTasks/ant.html
 .

 I need to use some of the Maven properties (${project.build.directory},
${
 project.build.outputDirectory}, etc.) inside the build.xml,
unfortunately it
 seems that those properties are not inherited from the Maven Project.

 To be precise, Maven properties are available in the Maven tasks tag
but
 not passed to the ant task.

 configuration
 tasks
 !-- Maven properties are available inside the tasks... --
 echo${project.build.directory}/echo

 !-- but not in the build.xml file! --
 ant dir=${basedir}
  antfile=build.xml
 /
 /tasks
 /configuration


 The only workaround I found out is to explicitly declare the properties
 before or inside the ant tag.
 But you will agree that this not really neat nor efficient.

 configuration
 tasks
 !-- Pass all the properties that may be needed in the ant file
--
 property name=project.build.directory value=${
 project.build.directory}/

 ant dir=${basedir}
  antfile=build-test.xml
 /
 /tasks
 /configuration

 Does anyone have a solution please?

 Thanks in advance for your help,

 Alexis




--
Toli Kuznets
http://www.marketcetera.com: Open-Source Trading Platform
download.run.trade.

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




[maven-antrun-plugin] How to pass default Maven Properties to ant/ ?

2006-07-27 Thread Alexis Midon

Hi all,

As recommended by the antrun
pluginhttp://maven.apache.org/plugins/maven-antrun-plugin/introduction.html,
I'd like to move all my Ant tasks to a build.xml file and just call it from
the POM using Ant's ant/ taskhttp://ant.apache.org/manual/CoreTasks/ant.html
.

I need to use some of the Maven properties (${project.build.directory}, ${
project.build.outputDirectory}, etc.) inside the build.xml, unfortunately it
seems that those properties are not inherited from the Maven Project.

To be precise, Maven properties are available in the Maven tasks tag but
not passed to the ant task.

configuration
   tasks
   !-- Maven properties are available inside the tasks... --
   echo${project.build.directory}/echo

   !-- but not in the build.xml file! --
   ant dir=${basedir}
antfile=build.xml
   /
   /tasks
/configuration


The only workaround I found out is to explicitly declare the properties
before or inside the ant tag.
But you will agree that this not really neat nor efficient.

configuration
   tasks
   !-- Pass all the properties that may be needed in the ant file --
   property name=project.build.directory value=${
project.build.directory}/

   ant dir=${basedir}
antfile=build-test.xml
   /
   /tasks
/configuration

Does anyone have a solution please?

Thanks in advance for your help,

Alexis


Re: Include Test classes in Jar

2006-07-27 Thread Alexis Midon

you should add the following plugins.
regards

Alexis


   !--
   | Those 2 plugins allow to build:
   |- a JAR of the test classes
   |- a JAR of the sources classes
   |- a JAR of the test sources classes
   --
!-- JAR of the test classes --
plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-jar-plugin/artifactId
   executions
   execution
   idBuild test-jar/id
   goals
   goaltest-jar/goal
   /goals
   /execution
   /executions
/plugin
!-- JAR of the sources classes  JAR of the test sources classes --
plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-source-plugin/artifactId
   executions
   execution
   idBuild src-jar and src-test-jar/id
   goals
   goaljar/goal
   goaltest-jar/goal
   /goals
   /execution
   /executions
/plugin


On 7/27/06, RobJac [EMAIL PROTECTED] wrote:



When I am trying to build/jar a project. The test-classes are not getting
jarred. Is there a way I can change settings in my pom.xml to include the
test classes as well when i build my project?
--
View this message in context:
http://www.nabble.com/Include-Test-classes-in-Jar-tf2009433.html#a5520569
Sent from the Maven - Users forum at Nabble.com.


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




1 Module - N output jars

2006-07-27 Thread Alexis Midon

Hi all,

I'm currently migrating a big project from Ant to Maven.
I have exploded the source code in modules as much as possible but for
legacy reasons I want one of them to generate N output jars (instead of a
single one).

My question is How can I do that?
I have several leads but some questions remain.
Here they are :

1. add to package phase an antrun plugin to create the desired jars,
  but then the underlying question is: how to disable the 'jar:jar' goal
during this phase?

1bis. use the assembly plugin to build several jars, sounds quite cumbersome
and not better than the ant plugin solution.

2. is there a way to make the jar plugin generate several jars?

Thanks for your help!

Alexis


Re: 1 Module - N output jars

2006-07-27 Thread Alexis Midon

well disable the jar:jar is not a requirement, but if I generate several
jars, I do not need the jar:jar goal to create a big jar containing all
classes. you see what I mean?

by the way, your answer is really appreciated.
I did not know the build-helper-maven-plugin up until now.

Regards,
Alexis

On 7/27/06, Chris Hilton [EMAIL PROTECTED] wrote:


1. Are you sure you need to disable jar:jar? Or just modify it such that
it builds one of your desired jars? I also needed to generate multiple
jars for a project; you can read about my particular solution here:

http://www.nabble.com/-maven2--Generating-several-artifacts-per-project-
--tf1689630.html#a4630045

2. Don't know, but hopefully answer 1 will make this a moot point.

Chris

 -Original Message-
 From: Alexis Midon [mailto:[EMAIL PROTECTED]
 Sent: Thursday, 27 July, 2006 09:50
 To: Maven Users List
 Subject: 1 Module - N output jars

 Hi all,

 I'm currently migrating a big project from Ant to Maven.
 I have exploded the source code in modules as much as
 possible but for legacy reasons I want one of them to
 generate N output jars (instead of a single one).

 My question is How can I do that?
 I have several leads but some questions remain.
 Here they are :

 1. add to package phase an antrun plugin to create the desired jars,
but then the underlying question is: how to disable the
 'jar:jar' goal during this phase?

 1bis. use the assembly plugin to build several jars, sounds
 quite cumbersome and not better than the ant plugin solution.

 2. is there a way to make the jar plugin generate several jars?

 Thanks for your help!

 Alexis


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




How to add some attributes to the manifest?

2006-07-26 Thread Alexis Midon

Hi all,

I'd like to add dynamically some attributes to a manifest.
I've searched into the maven-jar-plugin and found a way to set the manifest
file itself but nothing about attributes.
I'd like something like the Maven 1 jar plugin configuration :
http://maven.apache.org/maven-1.x/plugins/jar/properties.html#Jar_Settings

thanks for your help,

Alexis


Re: How to add some attributes to the manifest?

2006-07-26 Thread Alexis Midon

I finally found a way to add attribute to the manifest.
You should use the following syntax :

build
   plugins
   plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-jar-plugin/artifactId
   configuration
   archive

manifestFilesrc/main/resources/META-INF/MANIFEST.MF/manifestFile
   manifestEntries

myCustomAttributeNamemyValue/myCustomAttributeName
   /manifestEntries
   /archive
   /configuration
   /plugin
   /plugins
   /build


regards,

Alexis

On 7/26/06, Alexis Midon [EMAIL PROTECTED] wrote:




Hi all,

I'd like to add dynamically some attributes to a manifest.
I've searched into the maven-jar-plugin and found a way to set the
manifest file itself but nothing about attributes.
I'd like something like the Maven 1 jar plugin configuration :
http://maven.apache.org/maven-1.x/plugins/jar/properties.html#Jar_Settings

thanks for your help,

Alexis




Re: [m2] variable for ${basedir}/target ?

2006-07-26 Thread Alexis Midon

and a variable for the main resource directory?



On 7/26/06, David J. M. Karlsen [EMAIL PROTECTED] wrote:


Hi!

Does any variable exist for ${basedir}/target - or is this the closest I
can come?



Does there exist a list over variable expressions in maven2 poms?


--
David J. M. Karlsen - +47 90 68 22 43
http://www.davidkarlsen.com
http://mp3.davidkarlsen.com

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