maven-dependency-plugin

2013-03-19 Thread virg g
HI,
I have project which contains many modules and creates jars and wars. My
Build structure is parent POM has all modules. I am placing all my plugins
in PARENT POM to be required to to applied all child modules. My
requirement is to copy all these created jars to one location and wars to
another location. I am using maven-dependency-plugin to do this. This is
sample plugin. I have two issues with this.
1.  I am able to copy all the jars and wars to one folder, but not jars to
one folder and wars to another. Not able to distinguish
2. SInce i have placed this plugin in parent, along with all the jars and
wars, from Parent POM type is POM it is copying project.pom to this
location also. How to exclude project.pom being copied.

Here is my plugin. I have added 2 artifactItems one for jar and another
with war by mentioning TYPE as jar and war for each, also added excludes
and includes, nothing worked. Any solution to my problem? Really it would
be great help.

 plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-dependency-plugin/artifactId
version2.7/version
executions
execution
idcopy-installed/id
phaseinstall/phase
goals
goalcopy/goal
/goals
configuration
artifactItems
artifactItem
groupId${project.groupId}/groupId

 artifactId${project.artifactId}/artifactId
version${project.version}/version
type${project.packaging}/type
overWritetrue/overWrite

 destFileName${project.artifactId}.${project.packaging}/destFileName
/artifactItem
   /artifactItems

 outputDirectory../../${install.jar.folder}/outputDirectory
/configuration
/execution
/executions
/plugin

Thanks
Virg


Re: Unpacking jars into target/classes

2013-03-19 Thread Stephen Connolly
On 18 March 2013 22:52, Stephen Connolly stephen.alan.conno...@gmail.comwrote:




 On 18 March 2013 21:48, Joachim Durchholz j...@durchholz.org wrote:

 Am 18.03.2013 12:45, schrieb Stephen Connolly:

  I would not base your opinion on this one thread.

 Joachim got off on the wrong foot by mistaking us trying to guide him
 towards a path (where he won't fight maven all the way) for us being
 evangelical and spouting religious dogma...


 Just for the record: I heartily disagree with that view of what happened
 there.
 In fact I have reason to believe that such a path doesn't even exist, and
 in more situations than any Maven proponent would like to admit.
 Of course, Maven proponents would heartily disagree with that view, and
 in fact that part of the debate never reached a conclusion (nor will it
 ever, I think).


 Well I think there is a path, but let's not re-open that whole thing right
 now.

 Perhaps when I revamp the docs you might consider reading them and then
 respond because I believe at that point you might agree that I had a valid
 point and that there is a path... just a path that you don't want to go
 down because your experiences have coloured how you evaluate the set of
 trade-offs that need to be made.




  Some of us in this list may

 have egged on the troll vs troll style of this interaction, but the past
 is
 a foreign country that we cannot visit, personally I think it should be
 left behind, fault on both sides, therefore both sides gave some learning
 to do.


 I can agree with that.


  I am currently working on trying to find a way to revamp the main maven
 site to make it easier for people to get up to speed and grok the reasons
 for maven picking the sides it picks as well as grok *where* maven says
 not my problem (anything after a deployment environment agnostic
 artifact
 has been delivered into the maven repository is not maven's problem BTW,
 use other tools: Chef/Puppet/ANT/Gradle/Buildr/**BASH/etc to turn that
 into
 an artifact configured for the specific environment it will be deployed
 into and put it in that environment)


 Good plan.

 I'd also add a paragraph that Maven is not a toolbox, with the tools to
 be mixed and matched as a desired workflow mandates. Instead, you're
 supposed to study the workflows available, select the one that best fits
 your requirements, and stick with that no matter what. Of course you can
 configure the workflows, but the extent to which that is possible is
 strictly controlled.


 I think you really should wait for me to revamp the docs before making
 that kind of proposition.

 Maven has one primary lifecycle and considers its core responsibility to
 be delivering artifacts that are target agnostic into the maven repository.
 What you can do in that lifecycle is very mix and match and a lot more
 flexible than you would suspect, but after the end of that lifecycle you
 should not be using Maven.

 Handling the mix and match most likely will involve writing either
 extensions (unlikely) or plugins (most likely) which will need to be pushed
 to a Maven repository...

 If you don't have an internal Maven repository manager to host such
 things, or if you cannot push those plugins/extensions to central, then you
 might not realize how flexible Maven is in this respect




 I consider that approach to be a core mistake in Maven's, but I can agree
 to disagree about that one and move on, in the knowledge that little could
 be done about it even if it's true so there's little to be gained in
 discussing that.


 What we probably can agree on is that (a) the workflows are implicit in
 what's available in the plugins and what isn't, which makes it hard to get
 an overview of the available workflows and select the right one;


 There is 1 primary lifecycle: initialize - ... - compile - ... - test
 - ... - package - ... - verify - install - deploy

 There are different packagings: jar/war/ear/etc

 I am guessing that you are referring to these as workflows.

 Defining custom packaging is actually quite trivial, just an XML file in a
 .jar that you add as a build extension (or include in a maven plugin). You
 can do quite a lot with that.

 The Maven project can only document our packagings and their lifecycles:
 pom/jar/war/ear/rar/ejb-jar

 We cannot be responsible for documenting other people's lifecycles. For
 example (and I am pointing now at a personal project) the
 jszip-maven-plugin defines its own lifecycle:
 https://github.com/jszip/jszip-maven-plugin/blob/master/src/main/resources/META-INF/plexus/components.xmlThe
  documentation of that lifecycle is not the responsibility of the Maven
 project (or the ASF unless/until I seek to move that project into the ASF,
 but that is a separate story).

 I agree that it can be hard to decide what packaging type to pick for your
 use case when there are multiple similar ones, e.g. webjars is solving a
 similar problem to jszip so if you are packaging up javascript modules
 for consumption 

Re: maven-dependency-plugin

2013-03-19 Thread Adrien Rivard
Hi,
Have you try  to add two differents executions (with differents id), one
for type war the others for type jar ?


On Tue, Mar 19, 2013 at 10:51 AM, virg g 06v...@gmail.com wrote:

 HI,
 I have project which contains many modules and creates jars and wars. My
 Build structure is parent POM has all modules. I am placing all my plugins
 in PARENT POM to be required to to applied all child modules. My
 requirement is to copy all these created jars to one location and wars to
 another location. I am using maven-dependency-plugin to do this. This is
 sample plugin. I have two issues with this.
 1.  I am able to copy all the jars and wars to one folder, but not jars to
 one folder and wars to another. Not able to distinguish
 2. SInce i have placed this plugin in parent, along with all the jars and
 wars, from Parent POM type is POM it is copying project.pom to this
 location also. How to exclude project.pom being copied.

 Here is my plugin. I have added 2 artifactItems one for jar and another
 with war by mentioning TYPE as jar and war for each, also added excludes
 and includes, nothing worked. Any solution to my problem? Really it would
 be great help.

  plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-dependency-plugin/artifactId
 version2.7/version
 executions
 execution
 idcopy-installed/id
 phaseinstall/phase
 goals
 goalcopy/goal
 /goals
 configuration
 artifactItems
 artifactItem
 groupId${project.groupId}/groupId

  artifactId${project.artifactId}/artifactId
 version${project.version}/version
 type${project.packaging}/type
 overWritetrue/overWrite

  destFileName${project.artifactId}.${project.packaging}/destFileName
 /artifactItem
/artifactItems

  outputDirectory../../${install.jar.folder}/outputDirectory
 /configuration
 /execution
 /executions
 /plugin

 Thanks
 Virg




-- 
Adrien Rivard


RE: maven-dependency-plugin

2013-03-19 Thread Martin Gainty
so essentially you have 2 different executions which you want to trigger with 2 
different profiles 
 
http://www.thinkplexx.com/learn/howto/maven2/m2-execution/configure-default-and-alternative-executions-in-maven-pom-using-profiles

there are a number of triggers you can implement to trigger your profile:

absence or presence of a file
which maven phase you want the execution to bind to
environment variables detection
detection of OS variables
property values
 
http://maven.apache.org/settings.html#Profiles

Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.

  


 Date: Tue, 19 Mar 2013 12:35:04 +0100
 Subject: Re: maven-dependency-plugin
 From: adrien.riv...@gmail.com
 To: users@maven.apache.org
 
 Hi,
 Have you try to add two differents executions (with differents id), one
 for type war the others for type jar ?
 
 
 On Tue, Mar 19, 2013 at 10:51 AM, virg g 06v...@gmail.com wrote:
 
  HI,
  I have project which contains many modules and creates jars and wars. My
  Build structure is parent POM has all modules. I am placing all my plugins
  in PARENT POM to be required to to applied all child modules. My
  requirement is to copy all these created jars to one location and wars to
  another location. I am using maven-dependency-plugin to do this. This is
  sample plugin. I have two issues with this.
  1. I am able to copy all the jars and wars to one folder, but not jars to
  one folder and wars to another. Not able to distinguish
  2. SInce i have placed this plugin in parent, along with all the jars and
  wars, from Parent POM type is POM it is copying project.pom to this
  location also. How to exclude project.pom being copied.
 
  Here is my plugin. I have added 2 artifactItems one for jar and another
  with war by mentioning TYPE as jar and war for each, also added excludes
  and includes, nothing worked. Any solution to my problem? Really it would
  be great help.
 
  plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-dependency-plugin/artifactId
  version2.7/version
  executions
  execution
  idcopy-installed/id
  phaseinstall/phase
  goals
  goalcopy/goal
  /goals
  configuration
  artifactItems
  artifactItem
  groupId${project.groupId}/groupId
 
  artifactId${project.artifactId}/artifactId
  version${project.version}/version
  type${project.packaging}/type
  overWritetrue/overWrite
 
  destFileName${project.artifactId}.${project.packaging}/destFileName
  /artifactItem
  /artifactItems
 
  outputDirectory../../${install.jar.folder}/outputDirectory
  /configuration
  /execution
  /executions
  /plugin
 
  Thanks
  Virg
 
 
 
 
 -- 
 Adrien Rivard
  

Re: maven-dependency-plugin

2013-03-19 Thread virg g
Hi,
Yes have added as two different artifactItems like this
Since I have placed this in Parent POM, it was trying to copy even my
PARENT artifact (parentProj) which is of Type POM.
My Guess the PARENT POM is causing this issue, since its type POM, And i
have added another section for this also as type pom, but it did not help.
Is there anyaway to exclude Parent Artifact being copied?
This is the error i am getting
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-dependency-plugin:
2.7:copy (copy-installed) on project parentProj: Unable to find artifact.
Failure to find parentProj:jar:1.1-SNAPSHOT in
http://repo1.maven.org/maven2was cached in the local repository,
resolution will not be reattempted
until the update interval of central has elapsed or updates are forced

This is my sample conf

   artifactItems
artifactItem
groupId${project.groupId}/groupId

artifactId${project.artifactId}/artifactId
version${project.version}/version
typepom/type
-
/artifactItem
artifactItem
groupId${project.groupId}/groupId

artifactId${project.artifactId}/artifactId
version${project.version}/version
typejar/type
-
/artifactItem
artifactItem
groupId${project.groupId}/groupId

artifactId${project.artifactId}/artifactId
version${project.version}/version
typewar/type
---
/artifactItem
/artifactItems

On Tue, Mar 19, 2013 at 5:05 PM, Adrien Rivard adrien.riv...@gmail.comwrote:

 Hi,
 Have you try  to add two differents executions (with differents id), one
 for type war the others for type jar ?


 On Tue, Mar 19, 2013 at 10:51 AM, virg g 06v...@gmail.com wrote:

  HI,
  I have project which contains many modules and creates jars and wars. My
  Build structure is parent POM has all modules. I am placing all my
 plugins
  in PARENT POM to be required to to applied all child modules. My
  requirement is to copy all these created jars to one location and wars to
  another location. I am using maven-dependency-plugin to do this. This is
  sample plugin. I have two issues with this.
  1.  I am able to copy all the jars and wars to one folder, but not jars
 to
  one folder and wars to another. Not able to distinguish
  2. SInce i have placed this plugin in parent, along with all the jars and
  wars, from Parent POM type is POM it is copying project.pom to this
  location also. How to exclude project.pom being copied.
 
  Here is my plugin. I have added 2 artifactItems one for jar and another
  with war by mentioning TYPE as jar and war for each, also added excludes
  and includes, nothing worked. Any solution to my problem? Really it would
  be great help.
 
   plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-dependency-plugin/artifactId
  version2.7/version
  executions
  execution
  idcopy-installed/id
  phaseinstall/phase
  goals
  goalcopy/goal
  /goals
  configuration
  artifactItems
  artifactItem
  groupId${project.groupId}/groupId
 
   artifactId${project.artifactId}/artifactId
  version${project.version}/version
  type${project.packaging}/type
  overWritetrue/overWrite
 
   destFileName${project.artifactId}.${project.packaging}/destFileName
  /artifactItem
 /artifactItems
 
   outputDirectory../../${install.jar.folder}/outputDirectory
  /configuration
  /execution
  /executions
  /plugin
 
  Thanks
  Virg
 



 --
 Adrien Rivard



Re: Unpacking jars into target/classes

2013-03-19 Thread Wayne Fay
 Just for you, I have taken the 30 minutes out of my life and written a
 Maven Plugin that will solve your issues with those pesky non-maven
 dependencies.

 https://github.com/stephenc/non-maven-jar-maven-plugin

Most importantly, does the plugin output this text each time it runs
BY USING THIS PLUGIN YOU ACKNOWLEDGE THAT YOU ARE A BAD CITIZEN OF
THE MAVEN ECOSYSTEM.?

If not, I consider that a defect. ;-)

Wayne

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



Re: Unpacking jars into target/classes

2013-03-19 Thread Stephen Connolly
Wayne,

Please open an issue (
https://github.com/stephenc/non-maven-jar-maven-plugin/issues). Pull
requests welcome

-Stephen


On 19 March 2013 12:59, Wayne Fay wayne...@gmail.com wrote:

  Just for you, I have taken the 30 minutes out of my life and written a
  Maven Plugin that will solve your issues with those pesky non-maven
  dependencies.
 
  https://github.com/stephenc/non-maven-jar-maven-plugin

 Most importantly, does the plugin output this text each time it runs
 BY USING THIS PLUGIN YOU ACKNOWLEDGE THAT YOU ARE A BAD CITIZEN OF
 THE MAVEN ECOSYSTEM.?

 If not, I consider that a defect. ;-)

 Wayne

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




Copy-maven-plugin and settings.xml

2013-03-19 Thread kishorej
Hi,
I am using copy-maven-plugin for copying the .tar.gz from my hudson
machine(artifact) to the development server. I am using username, password,
server ip and path as hard coded in my pom instead of settings.xml. Could
you please any one help me how to do the same in settings.xml file.

plugin
groupIdcom.github.goldin/groupId
artifactIdcopy-maven-plugin/artifactId
version0.2.5/version
executions
execution
iddeploy-archive/id
phaseinstall/phase
goals
goalcopy/goal
/goals
configuration
resources
resource
*
targetPathscp://XX:YY@IP:/app_home/backup/targetPath *
 
file*.tar.gz/file 
/resource
   /resources
/configuration
/execution
/executions
/plugin



--
View this message in context: 
http://maven.40175.n5.nabble.com/Copy-maven-plugin-and-settings-xml-tp5751230.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



Re: maven-dependency-plugin

2013-03-19 Thread Ron Wheeler
I may not understand everything that you are trying to do but this looks 
like something that the assembly plug-in or the shade plug-in might 
accomplish in a more straightforward fashion.


Ron
On 19/03/2013 8:39 AM, virg g wrote:

Hi,
Yes have added as two different artifactItems like this
Since I have placed this in Parent POM, it was trying to copy even my
PARENT artifact (parentProj) which is of Type POM.
My Guess the PARENT POM is causing this issue, since its type POM, And i
have added another section for this also as type pom, but it did not help.
Is there anyaway to exclude Parent Artifact being copied?
This is the error i am getting
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-dependency-plugin:
2.7:copy (copy-installed) on project parentProj: Unable to find artifact.
Failure to find parentProj:jar:1.1-SNAPSHOT in
http://repo1.maven.org/maven2was cached in the local repository,
resolution will not be reattempted
until the update interval of central has elapsed or updates are forced

This is my sample conf

artifactItems
 artifactItem
 groupId${project.groupId}/groupId

artifactId${project.artifactId}/artifactId
 version${project.version}/version
 typepom/type
 -
 /artifactItem
 artifactItem
 groupId${project.groupId}/groupId

artifactId${project.artifactId}/artifactId
 version${project.version}/version
 typejar/type
 -
 /artifactItem
 artifactItem
 groupId${project.groupId}/groupId

artifactId${project.artifactId}/artifactId
 version${project.version}/version
 typewar/type
 ---
 /artifactItem
 /artifactItems

On Tue, Mar 19, 2013 at 5:05 PM, Adrien Rivard adrien.riv...@gmail.comwrote:


Hi,
Have you try  to add two differents executions (with differents id), one
for type war the others for type jar ?


On Tue, Mar 19, 2013 at 10:51 AM, virg g 06v...@gmail.com wrote:


HI,
I have project which contains many modules and creates jars and wars. My
Build structure is parent POM has all modules. I am placing all my

plugins

in PARENT POM to be required to to applied all child modules. My
requirement is to copy all these created jars to one location and wars to
another location. I am using maven-dependency-plugin to do this. This is
sample plugin. I have two issues with this.
1.  I am able to copy all the jars and wars to one folder, but not jars

to

one folder and wars to another. Not able to distinguish
2. SInce i have placed this plugin in parent, along with all the jars and
wars, from Parent POM type is POM it is copying project.pom to this
location also. How to exclude project.pom being copied.

Here is my plugin. I have added 2 artifactItems one for jar and another
with war by mentioning TYPE as jar and war for each, also added excludes
and includes, nothing worked. Any solution to my problem? Really it would
be great help.

  plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-dependency-plugin/artifactId
 version2.7/version
 executions
 execution
 idcopy-installed/id
 phaseinstall/phase
 goals
 goalcopy/goal
 /goals
 configuration
 artifactItems
 artifactItem
 groupId${project.groupId}/groupId

  artifactId${project.artifactId}/artifactId
 version${project.version}/version
 type${project.packaging}/type
 overWritetrue/overWrite

  destFileName${project.artifactId}.${project.packaging}/destFileName
 /artifactItem
/artifactItems

  outputDirectory../../${install.jar.folder}/outputDirectory
 /configuration
 /execution
 /executions
 /plugin

Thanks
Virg




--
Adrien Rivard




--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


-
To unsubscribe, e-mail: 

Re: maven-dependency-plugin

2013-03-19 Thread Adrien Rivard
On Tue, Mar 19, 2013 at 1:39 PM, virg g 06v...@gmail.com wrote:

 Hi,
 Yes have added as two different artifactItems like this
 Since I have placed this in Parent POM, it was trying to copy even my
 PARENT artifact (parentProj) which is of Type POM.
 My Guess the PARENT POM is causing this issue, since its type POM, And i
 have added another section for this also as type pom, but it did not help.
 Is there anyaway to exclude Parent Artifact being copied?
 This is the error i am getting
 [ERROR] Failed to execute goal
 org.apache.maven.plugins:maven-dependency-plugin:
 2.7:copy (copy-installed) on project parentProj: Unable to find artifact.
 Failure to find parentProj:jar:1.1-SNAPSHOT in
 http://repo1.maven.org/maven2was cached in the local repository,
 resolution will not be reattempted
 until the update interval of central has elapsed or updates are forced

 This is my sample conf

artifactItems
 artifactItem
 groupId${project.groupId}/groupId

 artifactId${project.artifactId}/artifactId
 version${project.version}/version
 typepom/type
 -
 /artifactItem
 artifactItem
 groupId${project.groupId}/groupId

 artifactId${project.artifactId}/artifactId
 version${project.version}/version
 typejar/type
 -
 /artifactItem
 artifactItem
 groupId${project.groupId}/groupId

 artifactId${project.artifactId}/artifactId
 version${project.version}/version
 typewar/type
 ---
 /artifactItem
 /artifactItems


I was suggested something like

executions
execution
idcopy-jar/id
phasepackage/phase
goals
goalcopy-dependencies/goal
/goals
configuration
includeTypesjar/includeTypes
outputDirectory../../jar/outputDirectory
/configuration
/execution
execution
idcopy-war/id
phasepackage/phase
goals
goalcopy-dependencies/goal
/goals
configuration
includeTypeswar/includeTypes
outputDirectory../../war/outputDirectory
/configuration
/execution
/executions

Also if I  understand it correctly the ${project*} variables are resolved
in the context of the parent project, so not exactly what you (seems to)
want.

What are you trying to achieve with this ?

On Tue, Mar 19, 2013 at 5:05 PM, Adrien Rivard adrien.riv...@gmail.com
 wrote:

  Hi,
  Have you try  to add two differents executions (with differents id), one
  for type war the others for type jar ?
 
 
  On Tue, Mar 19, 2013 at 10:51 AM, virg g 06v...@gmail.com wrote:
 
   HI,
   I have project which contains many modules and creates jars and wars.
 My
   Build structure is parent POM has all modules. I am placing all my
  plugins
   in PARENT POM to be required to to applied all child modules. My
   requirement is to copy all these created jars to one location and wars
 to
   another location. I am using maven-dependency-plugin to do this. This
 is
   sample plugin. I have two issues with this.
   1.  I am able to copy all the jars and wars to one folder, but not jars
  to
   one folder and wars to another. Not able to distinguish
   2. SInce i have placed this plugin in parent, along with all the jars
 and
   wars, from Parent POM type is POM it is copying project.pom to this
   location also. How to exclude project.pom being copied.
  
   Here is my plugin. I have added 2 artifactItems one for jar and another
   with war by mentioning TYPE as jar and war for each, also added
 excludes
   and includes, nothing worked. Any solution to my problem? Really it
 would
   be great help.
  
plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-dependency-plugin/artifactId
   version2.7/version
   executions
   execution
   idcopy-installed/id
   phaseinstall/phase
   goals
   goalcopy/goal
   /goals
   configuration
   artifactItems
   artifactItem
  
 groupId${project.groupId}/groupId
  
artifactId${project.artifactId}/artifactId
  
 version${project.version}/version
   type${project.packaging}/type
   overWritetrue/overWrite
  
  
  

build helper maven plugin:regex-property :: set the maven property with the value if the regex don't match ?

2013-03-19 Thread Fabien PERIE
Hello,

I use the build helper maven plugin:regex-property maven plugin to define a
maven property with a prefix (the character -) from the
parsedVersion.qualifier maven property.
If the parsedVersion.qualifier maven property is not defined, my variable
must be set to empty.

After resolving this issue : regex-property goal should allow an empty
replacement https://jira.codehaus.org/browse/MBUILDHELPER-53, I have
tried to write :
*
configuration
*
*nameMparsedVersion.qualifier/name
value-${parsedVersion.qualifier}/value
regex-$/regex
replacement/replacement
failIfNoMatchfalse/failIfNoMatch
*
*/configuration
*

This plugin allows to replace an expression in a value to set an another
maven property.
Insofar as it tells the plugin does not fail if the regex don't match, we
should set the value of the new maven property with the initial value, no ?

What do you think ?

Thank's a lot,
Fabien


Re: build helper maven plugin:regex-property :: set the maven property with the value if the regex don't match ?

2013-03-19 Thread Fabien PERIE
Hello,

I created a jira issue available here :
https://jira.codehaus.org/browse/MBUILDHELPER-54

Thank's a lot,
Fabien

2013/3/19 Fabien PERIE fabien.pe...@gmail.com

 Hello,

 I use the build helper maven plugin:regex-property maven plugin to define
 a maven property with a prefix (the character -) from the
 parsedVersion.qualifier maven property.
 If the parsedVersion.qualifier maven property is not defined, my variable
 must be set to empty.

 After resolving this issue : regex-property goal should allow an empty
 replacement https://jira.codehaus.org/browse/MBUILDHELPER-53, I have
 tried to write :
 *
 configuration
 *
 *nameMparsedVersion.qualifier/name
 value-${parsedVersion.qualifier}/value
 regex-$/regex
 replacement/replacement
 failIfNoMatchfalse/failIfNoMatch
 *
 */configuration
 *

 This plugin allows to replace an expression in a value to set an another
 maven property.
 Insofar as it tells the plugin does not fail if the regex don't match, we
 should set the value of the new maven property with the initial value, no
 ?

 What do you think ?

 Thank's a lot,
 Fabien



Re: build helper maven plugin:regex-property :: set the maven property with the value if the regex don't match ?

2013-03-19 Thread Fabien PERIE
Sorry but I smoked this morning...
I come to add a new IT test to validate the proper functioning of the
plugin...

Fabien

2013/3/19 Fabien PERIE fabien.pe...@gmail.com

 Hello,

 I created a jira issue available here :
 https://jira.codehaus.org/browse/MBUILDHELPER-54


 Thank's a lot,
 Fabien

 2013/3/19 Fabien PERIE fabien.pe...@gmail.com

 Hello,

 I use the build helper maven plugin:regex-property maven plugin to define
 a maven property with a prefix (the character -) from the
 parsedVersion.qualifier maven property.
 If the parsedVersion.qualifier maven property is not defined, my variable
 must be set to empty.

 After resolving this issue : regex-property goal should allow an empty
 replacement https://jira.codehaus.org/browse/MBUILDHELPER-53, I have
 tried to write :
 *
 configuration
 *
 *nameMparsedVersion.qualifier/name
 value-${parsedVersion.qualifier}/value
 regex-$/regex
 replacement/replacement
 failIfNoMatchfalse/failIfNoMatch
 *
 */configuration
 *

 This plugin allows to replace an expression in a value to set an another
 maven property.
 Insofar as it tells the plugin does not fail if the regex don't match,
 we should set the value of the new maven property with the initial
 value, no ?

 What do you think ?

 Thank's a lot,
 Fabien





RE: Copy-maven-plugin and settings.xml

2013-03-19 Thread Zanzerkia, Robert
Hi,
 I just configured security for maven nexus repository using encrypted 
passwords using the below guide.



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

 
 This might help in your situation...

Robert Zanzerkia

 

-Original Message-
From: kishorej [mailto:kishore.jaya...@gmail.com] 
Sent: Tuesday, March 19, 2013 9:34 AM
To: users@maven.apache.org
Subject: Copy-maven-plugin and settings.xml

Hi,
I am using copy-maven-plugin for copying the .tar.gz from my hudson
machine(artifact) to the development server. I am using username, password,
server ip and path as hard coded in my pom instead of settings.xml. Could
you please any one help me how to do the same in settings.xml file.

plugin
groupIdcom.github.goldin/groupId
artifactIdcopy-maven-plugin/artifactId
version0.2.5/version
executions
execution
iddeploy-archive/id
phaseinstall/phase
goals
goalcopy/goal
/goals
configuration
resources
resource
*
targetPathscp://XX:YY@IP:/app_home/backup/targetPath *
 
file*.tar.gz/file 
/resource
   /resources
/configuration
/execution
/executions
/plugin



--
View this message in context: 
http://maven.40175.n5.nabble.com/Copy-maven-plugin-and-settings-xml-tp5751230.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


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



Re: Copy-maven-plugin and settings.xml

2013-03-19 Thread Adrien Rivard
Why not using a ssh key with no password ?

Alternatively you can let the server download the file via a simple cron
script .(from hudson or even nexus or other MRM; nexus has a simple rest
api for that).



On Tue, Mar 19, 2013 at 2:34 PM, kishorej kishore.jaya...@gmail.com wrote:

 Hi,
 I am using copy-maven-plugin for copying the .tar.gz from my hudson
 machine(artifact) to the development server. I am using username, password,
 server ip and path as hard coded in my pom instead of settings.xml. Could
 you please any one help me how to do the same in settings.xml file.

 plugin
 groupIdcom.github.goldin/groupId
 artifactIdcopy-maven-plugin/artifactId
 version0.2.5/version
 executions
 execution
 iddeploy-archive/id
 phaseinstall/phase
 goals
 goalcopy/goal
 /goals
 configuration
 resources
 resource
 *
 targetPathscp://XX:YY@IP:/app_home/backup/targetPath *

 file*.tar.gz/file
 /resource
/resources
 /configuration
 /execution
 /executions
 /plugin



 --
 View this message in context:
 http://maven.40175.n5.nabble.com/Copy-maven-plugin-and-settings-xml-tp5751230.html
 Sent from the Maven - Users mailing list archive at Nabble.com.

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




-- 
Adrien Rivard


Re: mvn -amd should honour dependencyManagement POM imports

2013-03-19 Thread Ansgar Konermann
Am 18.03.2013 19:01, schrieb Stephen Connolly:
 Smells like a bug, I'd be interested in other's thoughts, but absence
 further input to the contrary, please one a jira

Filed MNG-5455 [1]

Best regards
Ansgar


[1] https://jira.codehaus.org/browse/MNG-5455




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



Nexus deployment of a ZIP file...

2013-03-19 Thread Zanzerkia, Robert
Hi,
 I am trying to deploy a zip file built using Maven to the Nexus repository 
(internal to our company).
 When I use mvn deploy it connects to repository and deploys the snapshot 
except with the default jar file NOT with the zip file I am building as 
explained below.
 uCMDB-PatternDev-0.0.1-20130319.143249-1.jar instead of the ZIP I created in 
target folder : uCMDB-PatternDev-0.0.1-SNAPSHOT-packages.zip

 I experimented with maven-deploy-plugin which didn't work.
 Also I rather NOT define file, just want it to copy the output of assembly 
plugin...

Thanks,


 My project builds a ZIP file using following plugin. (this part works fine).
plugin

artifactIdmaven-assembly-plugin/artifactId
version2.4/version
configuration
descriptors

descriptordistribution.xml/descriptor
/descriptors
/configuration
/plugin

Distribution.xml
assembly

xmlns=http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;

xsi:schemaLocation=http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
 http://maven.apache.org/xsd/assembly-1.1.2.xsd;
idpackages/id
formats
formatzip/format
/formats
repositories
repository
outputDirectoryrepository/outputDirectory
/repository
/repositories
fileSets
fileSet
directory./dist/directory
includes
include**/include
/includes
excludes
exclude./target/exclude
exclude./repository/exclude
/excludes
/fileSet
/fileSets

/assembly

My repository connections are defined as follows in the pom.xml: (commented out 
URL).
distributionManagement

repository
idnexuspro-prod-release/id
urlhttps://nexuspro.../url
/repository
snapshotRepository
idnexuspro-prod-snapshot/id
urlhttps://nexuspro.../url
/snapshotRepository
/distributionManagement

Robert Zanzerkia





Re: Nexus deployment of a ZIP file...

2013-03-19 Thread Jeffrey E Care
Zanzerkia, Robert robert.zanzer...@fmr.com wrote on 03/19/2013 
12:10:33 PM:

 From: Zanzerkia, Robert robert.zanzer...@fmr.com
 To: users@maven.apache.org users@maven.apache.org, 
 Date: 03/19/2013 12:12 PM
 Subject: Nexus deployment of a ZIP file...
 
 Hi,
  I am trying to deploy a zip file built using Maven to the Nexus 
 repository (internal to our company).
  When I use mvn deploy it connects to repository and deploys the 
 snapshot except with the default jar file NOT with the zip file I am
 building as explained below.

The assemby plugin has an option (attach) to deploy generated assemblies 
with classifiers.

RE: Nexus deployment of a ZIP file...

2013-03-19 Thread Jim McCaskey
Hi there,

Your missing phases and goals.  Below should get you closer.   More information 
can be found here:

http://maven.apache.org/plugins/maven-assembly-plugin/usage.html

-Jim

plugin
artifactIdmaven-assembly-plugin/artifactId
version2.4/version
executions
execution
phasepackage/phase
goals
goalsingle/goal
/goals
configuration
descriptors
descriptordistribution.xml/descriptor
/descriptors
/configuration
/execution
/executions
/plugin


-Original Message-
From: Zanzerkia, Robert [mailto:robert.zanzer...@fmr.com]
Sent: Tuesday, March 19, 2013 11:11 AM
To: users@maven.apache.org
Subject: Nexus deployment of a ZIP file...

Hi,
 I am trying to deploy a zip file built using Maven to the Nexus repository 
(internal to our company).
 When I use mvn deploy it connects to repository and deploys the snapshot 
except with the default jar file NOT with the zip file I am building as 
explained below.
 uCMDB-PatternDev-0.0.1-20130319.143249-1.jar instead of the ZIP I created in 
target folder : uCMDB-PatternDev-0.0.1-SNAPSHOT-packages.zip

 I experimented with maven-deploy-plugin which didn't work.
 Also I rather NOT define file, just want it to copy the output of assembly 
plugin...

Thanks,


 My project builds a ZIP file using following plugin. (this part works fine).
plugin

artifactIdmaven-assembly-plugin/artifactId
version2.4/version
configuration
descriptors

descriptordistribution.xml/descriptor
/descriptors
/configuration
/plugin

Distribution.xml
assembly

xmlns=http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;

xsi:schemaLocation=http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
 http://maven.apache.org/xsd/assembly-1.1.2.xsd;
idpackages/id
formats
formatzip/format
/formats
repositories
repository
outputDirectoryrepository/outputDirectory
/repository
/repositories
fileSets
fileSet
directory./dist/directory
includes
include**/include
/includes
excludes
exclude./target/exclude
exclude./repository/exclude
/excludes
/fileSet
/fileSets

/assembly

My repository connections are defined as follows in the pom.xml: (commented out 
URL).
distributionManagement

repository
idnexuspro-prod-release/id
urlhttps://nexuspro.../url
/repository
snapshotRepository
idnexuspro-prod-snapshot/id
urlhttps://nexuspro.../url
/snapshotRepository
/distributionManagement

Robert Zanzerkia



NOTICE: All information in and attached to this email may be proprietary, 
confidential, privileged and otherwise protected from improper or erroneous 
disclosure. If you are not the sender's intended recipient, you are not 
authorized to intercept, read, print, retain, copy, forward, or disseminate 
this message.


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



Re: Copy-maven-plugin and settings.xml

2013-03-19 Thread Kevin Krumwiede
You can put a profile section in your settings.xml and define properties in
it that will be available to your POM.

On Mar 19, 2013 6:34 AM, kishorej kishore.jaya...@gmail.com wrote:

 Hi,
 I am using copy-maven-plugin for copying the .tar.gz from my hudson
 machine(artifact) to the development server. I am using username,
password,
 server ip and path as hard coded in my pom instead of settings.xml. Could
 you please any one help me how to do the same in settings.xml file.

 plugin
 groupIdcom.github.goldin/groupId
 artifactIdcopy-maven-plugin/artifactId
 version0.2.5/version
 executions
 execution
 iddeploy-archive/id
 phaseinstall/phase
 goals
 goalcopy/goal
 /goals
 configuration
 resources
 resource
 *
 targetPathscp://XX:YY@IP:/app_home/backup/targetPath *

 file*.tar.gz/file
 /resource
/resources
 /configuration
 /execution
 /executions
 /plugin



 --
 View this message in context:
http://maven.40175.n5.nabble.com/Copy-maven-plugin-and-settings-xml-tp5751230.html
 Sent from the Maven - Users mailing list archive at Nabble.com.

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



Looking for best practice guidance to avoid duplication

2013-03-19 Thread Niranjan Rao

Hi there,

I am looking for a best (and/or correct) way  to avoid duplication of 
cargo declarations when using multiple servers, but same set of 
applications. Only thing that changes is destination server and it's 
password.


Current scenario

One master pom, lot of modules. Web applications scattered in the 
hierarchy depending upon some criterion such as internal/external

Multiple branches
One jenkins build per branch.
One deployer module for deploying all the web applications. This was 
done so that all deployment information is defined only at one location.
Jenkins build has cargo deploy command set with profile information to 
deploy to right server with right password.



So far this worked for us as we had only one target server for each 
profile/branch. Each profile defines it's own target server and everyone 
was happy.


Now we have additional requirement where we need to deploy web 
applications two or more servers  for certain profiles only. I am 
looking for a best way where I can minimize the duplication and still 
deploy to variable number of servers as part of jenkins build. Ideal way 
for me is to define deployment definition only at one location and set 
the deployment parameters using profiles. In short I am looking for 
something where I can call cargo deployer  like a function and use same 
settings except destination urls and passwords which are defined by the 
profile.



I am considering following - not sure if any of these will work

1. Set jenkins build to use two profiles which define it's own target 
servers.
2. Somehow call another maven project and pass the destination 
information as parameter

3. Call shell script that will deploy to destination server

My choices might be worst and hence looking for best practices to 
achieve what I want to do. As I said I am trying to avoid profile 
specific duplication of cargo except the things that really need to be 
separate.


Thanks,

Niranjan



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



how to include 'src/main/webapp' in a jar file?

2013-03-19 Thread Sankaran, Nambi
Hi All

I have a maven web project that has packaging as war. the package generates 
war file that confirms to war format. But, i like to package the project as a 
jar as well along with the default war format. So, I am trying to use 
maven jar plugin to achieve that. I am using the following jar plugin 
configuration.


plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-jar-plugin/artifactId
executions
execution
idmake-a-jar/id
phasepackage/phase
goals
goaljar/goal
/goals
/execution
/executions
configuration

classesDirectory${project.build.outputDirectory}/classesDirectory
includes
include../../src/main/webapp/**/include
include**/*/include
/includes
/configuration
/plugin

The package command produces a jar file that contains the classes and the 
contents of 'resources' folder and war file produces a proper 'war' file. But 
the contents of 'src/main/webapp' are not included in the jar file. How to 
include the contents of src/main/webapp in the jar using the jar plugin?

Stack Overflow Question
http://stackoverflow.com/questions/15509893/how-to-create-a-war-and-jar-from-a-web-project


Re: Unpacking jars into target/classes

2013-03-19 Thread Joachim Durchholz

Am 19.03.2013 12:13, schrieb Stephen Connolly:

Jo,

Just for you, I have taken the 30 minutes out of my life and written a
Maven Plugin that will solve your issues with those pesky non-maven
dependencies.

https://github.com/stephenc/non-maven-jar-maven-plugin


Sorry, but that bold text is a piece of both impudence and arrogance.

I don't think we have anything to discuss with each other anymore.


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



Re: Unpacking jars into target/classes

2013-03-19 Thread Stephen Connolly
On Tuesday, 19 March 2013, Joachim Durchholz wrote:

 Am 19.03.2013 12:13, schrieb Stephen Connolly:

 Jo,

 Just for you, I have taken the 30 minutes out of my life and written a
 Maven Plugin that will solve your issues with those pesky non-maven
 dependencies.

 https://github.com/stephenc/**non-maven-jar-maven-pluginhttps://github.com/stephenc/non-maven-jar-maven-plugin


 Sorry, but that bold text is a piece of both impudence and arrogance.

 I don't think we have anything to discuss with each other anymore.


Pity, you are missing out on the solution you seek.

I need to put that disclaimer on the project because I am on the Maven PMC
and therefore, even though the project is hosted on my GitHub account as
opposed to the ASF or the mojo project at codehaus it is necessary to let
people who stumble upon the project be aware that it is *not the
recommended solution*. I have a responsibility both as a committer on the
maven project and as a member of the maven project management committee,
that responsibility ethically requires that I encourage the ways of using
maven that benefit the ecosystem of maven users.

There are some small legitimate use cases for the plugin, hence why I wrote
it and published it on central... But there will be a temptation from the
Mr Random user who spots this login and says oh look that's by stephenc
and he's on the PMC, so using this must be on the Maven way... And no that
is not a theory, I've had that happen before with some file:/// based
repository hacks that I employed a couple of years ago... Thankfully
java.net is no longer a code hosting environment, and the source code with
those hacks is long long buried, but it triggered a raft of problems from
people abusing the hack and not understanding the limits of the hack.

This plugin is a more stable hack, but it is still a hack, so it needs a
warning. This is not the first time you have jumped on such a warning and
interpreted it as an insult directed at you. I assure you that is not the
case.


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



-- 
Sent from my phone


Re: Unpacking jars into target/classes

2013-03-19 Thread Joachim Durchholz

Am 19.03.2013 14:02, schrieb Stephen Connolly:

Wayne,

Please open an issue (
https://github.com/stephenc/non-maven-jar-maven-plugin/issues). Pull
requests welcome


Just for the record: This confirms that you did that in full consent 
with both the community and your true inner beliefs.


I had assumed such behaviour wouldn't be found acceptable in a community 
of professionals.

I guess one of these two assumptions was wrong.

You lost me weeks ago, but you just managed to make me regret every 
single minute I have ever spent trying to help you and Maven with feedback.


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



Re: Unpacking jars into target/classes

2013-03-19 Thread Ron Wheeler

Stephen,

I guess they don't have the expression about biting the hand that feeds 
you where ever he comes from.


It was very kind of you to develop the plug-in for him.
A simple Thank you would have been a better response.


Ron



On 19/03/2013 4:57 PM, Joachim Durchholz wrote:

Am 19.03.2013 12:13, schrieb Stephen Connolly:

Jo,

Just for you, I have taken the 30 minutes out of my life and written a
Maven Plugin that will solve your issues with those pesky non-maven
dependencies.

https://github.com/stephenc/non-maven-jar-maven-plugin


Sorry, but that bold text is a piece of both impudence and arrogance.

I don't think we have anything to discuss with each other anymore.


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





--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


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



Re: Unpacking jars into target/classes

2013-03-19 Thread Joachim Durchholz

Am 19.03.2013 22:20, schrieb Stephen Connolly:

On Tuesday, 19 March 2013, Joachim Durchholz wrote:


Am 19.03.2013 12:13, schrieb Stephen Connolly:


Jo,

Just for you, I have taken the 30 minutes out of my life and written a
Maven Plugin that will solve your issues with those pesky non-maven
dependencies.

https://github.com/stephenc/non-maven-jar-maven-plugin



Sorry, but that bold text is a piece of both impudence and arrogance.

I don't think we have anything to discuss with each other anymore.



Pity, you are missing out on the solution you seek.


The solution I seek does not lie with Maven.
Not anymore anyway; this was the last straw.


I need to put that disclaimer on the project because I am on the Maven PMC
and therefore, even though the project is hosted on my GitHub account as
opposed to the ASF or the mojo project at codehaus it is necessary to let
people who stumble upon the project be aware that it is *not the
recommended solution*.


Obviously you think I'm a fool if you think I can't read the subtext in 
the message.
And don't you worry, with that attempt to justify yourself for the 
injustifiable you lost the last shred of respect you held in my eyes. 
Just continue as you wish, you have nothing to lose.


You should really add this disclaimer:
BY PROMOTING THE MAVEN WAY YOU AGREE THAT YOU'RE UNWILLING AND/OR 
UNABLE TO UNDERSTAND THE REQUIREMENTS PEOPLE OUTSIDE YOUR SPHERE OF 
EXPERIENCE MIGHT HAVE.
Irks you? Doesn't do justice to you? Applies a yardstick you're not 
willing to accept as relevant?

Fine. Then you know what kind of message I just got.

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



Re: Unpacking jars into target/classes

2013-03-19 Thread Manfred Moser
 Am 19.03.2013 14:02, schrieb Stephen Connolly:
 Wayne,

 Please open an issue (
 https://github.com/stephenc/non-maven-jar-maven-plugin/issues). Pull
 requests welcome

 Just for the record: This confirms that you did that in full consent
 with both the community and your true inner beliefs.

 I had assumed such behaviour wouldn't be found acceptable in a community
 of professionals.
 I guess one of these two assumptions was wrong.

 You lost me weeks ago, but you just managed to make me regret every
 single minute I have ever spent trying to help you and Maven with
 feedback.

I am speechless to be honest. Stephen invested some of his valuable time
to provide a fix for your problem and this is all you can come up with as
a thank you.

Can you please do all of us a favor and unsubscribe from the list. I have
not seen anything positive come out of your input so far but a lot of
trolling and accusations.

I for one will stop reading your emails.

manfred


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



Re: Unpacking jars into target/classes

2013-03-19 Thread Stephen Connolly
On Tuesday, 19 March 2013, Joachim Durchholz wrote:

 Am 19.03.2013 22:20, schrieb Stephen Connolly:

 On Tuesday, 19 March 2013, Joachim Durchholz wrote:

  Am 19.03.2013 12:13, schrieb Stephen Connolly:

  Jo,

 Just for you, I have taken the 30 minutes out of my life and written a
 Maven Plugin that will solve your issues with those pesky non-maven
 dependencies.

 https://github.com/stephenc/**non-maven-jar-maven-pluginhttps://github.com/stephenc/non-maven-jar-maven-plugin


 Sorry, but that bold text is a piece of both impudence and arrogance.

 I don't think we have anything to discuss with each other anymore.


  Pity, you are missing out on the solution you seek.


 The solution I seek does not lie with Maven.
 Not anymore anyway; this was the last straw.

  I need to put that disclaimer on the project because I am on the Maven PMC
 and therefore, even though the project is hosted on my GitHub account as
 opposed to the ASF or the mojo project at codehaus it is necessary to let
 people who stumble upon the project be aware that it is *not the
 recommended solution*.


 Obviously you think I'm a fool if you think I can't read the subtext in
 the message.


Genuinely, no.

You are entitled to your opinion, but my stated reason of protecting the Mr
A Randomuser from stumbling upon the technique was the *only* reason for
the disclaimer.


 And don't you worry, with that attempt to justify yourself for the
 injustifiable you lost the last shred of respect you held in my eyes.


Well I am not out to gain/lose your respect. I am out to make the commons
better for everyone.

In fact that last phrase sums up the maven way

The guiding principle of the maven way is to make life easier for those
that come after.

* Standardised folder layout: makes life easier for those that come after
as it is one less thing to figure out.

* Standardised build life cycle: one less thing again.

* publishing built artifacts to a central repository: make life easier,
anyone around for the madness of 3rd party dependencies before central will
agree on that one

* encapsulate repeated build tasks as plugins: makes life easier, no
reinventing the wheel

Everything about the maven way is about making life easier for those that
come after.

The recommended solution to the problem of 3rd party non-maven jars is to
push them to a maven repository that benefits everyone who comes after.
They just need to declare the dependency and move on.

Alternative solutions such as the file:/// repository hack only work for
the project being built and can even not work fully for those projects.
They force everyone to add hacks on top of the hack to get their job done.

The non-maven-jar plugin solution that I implemented can be used with
internal projects to push 3rd party dependencies to an internal repository.
It won't work for pushing to central due to the validation requirements of
pushing to central (requires source.jar and javadoc.jar) so while not the
screaming ugly hack that others use, it has great potential to make life
harder for those that follow. If one does mvn deploy with this plugin =
life is better for those that follow as the dependencies are available
outside the build reactor. If one does mvn install with this plugin =
life is not better for others, but is better for you as the dependencies
are available outside the reactor but only on your machine.
Without doing mvn deploy then anyone needing to use your project will
need to checkout your project and build it to get those dependencies, now
chase that tree when you are wanting to use a library that depends on a
projects that depends on a project that depends on your project that
depends on those non-maven jar files... They will be forced to chase and
find the source code for each in turn, hope they have the correct revision
that works, and build... Oops dependency not found, oh another build from
source... Reminds me of all those ANT builds before maven central.

A commons only works if everyone has the principle I will leave it tidier
than I found it. Good citizens follow that principle, bad citizens don't.

You have already indicated that you don't want to be a citizen of the maven
ecosystem so what should it matter whether you would be a good or bad
citizen of the maven ecosystem when you are not interested in such
citizenship.

I never said good person or bad person instead citizen of the maven
ecosystem.

You have said you don't want to create a jira to help document
improvements.., that is not somebody wanting to leave things tidier than
you found it

You have against deploying to a maven repository... Again not making things
tidier.

It is an observable based on your actions that you are not interested in
leaving things tidier, that is not a good citizen of the maven ecosystem in
my book... That is not a value judgement on you as a person, just an
observation of your interaction with the community.




  Just continue as you wish, you have nothing to lose.

 You 

Re: how to include 'src/main/webapp' in a jar file?

2013-03-19 Thread Ron Wheeler
You might think about building the jar as a project first and then 
making the war project depend on the jar project.

This will give you the jar that you want and the war as well.

Ron

On 19/03/2013 4:38 PM, Sankaran, Nambi wrote:

Hi All

I have a maven web project that has packaging as war. the package generates war file that confirms to war 
format. But, i like to package the project as a jar as well along with the default war format. 
So, I am trying to use maven jar plugin to achieve that. I am using the following jar plugin configuration.


plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-jar-plugin/artifactId
 executions
 execution
 idmake-a-jar/id
 phasepackage/phase
 goals
 goaljar/goal
 /goals
 /execution
 /executions
 configuration
 
classesDirectory${project.build.outputDirectory}/classesDirectory
 includes
 include../../src/main/webapp/**/include
 include**/*/include
 /includes
 /configuration
/plugin

The package command produces a jar file that contains the classes and the 
contents of 'resources' folder and war file produces a proper 'war' file. But the 
contents of 'src/main/webapp' are not included in the jar file. How to include the 
contents of src/main/webapp in the jar using the jar plugin?

Stack Overflow Question
http://stackoverflow.com/questions/15509893/how-to-create-a-war-and-jar-from-a-web-project




--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


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



Re: Unpacking jars into target/classes

2013-03-19 Thread Joachim Durchholz

Am 19.03.2013 23:40, schrieb Stephen Connolly:

I don't know what kind of message you got, because it seems that you are
intent on mis-interpreting everything I write... I wonder what you will
jump on in this reply!


On nothing at all.
No reasons to.

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



Re: Unpacking jars into target/classes

2013-03-19 Thread Mark Derricutt

Stephen Connolly wrote:

Just for you, I have taken the 30 minutes out of my life and written a
Maven Plugin that will solve your issues with those pesky non-maven
dependencies.

https://github.com/stephenc/non-maven-jar-maven-plugin

You will need to wait a couple of hours for the sync to central before you
can use that plugin.

Stephen - thank you for this plugin! I was actually struck with a 
similar issue last night writing up a sample project to demonstrate 
maven to someone elses non-maven project, and started down the file:// 
repo route and gave up in disgust at myself after having it not quite 
work with multi-module builds.


This is a simple plugin, but elegantly solves a -temporary- transitional 
issue.


Big props to you.

Mark


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