Re: [ANN] Versions Maven Plugin 2.0 released

2012-11-28 Thread Wheeler, Dennis

Someone please help me from navigating through the forest of no return,
that is Google, and tell me how to force our projects back to using the
older 1.2 version of the Versions plugin, instead of this newer 2.0
version which is now giving us null pointer exceptions with this simple
command:

  mvn -U versions:set -DnewVersion=12345

I don't really know anything about maven myself, I only plugin what the
devs give me into our build configuration system.

Can I make a global setting in the settings.xml, or does it have to be in
each project's pom.xml?


Dennis Wheeler
Release Engineer II
ADP Digital Marketing Solutions
p 206.219.8049 | c 206.375.6781 | e dwhee...@cobalt.com

 http://www.cobalt.com/
Join the conversation facebook http://www.facebook.com/#!/adpdmc|
twitter http://twitter.com/#!/adp_cobalt | blog
http://www.digitalmileage.com/
This message and any attachments are intended only for the use of the
addressee and may contain information that is privileged and confidential.
If the reader of the message is not the intended recipient or an
authorized representative of the intended recipient, you are hereby
notified that any dissemination of this communication is strictly
prohibited. If you have received this communication in error, please
notify us immediately by email and delete the message and any attachments
from your system.








On 11/27/12 5:57 AM, Stephen Connolly stephen.alan.conno...@gmail.com
wrote:

The Mojo team is pleased to announce the release of the Versions
Maven Plugin, version 2.0

NOTE: This release requires Maven 2.2.1 or newer and consequently JRE 1.5
or newer.

NOTE: This is the *last* planned release that will support running on
Maven
2.2.x

The Versions Plugin has the following goals.

* versions:compare-dependencies compares the dependency versions of
the current project to the dependency management section of a remote
project.
* versions:display-dependency-updates scans a project's dependencies
and produces a report of those dependencies which have newer versions
available.
* versions:display-plugin-updates scans a project's plugins and
produces a report of those plugins which have newer versions
available.
* versions:display-property-updates scans a projectand produces a
report of those properties which are used to control artifact versions
and which properies have newer versions available.
* versions:update-parent updates the parent section of a project so
that it references the newest available version. For example, if you
use a corporate root POM, this goal can be helpful if you need to
ensure you are using the latest version of the corporate root POM.
* versions:update-properties updates properties defined in a project
so that they correspond to the latest available version of specific
dependencies. This can be useful if a suite of dependencies must all
be locked to one version.
* versions:update-child-modules updates the parent section of the
child modules of a project so the version matches the version of the
current project. For example, if you have an aggregator pom that is
also the parent for the projects that it aggregates and the children
and parent versions get out of sync, this mojo can help fix the
versions of the child modules. (Note you may need to invoke Maven with
the -N option in order to run this goal if your project is broken so
badly that it cannot build because of the version mis-match).
* versions:lock-snapshots searches the pom for all -SNAPSHOT versions
and replaces them with the current timestamp version of that
-SNAPSHOT, e.g. -20090327.172306-4
* versions:unlock-snapshots searches the pom for all timestamp locked
snapshot versions and replaces them with -SNAPSHOT.
* versions:resolve-ranges finds dependencies using version ranges and
resolves the range to the specific version being used.
* versions:set can be used to set the project version from the command
line.
* versions:use-releases searches the pom for all -SNAPSHOT versions
which have been released and replaces them with the corresponding
release version.
* versions:use-next-releases searches the pom for all non-SNAPSHOT
versions which have been a newer release and replaces them with the
next release version.
* versions:use-latest-releases searches the pom for all non-SNAPSHOT
versions which have been a newer release and replaces them with the
latest release version.
* versions:use-next-snapshots searches the pom for all non-SNAPSHOT
versions which have been a newer -SNAPSHOT version and replaces them
with the next -SNAPSHOT version.
* versions:use-latest-snapshots searches the pom for all non-SNAPSHOT
versions which have been a newer -SNAPSHOT version and replaces them
with the latest -SNAPSHOT version.
* versions:use-next-versions searches the pom for all versions which
have been a newer version and replaces them with the next version.
* versions:use-latest-versions searches the pom for all versions which
have been a newer version and replaces them with the latest version.
* 

Re: [ANN] Versions Maven Plugin 2.0 released

2012-11-28 Thread Anders Hammar
mvn org.codehaus.mojo:versions-maven-plugin:1.2:set

/Anders


On Wed, Nov 28, 2012 at 9:04 AM, Wheeler, Dennis
dwhee...@cobaltgroup.comwrote:


 Someone please help me from navigating through the forest of no return,
 that is Google, and tell me how to force our projects back to using the
 older 1.2 version of the Versions plugin, instead of this newer 2.0
 version which is now giving us null pointer exceptions with this simple
 command:

   mvn -U versions:set -DnewVersion=12345

 I don't really know anything about maven myself, I only plugin what the
 devs give me into our build configuration system.

 Can I make a global setting in the settings.xml, or does it have to be in
 each project's pom.xml?


 Dennis Wheeler
 Release Engineer II
 ADP Digital Marketing Solutions
 p 206.219.8049 | c 206.375.6781 | e dwhee...@cobalt.com

  http://www.cobalt.com/
 Join the conversation facebook http://www.facebook.com/#!/adpdmc|
 twitter http://twitter.com/#!/adp_cobalt | blog
 http://www.digitalmileage.com/
 This message and any attachments are intended only for the use of the
 addressee and may contain information that is privileged and confidential.
 If the reader of the message is not the intended recipient or an
 authorized representative of the intended recipient, you are hereby
 notified that any dissemination of this communication is strictly
 prohibited. If you have received this communication in error, please
 notify us immediately by email and delete the message and any attachments
 from your system.








 On 11/27/12 5:57 AM, Stephen Connolly stephen.alan.conno...@gmail.com
 wrote:

 The Mojo team is pleased to announce the release of the Versions
 Maven Plugin, version 2.0
 
 NOTE: This release requires Maven 2.2.1 or newer and consequently JRE 1.5
 or newer.
 
 NOTE: This is the *last* planned release that will support running on
 Maven
 2.2.x
 
 The Versions Plugin has the following goals.
 
 * versions:compare-dependencies compares the dependency versions of
 the current project to the dependency management section of a remote
 project.
 * versions:display-dependency-updates scans a project's dependencies
 and produces a report of those dependencies which have newer versions
 available.
 * versions:display-plugin-updates scans a project's plugins and
 produces a report of those plugins which have newer versions
 available.
 * versions:display-property-updates scans a projectand produces a
 report of those properties which are used to control artifact versions
 and which properies have newer versions available.
 * versions:update-parent updates the parent section of a project so
 that it references the newest available version. For example, if you
 use a corporate root POM, this goal can be helpful if you need to
 ensure you are using the latest version of the corporate root POM.
 * versions:update-properties updates properties defined in a project
 so that they correspond to the latest available version of specific
 dependencies. This can be useful if a suite of dependencies must all
 be locked to one version.
 * versions:update-child-modules updates the parent section of the
 child modules of a project so the version matches the version of the
 current project. For example, if you have an aggregator pom that is
 also the parent for the projects that it aggregates and the children
 and parent versions get out of sync, this mojo can help fix the
 versions of the child modules. (Note you may need to invoke Maven with
 the -N option in order to run this goal if your project is broken so
 badly that it cannot build because of the version mis-match).
 * versions:lock-snapshots searches the pom for all -SNAPSHOT versions
 and replaces them with the current timestamp version of that
 -SNAPSHOT, e.g. -20090327.172306-4
 * versions:unlock-snapshots searches the pom for all timestamp locked
 snapshot versions and replaces them with -SNAPSHOT.
 * versions:resolve-ranges finds dependencies using version ranges and
 resolves the range to the specific version being used.
 * versions:set can be used to set the project version from the command
 line.
 * versions:use-releases searches the pom for all -SNAPSHOT versions
 which have been released and replaces them with the corresponding
 release version.
 * versions:use-next-releases searches the pom for all non-SNAPSHOT
 versions which have been a newer release and replaces them with the
 next release version.
 * versions:use-latest-releases searches the pom for all non-SNAPSHOT
 versions which have been a newer release and replaces them with the
 latest release version.
 * versions:use-next-snapshots searches the pom for all non-SNAPSHOT
 versions which have been a newer -SNAPSHOT version and replaces them
 with the next -SNAPSHOT version.
 * versions:use-latest-snapshots searches the pom for all non-SNAPSHOT
 versions which have been a newer -SNAPSHOT version and replaces them
 with the latest -SNAPSHOT version.
 * versions:use-next-versions searches the pom 

Re: Mojo Java 1.5 @Component MavenProject (returns null) vs JavaDoc @parameter expression=${project} works

2012-11-28 Thread Olivier Lamy
2012/11/28 Barrie Treloar baerr...@gmail.com:
 While trying to sort out
 http://maven.40175.n5.nabble.com/Retrieving-the-project-source-directories-from-MavenProject-td5733602.html

 I was hacking his code and found that
 Java 1.5 @Component MavenProject returns null

 But when I changed it to use JavaDoc @parameter
 expression=${project} it works fine.

 http://maven.apache.org/plugin-tools/maven-plugin-tools-annotations/index.html
 gives an example
 @Component
 private MavenProject project;

 http://maven.apache.org/plugin-tools/maven-plugin-annotations/apidocs/org/apache/maven/plugins/annotations/Component.html
 says MavenProject can be accessed via @Component

 I've not used the Java 1.5 annotations before.
 Does anyone know why this might be?
weird as it works for all our plugins :-)
How do you build that ? any sample ?

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




--
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

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



AW: MissingProjectException

2012-11-28 Thread Stadelmann Josef
Hi

Do you know that NetBeans has its own maven on board?
C:\Program Files\NetBeans 7.2\java\maven\bin

Your EXTERNAL maven - pointed to by MAVEN_HOME or M2_HOME might work nicely, 
i.e. USE $ mvn -version 
as a always first to check and tell us a bit more about what you have.

In order to use this external maven with NetBeans, 
at NetBeans goto
/tools
/options
/tab to JAVA
/tab to MAVEN

and enter the path to the root of your external maven i.e.
or the  same as you have in M2_HOME

but not as a multi part path, 
only as a single path is allowed there 
E:\Users\C770817\SW-UMGEBUNG\apache-maven-3.0.5

If you already toke notice of that, or know that, then you are on a good way.

Josef



 
-Ursprüngliche Nachricht-
Von: Froggerbin [mailto:frogger...@gmail.com] 
Gesendet: Mittwoch, 28. November 2012 00:03
An: 'Maven Users List'; rwhee...@artifact-software.com
Betreff: RE: MissingProjectException

To me it simply looks like the  character is being escaped with \ on both 
sides: \ sample \
I figure NetBeans did this because the path contains spaces, therefor if the  
are escaped, then the \ have to be escaped as well, hence the double \.
That is simply supposed to be mvn.bat that resides in the Maven installation 
directory. In that case it's an external Maven. Internal or external, I tried 
both and the problem remained.

-Original Message-
From: Ron Wheeler [mailto:rwhee...@artifact-software.com] 
Sent: dinsdag 27 november 2012 23:59
To: users@maven.apache.org
Subject: Re: MissingProjectException

On 27/11/2012 4:07 PM, Froggerbin wrote:
 \E:\\Apps (x86)\\Dev\\apachemaven\\apache-maven-3.0.4\\bin\\mvn.bat\
This looks very odd and I am not sure how any normal parser is going to deal 
with this.
What is it supposed to be?

Ron

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



-
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: can't find maven dependencies

2012-11-28 Thread Mikhail Kalkov
  To add a dependency to my pom.xml, usually, I google the artifact, class,
  jar and then go to http://mvnrepository.com and try luck by searching key
  words, however sometimes it takes too much time, or I get stuck.
  So the question is, is there any formal/structured procedure to find
  dependencies in maven?
 
 
 Nope; that's pretty much what you do (trial, error, guesswork).  Free stuff
 is usually in Maven central, which is slang for the great central Maven
 repository in the sky.  You can search it more directly via
 search.maven.org.
 
 As another poster I think mentioned, not all software is available in Maven
 central.  This of course begs the question: OK, so, fine, where is it?
 
 There is no sort of discovery protocol or federation of Maven repositories
 (i.e. there's not really a way to bring a Maven repository up for, say,
 your company, and have it somehow join some hypothetical global set of
 Maven repositories).  So you Just Have To Know what other repositories you
 will need to check.

It sounds like a distributed hash table of maven resources, in which most 
repository servers would participate, could be a nice solution to the search 
problem. However, I have no idea how difficult it can be to develop one.

Kind regards,
Mikhail Kalkov

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



Re: MissingProjectException

2012-11-28 Thread Mikhail Kalkov
These escapes would work in bash, but Windows batch interpreter uses ^ 
character for escaping, and ignores double backslashes. Additionally, in 
Windows you cannot set variables with VAR=VALUE syntax. What is the interpreter 
this command is being passed to? Do you run it in Cygwin bash?

Kind regards, 
Mikhail Kalkov 

Purple Scout AB 
Software Developer

Address: Kyrkogatan 20-22, SE-41110 Gothenburg, Sweden
Phone:   +46 (0) 732 - 051405
E-mail:  mikhail.kal...@purplescout.se
Web: www.purplescout.se


- Original Message -
From: Froggerbin frogger...@gmail.com
To: Maven Users List users@maven.apache.org, rwhee...@artifact-software.com
Sent: Wednesday, November 28, 2012 12:03:00 AM
Subject: RE: MissingProjectException

To me it simply looks like the  character is being escaped with \ on both 
sides: \ sample \
I figure NetBeans did this because the path contains spaces, therefor if the  
are escaped, then the \ have to be escaped as well, hence the double \.
That is simply supposed to be mvn.bat that resides in the Maven installation 
directory. In that case it's an external Maven. Internal or external, I tried 
both and the problem remained.

-Original Message-
From: Ron Wheeler [mailto:rwhee...@artifact-software.com] 
Sent: dinsdag 27 november 2012 23:59
To: users@maven.apache.org
Subject: Re: MissingProjectException

On 27/11/2012 4:07 PM, Froggerbin wrote:
 \E:\\Apps (x86)\\Dev\\apachemaven\\apache-maven-3.0.4\\bin\\mvn.bat\
This looks very odd and I am not sure how any normal parser is going to deal 
with this.
What is it supposed to be?

Ron

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



-
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: [ANN] Versions Maven Plugin 2.0 released

2012-11-28 Thread Stephen Connolly
Can you please raise a JIRA for the NPE


On 28 November 2012 08:04, Wheeler, Dennis dwhee...@cobaltgroup.com wrote:


 Someone please help me from navigating through the forest of no return,
 that is Google, and tell me how to force our projects back to using the
 older 1.2 version of the Versions plugin, instead of this newer 2.0
 version which is now giving us null pointer exceptions with this simple
 command:

   mvn -U versions:set -DnewVersion=12345

 I don't really know anything about maven myself, I only plugin what the
 devs give me into our build configuration system.

 Can I make a global setting in the settings.xml, or does it have to be in
 each project's pom.xml?


 Dennis Wheeler
 Release Engineer II
 ADP Digital Marketing Solutions
 p 206.219.8049 | c 206.375.6781 | e dwhee...@cobalt.com

  http://www.cobalt.com/
 Join the conversation facebook http://www.facebook.com/#!/adpdmc|
 twitter http://twitter.com/#!/adp_cobalt | blog
 http://www.digitalmileage.com/
 This message and any attachments are intended only for the use of the
 addressee and may contain information that is privileged and confidential.
 If the reader of the message is not the intended recipient or an
 authorized representative of the intended recipient, you are hereby
 notified that any dissemination of this communication is strictly
 prohibited. If you have received this communication in error, please
 notify us immediately by email and delete the message and any attachments
 from your system.








 On 11/27/12 5:57 AM, Stephen Connolly stephen.alan.conno...@gmail.com
 wrote:

 The Mojo team is pleased to announce the release of the Versions
 Maven Plugin, version 2.0
 
 NOTE: This release requires Maven 2.2.1 or newer and consequently JRE 1.5
 or newer.
 
 NOTE: This is the *last* planned release that will support running on
 Maven
 2.2.x
 
 The Versions Plugin has the following goals.
 
 * versions:compare-dependencies compares the dependency versions of
 the current project to the dependency management section of a remote
 project.
 * versions:display-dependency-updates scans a project's dependencies
 and produces a report of those dependencies which have newer versions
 available.
 * versions:display-plugin-updates scans a project's plugins and
 produces a report of those plugins which have newer versions
 available.
 * versions:display-property-updates scans a projectand produces a
 report of those properties which are used to control artifact versions
 and which properies have newer versions available.
 * versions:update-parent updates the parent section of a project so
 that it references the newest available version. For example, if you
 use a corporate root POM, this goal can be helpful if you need to
 ensure you are using the latest version of the corporate root POM.
 * versions:update-properties updates properties defined in a project
 so that they correspond to the latest available version of specific
 dependencies. This can be useful if a suite of dependencies must all
 be locked to one version.
 * versions:update-child-modules updates the parent section of the
 child modules of a project so the version matches the version of the
 current project. For example, if you have an aggregator pom that is
 also the parent for the projects that it aggregates and the children
 and parent versions get out of sync, this mojo can help fix the
 versions of the child modules. (Note you may need to invoke Maven with
 the -N option in order to run this goal if your project is broken so
 badly that it cannot build because of the version mis-match).
 * versions:lock-snapshots searches the pom for all -SNAPSHOT versions
 and replaces them with the current timestamp version of that
 -SNAPSHOT, e.g. -20090327.172306-4
 * versions:unlock-snapshots searches the pom for all timestamp locked
 snapshot versions and replaces them with -SNAPSHOT.
 * versions:resolve-ranges finds dependencies using version ranges and
 resolves the range to the specific version being used.
 * versions:set can be used to set the project version from the command
 line.
 * versions:use-releases searches the pom for all -SNAPSHOT versions
 which have been released and replaces them with the corresponding
 release version.
 * versions:use-next-releases searches the pom for all non-SNAPSHOT
 versions which have been a newer release and replaces them with the
 next release version.
 * versions:use-latest-releases searches the pom for all non-SNAPSHOT
 versions which have been a newer release and replaces them with the
 latest release version.
 * versions:use-next-snapshots searches the pom for all non-SNAPSHOT
 versions which have been a newer -SNAPSHOT version and replaces them
 with the next -SNAPSHOT version.
 * versions:use-latest-snapshots searches the pom for all non-SNAPSHOT
 versions which have been a newer -SNAPSHOT version and replaces them
 with the latest -SNAPSHOT version.
 * versions:use-next-versions searches the pom for all versions which
 have 

How to generate ZIP containing another generated ZIP with resources ?

2012-11-28 Thread Xavier NOPRE
Hi all,

With Maven (3.0.3), I can generate a ZIP file containing some resources
from my projet, with maven-assembly-plugin and an assembly.xml descriptor.
OK.

I can also generate 2 different ZIP files with 2 executions binded on
different phases. OK.

Now, I need to generate the second ZIP file containing some resources and
the first generated ZIP file. I can do that with a separated module to
generate the first ZIP file. But is it possible without modules, just one
Maven project ?

In fact, my problem is how to reference the first ZIP file in the
assembly.xml for the second ZIP file generation.

Thanks for any help,

Xavier


Re: How to generate ZIP containing another generated ZIP with resources ?

2012-11-28 Thread Jeff MAURY
Can'y you use a fileset with directory element being to your project output
directory, it should include the first ZIP file, no ?

Jeff


On Wed, Nov 28, 2012 at 2:39 PM, Xavier NOPRE xno...@gmail.com wrote:

 Hi all,

 With Maven (3.0.3), I can generate a ZIP file containing some resources
 from my projet, with maven-assembly-plugin and an assembly.xml descriptor.
 OK.

 I can also generate 2 different ZIP files with 2 executions binded on
 different phases. OK.

 Now, I need to generate the second ZIP file containing some resources and
 the first generated ZIP file. I can do that with a separated module to
 generate the first ZIP file. But is it possible without modules, just one
 Maven project ?

 In fact, my problem is how to reference the first ZIP file in the
 assembly.xml for the second ZIP file generation.

 Thanks for any help,

 Xavier




-- 
Jeff MAURY


Legacy code often differs from its suggested alternative by actually
working and scaling.
 - Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury


Re: How to generate ZIP containing another generated ZIP with resources ?

2012-11-28 Thread Ron Wheeler

General rule - one artifact from one project.

First get your zip with a zip included, working by doing it the Maven way.
Then see if it is worth optimizing the process.

Ron

On 28/11/2012 8:42 AM, Jeff MAURY wrote:

Can'y you use a fileset with directory element being to your project output
directory, it should include the first ZIP file, no ?

Jeff


On Wed, Nov 28, 2012 at 2:39 PM, Xavier NOPRE xno...@gmail.com wrote:


Hi all,

With Maven (3.0.3), I can generate a ZIP file containing some resources
from my projet, with maven-assembly-plugin and an assembly.xml descriptor.
OK.

I can also generate 2 different ZIP files with 2 executions binded on
different phases. OK.

Now, I need to generate the second ZIP file containing some resources and
the first generated ZIP file. I can do that with a separated module to
generate the first ZIP file. But is it possible without modules, just one
Maven project ?

In fact, my problem is how to reference the first ZIP file in the
assembly.xml for the second ZIP file generation.

Thanks for any help,

Xavier







--
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: release:branch creates branch only from HEAD?

2012-11-28 Thread Benson Margulies
You're not the first people to complain about this. I believe I filed
a JIRA. Let me see if I can stir up action.

On Wed, Nov 28, 2012 at 8:51 AM, Aliaksei Lahachou
aliaksei.lahac...@gmail.com wrote:
 Hello everyone!

 release:prepare/perform creates release only from HEAD revision and I can
 understand that - it has to commit release POMs before it creates a tag,
 because the tag may not be modified.

 If I want to perform a release from a specific revision, I have to create a
 branch first. And I thought that release:branch can help me here - it could
 create a branch then update POM in the new branch. But it seems that it has
 just the same logic as release:prepare - it attempts to commit release POMs
 before branching.

 Is there any prescribed sequence for making a release from a revision, or
 is this scenario not supported?


 Regards,
 htfv (Aliaksei Lahachou)

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



Re: externalize conf files

2012-11-28 Thread Aliaksei Lahachou
Hello,

I'm not sure what exactly you need, but here's a couple of guesses:

1. If you want to copy files from the project to another location, you may
try resources:copy-resources [1].
2. If you need to load properties from properties file, you may try
build-configurator-maven-plugin [2].

[1]
http://maven.apache.org/plugins/maven-resources-plugin/examples/copy-resources.html
[2]
http://htfv.github.com/build-configurator/1.0.0/loading-property-files.html


Regards,
htfv (Aliaksei Lahachou)


On Sat, Nov 24, 2012 at 11:29 PM, laudio.info laudio.i...@gmail.com wrote:

 hello
 into my maven projects i have the conf files (properties) and log
 configuracion files into the jars or ears.
 well i must to externalize them.
 i must to put into one external location but i dont know.
 for example i must to put when i install the app (mvn install) into one
 ourt directory, for example c:/confiles

 is this posible using maven?
 how?
 can you help me please?

 Thanks



Re: How to generate ZIP containing another generated ZIP with resources ?

2012-11-28 Thread Jeff MAURY
I don't feel he is not following the Maven way if the first ZIP is not
attached to the project

Jeff



On Wed, Nov 28, 2012 at 2:50 PM, Ron Wheeler rwhee...@artifact-software.com
 wrote:

 General rule - one artifact from one project.

 First get your zip with a zip included, working by doing it the Maven way.
 Then see if it is worth optimizing the process.

 Ron


 On 28/11/2012 8:42 AM, Jeff MAURY wrote:

 Can'y you use a fileset with directory element being to your project
 output
 directory, it should include the first ZIP file, no ?

 Jeff


 On Wed, Nov 28, 2012 at 2:39 PM, Xavier NOPRE xno...@gmail.com wrote:

  Hi all,

 With Maven (3.0.3), I can generate a ZIP file containing some resources
 from my projet, with maven-assembly-plugin and an assembly.xml
 descriptor.
 OK.

 I can also generate 2 different ZIP files with 2 executions binded on
 different phases. OK.

 Now, I need to generate the second ZIP file containing some resources and
 the first generated ZIP file. I can do that with a separated module to
 generate the first ZIP file. But is it possible without modules, just one
 Maven project ?

 In fact, my problem is how to reference the first ZIP file in the
 assembly.xml for the second ZIP file generation.

 Thanks for any help,

 Xavier





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


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




-- 
Jeff MAURY


Legacy code often differs from its suggested alternative by actually
working and scaling.
 - Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury


Re: AW: [mvn] bad artifacs returned

2012-11-28 Thread andhdo
Using an old copy of the libraries should work for you.
(I have packaged the following dependencies:
* jargs:jargs:1.0
* org.apache.xalan:xalan:2.7.1
* org.opensaml:openws:1.2.2)

it applies to compile axis2:1.6.0

_m2_repo.rar http://maven.40175.n5.nabble.com/file/n5733969/_m2_repo.rar  



--
View this message in context: 
http://maven.40175.n5.nabble.com/mvn-bad-artifacs-returned-tp5712981p5733969.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: How to generate ZIP containing another generated ZIP with resources ?

2012-11-28 Thread Xavier NOPRE
Hi Jeff, Ron, and other !

Yes, I had tried to use a fileset with directory. It did'nt work. But I had
some mistakes, like ${project.build.outputDirectory} instead
of ${project.build.directory}.

I have found a solution on this way. I put it here if it can help anybody
...

In my pom.xml, I have this plugin section :

plugin
artifactIdmaven-assembly-plugin/artifactId
version2.4/version
executions
execution
idmake-inter/id
configuration
descriptors
descriptorsrc/main/assemblies/assembly-inter.xml/descriptor
/descriptors
*attachfalse/attach*
*outputDirectory${project.build.directory}/inter/outputDirectory*
/configuration
phaseprepare-package/phase
goals
goalsingle/goal
/goals
/execution
execution
idmake-final/id
configuration
descriptors
descriptorsrc/main/assemblies/assembly-final.xml/descriptor
/descriptors
/configuration
phasepackage/phase
goals
goalsingle/goal
/goals
/execution
/executions
/plugin

Note the *attachfalse/attach* for the first ZIP file to not attach this
intermediate ZIP file to the artefact (and to avoid a Maven warnin/error).

Note also the following instruction to generate the intermediate ZIP file
in a specified directory :

*outputDirectory${project.build.directory}/inter/outputDirectory*

To generate the first intermediate ZIP file, the assembly file
assembly-inter.xml is very classic.

For the final ZIP file, the assembly-final.xml file contains the following
section to include all files generated in the inter directory :

fileSets
...
fileSet
directory*${project.build.directory}/inter*/directory
outputDirectory//outputDirectory
 /fileSet
...
/fileSets

Thanks for your helps !

Xavier






2012/11/28 Jeff MAURY jeffma...@jeffmaury.com

 I don't feel he is not following the Maven way if the first ZIP is not
 attached to the project

 Jeff



 On Wed, Nov 28, 2012 at 2:50 PM, Ron Wheeler 
 rwhee...@artifact-software.com
  wrote:

  General rule - one artifact from one project.
 
  First get your zip with a zip included, working by doing it the Maven
 way.
  Then see if it is worth optimizing the process.
 
  Ron
 
 
  On 28/11/2012 8:42 AM, Jeff MAURY wrote:
 
  Can'y you use a fileset with directory element being to your project
  output
  directory, it should include the first ZIP file, no ?
 
  Jeff
 
 
  On Wed, Nov 28, 2012 at 2:39 PM, Xavier NOPRE xno...@gmail.com wrote:
 
   Hi all,
 
  With Maven (3.0.3), I can generate a ZIP file containing some resources
  from my projet, with maven-assembly-plugin and an assembly.xml
  descriptor.
  OK.
 
  I can also generate 2 different ZIP files with 2 executions binded on
  different phases. OK.
 
  Now, I need to generate the second ZIP file containing some resources
 and
  the first generated ZIP file. I can do that with a separated module to
  generate the first ZIP file. But is it possible without modules, just
 one
  Maven project ?
 
  In fact, my problem is how to reference the first ZIP file in the
  assembly.xml for the second ZIP file generation.
 
  Thanks for any help,
 
  Xavier
 
 
 
 
 
  --
  Ron Wheeler
  President
  Artifact Software Inc
  email: rwhee...@artifact-software.com
  skype: ronaldmwheeler
  phone: 866-970-2435, ext 102
 
 
  --**--**-
  To unsubscribe, e-mail: users-unsubscribe@maven.**apache.org
 users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 
 


 --
 Jeff MAURY


 Legacy code often differs from its suggested alternative by actually
 working and scaling.
  - Bjarne Stroustrup

 http://www.jeffmaury.com
 http://riadiscuss.jeffmaury.com
 http://www.twitter.com/jeffmaury



assembly plugin - pass property from pom.xml to assembly descriptor

2012-11-28 Thread Steve Cohen
Are properties defined in pom.xml available in the execution of an 
assembly descriptor invoked from pom.xml via the assembly plugin?


If not, is there a way to pass such definitions to the assembly plugin?

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



assembly plugin - pass property from pom.xml to assembly descriptor?

2012-11-28 Thread Steve Cohen
Are properties defined in pom.xml available in the execution of an 
assembly descriptor invoked from pom.xml via the assembly plugin?


If not, is there a way to pass such definitions to the assembly plugin?

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



Re: Why does mvn compiile using java 1.3?

2012-11-28 Thread Jasper Floor
I use mvn on the command line. I actually solved the problem by setting the
java version explicitly. I have jdk 1.6.0_33. I found some things on
various sites which suggested mvn always compiles in 1.3 mode. You might
not notice this in an IDE (if it is true) since your IDE is likely to fix
this for you. After all, you also have an explicit java version in your IDE.

mvg,
Jasper

On Fri, Nov 16, 2012 at 4:42 PM, Ron Wheeler rwhee...@artifact-software.com
 wrote:

 What IDE are you using.
 If your colleagues are using the same pom, you need to look at your IDE
 setup.

 For example, Eclipse will let you select any of the available compilers.

 Ron


 On 16/11/2012 8:21 AM, John Patrick wrote:

 Jasper,

 I also experience similar issues, it comes down to what version of
 java you have installed, what version of the plugin you use and what
 their respective defaults are. To avoid this I would explicitly state
 version's of plugins and also a few other useful properties. I always
 but at the least the following in every new project pom;

 project ...
 [...]
 build
 [...]
pluginManagement
 [...]
   plugins
 [...]
  plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-compiler-plugin/artifactId
 version2.5.1/version
  /plugin
 [...]
   /plugins
 [...]
/pluginManagement
 [...]
 /build
 [...]
 properties
 [...]
project.custom.encodingUTF-8/project.custom.encoding
project.custom.java.version1.6/project.custom.java.version

  
 maven.compiler.source${project.custom.java.version}/maven.compiler.source

  
 maven.compiler.target${project.custom.java.version}/maven.compiler.target

  
 project.build.sourceEncoding${project.custom.encoding}/project.build.sourceEncoding

  
 project.build.outputEncoding${project.custom.encoding}/project.build.outputEncoding

  
 project.reporting.outputEncoding${project.custom.encoding}/project.reporting.outputEncoding
 [...]
 /properties
 /project

 John

 On 16 November 2012 09:50, Olivier Lamy ol...@apache.org wrote:

 Hi,
 Which maven-compiler-plugin version are you using ?
 Does your colleague set JAVA_HOME env var on windows ?

 2012/11/16 Jasper Floor j.fl...@onehippo.com:

 Hi,

 For some reason mvn is compiling using java 1.3. I do not understand
 this
 behavior. I have never seen this before and it doesn't do this on my
 colleagues machine with the same project. The big difference is he is a
 windows use and I am a linux user.

 Apache Maven 3.0.4
 Maven home: /usr/share/maven
 Java version: 1.6.0_33, vendor: Sun Microsystems Inc.
 Java home: /opt/jdk/jdk1.6.0_33/jre
 Default locale: en_US, platform encoding: UTF-8
 OS name: linux, version: 3.2.0-29-generic, arch: amd64, family:
 unix

 Its a Mint distro, but with my own java installed as I required the 1.6
   jdk.


 mvg,
 Jasper



 --
 Olivier Lamy
 Talend: http://coders.talend.com
 http://twitter.com/olamy | http://linkedin.com/in/olamy

 -
 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




 --
 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: assembly plugin - pass property from pom.xml to assembly descriptor

2012-11-28 Thread Thomas Broyer
On Wed, Nov 28, 2012 at 4:06 PM, Steve Cohen stevec...@comcast.net wrote:
 Are properties defined in pom.xml available in the execution of an assembly
 descriptor invoked from pom.xml via the assembly plugin?

I don't think so (TBH, I didn't even try, because I first saw… see below)

 If not, is there a way to pass such definitions to the assembly plugin?

You can use the maven-resources-plugin to copy and filter the
descriptor, and point the maven-assembly-plugin at the filtered
descriptor. This is what Sonatype does when packaging Nexus:
https://github.com/sonatype/nexus/blob/master/nexus/nexus-oss-webapp/pom.xml

--
Thomas Broyer
/tɔ.ma.bʁwa.je/

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



Re: Why does mvn compiile using java 1.3?

2012-11-28 Thread Stephen Connolly
Up until m-c-p 2.5ish the default value for source was 1.3.

That was updated and newer versions of m-c-p use 1.5 as the default

http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#source

Maven 3.1.0 will have m-c-p's default version pinned at least at 2.5, so
when that gets released you will have, by default, the source level at 1.5
(unless you downgrade your m-c-p plugin or override it to something lower


On 28 November 2012 15:14, Jasper Floor j.fl...@onehippo.com wrote:

 I use mvn on the command line. I actually solved the problem by setting the
 java version explicitly. I have jdk 1.6.0_33. I found some things on
 various sites which suggested mvn always compiles in 1.3 mode. You might
 not notice this in an IDE (if it is true) since your IDE is likely to fix
 this for you. After all, you also have an explicit java version in your
 IDE.

 mvg,
 Jasper

 On Fri, Nov 16, 2012 at 4:42 PM, Ron Wheeler 
 rwhee...@artifact-software.com
  wrote:

  What IDE are you using.
  If your colleagues are using the same pom, you need to look at your IDE
  setup.
 
  For example, Eclipse will let you select any of the available compilers.
 
  Ron
 
 
  On 16/11/2012 8:21 AM, John Patrick wrote:
 
  Jasper,
 
  I also experience similar issues, it comes down to what version of
  java you have installed, what version of the plugin you use and what
  their respective defaults are. To avoid this I would explicitly state
  version's of plugins and also a few other useful properties. I always
  but at the least the following in every new project pom;
 
  project ...
  [...]
  build
  [...]
 pluginManagement
  [...]
plugins
  [...]
   plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-compiler-plugin/artifactId
  version2.5.1/version
   /plugin
  [...]
/plugins
  [...]
 /pluginManagement
  [...]
  /build
  [...]
  properties
  [...]
 project.custom.encodingUTF-8/project.custom.encoding
 project.custom.java.version1.6/project.custom.java.version
 
 
  maven.compiler.source${project.custom.java.version}/maven.compiler.source
 
 
  maven.compiler.target${project.custom.java.version}/maven.compiler.target
 
 
  
 project.build.sourceEncoding${project.custom.encoding}/project.build.sourceEncoding
 
 
  
 project.build.outputEncoding${project.custom.encoding}/project.build.outputEncoding
 
 
  
 project.reporting.outputEncoding${project.custom.encoding}/project.reporting.outputEncoding
  [...]
  /properties
  /project
 
  John
 
  On 16 November 2012 09:50, Olivier Lamy ol...@apache.org wrote:
 
  Hi,
  Which maven-compiler-plugin version are you using ?
  Does your colleague set JAVA_HOME env var on windows ?
 
  2012/11/16 Jasper Floor j.fl...@onehippo.com:
 
  Hi,
 
  For some reason mvn is compiling using java 1.3. I do not understand
  this
  behavior. I have never seen this before and it doesn't do this on my
  colleagues machine with the same project. The big difference is he is
 a
  windows use and I am a linux user.
 
  Apache Maven 3.0.4
  Maven home: /usr/share/maven
  Java version: 1.6.0_33, vendor: Sun Microsystems Inc.
  Java home: /opt/jdk/jdk1.6.0_33/jre
  Default locale: en_US, platform encoding: UTF-8
  OS name: linux, version: 3.2.0-29-generic, arch: amd64, family:
  unix
 
  Its a Mint distro, but with my own java installed as I required the
 1.6
jdk.
 
 
  mvg,
  Jasper
 
 
 
  --
  Olivier Lamy
  Talend: http://coders.talend.com
  http://twitter.com/olamy | http://linkedin.com/in/olamy
 
  -
  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
 
 
 
 
  --
  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: assembly plugin - pass property from pom.xml to assembly descriptor

2012-11-28 Thread Steve Cohen

On 11/28/2012 09:27 AM, Thomas Broyer wrote:

On Wed, Nov 28, 2012 at 4:06 PM, Steve Cohen stevec...@comcast.net wrote:

Are properties defined in pom.xml available in the execution of an assembly
descriptor invoked from pom.xml via the assembly plugin?


I don't think so (TBH, I didn't even try, because I first saw… see below)


If not, is there a way to pass such definitions to the assembly plugin?


You can use the maven-resources-plugin to copy and filter the
descriptor, and point the maven-assembly-plugin at the filtered
descriptor. This is what Sonatype does when packaging Nexus:
https://github.com/sonatype/nexus/blob/master/nexus/nexus-oss-webapp/pom.xml

--
Thomas Broyer
/tɔ.ma.bʁwa.je/

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




Actually, to answer my own question, I found that they are.

Given
properties
mykeymyvalue/mykey
/properties

in pom.xml

the assembly descriptor has access to this property via

${project.properties.mykey}



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



Re: Why does mvn compiile using java 1.3?

2012-11-28 Thread Ron Wheeler
Good to know that Maven is now only 8 years behind. Better than 12, I 
suppose!


Ron

On 28/11/2012 10:40 AM, Stephen Connolly wrote:

Up until m-c-p 2.5ish the default value for source was 1.3.

That was updated and newer versions of m-c-p use 1.5 as the default

http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#source

Maven 3.1.0 will have m-c-p's default version pinned at least at 2.5, so
when that gets released you will have, by default, the source level at 1.5
(unless you downgrade your m-c-p plugin or override it to something lower


On 28 November 2012 15:14, Jasper Floor j.fl...@onehippo.com wrote:


I use mvn on the command line. I actually solved the problem by setting the
java version explicitly. I have jdk 1.6.0_33. I found some things on
various sites which suggested mvn always compiles in 1.3 mode. You might
not notice this in an IDE (if it is true) since your IDE is likely to fix
this for you. After all, you also have an explicit java version in your
IDE.

mvg,
Jasper

On Fri, Nov 16, 2012 at 4:42 PM, Ron Wheeler 
rwhee...@artifact-software.com

wrote:
What IDE are you using.
If your colleagues are using the same pom, you need to look at your IDE
setup.

For example, Eclipse will let you select any of the available compilers.

Ron


On 16/11/2012 8:21 AM, John Patrick wrote:


Jasper,

I also experience similar issues, it comes down to what version of
java you have installed, what version of the plugin you use and what
their respective defaults are. To avoid this I would explicitly state
version's of plugins and also a few other useful properties. I always
but at the least the following in every new project pom;

project ...
[...]
 build
[...]
pluginManagement
[...]
   plugins
[...]
  plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-compiler-plugin/artifactId
 version2.5.1/version
  /plugin
[...]
   /plugins
[...]
/pluginManagement
[...]
 /build
[...]
 properties
[...]
project.custom.encodingUTF-8/project.custom.encoding
project.custom.java.version1.6/project.custom.java.version



  maven.compiler.source${project.custom.java.version}/maven.compiler.source



  maven.compiler.target${project.custom.java.version}/maven.compiler.target



  
project.build.sourceEncoding${project.custom.encoding}/project.build.sourceEncoding



  
project.build.outputEncoding${project.custom.encoding}/project.build.outputEncoding



  
project.reporting.outputEncoding${project.custom.encoding}/project.reporting.outputEncoding

[...]
 /properties
/project

John

On 16 November 2012 09:50, Olivier Lamy ol...@apache.org wrote:


Hi,
Which maven-compiler-plugin version are you using ?
Does your colleague set JAVA_HOME env var on windows ?

2012/11/16 Jasper Floor j.fl...@onehippo.com:


Hi,

For some reason mvn is compiling using java 1.3. I do not understand
this
behavior. I have never seen this before and it doesn't do this on my
colleagues machine with the same project. The big difference is he is

a

windows use and I am a linux user.

Apache Maven 3.0.4
Maven home: /usr/share/maven
Java version: 1.6.0_33, vendor: Sun Microsystems Inc.
Java home: /opt/jdk/jdk1.6.0_33/jre
Default locale: en_US, platform encoding: UTF-8
OS name: linux, version: 3.2.0-29-generic, arch: amd64, family:
unix

Its a Mint distro, but with my own java installed as I required the

1.6

   jdk.


mvg,
Jasper



--
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

-
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




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





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



Create text file in maven?

2012-11-28 Thread Steve Cohen
Is there a way in maven to echo some text provided via a property in 
pom.xml into a text file at a given location?


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



RE: Create text file in maven?

2012-11-28 Thread Jim McCaskey
Steve,

You can use the antrun plugin for that just using ant echo statements.

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

There might be a plugin that can do just the echo, but I don't know what that 
would be.

-Jim

-Original Message-
From: Steve Cohen [mailto:sco...@javactivity.org]
Sent: Wednesday, November 28, 2012 10:14 AM
To: users@maven.apache.org
Subject: Create text file in maven?

Is there a way in maven to echo some text provided via a property in
pom.xml into a text file at a given location?

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


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: Create text file in maven?

2012-11-28 Thread Mark H. Wood
On Wed, Nov 28, 2012 at 10:13:47AM -0600, Steve Cohen wrote:
 Is there a way in maven to echo some text provided via a property in 
 pom.xml into a text file at a given location?

Perhaps [modest cough] http://mypage.iu.edu/~mwood/FileWeaver/

-- 
Mark H. Wood, Lead System Programmer   mw...@iupui.edu
I don't do doorbusters.


pgp2P2G4XAmxW.pgp
Description: PGP signature


Re: Retrieving the project source directories from MavenProject

2012-11-28 Thread Javier Ortiz
It worked! Thanks a lot. Now trying to figure out how to make the unit test
work...


On Tue, Nov 27, 2012 at 9:23 PM, Barrie Treloar baerr...@gmail.com wrote:

 On Wed, Nov 28, 2012 at 9:08 AM, Javier Ortiz javier.ortiz...@gmail.com
 wrote:
  Added the link to the sources:
  https://bitbucket.org/javydreamercsw/randoop-maven-plugin
 
  The link was added in Stackoverflow as well.

 Ok. I got it running.

 Updated Stackoverflow.

 Summary:
 Java 1.5 annotations @Parameter and @Component are not working.
 JavaDoc annotations are working fine.

 Will start another thread to ask why Java 1.5 annotations aren't
 working as they should.

 Example output below

 [INFO] --- randoop-maven-plugin:1.0-SNAPSHOT:generate-all-tests
 (default-cli) @ randoop-maven-plugin ---
 [INFO] Running Randoop Mojo on project: Randoop-Maven-Plugin Maven Mojo
 [INFO] Sources:
 [INFO] XXX\randoop-maven-plugin\src\main\java
 [INFO] Artifacts:
 [INFO] org.apache.maven:maven-plugin-api:jar:2.2.1:compile
 [INFO] org.apache.maven:maven-project:jar:2.2.1:compile
 [INFO] org.apache.maven:maven-settings:jar:2.2.1:compile
 [INFO] org.apache.maven:maven-profile:jar:2.2.1:compile
 [INFO] org.apache.maven:maven-artifact-manager:jar:2.2.1:compile
 [INFO] org.apache.maven:maven-repository-metadata:jar:2.2.1:compile
 [INFO] org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6:compile
 [INFO] backport-util-concurrent:backport-util-concurrent:jar:3.1:compile
 [INFO] org.apache.maven:maven-plugin-registry:jar:2.2.1:compile
 [INFO] org.codehaus.plexus:plexus-interpolation:jar:1.11:compile
 [INFO] org.codehaus.plexus:plexus-utils:jar:1.5.15:compile
 [INFO] org.apache.maven:maven-artifact:jar:2.2.1:compile
 [INFO]
 org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
 [INFO] classworlds:classworlds:jar:1.1-alpha-2:compile
 [INFO]
 org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.2:compile
 [INFO] org.apache.maven:maven-model:jar:2.2.1:compile
 [INFO] org.fuin:utils4j:jar:0.6.8:compile
 [INFO] Dependencies:
 [INFO] Dependency {groupId=org.apache.maven,
 artifactId=maven-plugin-api, version=2.2.1, type=jar}
 [INFO] Dependency {groupId=org.apache.maven, artifactId=maven-project,
 version=2.2.1, type=jar}
 [INFO] Dependency {groupId=org.apache.maven,
 artifactId=maven-settings, version=2.2.1, type=jar}
 [INFO] Dependency {groupId=org.apache.maven, artifactId=maven-profile,
 version=2.2.1, type=jar}
 [INFO] Dependency {groupId=org.apache.maven,
 artifactId=maven-artifact-manager, version=2.2.1, type=jar}
 [INFO] Dependency {groupId=org.apache.maven,
 artifactId=maven-repository-metadata, version=2.2.1, type=jar}
 [INFO] Dependency {groupId=org.apache.maven.wagon,
 artifactId=wagon-provider-api, version=1.0-beta-6, type=jar}
 [INFO] Dependency {groupId=backport-util-concurrent,
 artifactId=backport-util-concurrent, version=3.1, type=jar}
 [INFO] Dependency {groupId=org.apache.maven,
 artifactId=maven-plugin-registry, version=2.2.1, type=jar}
 [INFO] Dependency {groupId=org.codehaus.plexus,
 artifactId=plexus-interpolation, version=1.11, type=jar}
 [INFO] Dependency {groupId=org.codehaus.plexus,
 artifactId=plexus-utils, version=1.5.15, type=jar}
 [INFO] Dependency {groupId=org.apache.maven,
 artifactId=maven-artifact, version=2.2.1, type=jar}
 [INFO] Dependency {groupId=org.codehaus.plexus,
 artifactId=plexus-container-default, version=1.0-alpha-9-stable-1,
 type=jar}
 [INFO] Dependency {groupId=classworlds, artifactId=classworlds,
 version=1.1-alpha-2, type=jar}
 [INFO] Dependency {groupId=org.apache.maven.plugin-tools,
 artifactId=maven-plugin-annotations, version=3.2, type=jar}
 [INFO] Dependency {groupId=org.apache.maven, artifactId=maven-model,
 version=2.2.1, type=jar}
 [INFO] Dependency {groupId=org.fuin, artifactId=utils4j,
 version=0.6.8, type=jar}
 [INFO] Classpath:
 [INFO] XXX\randoop-maven-plugin\target\classes
 [INFO]
 C:\Users\XXX\.m2\repository\org\apache\maven\maven-plugin-api\2.2.1\maven-plugin-api-2.2.1.jar
 [INFO]
 C:\Users\XXX\.m2\repository\org\apache\maven\maven-project\2.2.1\maven-project-2.2.1.jar
 [INFO]
 C:\Users\XXX\.m2\repository\org\apache\maven\maven-settings\2.2.1\maven-settings-2.2.1.jar
 [INFO]
 C:\Users\XXX\.m2\repository\org\apache\maven\maven-profile\2.2.1\maven-profile-2.2.1.jar
 [INFO]
 C:\Users\XXX\.m2\repository\org\apache\maven\maven-artifact-manager\2.2.1\maven-artifact-manager-2.2.1.jar
 [INFO]
 C:\Users\XXX\.m2\repository\org\apache\maven\maven-repository-metadata\2.2.1\maven-repository-metadata-2.2.1.jar
 [INFO]
 C:\Users\XXX\.m2\repository\org\apache\maven\wagon\wagon-provider-api\1.0-beta-6\wagon-provider-api-1.0-beta-6.jar
 [INFO]
 C:\Users\XXX\.m2\repository\backport-util-concurrent\backport-util-concurrent\3.1\backport-util-concurrent-3.1.jar
 [INFO]
 C:\Users\XXX\.m2\repository\org\apache\maven\maven-plugin-registry\2.2.1\maven-plugin-registry-2.2.1.jar
 [INFO]
 C:\Users\XXX\.m2\repository\org\codehaus\plexus\plexus-interpolation\1.11\plexus-interpolation-1.11.jar
 

Re: Create text file in maven?

2012-11-28 Thread Steve Cohen

On 11/28/2012 10:13 AM, Steve Cohen wrote:

Is there a way in maven to echo some text provided via a property in
pom.xml into a text file at a given location?

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



my simple yet ridiculously inelegant solution was to create a class in 
my project that can executed through the exec:java goal.


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



Re: Why does mvn compiile using java 1.3?

2012-11-28 Thread Curtis Rueden
Hi Ron,

 Good to know that Maven is now only 8 years behind.

I blame Apple.

-Curtis


On Wed, Nov 28, 2012 at 9:51 AM, Ron Wheeler rwhee...@artifact-software.com
 wrote:

 Good to know that Maven is now only 8 years behind. Better than 12, I
 suppose!

 Ron


 On 28/11/2012 10:40 AM, Stephen Connolly wrote:

 Up until m-c-p 2.5ish the default value for source was 1.3.

 That was updated and newer versions of m-c-p use 1.5 as the default

 http://maven.apache.org/**plugins/maven-compiler-plugin/**
 compile-mojo.html#sourcehttp://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#source

 Maven 3.1.0 will have m-c-p's default version pinned at least at 2.5, so
 when that gets released you will have, by default, the source level at 1.5
 (unless you downgrade your m-c-p plugin or override it to something lower


 On 28 November 2012 15:14, Jasper Floor j.fl...@onehippo.com wrote:

  I use mvn on the command line. I actually solved the problem by setting
 the
 java version explicitly. I have jdk 1.6.0_33. I found some things on
 various sites which suggested mvn always compiles in 1.3 mode. You might
 not notice this in an IDE (if it is true) since your IDE is likely to fix
 this for you. After all, you also have an explicit java version in your
 IDE.

 mvg,
 Jasper

 On Fri, Nov 16, 2012 at 4:42 PM, Ron Wheeler 
 rwhee...@artifact-software.com

 wrote:
 What IDE are you using.
 If your colleagues are using the same pom, you need to look at your IDE
 setup.

 For example, Eclipse will let you select any of the available compilers.

 Ron


 On 16/11/2012 8:21 AM, John Patrick wrote:

  Jasper,

 I also experience similar issues, it comes down to what version of
 java you have installed, what version of the plugin you use and what
 their respective defaults are. To avoid this I would explicitly state
 version's of plugins and also a few other useful properties. I always
 but at the least the following in every new project pom;

 project ...
 [...]
  build
 [...]
 pluginManagement
 [...]
plugins
 [...]
   plugin
  groupIdorg.apache.maven.**plugins/groupId
  artifactIdmaven-compiler-**plugin/artifactId
  version2.5.1/version
   /plugin
 [...]
/plugins
 [...]
 /pluginManagement
 [...]
  /build
 [...]
  properties
 [...]
 project.custom.encodingUTF-**8/project.custom.encoding
 project.custom.java.version**1.6/project.custom.java.**
 version


maven.compiler.source${**project.custom.java.version}/**
 maven.compiler.source


maven.compiler.target${**project.custom.java.version}/**
 maven.compiler.target


project.build.sourceEncoding**${project.custom.encoding}/**
 project.build.sourceEncoding


project.build.outputEncoding**${project.custom.encoding}/**
 project.build.outputEncoding


project.reporting.**outputEncoding${project.**
 custom.encoding}/project.**reporting.outputEncoding

 [...]
  /properties
 /project

 John

 On 16 November 2012 09:50, Olivier Lamy ol...@apache.org wrote:

  Hi,
 Which maven-compiler-plugin version are you using ?
 Does your colleague set JAVA_HOME env var on windows ?

 2012/11/16 Jasper Floor j.fl...@onehippo.com:

  Hi,

 For some reason mvn is compiling using java 1.3. I do not understand
 this
 behavior. I have never seen this before and it doesn't do this on my
 colleagues machine with the same project. The big difference is he is

 a

  windows use and I am a linux user.

 Apache Maven 3.0.4
 Maven home: /usr/share/maven
 Java version: 1.6.0_33, vendor: Sun Microsystems Inc.
 Java home: /opt/jdk/jdk1.6.0_33/jre
 Default locale: en_US, platform encoding: UTF-8
 OS name: linux, version: 3.2.0-29-generic, arch: amd64, family:
 unix

 Its a Mint distro, but with my own java installed as I required the

 1.6

 jdk.


 mvg,
 Jasper


 --
 Olivier Lamy
 Talend: http://coders.talend.com
 http://twitter.com/olamy | http://linkedin.com/in/olamy

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

   --**--**
 -

 To unsubscribe, e-mail: 
 users-unsubscribe@maven.**apache.orgusers-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-unsubscribe@maven.**apache.orgusers-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

Re: Create text file in maven?

2012-11-28 Thread Jochen Wiedmann
Use the groovy-maven-plugin:

  http://groovy.codehaus.org/GMaven



On Wed, Nov 28, 2012 at 5:13 PM, Steve Cohen sco...@javactivity.org wrote:

 Is there a way in maven to echo some text provided via a property in
 pom.xml into a text file at a given location?

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




-- 
The best argument for celibacy is that the clergy will sooner or later
become extinct.


Re: Why does mvn compiile using java 1.3?

2012-11-28 Thread Mark Derricutt
Now that Oracle are controlling Java on OSX we can no longer blame Apple - 
I'd love to see the default become Java 7 now.

And if one needs to lock down to the older versions, lock them down.


On 29/11/2012, at 7:07 AM, Curtis Rueden ctrue...@wisc.edu wrote:

 Good to know that Maven is now only 8 years behind.
 
 I blame Apple.



Re: Why does mvn compiile using java 1.3?

2012-11-28 Thread Curtis Rueden
Hi Mark,

 Now that Oracle are controlling Java on OSX we can no longer blame
 Apple

Well, the new problem is that Java 7 only runs on Lion or later. So then I
blame whoever made that decision. It has forced my projects to stay with
Java 6 (which can for the most part be run in a Java 5 environment too
using Retrotranslator) for the foreseeable future.

 I'd love to see the default become Java 7 now.
 And if one needs to lock down to the older versions, lock them down.

I agree, actually. That said, I think Java source/target versions are
analogous to Maven plugin versions, in that it is safest to *always* lock
them down, for all the same reasons.

Regards,
Curtis


On Wed, Nov 28, 2012 at 12:36 PM, Mark Derricutt m...@talios.com wrote:

 Now that Oracle are controlling Java on OSX we can no longer blame Apple
 - I'd love to see the default become Java 7 now.

 And if one needs to lock down to the older versions, lock them down.


 On 29/11/2012, at 7:07 AM, Curtis Rueden ctrue...@wisc.edu wrote:

  Good to know that Maven is now only 8 years behind.
 
  I blame Apple.




Re: assembly plugin - pass property from pom.xml to assembly descriptor?

2012-11-28 Thread Curtis Rueden
Hi Steve,

 Are properties defined in pom.xml available in the execution of an
 assembly descriptor invoked from pom.xml via the assembly plugin?

I did a quick test, and it works for me. Anything defined in the pom.xml
properties gets passed to the assembly descriptor, accessible via the
usual ${foo} syntax.

You can also pass additional filters using the filters section of the
assembly configuration:
https://maven.apache.org/plugins/maven-assembly-plugin/single-mojo.html#filters

HTH,
Curtis


On Wed, Nov 28, 2012 at 9:07 AM, Steve Cohen sco...@javactivity.org wrote:

 Are properties defined in pom.xml available in the execution of an
 assembly descriptor invoked from pom.xml via the assembly plugin?

 If not, is there a way to pass such definitions to the assembly plugin?

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




Re: Why does mvn compiile using java 1.3?

2012-11-28 Thread Ron Wheeler

+1

On 28/11/2012 1:36 PM, Mark Derricutt wrote:

Now that Oracle are controlling Java on OSX we can no longer blame Apple - 
I'd love to see the default become Java 7 now.

And if one needs to lock down to the older versions, lock them down.


On 29/11/2012, at 7:07 AM, Curtis Rueden ctrue...@wisc.edu wrote:


Good to know that Maven is now only 8 years behind.

I blame Apple.





--
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: How to unpack dependencies in specific order ?

2012-11-28 Thread Jeff MAURY
Does not seem to be possible with unpack dependencies.
One option would be to use unpack-dep with the flag that tell to unpack
each dependency in a separate folder and then use the assembly, specifying
the folders in the proper order.
The drawback is that you must list each dependency and inherited dependency

Jeff



On Wed, Nov 28, 2012 at 4:19 PM, Xavier NOPRE xno...@gmail.com wrote:

 Hi all,

 My project is depending on many ZIP resources.

 With maven-dependency-plugin and its unpack-dependencies, I kown how to
 unpack each dependency.

 But (for different reasons I cannot explain here), I have to unpack the
 dependencies in a specific order (*).

 Is it possible to unpack in a specific order, or is it possible to manage
 the dependencies order ?

 Thanks,

 Xavier



 (*) there are some files with the same names, and I have to overwrite some
 files from one dependency with other from another dependency 




-- 
Jeff MAURY


Legacy code often differs from its suggested alternative by actually
working and scaling.
 - Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury


Re: Create text file in maven?

2012-11-28 Thread Stephen Connolly
Resource filtering!

On Wednesday, 28 November 2012, Steve Cohen wrote:

 Is there a way in maven to echo some text provided via a property in
 pom.xml into a text file at a given location?

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




Re: Mojo Java 1.5 @Component MavenProject (returns null) vs JavaDoc @parameter expression=${project} works

2012-11-28 Thread Barrie Treloar
 I've not used the Java 1.5 annotations before.
 Does anyone know why this might be?
 weird as it works for all our plugins :-)
 How do you build that ? any sample ?

Got one I can take a look at?

Google isn't helpful because it picks up the javadoc ones too.

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



Re: Mojo Java 1.5 @Component MavenProject (returns null) vs JavaDoc @parameter expression=${project} works

2012-11-28 Thread Olivier Lamy
2012/11/28 Barrie Treloar baerr...@gmail.com:
 I've not used the Java 1.5 annotations before.
 Does anyone know why this might be?
 weird as it works for all our plugins :-)
 How do you build that ? any sample ?

 Got one I can take a look at?

http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugin/jar/AbstractJarMojo.java


 Google isn't helpful because it picks up the javadoc ones too.

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




--
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

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



Re: Retrieving the project source directories from MavenProject

2012-11-28 Thread Barrie Treloar
On Thu, Nov 29, 2012 at 3:32 AM, Javier Ortiz javier.ortiz...@gmail.com wrote:
 It worked! Thanks a lot. Now trying to figure out how to make the unit test
 work...

Its more like an integration test than a unit test, as your mojo will
need a lot of structure that it just painful to Mock.

Have a look at the maven-it project to see how it is done.
There are about 3 different frameworks when I started this stuff and
one (I dont remember which) became the leader.

You may also want to look at using a mock repository so that it loads
things off disk (and writes your test version into this repo too)
instead of downloading things form the internet or polluting your
local cache.  I'm not sure how well this is documented.

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



Re: Why does mvn compiile using java 1.3?

2012-11-28 Thread Manfred Moser
+1 even though that would trip up lots if users IMHO. 

Given that Jdk 6 will be deprecated in spring it might be a good move 

Ron Wheeler rwhee...@artifact-software.com wrote:

+1

On 28/11/2012 1:36 PM, Mark Derricutt wrote:
 Now that Oracle are controlling Java on OSX we can no longer blame
Apple - I'd love to see the default become Java 7 now.

 And if one needs to lock down to the older versions, lock them down.


 On 29/11/2012, at 7:07 AM, Curtis Rueden ctrue...@wisc.edu wrote:

 Good to know that Maven is now only 8 years behind.
 I blame Apple.



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

-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

gwt-maven-plugin - maven-release-plugin

2012-11-28 Thread Karl Heinz Marbaise

Hello to all,

i just want to know if someone knows about some influences between
the gwt-maven-plugin and the maven-release-plugin ?

may be someone has already some kind of this experience ?

Thanks in advance.
Karl-Heinz Marbaise
--
SoftwareEntwicklung Beratung SchulungTel.: +49 (0) 2405 / 415 893
Dipl.Ing.(FH) Karl-Heinz MarbaiseICQ#: 135949029
Hauptstrasse 177 USt.IdNr: DE191347579
52146 Würselen   http://www.soebes.de

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



Re: gwt-maven-plugin - maven-release-plugin

2012-11-28 Thread Karl Heinz Marbaise



i just want to know if someone knows about some influences between
the gwt-maven-plugin and the maven-release-plugin ?

missed to add the link to this:

https://groups.google.com/forum/?fromgroups=#!topic/codehaus-mojo-gwt-maven-plugin-users/dExd-zgzs9k

But doesn't the hint have the consequence not to transfer the artifacts 
into repository manager ?


Kind regards
Karl-Heinz Marbaise
--
SoftwareEntwicklung Beratung SchulungTel.: +49 (0) 2405 / 415 893
Dipl.Ing.(FH) Karl-Heinz MarbaiseICQ#: 135949029
Hauptstrasse 177 USt.IdNr: DE191347579
52146 Würselen   http://www.soebes.de

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



Re: gwt-maven-plugin - maven-release-plugin

2012-11-28 Thread Joachim Van der Auwera
We have used gwt-maven-plugin in combination with the 
maven-release-plugin without problems in the Geomajas project. We do not 
use compileSourcesArtifacts though, we always either include the sources 
in the jars themselves or include the sources jars as dependency in the 
project.


Kind regards,
Joachim

On 28-11-12 21:56, Karl Heinz Marbaise wrote:



i just want to know if someone knows about some influences between
the gwt-maven-plugin and the maven-release-plugin ?

missed to add the link to this:

https://groups.google.com/forum/?fromgroups=#!topic/codehaus-mojo-gwt-maven-plugin-users/dExd-zgzs9k 



But doesn't the hint have the consequence not to transfer the 
artifacts into repository manager ?


Kind regards
Karl-Heinz Marbaise



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



Re: Mojo Java 1.5 @Component MavenProject (returns null) vs JavaDoc @parameter expression=${project} works

2012-11-28 Thread Jason van Zyl
The MavenProject is not a component that is injected by the container. It's 
handled by the PluginParameterExpressionEvaluator[1] which looks at all the 
non-@component things and sets their values once the Mojo instance is 
constructed.

[1]: 
https://github.com/apache/maven-3/blob/trunk/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java

On Nov 27, 2012, at 10:26 PM, Barrie Treloar baerr...@gmail.com wrote:

 While trying to sort out
 http://maven.40175.n5.nabble.com/Retrieving-the-project-source-directories-from-MavenProject-td5733602.html
 
 I was hacking his code and found that
 Java 1.5 @Component MavenProject returns null
 
 But when I changed it to use JavaDoc @parameter
 expression=${project} it works fine.
 
 http://maven.apache.org/plugin-tools/maven-plugin-tools-annotations/index.html
 gives an example
@Component
private MavenProject project;
 
 http://maven.apache.org/plugin-tools/maven-plugin-annotations/apidocs/org/apache/maven/plugins/annotations/Component.html
 says MavenProject can be accessed via @Component
 
 I've not used the Java 1.5 annotations before.
 Does anyone know why this might be?
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 

Thanks,

Jason

--
Jason van Zyl
Founder  CTO, Sonatype
Founder,  Apache Maven
http://twitter.com/jvanzyl
-

happiness is like a butterfly: the more you chase it, the more it will
elude you, but if you turn your attention to other things, it will come
and sit softly on your shoulder ...

-- Thoreau 







Re: How to unpack dependencies in specific order ?

2012-11-28 Thread Xavier NOPRE
Hi Jeff,

I found a solution using the copy-maven-plugin that allows to unpack
and pack (and other operations) :
https://gist.github.com/4164769

The plugin : http://evgeny-goldin.com/wiki/Copy-maven-plugin

Thanks,

Xavier



2012/11/28 Jeff MAURY jeffma...@jeffmaury.com

 Does not seem to be possible with unpack dependencies.
 One option would be to use unpack-dep with the flag that tell to unpack
 each dependency in a separate folder and then use the assembly, specifying
 the folders in the proper order.
 The drawback is that you must list each dependency and inherited dependency

 Jeff



 On Wed, Nov 28, 2012 at 4:19 PM, Xavier NOPRE xno...@gmail.com wrote:

  Hi all,
 
  My project is depending on many ZIP resources.
 
  With maven-dependency-plugin and its unpack-dependencies, I kown how
 to
  unpack each dependency.
 
  But (for different reasons I cannot explain here), I have to unpack the
  dependencies in a specific order (*).
 
  Is it possible to unpack in a specific order, or is it possible to manage
  the dependencies order ?
 
  Thanks,
 
  Xavier
 
 
 
  (*) there are some files with the same names, and I have to overwrite
 some
  files from one dependency with other from another dependency 
 



 --
 Jeff MAURY


 Legacy code often differs from its suggested alternative by actually
 working and scaling.
  - Bjarne Stroustrup

 http://www.jeffmaury.com
 http://riadiscuss.jeffmaury.com
 http://www.twitter.com/jeffmaury



Re: Mojo Java 1.5 @Component MavenProject (returns null) vs JavaDoc @parameter expression=${project} works

2012-11-28 Thread Barrie Treloar
On Thu, Nov 29, 2012 at 8:49 AM, Jason van Zyl ja...@tesla.io wrote:
 The MavenProject is not a component that is injected by the container. It's 
 handled by the PluginParameterExpressionEvaluator[1] which looks at all the 
 non-@component things and sets their values once the Mojo instance is 
 constructed.

 [1]: 
 https://github.com/apache/maven-3/blob/trunk/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java

Does that mean our docs are wrong?
Do you have an example?

I've not used annotations before and I was trying to help someone
else's user list question.
And unfortunately google returns javadoc matches as well so wading
through examples was time consuming and not very enlightening.

And the link Olivier sent is using
/**
 * The Maven project.
 */
@Component
private MavenProject project;
and is working, but when I tried that it didn't.

I'm going to try looking at the pom to see if there are some incorrect
versions of dependencies might be causing an issue.

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



Re: Mojo Java 1.5 @Component MavenProject (returns null) vs JavaDoc @parameter expression=${project} works

2012-11-28 Thread Olivier Lamy
see 
http://maven.apache.org/plugin-tools/maven-plugin-tools-annotations/index.html
and 
http://maven.apache.org/plugin-tools/maven-plugin-plugin/examples/using-annotations.html


2012/11/29 Barrie Treloar baerr...@gmail.com:
 On Thu, Nov 29, 2012 at 8:49 AM, Jason van Zyl ja...@tesla.io wrote:
 The MavenProject is not a component that is injected by the container. It's 
 handled by the PluginParameterExpressionEvaluator[1] which looks at all the 
 non-@component things and sets their values once the Mojo instance is 
 constructed.

 [1]: 
 https://github.com/apache/maven-3/blob/trunk/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java

 Does that mean our docs are wrong?
 Do you have an example?

 I've not used annotations before and I was trying to help someone
 else's user list question.
 And unfortunately google returns javadoc matches as well so wading
 through examples was time consuming and not very enlightening.

 And the link Olivier sent is using
 /**
  * The Maven project.
  */
 @Component
 private MavenProject project;
 and is working, but when I tried that it didn't.

 I'm going to try looking at the pom to see if there are some incorrect
 versions of dependencies might be causing an issue.

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




-- 
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

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



Re: [ANN] Versions Maven Plugin 2.0 released

2012-11-28 Thread Wheeler, Dennis
While I would love to assist, this issue has not been consistently
reproducible. It hasn't yet failed on our automated trunk builds, but
consistently fails on our automated branch builds (it consistently fails
for me locally both in the trunk and the branch, but the project's primary
developer claims is doesn't fail for him at all (and I don't yet believe
he's using the exact same steps -- I think he only wants access to our
automated servers)).

I am extremely backlogged with other pressing tasks, and my boss doesn't
want me to spend the time debugging this issue any further now that we
have a workaround solution. Not to mention that we're working within a
closed source environment and I'm unsure about how much of our build logs
and environment info we can share.

Perhaps I can pass this off to one of our other developers who is also
more experienced using maven who can then help debug and better report on
the NPE.

I'm just guessing (and its just a wild unfounded guess at this point),
that our project contains some circular dependencies and the new versions
plugin is attempting to be more strict in that area.


Thanks for all the assistance.

On 11/28/12 5:18 AM, Stephen Connolly stephen.alan.conno...@gmail.com
wrote:

Can you please raise a JIRA for the NPE


On 28 November 2012 08:04, Wheeler, Dennis dwhee...@cobaltgroup.com
wrote:


 Someone please help me from navigating through the forest of no return,
 that is Google, and tell me how to force our projects back to using the
 older 1.2 version of the Versions plugin, instead of this newer 2.0
 version which is now giving us null pointer exceptions with this simple
 command:

   mvn -U versions:set -DnewVersion=12345

 I don't really know anything about maven myself, I only plugin what the
 devs give me into our build configuration system.

 Can I make a global setting in the settings.xml, or does it have to be
in
 each project's pom.xml?


 Dennis Wheeler
 Release Engineer II
 ADP Digital Marketing Solutions
 p 206.219.8049 | c 206.375.6781 | e dwhee...@cobalt.com

  http://www.cobalt.com/
 Join the conversation facebook http://www.facebook.com/#!/adpdmc|
 twitter http://twitter.com/#!/adp_cobalt | blog
 http://www.digitalmileage.com/
 This message and any attachments are intended only for the use of the
 addressee and may contain information that is privileged and
confidential.
 If the reader of the message is not the intended recipient or an
 authorized representative of the intended recipient, you are hereby
 notified that any dissemination of this communication is strictly
 prohibited. If you have received this communication in error, please
 notify us immediately by email and delete the message and any
attachments
 from your system.








 On 11/27/12 5:57 AM, Stephen Connolly
stephen.alan.conno...@gmail.com
 wrote:

 The Mojo team is pleased to announce the release of the Versions
 Maven Plugin, version 2.0
 
 NOTE: This release requires Maven 2.2.1 or newer and consequently JRE
1.5
 or newer.
 
 NOTE: This is the *last* planned release that will support running on
 Maven
 2.2.x
 
 The Versions Plugin has the following goals.
 
 * versions:compare-dependencies compares the dependency versions of
 the current project to the dependency management section of a remote
 project.
 * versions:display-dependency-updates scans a project's dependencies
 and produces a report of those dependencies which have newer versions
 available.
 * versions:display-plugin-updates scans a project's plugins and
 produces a report of those plugins which have newer versions
 available.
 * versions:display-property-updates scans a projectand produces a
 report of those properties which are used to control artifact versions
 and which properies have newer versions available.
 * versions:update-parent updates the parent section of a project so
 that it references the newest available version. For example, if you
 use a corporate root POM, this goal can be helpful if you need to
 ensure you are using the latest version of the corporate root POM.
 * versions:update-properties updates properties defined in a project
 so that they correspond to the latest available version of specific
 dependencies. This can be useful if a suite of dependencies must all
 be locked to one version.
 * versions:update-child-modules updates the parent section of the
 child modules of a project so the version matches the version of the
 current project. For example, if you have an aggregator pom that is
 also the parent for the projects that it aggregates and the children
 and parent versions get out of sync, this mojo can help fix the
 versions of the child modules. (Note you may need to invoke Maven with
 the -N option in order to run this goal if your project is broken so
 badly that it cannot build because of the version mis-match).
 * versions:lock-snapshots searches the pom for all -SNAPSHOT versions
 and replaces them with the current timestamp version of that
 -SNAPSHOT, e.g. 

Re: Mojo Java 1.5 @Component MavenProject (returns null) vs JavaDoc @parameter expression=${project} works

2012-11-28 Thread Barrie Treloar
On Thu, Nov 29, 2012 at 9:37 AM, Olivier Lamy ol...@apache.org wrote:
 see 
 http://maven.apache.org/plugin-tools/maven-plugin-tools-annotations/index.html
 and 
 http://maven.apache.org/plugin-tools/maven-plugin-plugin/examples/using-annotations.html

I tried those with his example project I forked at
https://bitbucket.org/baerrach/randoop-maven-plugin
(Its a mercurial repo)

You can see in my comments that @Component doesn't work, but javadoc does.

I can't explain why...

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



Re: Mojo Java 1.5 @Component MavenProject (returns null) vs JavaDoc @parameter expression=${project} works

2012-11-28 Thread Olivier Lamy
2012/11/29 Barrie Treloar baerr...@gmail.com:
 On Thu, Nov 29, 2012 at 9:37 AM, Olivier Lamy ol...@apache.org wrote:
 see 
 http://maven.apache.org/plugin-tools/maven-plugin-tools-annotations/index.html
 and 
 http://maven.apache.org/plugin-tools/maven-plugin-plugin/examples/using-annotations.html

 I tried those with his example project I forked at
 https://bitbucket.org/baerrach/randoop-maven-plugin
 (Its a mercurial repo)

 You can see in my comments that @Component doesn't work, but javadoc does.

 I can't explain why...
maybe avoid to mix doclet and annotations

then don't miss

  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-plugin-plugin/artifactId
version3.2/version
configuration
  !-- see http://jira.codehaus.org/browse/MNG-5346 --
  skipErrorNoDescriptorsFoundtrue/skipErrorNoDescriptorsFound
/configuration
executions
  execution
idmojo-descriptor/id
goals
  goaldescriptor/goal
/goals
  /execution
  !-- if you want to generate help goal --
  execution
idhelp-goal/id
goals
  goalhelpmojo/goal
/goals
  /execution
/executions
  /plugin

and add an it test to ease help :-)

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




--
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

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



Re: Mojo Java 1.5 @Component MavenProject (returns null) vs JavaDoc @parameter expression=${project} works

2012-11-28 Thread Barrie Treloar
On Thu, Nov 29, 2012 at 10:14 AM, Olivier Lamy ol...@apache.org wrote:
 then don't miss

   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-plugin-plugin/artifactId
 version3.2/version
 configuration
   !-- see http://jira.codehaus.org/browse/MNG-5346 --
   skipErrorNoDescriptorsFoundtrue/skipErrorNoDescriptorsFound
 /configuration
[del]

Which is clearly documented at
http://maven.apache.org/plugin-tools/maven-plugin-plugin/examples/using-annotations.html
:)

As I said, I've not used it before and didn't look too closely at the
configuration to compare it with the docs - my bad.

Thanks.

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



Re: [ANN] Versions Maven Plugin 2.0 released

2012-11-28 Thread Stephen Connolly
Even the stack trace from the NPE would help


On 28 November 2012 23:31, Wheeler, Dennis dwhee...@cobaltgroup.com wrote:

 While I would love to assist, this issue has not been consistently
 reproducible. It hasn't yet failed on our automated trunk builds, but
 consistently fails on our automated branch builds (it consistently fails
 for me locally both in the trunk and the branch, but the project's primary
 developer claims is doesn't fail for him at all (and I don't yet believe
 he's using the exact same steps -- I think he only wants access to our
 automated servers)).

 I am extremely backlogged with other pressing tasks, and my boss doesn't
 want me to spend the time debugging this issue any further now that we
 have a workaround solution. Not to mention that we're working within a
 closed source environment and I'm unsure about how much of our build logs
 and environment info we can share.

 Perhaps I can pass this off to one of our other developers who is also
 more experienced using maven who can then help debug and better report on
 the NPE.

 I'm just guessing (and its just a wild unfounded guess at this point),
 that our project contains some circular dependencies and the new versions
 plugin is attempting to be more strict in that area.


 Thanks for all the assistance.

 On 11/28/12 5:18 AM, Stephen Connolly stephen.alan.conno...@gmail.com
 wrote:

 Can you please raise a JIRA for the NPE
 
 
 On 28 November 2012 08:04, Wheeler, Dennis dwhee...@cobaltgroup.com
 wrote:
 
 
  Someone please help me from navigating through the forest of no return,
  that is Google, and tell me how to force our projects back to using the
  older 1.2 version of the Versions plugin, instead of this newer 2.0
  version which is now giving us null pointer exceptions with this simple
  command:
 
mvn -U versions:set -DnewVersion=12345
 
  I don't really know anything about maven myself, I only plugin what the
  devs give me into our build configuration system.
 
  Can I make a global setting in the settings.xml, or does it have to be
 in
  each project's pom.xml?
 
 
  Dennis Wheeler
  Release Engineer II
  ADP Digital Marketing Solutions
  p 206.219.8049 | c 206.375.6781 | e dwhee...@cobalt.com
 
   http://www.cobalt.com/
  Join the conversation facebook http://www.facebook.com/#!/adpdmc|
  twitter http://twitter.com/#!/adp_cobalt | blog
  http://www.digitalmileage.com/
  This message and any attachments are intended only for the use of the
  addressee and may contain information that is privileged and
 confidential.
  If the reader of the message is not the intended recipient or an
  authorized representative of the intended recipient, you are hereby
  notified that any dissemination of this communication is strictly
  prohibited. If you have received this communication in error, please
  notify us immediately by email and delete the message and any
 attachments
  from your system.
 
 
 
 
 
 
 
 
  On 11/27/12 5:57 AM, Stephen Connolly
 stephen.alan.conno...@gmail.com
  wrote:
 
  The Mojo team is pleased to announce the release of the Versions
  Maven Plugin, version 2.0
  
  NOTE: This release requires Maven 2.2.1 or newer and consequently JRE
 1.5
  or newer.
  
  NOTE: This is the *last* planned release that will support running on
  Maven
  2.2.x
  
  The Versions Plugin has the following goals.
  
  * versions:compare-dependencies compares the dependency versions of
  the current project to the dependency management section of a remote
  project.
  * versions:display-dependency-updates scans a project's dependencies
  and produces a report of those dependencies which have newer versions
  available.
  * versions:display-plugin-updates scans a project's plugins and
  produces a report of those plugins which have newer versions
  available.
  * versions:display-property-updates scans a projectand produces a
  report of those properties which are used to control artifact versions
  and which properies have newer versions available.
  * versions:update-parent updates the parent section of a project so
  that it references the newest available version. For example, if you
  use a corporate root POM, this goal can be helpful if you need to
  ensure you are using the latest version of the corporate root POM.
  * versions:update-properties updates properties defined in a project
  so that they correspond to the latest available version of specific
  dependencies. This can be useful if a suite of dependencies must all
  be locked to one version.
  * versions:update-child-modules updates the parent section of the
  child modules of a project so the version matches the version of the
  current project. For example, if you have an aggregator pom that is
  also the parent for the projects that it aggregates and the children
  and parent versions get out of sync, this mojo can help fix the
  versions of the child modules. (Note you may need to invoke Maven with
  the -N option in order to run this goal if your project 

Re: Mojo Java 1.5 @Component MavenProject (returns null) vs JavaDoc @parameter expression=${project} works

2012-11-28 Thread Jason van Zyl
Internally the way @component works is to take the role of component supplied 
or figure it out. With that role a lookup against the container is executed. 
The MavenProject is not something that is available from the container because 
it is not a component. So I doubt it works, unless some magic was done to just 
make the @Component act on MavenProject's which itself doesn't make sense. It 
is meant to be a parameter, and that's what it has always been.

On Nov 28, 2012, at 6:03 PM, Barrie Treloar baerr...@gmail.com wrote:

 On Thu, Nov 29, 2012 at 8:49 AM, Jason van Zyl ja...@tesla.io wrote:
 The MavenProject is not a component that is injected by the container. It's 
 handled by the PluginParameterExpressionEvaluator[1] which looks at all the 
 non-@component things and sets their values once the Mojo instance is 
 constructed.
 
 [1]: 
 https://github.com/apache/maven-3/blob/trunk/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java
 
 Does that mean our docs are wrong?
 Do you have an example?
 
 I've not used annotations before and I was trying to help someone
 else's user list question.
 And unfortunately google returns javadoc matches as well so wading
 through examples was time consuming and not very enlightening.
 
 And the link Olivier sent is using
/**
 * The Maven project.
 */
@Component
private MavenProject project;
 and is working, but when I tried that it didn't.
 
 I'm going to try looking at the pom to see if there are some incorrect
 versions of dependencies might be causing an issue.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 

Thanks,

Jason

--
Jason van Zyl
Founder  CTO, Sonatype
Founder,  Apache Maven
http://twitter.com/jvanzyl
-

To do two things at once is to do neither.
 
 -- Publilius Syrus, Roman slave, first century B.C.







Re: Mojo Java 1.5 @Component MavenProject (returns null) vs JavaDoc @parameter expression=${project} works

2012-11-28 Thread Hervé BOUTEMY
magic has been done:
see http://maven.apache.org/plugin-tools/apidocs/src-
html/org/apache/maven/tools/plugin/util/PluginUtils.html#line.40

Le mercredi 28 novembre 2012 18:54:11 Jason van Zyl a écrit :
 Internally the way @component works is to take the role of component
 supplied or figure it out. With that role a lookup against the container is
 executed. The MavenProject is not something that is available from the
 container because it is not a component. So I doubt it works, unless some
 magic was done to just make the @Component act on MavenProject's which
 itself doesn't make sense. It is meant to be a parameter, and that's what
 it has always been.
 On Nov 28, 2012, at 6:03 PM, Barrie Treloar baerr...@gmail.com wrote:
  On Thu, Nov 29, 2012 at 8:49 AM, Jason van Zyl ja...@tesla.io wrote:
  The MavenProject is not a component that is injected by the container.
  It's handled by the PluginParameterExpressionEvaluator[1] which looks at
  all the non-@component things and sets their values once the Mojo
  instance is constructed.
  
  [1]:
  https://github.com/apache/maven-3/blob/trunk/maven-core/src/main/java/or
  g/apache/maven/plugin/PluginParameterExpressionEvaluator.java 
  Does that mean our docs are wrong?
  Do you have an example?
  
  I've not used annotations before and I was trying to help someone
  else's user list question.
  And unfortunately google returns javadoc matches as well so wading
  through examples was time consuming and not very enlightening.
  
  And the link Olivier sent is using
  
 /**
 
  * The Maven project.
  */
 
 @Component
 private MavenProject project;
  
  and is working, but when I tried that it didn't.
  
  I'm going to try looking at the pom to see if there are some incorrect
  versions of dependencies might be causing an issue.
  
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 
 Thanks,
 
 Jason
 
 --
 Jason van Zyl
 Founder  CTO, Sonatype
 Founder,  Apache Maven
 http://twitter.com/jvanzyl
 -
 
 To do two things at once is to do neither.
 
  -- Publilius Syrus, Roman slave, first century B.C.

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



Re: Mojo Java 1.5 @Component MavenProject (returns null) vs JavaDoc @parameter expression=${project} works

2012-11-28 Thread Jason van Zyl
That's not right, and confusing. It's not a component.

jvz

On 2012-11-28, at 6:57 PM, Hervé BOUTEMY herve.bout...@free.fr wrote:

 magic has been done:
 see http://maven.apache.org/plugin-tools/apidocs/src-
 html/org/apache/maven/tools/plugin/util/PluginUtils.html#line.40
 
 Le mercredi 28 novembre 2012 18:54:11 Jason van Zyl a écrit :
 Internally the way @component works is to take the role of component
 supplied or figure it out. With that role a lookup against the container is
 executed. The MavenProject is not something that is available from the
 container because it is not a component. So I doubt it works, unless some
 magic was done to just make the @Component act on MavenProject's which
 itself doesn't make sense. It is meant to be a parameter, and that's what
 it has always been.
 On Nov 28, 2012, at 6:03 PM, Barrie Treloar baerr...@gmail.com wrote:
 On Thu, Nov 29, 2012 at 8:49 AM, Jason van Zyl ja...@tesla.io wrote:
 The MavenProject is not a component that is injected by the container.
 It's handled by the PluginParameterExpressionEvaluator[1] which looks at
 all the non-@component things and sets their values once the Mojo
 instance is constructed.
 
 [1]:
 https://github.com/apache/maven-3/blob/trunk/maven-core/src/main/java/or
 g/apache/maven/plugin/PluginParameterExpressionEvaluator.java 
 Does that mean our docs are wrong?
 Do you have an example?
 
 I've not used annotations before and I was trying to help someone
 else's user list question.
 And unfortunately google returns javadoc matches as well so wading
 through examples was time consuming and not very enlightening.
 
 And the link Olivier sent is using
 
   /**
 
* The Maven project.
*/
 
   @Component
   private MavenProject project;
 
 and is working, but when I tried that it didn't.
 
 I'm going to try looking at the pom to see if there are some incorrect
 versions of dependencies might be causing an issue.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 
 Thanks,
 
 Jason
 
 --
 Jason van Zyl
 Founder  CTO, Sonatype
 Founder,  Apache Maven
 http://twitter.com/jvanzyl
 -
 
 To do two things at once is to do neither.
 
 -- Publilius Syrus, Roman slave, first century B.C.
 
 -
 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: Mojo Java 1.5 @Component MavenProject (returns null) vs JavaDoc @parameter expression=${project} works

2012-11-28 Thread Jason van Zyl
I would remove that from the doco. I assume the @Parameter method still works 
and just keep that method.

jvz

On 2012-11-28, at 6:57 PM, Hervé BOUTEMY herve.bout...@free.fr wrote:

 magic has been done:
 see http://maven.apache.org/plugin-tools/apidocs/src-
 html/org/apache/maven/tools/plugin/util/PluginUtils.html#line.40
 
 Le mercredi 28 novembre 2012 18:54:11 Jason van Zyl a écrit :
 Internally the way @component works is to take the role of component
 supplied or figure it out. With that role a lookup against the container is
 executed. The MavenProject is not something that is available from the
 container because it is not a component. So I doubt it works, unless some
 magic was done to just make the @Component act on MavenProject's which
 itself doesn't make sense. It is meant to be a parameter, and that's what
 it has always been.
 On Nov 28, 2012, at 6:03 PM, Barrie Treloar baerr...@gmail.com wrote:
 On Thu, Nov 29, 2012 at 8:49 AM, Jason van Zyl ja...@tesla.io wrote:
 The MavenProject is not a component that is injected by the container.
 It's handled by the PluginParameterExpressionEvaluator[1] which looks at
 all the non-@component things and sets their values once the Mojo
 instance is constructed.
 
 [1]:
 https://github.com/apache/maven-3/blob/trunk/maven-core/src/main/java/or
 g/apache/maven/plugin/PluginParameterExpressionEvaluator.java 
 Does that mean our docs are wrong?
 Do you have an example?
 
 I've not used annotations before and I was trying to help someone
 else's user list question.
 And unfortunately google returns javadoc matches as well so wading
 through examples was time consuming and not very enlightening.
 
 And the link Olivier sent is using
 
   /**
 
* The Maven project.
*/
 
   @Component
   private MavenProject project;
 
 and is working, but when I tried that it didn't.
 
 I'm going to try looking at the pom to see if there are some incorrect
 versions of dependencies might be causing an issue.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 
 Thanks,
 
 Jason
 
 --
 Jason van Zyl
 Founder  CTO, Sonatype
 Founder,  Apache Maven
 http://twitter.com/jvanzyl
 -
 
 To do two things at once is to do neither.
 
 -- Publilius Syrus, Roman slave, first century B.C.
 
 -
 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: Mojo Java 1.5 @Component MavenProject (returns null) vs JavaDoc @parameter expression=${project} works

2012-11-28 Thread Hervé BOUTEMY
it's confusing for people mastering a lot of things

for normal people, it was really not easy to understand, and not really 
documented, neither PluginParameterExpressionEvaluator (which I documented 
after I uderstood) nor the '@parameter default-value=${project} 
readonly=true' pattern (lots of plugins had expression=${project})

we had a long discussion on the dev list and found that, even if a little 
magic, it would be really easier to use: 
http://jira.codehaus.org/browse/MPLUGIN-204

the doc of the annotations show these special cases

Regards,

Hervé

Le mercredi 28 novembre 2012 19:00:03 Jason van Zyl a écrit :
 That's not right, and confusing. It's not a component.
 
 jvz
 
 On 2012-11-28, at 6:57 PM, Hervé BOUTEMY herve.bout...@free.fr wrote:
  magic has been done:
  see http://maven.apache.org/plugin-tools/apidocs/src-
  html/org/apache/maven/tools/plugin/util/PluginUtils.html#line.40
  
  Le mercredi 28 novembre 2012 18:54:11 Jason van Zyl a écrit :
  Internally the way @component works is to take the role of component
  supplied or figure it out. With that role a lookup against the container
  is
  executed. The MavenProject is not something that is available from the
  container because it is not a component. So I doubt it works, unless some
  magic was done to just make the @Component act on MavenProject's which
  itself doesn't make sense. It is meant to be a parameter, and that's what
  it has always been.
  
  On Nov 28, 2012, at 6:03 PM, Barrie Treloar baerr...@gmail.com wrote:
  On Thu, Nov 29, 2012 at 8:49 AM, Jason van Zyl ja...@tesla.io wrote:
  The MavenProject is not a component that is injected by the container.
  It's handled by the PluginParameterExpressionEvaluator[1] which looks
  at
  all the non-@component things and sets their values once the Mojo
  instance is constructed.
  
  [1]:
  https://github.com/apache/maven-3/blob/trunk/maven-core/src/main/java/o
  r
  g/apache/maven/plugin/PluginParameterExpressionEvaluator.java
  
  Does that mean our docs are wrong?
  Do you have an example?
  
  I've not used annotations before and I was trying to help someone
  else's user list question.
  And unfortunately google returns javadoc matches as well so wading
  through examples was time consuming and not very enlightening.
  
  And the link Olivier sent is using
  
/**

 * The Maven project.
 */

@Component
private MavenProject project;
  
  and is working, but when I tried that it didn't.
  
  I'm going to try looking at the pom to see if there are some incorrect
  versions of dependencies might be causing an issue.
  
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
  
  Thanks,
  
  Jason
  
  --
  Jason van Zyl
  Founder  CTO, Sonatype
  Founder,  Apache Maven
  http://twitter.com/jvanzyl
  -
  
  To do two things at once is to do neither.
  
  -- Publilius Syrus, Roman slave, first century B.C.
  
  -
  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

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



Re: Why does mvn compiile using java 1.3?

2012-11-28 Thread Mark Derricutt
Do users often accidentally upgrade major releases of maven without care or 
thought?


….maybe I shouldn't ask that tho :)

On 29/11/2012, at 9:47 AM, Manfred Moser manf...@mosabuam.com wrote:

 +1 even though that would trip up lots if users IMHO. 



Re: Mojo Java 1.5 @Component MavenProject (returns null) vs JavaDoc @parameter expression=${project} works

2012-11-28 Thread Hervé BOUTEMY
no, we choose to do that for ease of use for the average plugin developer

we had a long discussion on how to ease plugin development, find a better name 
than expression, understand that such Maven object injection case is best 
written as default-value than expression, and so on...

and actual plugins using @Component for injecting classical MavenProject is 
easier than @Parameter( defaultValue=${project} ) even if the former is a 
trick

Le mercredi 28 novembre 2012 19:05:10 Jason van Zyl a écrit :
 I would remove that from the doco. I assume the @Parameter method still
 works and just keep that method.
 
 jvz
 
 On 2012-11-28, at 6:57 PM, Hervé BOUTEMY herve.bout...@free.fr wrote:
  magic has been done:
  see http://maven.apache.org/plugin-tools/apidocs/src-
  html/org/apache/maven/tools/plugin/util/PluginUtils.html#line.40
  
  Le mercredi 28 novembre 2012 18:54:11 Jason van Zyl a écrit :
  Internally the way @component works is to take the role of component
  supplied or figure it out. With that role a lookup against the container
  is
  executed. The MavenProject is not something that is available from the
  container because it is not a component. So I doubt it works, unless some
  magic was done to just make the @Component act on MavenProject's which
  itself doesn't make sense. It is meant to be a parameter, and that's what
  it has always been.
  
  On Nov 28, 2012, at 6:03 PM, Barrie Treloar baerr...@gmail.com wrote:
  On Thu, Nov 29, 2012 at 8:49 AM, Jason van Zyl ja...@tesla.io wrote:
  The MavenProject is not a component that is injected by the container.
  It's handled by the PluginParameterExpressionEvaluator[1] which looks
  at
  all the non-@component things and sets their values once the Mojo
  instance is constructed.
  
  [1]:
  https://github.com/apache/maven-3/blob/trunk/maven-core/src/main/java/o
  r
  g/apache/maven/plugin/PluginParameterExpressionEvaluator.java
  
  Does that mean our docs are wrong?
  Do you have an example?
  
  I've not used annotations before and I was trying to help someone
  else's user list question.
  And unfortunately google returns javadoc matches as well so wading
  through examples was time consuming and not very enlightening.
  
  And the link Olivier sent is using
  
/**

 * The Maven project.
 */

@Component
private MavenProject project;
  
  and is working, but when I tried that it didn't.
  
  I'm going to try looking at the pom to see if there are some incorrect
  versions of dependencies might be causing an issue.
  
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
  
  Thanks,
  
  Jason
  
  --
  Jason van Zyl
  Founder  CTO, Sonatype
  Founder,  Apache Maven
  http://twitter.com/jvanzyl
  -
  
  To do two things at once is to do neither.
  
  -- Publilius Syrus, Roman slave, first century B.C.
  
  -
  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

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



Re: Mojo Java 1.5 @Component MavenProject (returns null) vs JavaDoc @parameter expression=${project} works

2012-11-28 Thread Jason van Zyl
How does it help by telling them something factually incorrect? A component has 
a specific definition of being an instance created by the container. 

On Nov 28, 2012, at 7:23 PM, Hervé BOUTEMY herve.bout...@free.fr wrote:

 no, we choose to do that for ease of use for the average plugin developer
 
 we had a long discussion on how to ease plugin development, find a better 
 name 
 than expression, understand that such Maven object injection case is best 
 written as default-value than expression, and so on...
 
 and actual plugins using @Component for injecting classical MavenProject is 
 easier than @Parameter( defaultValue=${project} ) even if the former is a 
 trick
 
 Le mercredi 28 novembre 2012 19:05:10 Jason van Zyl a écrit :
 I would remove that from the doco. I assume the @Parameter method still
 works and just keep that method.
 
 jvz
 
 On 2012-11-28, at 6:57 PM, Hervé BOUTEMY herve.bout...@free.fr wrote:
 magic has been done:
 see http://maven.apache.org/plugin-tools/apidocs/src-
 html/org/apache/maven/tools/plugin/util/PluginUtils.html#line.40
 
 Le mercredi 28 novembre 2012 18:54:11 Jason van Zyl a écrit :
 Internally the way @component works is to take the role of component
 supplied or figure it out. With that role a lookup against the container
 is
 executed. The MavenProject is not something that is available from the
 container because it is not a component. So I doubt it works, unless some
 magic was done to just make the @Component act on MavenProject's which
 itself doesn't make sense. It is meant to be a parameter, and that's what
 it has always been.
 
 On Nov 28, 2012, at 6:03 PM, Barrie Treloar baerr...@gmail.com wrote:
 On Thu, Nov 29, 2012 at 8:49 AM, Jason van Zyl ja...@tesla.io wrote:
 The MavenProject is not a component that is injected by the container.
 It's handled by the PluginParameterExpressionEvaluator[1] which looks
 at
 all the non-@component things and sets their values once the Mojo
 instance is constructed.
 
 [1]:
 https://github.com/apache/maven-3/blob/trunk/maven-core/src/main/java/o
 r
 g/apache/maven/plugin/PluginParameterExpressionEvaluator.java
 
 Does that mean our docs are wrong?
 Do you have an example?
 
 I've not used annotations before and I was trying to help someone
 else's user list question.
 And unfortunately google returns javadoc matches as well so wading
 through examples was time consuming and not very enlightening.
 
 And the link Olivier sent is using
 
  /**
 
   * The Maven project.
   */
 
  @Component
  private MavenProject project;
 
 and is working, but when I tried that it didn't.
 
 I'm going to try looking at the pom to see if there are some incorrect
 versions of dependencies might be causing an issue.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 
 Thanks,
 
 Jason
 
 --
 Jason van Zyl
 Founder  CTO, Sonatype
 Founder,  Apache Maven
 http://twitter.com/jvanzyl
 -
 
 To do two things at once is to do neither.
 
 -- Publilius Syrus, Roman slave, first century B.C.
 
 -
 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
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 

Thanks,

Jason

--
Jason van Zyl
Founder  CTO, Sonatype
Founder,  Apache Maven
http://twitter.com/jvanzyl
-

To do two things at once is to do neither.
 
 -- Publilius Syrus, Roman slave, first century B.C.







Re: Mojo Java 1.5 @Component MavenProject (returns null) vs JavaDoc @parameter expression=${project} works

2012-11-28 Thread Hervé BOUTEMY
I wish we had this good discussion in may, when we wroked on plugin-tools ease 
of use enhancements

I understand your point
And in fact, when I write that the feature was added partly because parameter 
default-value=${project} read-only=true, I see I didn't document it 
either, now that I'm able to do it because it is absolutely clear in my head 
(and wasn't before the work in may)

let's go ahead:
- now that the expressions will be well documented in future Maven versions 
(see [1] instead of [2])
- given that I'll add a documentation on the default-value pattern to get 
Maven objects, whatever we decide here
I'm ok to deprecate the @component trick in favour of the documentation 
written, because the trick can be confusing

tell me if you open a Jira issue, I'll be glad to work on it

Regards,

Hervé


[1] http://maven.apache.org/ref/3.1-SNAPSHOT/maven-
core/apidocs/org/apache/maven/plugin/PluginParameterExpressionEvaluator.html

[2] http://maven.apache.org/ref/3.1-SNAPSHOT/maven-
core/apidocs/org/apache/maven/plugin/PluginParameterExpressionEvaluator.html

Le mercredi 28 novembre 2012 20:19:44 Jason van Zyl a écrit :
 How does it help by telling them something factually incorrect? A component
 has a specific definition of being an instance created by the container.
 On Nov 28, 2012, at 7:23 PM, Hervé BOUTEMY herve.bout...@free.fr wrote:
  no, we choose to do that for ease of use for the average plugin developer
  
  we had a long discussion on how to ease plugin development, find a better
  name than expression, understand that such Maven object injection case
  is best written as default-value than expression, and so on...
  
  and actual plugins using @Component for injecting classical MavenProject
  is
  easier than @Parameter( defaultValue=${project} ) even if the former is
  a
  trick
  
  Le mercredi 28 novembre 2012 19:05:10 Jason van Zyl a écrit :
  I would remove that from the doco. I assume the @Parameter method still
  works and just keep that method.
  
  jvz
  
  On 2012-11-28, at 6:57 PM, Hervé BOUTEMY herve.bout...@free.fr wrote:
  magic has been done:
  see http://maven.apache.org/plugin-tools/apidocs/src-
  html/org/apache/maven/tools/plugin/util/PluginUtils.html#line.40
  
  Le mercredi 28 novembre 2012 18:54:11 Jason van Zyl a écrit :
  Internally the way @component works is to take the role of component
  supplied or figure it out. With that role a lookup against the
  container
  is
  executed. The MavenProject is not something that is available from the
  container because it is not a component. So I doubt it works, unless
  some
  magic was done to just make the @Component act on MavenProject's which
  itself doesn't make sense. It is meant to be a parameter, and that's
  what
  it has always been.
  
  On Nov 28, 2012, at 6:03 PM, Barrie Treloar baerr...@gmail.com wrote:
  On Thu, Nov 29, 2012 at 8:49 AM, Jason van Zyl ja...@tesla.io wrote:
  The MavenProject is not a component that is injected by the
  container.
  It's handled by the PluginParameterExpressionEvaluator[1] which looks
  at
  all the non-@component things and sets their values once the Mojo
  instance is constructed.
  
  [1]:
  https://github.com/apache/maven-3/blob/trunk/maven-core/src/main/java
  /o
  r
  g/apache/maven/plugin/PluginParameterExpressionEvaluator.java
  
  Does that mean our docs are wrong?
  Do you have an example?
  
  I've not used annotations before and I was trying to help someone
  else's user list question.
  And unfortunately google returns javadoc matches as well so wading
  through examples was time consuming and not very enlightening.
  
  And the link Olivier sent is using
  
   /**
   
* The Maven project.
*/
   
   @Component
   private MavenProject project;
  
  and is working, but when I tried that it didn't.
  
  I'm going to try looking at the pom to see if there are some incorrect
  versions of dependencies might be causing an issue.
  
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
  
  Thanks,
  
  Jason
  
  --
  Jason van Zyl
  Founder  CTO, Sonatype
  Founder,  Apache Maven
  http://twitter.com/jvanzyl
  -
  
  To do two things at once is to do neither.
  
  -- Publilius Syrus, Roman slave, first century B.C.
  
  -
  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
  
  -
  To unsubscribe, e-mail: