Re: maven-metadata.xml : release vs. latest

2012-01-17 Thread Mirko Friedenhagen
OK, thanks for the answer. And what about the plugins-section in
org/apache/maven/plugins/maven-metadata.xml? Deprecated as well?

Regards Mirko
-- 
Sent from my phone
http://illegalstateexception.blogspot.com
http://github.com/mfriedenhagen/
https://bitbucket.org/mfriedenhagen/
On Jan 17, 2012 11:39 PM, "Stephen Connolly" <
stephen.alan.conno...@gmail.com> wrote:

> 1. Both of these tags are deprecated because they are a load of crap
> and useless.
>
> 2. Here is what they mean:
>
>  LATEST => The most recently deployed version
>  RELEASE => The most recently deployed non -SNAPSHOT version
>
> Crappy aren't they!
>
> 3. Versions-maven-plugin does not pay any heed to those two tags
>
> 4. Maven 3.x does not pay any heed to those tags
>
> 5. They were meant for s only not regular dependencies.
>
> -Stephen
>
> On 17 January 2012 22:31, Mirko Friedenhagen 
> wrote:
> > Hello,
> >
> > what is the difference between these two tags?
> >
> > Say I deploy two versions 1.1 and 1.2 in this order. What should I expect
> > for release and latest? My expectation would  be to see 1.2 for both.
> >
> > Say I deploy 1.2 and later on 1.1. Now my expectation would be 1.2 for
> > latest and 1.1 for release.
> >
> > Do plugins like the versions-maven-plugin or requests for LATEST in e.g.
> > Nexus read this information or do they use the "natural" order (1.2 >
> 1.1)
> > for getting latest?
> >
> > Could someone please shed a light :-D .
> >
> > Regards Mirko
> > --
> > Sent from my phone
> > http://illegalstateexception.blogspot.com
> > http://github.com/mfriedenhagen/
> > https://bitbucket.org/mfriedenhagen/
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: maven plugin configuration and binding execution to a phase/goal

2012-01-17 Thread Manfred Moser

On 12-01-17 07:24 PM, Jeff Trent wrote:

I am stuck on two things while writing a plugin: (1) configuration,
and (2) binding to the right goal/phase automatically.  I am using
Maven 3.0.3, and trying to use the plugin for APK (android) packaged
modules.

(1) configuration.

/**
  * @phase compile
  * @goal myGoal
  * @requiresDependencyResolution runtime
  */
public class MyMojo extends AbstractMojo {

   /**
* @parameter expression="${myGoal.aVal}" default-value="defaultVal"
*/
   String aVal;

…
}


And in my pom using the plugin:




my.package
my-plugin-test
1.0-SNAPSHOT

myConfiguredValue




generate-resources

myGoal





...

The problem is that I always get the default value instead of the
configured value.  What am I missing?

Am I required to provide the plugin.xml file, even for this simple case?

(2) Binding to the right goal/phase.

Ideally in the above example I don't want to specify  for
my plugin.  But I can't figure out how to vary my annotations to get
it to work.

Can someone point out the problem, or a simple concrete example that
demonstrates this case please?

Thanks,
CP


The expression should just be aVal... btw. what are you trying to do 
that the Android Maven Plugin does not do? You could implement the 
feature as a mojo there become part of that strong community..


manfred

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



maven plugin configuration and binding execution to a phase/goal

2012-01-17 Thread Jeff Trent
I am stuck on two things while writing a plugin: (1) configuration,
and (2) binding to the right goal/phase automatically.  I am using
Maven 3.0.3, and trying to use the plugin for APK (android) packaged
modules.

(1) configuration.

/**
 * @phase compile
 * @goal myGoal
 * @requiresDependencyResolution runtime
 */
public class MyMojo extends AbstractMojo {

  /**
   * @parameter expression="${myGoal.aVal}" default-value="defaultVal"
   */
  String aVal;

…
}


And in my pom using the plugin:




my.package
my-plugin-test
1.0-SNAPSHOT

myConfiguredValue




generate-resources

myGoal





...

The problem is that I always get the default value instead of the
configured value.  What am I missing?

Am I required to provide the plugin.xml file, even for this simple case?

(2) Binding to the right goal/phase.

Ideally in the above example I don't want to specify  for
my plugin.  But I can't figure out how to vary my annotations to get
it to work.

Can someone point out the problem, or a simple concrete example that
demonstrates this case please?

Thanks,
CP

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



Changing the working directory of the release plugin...

2012-01-17 Thread Thiessen, Todd (Todd)
Does anyone know how to change the working directory, that the prepare phase of 
the release plugin uses, without also changing where it checkouts out the tag?

Basically, I want to run the top level pom, but from a different working 
directory.


Re: maven-metadata.xml : release vs. latest

2012-01-17 Thread Stephen Connolly
1. Both of these tags are deprecated because they are a load of crap
and useless.

2. Here is what they mean:

  LATEST => The most recently deployed version
  RELEASE => The most recently deployed non -SNAPSHOT version

Crappy aren't they!

3. Versions-maven-plugin does not pay any heed to those two tags

4. Maven 3.x does not pay any heed to those tags

5. They were meant for s only not regular dependencies.

-Stephen

On 17 January 2012 22:31, Mirko Friedenhagen  wrote:
> Hello,
>
> what is the difference between these two tags?
>
> Say I deploy two versions 1.1 and 1.2 in this order. What should I expect
> for release and latest? My expectation would  be to see 1.2 for both.
>
> Say I deploy 1.2 and later on 1.1. Now my expectation would be 1.2 for
> latest and 1.1 for release.
>
> Do plugins like the versions-maven-plugin or requests for LATEST in e.g.
> Nexus read this information or do they use the "natural" order (1.2 > 1.1)
> for getting latest?
>
> Could someone please shed a light :-D .
>
> Regards Mirko
> --
> Sent from my phone
> http://illegalstateexception.blogspot.com
> http://github.com/mfriedenhagen/
> https://bitbucket.org/mfriedenhagen/

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



maven-metadata.xml : release vs. latest

2012-01-17 Thread Mirko Friedenhagen
Hello,

what is the difference between these two tags?

Say I deploy two versions 1.1 and 1.2 in this order. What should I expect
for release and latest? My expectation would  be to see 1.2 for both.

Say I deploy 1.2 and later on 1.1. Now my expectation would be 1.2 for
latest and 1.1 for release.

Do plugins like the versions-maven-plugin or requests for LATEST in e.g.
Nexus read this information or do they use the "natural" order (1.2 > 1.1)
for getting latest?

Could someone please shed a light :-D .

Regards Mirko
-- 
Sent from my phone
http://illegalstateexception.blogspot.com
http://github.com/mfriedenhagen/
https://bitbucket.org/mfriedenhagen/


Re: Skipping the TAR packaging step

2012-01-17 Thread Wayne Fay
> I'm working on a large project that takes time to compile.  I would like

Realistically I think you should be looking for LOCAL help (from
someone else in your project team, who knows Maven better than you do
-- who set these projects up originally?) rather than asking here on
Maven Users...

> instruct Maven to only build the jar file, but after the build I have a tar,

This should be pretty simple since Jars are the default.

> tar.bz2, and a zip file.  I am brand new to Maven, but have converted a
> project to use Maven for the compilation of all component modules.  In

You "converted" from what - Ant?

> general, I want to indicate to Maven to only create me a jar with all
> dependencies rolled into that jar, and nothing else.  This can be for a

You do realize that very few classloaders will support the "jar in a
jar" approach, right? You should probably look into the shade plugin
if you seriously want to pursue this.

> So I have a parent pom that is the kind that aggregates all sub-modules.  In
> any given module that I want to generate an executable jar for, I have a
> section that looks like this:

Nothing that you've sent shows anything about tar, bz2 or zip. Is that
coming from another parent or a profile? Or later in the assembly.xml
file? Or elsewhere in the same pom file, and you just didn't send it?

> I don't have any concept of a profile right now, but I want right now to
> simply suppress the creation of all the extra build artifacts.  Is there a
> way to do that?

Try "mvn help:effective-pom" in your project dir to see the actual pom
as interpreted by Maven.

Wayne

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



Re: maven-plugin-tools-ant custom parameter

2012-01-17 Thread Robert Scholte

Hi Max,

Don't confuse a mojo with a pojo.
The Mojo reflects the actual goal, supports injection, etc, etc.
A pojo is just that plain old java object: private fields with their  
getters and setters

Only for mojo's the @parameters can be used.
Such field can be of a lot of types: String, primitive, pojo, array or  
List of one of these types (as long as Plexus can transform it)

The @parameter on the name of the person won't work.

I've never developed Ant Plugins for Maven 2.x, this is the first time I  
see this page.

My impression is that this was written in the early days of Maven 2.
I don't think there are a lot of people who are still developing  
Maven-plugins like this.


I strongly advice you to first read the 5 minutes[1] and 30 minutes[2]  
tutorials.
Next check if there is already a plugin which already solves your problem,  
you're probably not the first one [3] (at the bottom are some other  
maven-plugin communities)

Unlike Ant it's much easier to reuse "build-scripts"/plugins.

-Robert

[1]  
http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html

[2] http://maven.apache.org/guides/getting-started/index.html
[3] http://maven.apache.org/plugins/index.html

On Tue, 17 Jan 2012 15:22:05 +0100, Maxime Carpentier  
 wrote:



Thanxs Robert, but i still don't get it

i'm just replacing my String object (which works fine) by a Person object
so instead of having in my project's pom :

John 
i have :
Jason

Doesn't it work this way ? :
plugin mojo.xml : declaring properties used in build.xml
plugin build.xml : executed part, using properties declared in mojo.xml  
and

valued in project's pom
project pom : defining properties value

In a more simple exemple, how to use a List instead of a String  
parameter ?


i'm using maven-plugin-tools-ant because i'd like use an already existing
build.xml file...

Thanxs for your help,
Max

On Mon, Jan 16, 2012 at 6:29 PM, Robert Scholte  
wrote:



Yes you're missing something.
If we keep it very simple: you can use properties to set the
configuration, but you can't use configuration to set a property.
I'm wondering why you're using Ant and not just making an Mojo.

Please check http://www.sonatype.com/books/**
mvnref-book/reference/writing-**plugins-sect-mojo-params.html

-Robert


On Mon, 16 Jan 2012 10:16:22 +0100, Maxime Carpentier <
carpentier@gmail.com> wrote:

 yes, but i'm not sure about my hello.mojos.xml  :


*Person.java :*

package my.test.maven;

public class Person {
/**
* @parameter expression="${cvs.name}"
*/
   private String name;
   public String getName() {
   return name;
   }
   public void setName(String name) {
   this.name= name;
   }
}

*hello.mojos.xml :*



 
   
 sayhi
 true
 sayhi-ant
 
   
 person
 person
 true
 ${person}
 my.test.maven.Person
   
 
   
 


and in my hello.build.xml :  outputs : Hello ${person} - ${person.name}
did i miss something ?

On Fri, Jan 13, 2012 at 9:21 PM, Robert Scholte  

>**wrote:

 have you tried to create a pojo called Person (with getters + setters  
for

firstName and lastName) in the same package as the mojo?
did you add something like this to the mojo

/**
* @parameter
*/
private Person person;


-Robert



On Fri, 13 Jan 2012 11:53:53 +0100, Maxime Carpentier <
carpentier@gmail.com> wrote:

 Hi,


I'm developping a new plugin using ant, guided by
http://maven.apache.org/guides/plugin/guide-ant-**
plugin-development.htmlhttp://maven.apache.org/guides/plugin/guide-ant-plugin-development.html>
>

.
In this tutorial you can see how to map parameter for your plugin,
declaring in your pom.xml :


 org.myproject.plugins
 hello-plugin
 1.0-SNAPSHOT


 
John
 


and in your xml mojo :


 name
 name
 true
 java.lang.String
 ...


but what i actually want to do is using complex objects, as described
here
:
http://maven.apache.org/guides/mini/guide-configuring-
plugins.html#Mapping_Complex_Objects
>



 
  Jason
  van Zyl
 


I've tried several possible configurations but no success...any idea
on how to do it ?
Thanxs,

Max



--**
--**-
To unsubscribe, e-mail:  
users-unsubscribe@maven.**apac**he.org


>

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



--**--**-
To unsubscribe, e-mail:  
users-unsubscribe@maven.**apache.org

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



---

Skipping the TAR packaging step

2012-01-17 Thread jackett_dad
Hello,

I'm working on a large project that takes time to compile.  I would like to
instruct Maven to only build the jar file, but after the build I have a tar,
tar.bz2, and a zip file.  I am brand new to Maven, but have converted a
project to use Maven for the compilation of all component modules.  In
general, I want to indicate to Maven to only create me a jar with all
dependencies rolled into that jar, and nothing else.  This can be for a
particular profile, one for specific for development.  The wait is too long
when I make a small change.

So I have a parent pom that is the kind that aggregates all sub-modules.  In
any given module that I want to generate an executable jar for, I have a
section that looks like this:




maven-assembly-plugin
${maven.assembly.plugin.version}



   
../config/maven/single-jar-assembly.xml



com.company.MainClass







The assembly starts like this:

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

jar

false

I don't have any concept of a profile right now, but I want right now to
simply suppress the creation of all the extra build artifacts.  Is there a
way to do that?  

Sorry if it's been asked before, but I have either not found it, or when I
did find it, I didn't understand what needed to be done.  I barely eked out
the assembly.xml that I did create.

Thanks for any help you can provide,

Scott

--
View this message in context: 
http://maven.40175.n5.nabble.com/Skipping-the-TAR-packaging-step-tp5152958p5152958.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: Committing non-POM files during release:prepare?

2012-01-17 Thread Stephen Connolly
sorry yeah, completion goals is for after starting the next version.

you can do the same trick in preparation goals though

- Stephen

---
Sent from my Android phone, so random spelling mistakes, random nonsense
words and other nonsense are a direct result of using swype to type on the
screen
On 17 Jan 2012 18:36, "Andrew Todd"  wrote:

> Thanks, I somehow missed completionGoals before.
>
> However, it doesn't really seem to do what's necessary. Looking at my
> build log, I can see that the source code is being tagged and
> committed before completionGoals runs.
>
> Not to mention that I'm not sure scm:add is the right command, since
> my .properties file already exists in the repository. Looking at
> scm:checkin.
>
> On Tue, Jan 17, 2012 at 9:55 AM, Stephen Connolly
>  wrote:
> > in
> >
> >
> http://maven.apache.org/plugins/maven-release-plugin/prepare-mojo.html#completionGoals
> >
> > invoke scm:add
> >
> > Though I am pretty sure all unmodified files which are already in SCM
> > get committed by default
> >
> > On 17 January 2012 14:47, Andrew Todd  wrote:
> >> I'm fairly certain the answer to the question below is "no," but I'm
> >> wondering if anyone can definitively say either way. Thanks.
> >>
> >> On Mon, Jan 9, 2012 at 3:02 PM, Andrew Todd 
> wrote:
> >>> Maven 2.2, release plugin.
> >>>
> >>> During the preparationGoals, I'm modifying a .properties file that
> >>> references the Maven project version. When the POM files get committed
> >>> to Subversion after the preparationGoals have completed, I need this
> >>> .properties file to get committed as well. Otherwise the
> >>> release:perform step will fail. Is this possible? Thanks.
> >>
> >> -
> >> 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: Committing non-POM files during release:prepare?

2012-01-17 Thread Andrew Todd
Thanks, I somehow missed completionGoals before.

However, it doesn't really seem to do what's necessary. Looking at my
build log, I can see that the source code is being tagged and
committed before completionGoals runs.

Not to mention that I'm not sure scm:add is the right command, since
my .properties file already exists in the repository. Looking at
scm:checkin.

On Tue, Jan 17, 2012 at 9:55 AM, Stephen Connolly
 wrote:
> in
>
> http://maven.apache.org/plugins/maven-release-plugin/prepare-mojo.html#completionGoals
>
> invoke scm:add
>
> Though I am pretty sure all unmodified files which are already in SCM
> get committed by default
>
> On 17 January 2012 14:47, Andrew Todd  wrote:
>> I'm fairly certain the answer to the question below is "no," but I'm
>> wondering if anyone can definitively say either way. Thanks.
>>
>> On Mon, Jan 9, 2012 at 3:02 PM, Andrew Todd  wrote:
>>> Maven 2.2, release plugin.
>>>
>>> During the preparationGoals, I'm modifying a .properties file that
>>> references the Maven project version. When the POM files get committed
>>> to Subversion after the preparationGoals have completed, I need this
>>> .properties file to get committed as well. Otherwise the
>>> release:perform step will fail. Is this possible? Thanks.
>>
>> -
>> 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: MVN Site doesn't bring Project Modules structure properly

2012-01-17 Thread Daivish Shah
Thanks Benson !!!

This is what i was looking for. I made following entry and it's working all
right now... Thx again.



org.apache.maven.plugins
maven-site-plugin
3.0



org.apache.maven.plugins

maven-project-info-reports-plugin
2.4


org.apache.maven.plugins
maven-javadoc-plugin
2.8







On Mon, Jan 16, 2012 at 2:55 PM, Benson Margulies wrote:

> you list the javadoc plugin as a reporting plugin, either in
>  or in the config of the site plugin.
>
> On Mon, Jan 16, 2012 at 5:50 PM, Daivish Shah 
> wrote:
> > Yes i know there is a plugin for java doc.
> >
> > But i am looking how to integrate JAVADOC with maven site ? I mean on
> MAVEN
> > generated site i want to provide JAVA DOC link how can i do that  ?
> >
> > Thanks.
> >
> >
> >
> > On Mon, Jan 16, 2012 at 2:28 PM, Dennis Lundberg 
> wrote:
> >
> >> That'd be the Javadoc Plugin:
> >>
> >> http://maven.apache.org/plugins/maven-javadoc-plugin/
> >>
> >> On 2012-01-16 22:36, Daivish Shah wrote:
> >> > Thanks Dennis for your quick reply on this...
> >> >
> >> >
> >> > And how to associate JAVADOC with this MVN submodule project ? As all
> >> > submodules has JAVADOC and i want to associate those with MVN SITE,
> How
> >> can
> >> > i do that ?
> >> >
> >> > Thanks.
> >> >
> >> > On Mon, Jan 16, 2012 at 12:18 PM, Dennis Lundberg  >> >wrote:
> >> >
> >> >>
> >> >>
> >>
> http://maven.apache.org/plugins/maven-site-plugin/faq.html#Why_dont_the_links_between_parent_and_child_modules_work_when_I_run_mvn_site
> >> >>
> >> >> On 2012-01-16 21:04, Daivish Shah wrote:
> >> >>> I have project like this.
> >> >>>
> >> >>> MainProject
> >> >>>
> >> >>>   SubProject1
> >> >>>
> >> >>>  ---  SubProject2
> >> >>>
> >> >>>    SubProject3
> >> >>>
> >> >>>
> >> >>> And i am trying to execute MVN SITE command. I am able to setup all
> >> other
> >> >>> section in Project Information Section.
> >> >>>
> >> >>> All sub module's POM.XML have SubProject1 entry for this, that's
> why i
> >> am
> >> >>> able to see that module name in Project Modules Section.
> >> >>>
> >> >>> But when i am trying to click the submodule link it's looking for
> HTML
> >> >> file
> >> >>> under PARENT PROJECT so something like this.
> >> >>>
> >> >>> MainProject/target/site/SubModule1/index.html
> >> >>>
> >> >>> Actually that location i don't find anything. So what is the correct
> >> >>> approach for MultiModule structure SITE creating ?
> >> >>> Looking for some good multi module(SITE) material or website to
> read on
> >> >>> this and which can fix my issue. Or if you have guys have any
> POM.XML
> >> to
> >> >>> use it please post it here.
> >> >>>
> >> >>
> >> >>
> >> >> --
> >> >> Dennis Lundberg
> >> >>
> >> >> -
> >> >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> >> >> For additional commands, e-mail: users-h...@maven.apache.org
> >> >>
> >> >>
> >> >
> >>
> >>
> >> --
> >> Dennis Lundberg
> >>
> >> -
> >> 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
>
>


Google-docs -> site plugin

2012-01-17 Thread Benson Margulies
Has anyone thought about how to get a google doc into a format usable
in a maven site? The download choices are rather lame: html, open
office, ms word, and then images.

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



Re: Disabling resolving test scoped dependencies when tests are skipped via maven.test.skip system property

2012-01-17 Thread Benson Margulies
I'd move the 'special' tests to their own project.

On Tue, Jan 17, 2012 at 11:17 AM, Stevo Slavić  wrote:
> OK, thanks for explaining! A module's tests are supposed to be run only by
> part of the team. For others not even test dependencies are accessible, so
> just disabling compiling and executing tests was not enough. Resolved this
> with a profile and putting dependencies of those tests there.
>
> Kind regards,
> Stevo.
>
> On Tue, Jan 17, 2012 at 5:06 PM, Olivier Lamy  wrote:
>
>> Hello,
>>
>> 2012/1/17 Stevo Slavić :
>> > Hello Maven community,
>> >
>> > Why does Maven (3.0.3) resolve test scoped dependencies when tests
>> > compilation and execution is skipped via maven.test.skip system property?
>>
>> That's something will happen with all maven 2.x or 3.x versions.
>> Why because maven use something generic which is kind of plugin
>> "metadata" which contains the dependencies "level/scope" needed.
>> So at this stage when resolving dependencies for the plugin, maven
>> core doesn't have any idea on any skip or other plugin parameters or
>> what the plugin does.
>>
>> How does it work.
>> See source
>> http://svn.apache.org/repos/asf/maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
>>
>> You will see an annotation @requiresDependencyResolution test (this
>> the "metadata).
>> So maven core only knows he need to resolve dependencies even if the
>> mojo have a skip or a shutdownMachine :-) parameter
>>
>> >
>> > I'm trying to achieve this by defining a profile with all test scope
>> > dependencies declared in it only. Profile is activated when
>> maven.test.skip
>> > system property is not defined. Would be more precise if I could specify
>> > activation to be when that property is not defined or is set to false but
>> > that doesn't seem to be possible (no compound expressions in single
>> > property, no multiple properties in single activation) or am I missing
>> > something?
>> >
>> > Kind regards,
>> > Stevo.
>>
>>
>>
>> --
>> 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



Re: Disabling resolving test scoped dependencies when tests are skipped via maven.test.skip system property

2012-01-17 Thread Stevo Slavić
OK, thanks for explaining! A module's tests are supposed to be run only by
part of the team. For others not even test dependencies are accessible, so
just disabling compiling and executing tests was not enough. Resolved this
with a profile and putting dependencies of those tests there.

Kind regards,
Stevo.

On Tue, Jan 17, 2012 at 5:06 PM, Olivier Lamy  wrote:

> Hello,
>
> 2012/1/17 Stevo Slavić :
> > Hello Maven community,
> >
> > Why does Maven (3.0.3) resolve test scoped dependencies when tests
> > compilation and execution is skipped via maven.test.skip system property?
>
> That's something will happen with all maven 2.x or 3.x versions.
> Why because maven use something generic which is kind of plugin
> "metadata" which contains the dependencies "level/scope" needed.
> So at this stage when resolving dependencies for the plugin, maven
> core doesn't have any idea on any skip or other plugin parameters or
> what the plugin does.
>
> How does it work.
> See source
> http://svn.apache.org/repos/asf/maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
>
> You will see an annotation @requiresDependencyResolution test (this
> the "metadata).
> So maven core only knows he need to resolve dependencies even if the
> mojo have a skip or a shutdownMachine :-) parameter
>
> >
> > I'm trying to achieve this by defining a profile with all test scope
> > dependencies declared in it only. Profile is activated when
> maven.test.skip
> > system property is not defined. Would be more precise if I could specify
> > activation to be when that property is not defined or is set to false but
> > that doesn't seem to be possible (no compound expressions in single
> > property, no multiple properties in single activation) or am I missing
> > something?
> >
> > Kind regards,
> > Stevo.
>
>
>
> --
> 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: Disabling resolving test scoped dependencies when tests are skipped via maven.test.skip system property

2012-01-17 Thread Olivier Lamy
Hello,

2012/1/17 Stevo Slavić :
> Hello Maven community,
>
> Why does Maven (3.0.3) resolve test scoped dependencies when tests
> compilation and execution is skipped via maven.test.skip system property?

That's something will happen with all maven 2.x or 3.x versions.
Why because maven use something generic which is kind of plugin
"metadata" which contains the dependencies "level/scope" needed.
So at this stage when resolving dependencies for the plugin, maven
core doesn't have any idea on any skip or other plugin parameters or
what the plugin does.

How does it work.
See source 
http://svn.apache.org/repos/asf/maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java

You will see an annotation @requiresDependencyResolution test (this
the "metadata).
So maven core only knows he need to resolve dependencies even if the
mojo have a skip or a shutdownMachine :-) parameter

>
> I'm trying to achieve this by defining a profile with all test scope
> dependencies declared in it only. Profile is activated when maven.test.skip
> system property is not defined. Would be more precise if I could specify
> activation to be when that property is not defined or is set to false but
> that doesn't seem to be possible (no compound expressions in single
> property, no multiple properties in single activation) or am I missing
> something?
>
> Kind regards,
> Stevo.



-- 
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: Disabling resolving test scoped dependencies when tests are skipped via maven.test.skip system property

2012-01-17 Thread Wayne Fay
> Why does Maven (3.0.3) resolve test scoped dependencies when tests
> compilation and execution is skipped via maven.test.skip system property?

The maven.test.skip system property is apparently not utilized by the
plugin(s) responsible for resolving dependencies early in the build.
Whether or not you regard this as a bug would depend on your
interpretation of things, I suppose.

> system property is not defined. Would be more precise if I could specify
> activation to be when that property is not defined or is set to false but
> that doesn't seem to be possible (no compound expressions in single

You may need to brush up on profile activation, specifically the bang
expression, here in section 5.3.2:
http://www.sonatype.com/books/mvnref-book/reference/profiles-sect-activation.html

What are you actually trying to achieve, and for what purpose?

Wayne

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



Re: Committing non-POM files during release:prepare?

2012-01-17 Thread Stephen Connolly
in

http://maven.apache.org/plugins/maven-release-plugin/prepare-mojo.html#completionGoals

invoke scm:add

Though I am pretty sure all unmodified files which are already in SCM
get committed by default

On 17 January 2012 14:47, Andrew Todd  wrote:
> I'm fairly certain the answer to the question below is "no," but I'm
> wondering if anyone can definitively say either way. Thanks.
>
> On Mon, Jan 9, 2012 at 3:02 PM, Andrew Todd  wrote:
>> Maven 2.2, release plugin.
>>
>> During the preparationGoals, I'm modifying a .properties file that
>> references the Maven project version. When the POM files get committed
>> to Subversion after the preparationGoals have completed, I need this
>> .properties file to get committed as well. Otherwise the
>> release:perform step will fail. Is this possible? Thanks.
>
> -
> 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: Committing non-POM files during release:prepare?

2012-01-17 Thread Andrew Todd
I'm fairly certain the answer to the question below is "no," but I'm
wondering if anyone can definitively say either way. Thanks.

On Mon, Jan 9, 2012 at 3:02 PM, Andrew Todd  wrote:
> Maven 2.2, release plugin.
>
> During the preparationGoals, I'm modifying a .properties file that
> references the Maven project version. When the POM files get committed
> to Subversion after the preparationGoals have completed, I need this
> .properties file to get committed as well. Otherwise the
> release:perform step will fail. Is this possible? Thanks.

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



Re: maven-plugin-tools-ant custom parameter

2012-01-17 Thread Maxime Carpentier
Thanxs Robert, but i still don't get it

i'm just replacing my String object (which works fine) by a Person object
so instead of having in my project's pom :

John 
i have :
Jason

Doesn't it work this way ? :
plugin mojo.xml : declaring properties used in build.xml
plugin build.xml : executed part, using properties declared in mojo.xml and
valued in project's pom
project pom : defining properties value

In a more simple exemple, how to use a List instead of a String parameter ?

i'm using maven-plugin-tools-ant because i'd like use an already existing
build.xml file...

Thanxs for your help,
Max

On Mon, Jan 16, 2012 at 6:29 PM, Robert Scholte wrote:

> Yes you're missing something.
> If we keep it very simple: you can use properties to set the
> configuration, but you can't use configuration to set a property.
> I'm wondering why you're using Ant and not just making an Mojo.
>
> Please check http://www.sonatype.com/books/**
> mvnref-book/reference/writing-**plugins-sect-mojo-params.html
>
> -Robert
>
>
> On Mon, 16 Jan 2012 10:16:22 +0100, Maxime Carpentier <
> carpentier@gmail.com> wrote:
>
>  yes, but i'm not sure about my hello.mojos.xml  :
>>
>> *Person.java :*
>>
>> package my.test.maven;
>>
>> public class Person {
>> /**
>> * @parameter expression="${cvs.name}"
>> */
>>private String name;
>>public String getName() {
>>return name;
>>}
>>public void setName(String name) {
>>this.name= name;
>>}
>> }
>>
>> *hello.mojos.xml :*
>>
>>
>> 
>>  
>>
>>  sayhi
>>  true
>>  sayhi-ant
>>  
>>
>>  person
>>  person
>>  true
>>  ${person}
>>  my.test.maven.Person
>>
>>  
>>
>>  
>> 
>>
>> and in my hello.build.xml :  outputs : Hello ${person} - ${person.name}
>> did i miss something ?
>>
>> On Fri, Jan 13, 2012 at 9:21 PM, Robert Scholte > >**wrote:
>>
>>  have you tried to create a pojo called Person (with getters + setters for
>>> firstName and lastName) in the same package as the mojo?
>>> did you add something like this to the mojo
>>>
>>> /**
>>> * @parameter
>>> */
>>> private Person person;
>>>
>>>
>>> -Robert
>>>
>>>
>>>
>>> On Fri, 13 Jan 2012 11:53:53 +0100, Maxime Carpentier <
>>> carpentier@gmail.com> wrote:
>>>
>>>  Hi,
>>>
 I'm developping a new plugin using ant, guided by
 http://maven.apache.org/guides/plugin/guide-ant-**
 plugin-development.html>>> plugin/guide-ant-plugin-**development.html
 >

 .
 In this tutorial you can see how to map parameter for your plugin,
 declaring in your pom.xml :

 
  org.myproject.plugins
  hello-plugin
  1.0-SNAPSHOT


  
 John
  
 

 and in your xml mojo :

 
  name
  name
  true
  java.lang.String
  ...
 

 but what i actually want to do is using complex objects, as described
 here
 :
 http://maven.apache.org/guides/mini/guide-configuring-
 plugins.html#Mapping_Complex_Objects
 >


 
  
   Jason
   van Zyl
  
 

 I've tried several possible configurations but no success...any idea
 on how to do it ?
 Thanxs,

 Max


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


Disabling resolving test scoped dependencies when tests are skipped via maven.test.skip system property

2012-01-17 Thread Stevo Slavić
Hello Maven community,

Why does Maven (3.0.3) resolve test scoped dependencies when tests
compilation and execution is skipped via maven.test.skip system property?

I'm trying to achieve this by defining a profile with all test scope
dependencies declared in it only. Profile is activated when maven.test.skip
system property is not defined. Would be more precise if I could specify
activation to be when that property is not defined or is set to false but
that doesn't seem to be possible (no compound expressions in single
property, no multiple properties in single activation) or am I missing
something?

Kind regards,
Stevo.