Re: Release plugin and updating a release with some fixes

2010-04-30 Thread Tim O'Brien
mvn versions:set -DnewVersion=1.1-SNAPSHOT



On Fri, Apr 30, 2010 at 9:07 AM, Jan Torben Heuer
 wrote:
> Wendy Smoak wrote:
>
>> If you find you need to make a fix, then you can branch from the tag
>> -- in your case the version number on your branch might be
>> 1.5.1-SNAPSHOT.
>
> How do I create a branch from a tag?
> I have a:
> 2.0-SNAPSHOT (current /trunk/)
> 1.0 /tags/1.0/
>
> and I want to have a /branch/1.1-SNAPSHOT.
> It is a a multi module project so version numbers must be changed.
>
> Jan
> --
> From address is valid until 01.06.2010
>
> -
> 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: Release Plugin and local working copy changes

2010-04-29 Thread Tim O'Brien
I just tested this with mvn 2.2.1 + 2.0-beta-9.   It refused to run
release:prepare with the following error message:

[INFO] Cannot prepare the release because you have local modifications :
[pom.xml:modified]

What version of the release plugin are you using?



On Wed, Apr 28, 2010 at 8:35 PM, Mark Derricutt  wrote:
> Hi all,
>
> I was discussing last night with some friends about problems they've
> had lately with the release plugin, it seems that the plugin is no
> longer checking for modified files in the working copy and aborting
> the release:prepare process ( against a subversion repository ).  I've
> not had a chance to try and reproduce it myself, does anyone know if
> anything changed in this regard lately?
>
> Mark
>
>
> --
> Pull me down under...
>
> -
> 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: maven inheritance for multiple build executions

2010-04-26 Thread Tim O'Brien
On Mon, Apr 26, 2010 at 8:39 AM, Marshall Schor  wrote:
> My use case:
>
> I'm running the maven docbkx plugin to produce both pdf and html outputs
> from multiple docbook sources.
>
> The docbkx plugin says to use two executions (with ids, for instance, of
> "html" and "pdf", one for each of the outputs).
>
> I would like to reuse this setup 4 times in my builds, because I have 4
> "books" to process in this project.
>
> I'm trying to factor out common configuration for these, into a
> pluginManagement element, having 2 configurations with those ids of
> "html" and "pdf".
>
> I understand that the configuration merging is done by matching "ids".
> My trouble is that when I now try to write my 8 executions (2 per book),
> I have to write 8 unique "ids", which can't match up with the 2 ids in
> the pluginManagement.
>
> Is there a maven best practice for how to factor this?
>
> I know the one "solution" of splitting up the 4 docbooks into 4 separate
> projects, but I'm looking for another solution since I would rather not
> split these up.
>

One solution would be to separate content from rendering.   I have
books that need to be packaged into a different formats.   Each book
is rendered as a PDF, HTML, and as an eclipse book.   In addition to
these formats, a book may need to be rendered in a reduced format for
a special print, and each book needs to be published to Scribd, Lulu,
etc.

I reached a point with docbkx where I was frustrated with having to
deal with a massively customized lifecycle in one central "book"
project.Instead of dealing with 8 executions, I have a content
project that installs docbook source as a JAR in the local repo.
Other projects in the multimodule project then declare the source as a
dependency and process the docbook accordingly.   See here:
http://github.com/sonatype/nexus-book/

While it is substantially more complex than what you are doing, you
might find that the separation allows you to avoid having to define 8
plugin execution ids.   Or, you might be able to fiddle around with
project hierarchy once you've moved away from the "massive, monolithic
docbkx project" approach.

> -Marshall
>
> -
> 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: How to add jar file into a Maven 2 environment?

2010-04-22 Thread Tim O'Brien
Vernon,

A bunch of us monitor the User mailing list referenced here:
http://nexus.sonatype.org/project-information.html

You can join it by sending an email here: nexus-user-subscr...@sonatype.org

And the archive is here:
http://nexus.sonatype.org/mailing-list-user-archives.html

2010/4/22 Vernon :
> Thanks very much Tim for your very helpful information.
>
> I get the Nexus up. Where is a place to ask Nexus usage questions?
>
>
> 
>> 1. Install Nexus like this: http://www.youtube.com/watch?v=bLskAeXivPg
>>
>> 2. Drop this into your ~/.m2/settings.xml
>> http://www.sonatype.com/books/nexus-book/reference/maven-sect-single-group.html
>>
>> 3. Login into Nexus with admin/admin123, click on the 3rd party
>> repository and upload your artifacts, here's the relevant section:
>>
>> http://www.sonatype.com/books/nexus-book/reference/using-sect-uploading-artifacts.html
>>
>> 2010/4/22 Vernon :
>>> Thanks for the information.
>>>
>>> How long it will take me to read through the book and set up an internal
>>> Maven proxy server?
>>>
>>> In a non-Maven environment, we can add those jar files in a minutes. Of
>>> course, the downside will be a potential version issues.
>>>
>>>
>>> 
 Here's a good book on the topic:
 http://www.sonatype.com/books/nexus-book/reference/

 2010/4/22 Vernon :
> Thanks a lot for your information.
>
> Where I can find a documentation on the subject (an internal Maven
> proxy
> server)? I have a look at the maven documentation under the user
> center
> and haven't find any useful information yet.
>
>
> 
>> Right if its not in a public Maven repository you have to add it to
>> yours.  Ideally you will have an internal Maven proxy server such as
>> Artifactory/Nexus where you can deploy it once and all can get it
>> from
>> there.
>>
>> (Regarding iText 5.x the reason that's not in a public maven is the
>> license has changed greatly starting with this version.)
>>
>> -Dave
>>
>> 2010/4/20 Vernon :
>>>
>>> We need to add PayPal Java library files into our Maven development
>>> environment. PayPal doesn't make any Maven artifact ID. What is a
>>> right
>>> way of adding a jar file?
>>>
>>> And one more related question: shall we add jar file by ourselves
>>> for
>>> a
>>> new version of jar file? For example, the current version of iText
>>> is
>>> 5.0.x and the highest version with Maven artifact ID is 2.7.x.
>>>
>>> Thanks very much in advance.
>>>
>>>
>>>
>>>
>>>
>>> -
>>> 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
>>
>>
>> 
>> Spam/Virus scanning by CanIt Pro
>>
>> For more information see
>> http://www.kgbinternet.com/SpamFilter.htm
>>
>> To control your spam filter, log in at
>> http://filter.kgbinternet.com
>>
>
>
> --
> 蒲公英 http://www.pu-gong-ying.info - 您的社区信息服务网站
>
> 新闻门户 -
> 容易、快速地浏览来自世界各地主要新闻机构的超过4000个新闻条目。
> 社会新闻 - 与他人分享您的故事。
> 服务指南 - 寻找或评论的吃喝、购物、游玩地方。
> 分类广告 - 张贴和浏览当地的分类广告。
>
>
>
> -
> 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


 
 Spam/Virus scanning by CanIt Pro

 For more information see
 http://www.kgbinternet.com/SpamFilter.htm

 To control your spam filter, log in at
 http://filter.kgbinternet.com

>>>
>>>
>>> --
>>> 蒲公英 http://www.pu-gong-ying.info - 您的社区信息服务网站
>>>
>>> 新闻门户 -
>>> 容易、快速地浏览来自世界各地主要新闻机构的超过4000个新闻条目。
>>> 社会新闻 - 与他人分享您的故事。
>>> 服务指南 - 寻找或评论的吃喝、购物、游玩地方。
>>> 分类广告 - 张贴和浏览当地的分类广告。
>>>
>>>
>>>
>>> -
>>> 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
>>
>>
>> 
>> Spam/Virus scanning by CanIt Pro
>>
>> For more information see
>> http://www.kgbintern

Re: How to add jar file into a Maven 2 environment?

2010-04-22 Thread Tim O'Brien
1. Install Nexus like this: http://www.youtube.com/watch?v=bLskAeXivPg

2. Drop this into your ~/.m2/settings.xml
http://www.sonatype.com/books/nexus-book/reference/maven-sect-single-group.html

3. Login into Nexus with admin/admin123, click on the 3rd party
repository and upload your artifacts, here's the relevant section:

http://www.sonatype.com/books/nexus-book/reference/using-sect-uploading-artifacts.html

2010/4/22 Vernon :
> Thanks for the information.
>
> How long it will take me to read through the book and set up an internal
> Maven proxy server?
>
> In a non-Maven environment, we can add those jar files in a minutes. Of
> course, the downside will be a potential version issues.
>
>
> 
>> Here's a good book on the topic:
>> http://www.sonatype.com/books/nexus-book/reference/
>>
>> 2010/4/22 Vernon :
>>> Thanks a lot for your information.
>>>
>>> Where I can find a documentation on the subject (an internal Maven proxy
>>> server)? I have a look at the maven documentation under the user center
>>> and haven't find any useful information yet.
>>>
>>>
>>> 
 Right if its not in a public Maven repository you have to add it to
 yours.  Ideally you will have an internal Maven proxy server such as
 Artifactory/Nexus where you can deploy it once and all can get it from
 there.

 (Regarding iText 5.x the reason that's not in a public maven is the
 license has changed greatly starting with this version.)

 -Dave

 2010/4/20 Vernon :
>
> We need to add PayPal Java library files into our Maven development
> environment. PayPal doesn't make any Maven artifact ID. What is a
> right
> way of adding a jar file?
>
> And one more related question: shall we add jar file by ourselves for
> a
> new version of jar file? For example, the current version of iText is
> 5.0.x and the highest version with Maven artifact ID is 2.7.x.
>
> Thanks very much in advance.
>
>
>
>
>
> -
> 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


 
 Spam/Virus scanning by CanIt Pro

 For more information see
 http://www.kgbinternet.com/SpamFilter.htm

 To control your spam filter, log in at
 http://filter.kgbinternet.com

>>>
>>>
>>> --
>>> 蒲公英 http://www.pu-gong-ying.info - 您的社区信息服务网站
>>>
>>> 新闻门户 -
>>> 容易、快速地浏览来自世界各地主要新闻机构的超过4000个新闻条目。
>>> 社会新闻 - 与他人分享您的故事。
>>> 服务指南 - 寻找或评论的吃喝、购物、游玩地方。
>>> 分类广告 - 张贴和浏览当地的分类广告。
>>>
>>>
>>>
>>> -
>>> 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
>>
>>
>> 
>> Spam/Virus scanning by CanIt Pro
>>
>> For more information see
>> http://www.kgbinternet.com/SpamFilter.htm
>>
>> To control your spam filter, log in at
>> http://filter.kgbinternet.com
>>
>
>
> --
> 蒲公英 http://www.pu-gong-ying.info - 您的社区信息服务网站
>
> 新闻门户 - 容易、快速地浏览来自世界各地主要新闻机构的超过4000个新闻条目。
> 社会新闻 - 与他人分享您的故事。
> 服务指南 - 寻找或评论的吃喝、购物、游玩地方。
> 分类广告 - 张贴和浏览当地的分类广告。
>
>
>
> -
> 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: How to add jar file into a Maven 2 environment?

2010-04-22 Thread Tim O'Brien
Here's a good book on the topic:
http://www.sonatype.com/books/nexus-book/reference/

2010/4/22 Vernon :
> Thanks a lot for your information.
>
> Where I can find a documentation on the subject (an internal Maven proxy
> server)? I have a look at the maven documentation under the user center
> and haven't find any useful information yet.
>
>
> 
>> Right if its not in a public Maven repository you have to add it to
>> yours.  Ideally you will have an internal Maven proxy server such as
>> Artifactory/Nexus where you can deploy it once and all can get it from
>> there.
>>
>> (Regarding iText 5.x the reason that's not in a public maven is the
>> license has changed greatly starting with this version.)
>>
>> -Dave
>>
>> 2010/4/20 Vernon :
>>>
>>> We need to add PayPal Java library files into our Maven development
>>> environment. PayPal doesn't make any Maven artifact ID. What is a right
>>> way of adding a jar file?
>>>
>>> And one more related question: shall we add jar file by ourselves for a
>>> new version of jar file? For example, the current version of iText is
>>> 5.0.x and the highest version with Maven artifact ID is 2.7.x.
>>>
>>> Thanks very much in advance.
>>>
>>>
>>>
>>>
>>>
>>> -
>>> 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
>>
>>
>> 
>> Spam/Virus scanning by CanIt Pro
>>
>> For more information see
>> http://www.kgbinternet.com/SpamFilter.htm
>>
>> To control your spam filter, log in at
>> http://filter.kgbinternet.com
>>
>
>
> --
> 蒲公英 http://www.pu-gong-ying.info - 您的社区信息服务网站
>
> 新闻门户 - 容易、快速地浏览来自世界各地主要新闻机构的超过4000个新闻条目。
> 社会新闻 - 与他人分享您的故事。
> 服务指南 - 寻找或评论的吃喝、购物、游玩地方。
> 分类广告 - 张贴和浏览当地的分类广告。
>
>
>
> -
> 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: Some problems with Archetype Plugin

2010-04-22 Thread Tim O'Brien
Use archetype:create instead of archetype:generate

See here: 
http://maven.apache.org/archetype/maven-archetype-plugin/create-mojo.html

Tim

On Thu, Apr 22, 2010 at 11:11 AM, Aleksey Didik
 wrote:
> Thanks a lot, Tim.
> Archetype can be found now, but Maven still try to get archetype catalog
> from central and print connection fail error to console (we have a proxy).
> Is it possible to prevent looking for catalog? I needn't to choose
> archetype, I'm already know what I need.
>
> Best regards,
> Aleksey.
>
> 22.04.2010 19:49, Tim O'Brien пишет:
>>
>> Ok, got it, you'll need to specify the archetype repository.    Pass
>> in a -DarchetypeRepository=  that will likely point to your
>> internal repository group.
>>
>> Here's a blog post I wrote ages ago, for Alfresco archetypes which
>> uses this option: http://bit.ly/8YtLOh
>>
>> On Thu, Apr 22, 2010 at 9:58 AM, Aleksey Didik
>>   wrote:
>>
>>>
>>> Thanks for response, Tim.
>>>
>>> Yes, sure, it's my own archetype. I created it and deployed to our
>>> company
>>> Nexus.
>>> Mirror is defined too. It can't be in central, because it's for internal
>>> company usage only.
>>> Question is how to generate project from this archetype in this case in
>>> linking with problems, defined below.
>>>
>>> Aleksey.
>>>
>>>
>>>
>>> 22.04.2010 18:46, Tim O'Brien пишет:
>>>
>>>>
>>>> There is no archetype in Central with the artifactId
>>>> "magenta-basic-project"
>>>>
>>>> Maybe you are trying to use an internal artifact?   You email is from
>>>> "magenta-technology.ru", and you are attempting to reference a
>>>> "com.magenta" groupId.   I'd suggest contacting others in your
>>>> development group to find out what you should put in your
>>>> ~/.m2/settings.xml.    If you are using a repository manager, then you
>>>> will need to define a mirror in your settings.xml.
>>>>
>>>> Tim
>>>>
>>>> On Thu, Apr 22, 2010 at 4:19 AM, Aleksey Didik
>>>>     wrote:
>>>>
>>>>
>>>>>
>>>>> Hello all,
>>>>>
>>>>> I create my own archetype and deploy it to my company repository (Nexus
>>>>> 1.5).
>>>>> Now some developers try to use my archetype by calling:
>>>>> mvn archetype:generate -DarchetypeGroupId=com.magenta.maven.archetypes
>>>>> -DarchetypeArtifactId=magenta-basic-project
>>>>> -DarchetypeVersion=0.1-SNAPSHOT
>>>>>
>>>>> Archetype plugin failed with unavailability to connect to central repo
>>>>> and
>>>>> said me: [WARNING] No archetype found in Remote catalog. Defaulting to
>>>>> internal Catalog.
>>>>>
>>>>> We use proxy server, and it's ok that archetype plugin can't get
>>>>> central
>>>>> catalog.
>>>>> My archetype is not registered in internal archetype-plugin catalog
>>>>> (it's
>>>>> predefined).
>>>>> And my archetype is not registered in local repository catalog, because
>>>>> it
>>>>> was installed on another developer computer.
>>>>> So, archetype plugin can't find my plugin in any available catalog on a
>>>>> developer computer.
>>>>>
>>>>> So my question is: Is archetype-plugin really need to have information
>>>>> about
>>>>> archetype in archetype catalog to generate project from it???
>>>>> And -DarchetypeGroupId=com.magenta.maven.archetypes
>>>>> -DarchetypeArtifactId=magenta-basic-project
>>>>> -DarchetypeVersion=0.1-SNAPSHOT
>>>>> is not enough???
>>>>> Just before I think, that plugin just looking  for archetype in
>>>>> repositories
>>>>> like any another artifact.
>>>>>
>>>>> Please, solve my doubt.
>>>>>
>>>>> Best regards,
>>>>> Aleksey Didik.
>>>>>
>>>>> P.S. Looks like I need to use nexus archetype plugin to create my nexus
>>>>> archetype catalog and define it usage on a 'generate' goal.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> -
>>>>> 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
>>>
>>>
>>>
>>
>> -
>> 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: Some problems with Archetype Plugin

2010-04-22 Thread Tim O'Brien
Ok, got it, you'll need to specify the archetype repository.Pass
in a -DarchetypeRepository= that will likely point to your
internal repository group.

Here's a blog post I wrote ages ago, for Alfresco archetypes which
uses this option: http://bit.ly/8YtLOh

On Thu, Apr 22, 2010 at 9:58 AM, Aleksey Didik
 wrote:
> Thanks for response, Tim.
>
> Yes, sure, it's my own archetype. I created it and deployed to our company
> Nexus.
> Mirror is defined too. It can't be in central, because it's for internal
> company usage only.
> Question is how to generate project from this archetype in this case in
> linking with problems, defined below.
>
> Aleksey.
>
>
>
> 22.04.2010 18:46, Tim O'Brien пишет:
>>
>> There is no archetype in Central with the artifactId
>> "magenta-basic-project"
>>
>> Maybe you are trying to use an internal artifact?   You email is from
>> "magenta-technology.ru", and you are attempting to reference a
>> "com.magenta" groupId.   I'd suggest contacting others in your
>> development group to find out what you should put in your
>> ~/.m2/settings.xml.    If you are using a repository manager, then you
>> will need to define a mirror in your settings.xml.
>>
>> Tim
>>
>> On Thu, Apr 22, 2010 at 4:19 AM, Aleksey Didik
>>   wrote:
>>
>>>
>>> Hello all,
>>>
>>> I create my own archetype and deploy it to my company repository (Nexus
>>> 1.5).
>>> Now some developers try to use my archetype by calling:
>>> mvn archetype:generate -DarchetypeGroupId=com.magenta.maven.archetypes
>>> -DarchetypeArtifactId=magenta-basic-project
>>> -DarchetypeVersion=0.1-SNAPSHOT
>>>
>>> Archetype plugin failed with unavailability to connect to central repo
>>> and
>>> said me: [WARNING] No archetype found in Remote catalog. Defaulting to
>>> internal Catalog.
>>>
>>> We use proxy server, and it's ok that archetype plugin can't get central
>>> catalog.
>>> My archetype is not registered in internal archetype-plugin catalog (it's
>>> predefined).
>>> And my archetype is not registered in local repository catalog, because
>>> it
>>> was installed on another developer computer.
>>> So, archetype plugin can't find my plugin in any available catalog on a
>>> developer computer.
>>>
>>> So my question is: Is archetype-plugin really need to have information
>>> about
>>> archetype in archetype catalog to generate project from it???
>>> And -DarchetypeGroupId=com.magenta.maven.archetypes
>>> -DarchetypeArtifactId=magenta-basic-project
>>> -DarchetypeVersion=0.1-SNAPSHOT
>>> is not enough???
>>> Just before I think, that plugin just looking  for archetype in
>>> repositories
>>> like any another artifact.
>>>
>>> Please, solve my doubt.
>>>
>>> Best regards,
>>> Aleksey Didik.
>>>
>>> P.S. Looks like I need to use nexus archetype plugin to create my nexus
>>> archetype catalog and define it usage on a 'generate' goal.
>>>
>>>
>>>
>>>
>>>
>>>
>>> -
>>> 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
>
>

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



Re: Some problems with Archetype Plugin

2010-04-22 Thread Tim O'Brien
There is no archetype in Central with the artifactId "magenta-basic-project"

Maybe you are trying to use an internal artifact?   You email is from
"magenta-technology.ru", and you are attempting to reference a
"com.magenta" groupId.   I'd suggest contacting others in your
development group to find out what you should put in your
~/.m2/settings.xml.If you are using a repository manager, then you
will need to define a mirror in your settings.xml.

Tim

On Thu, Apr 22, 2010 at 4:19 AM, Aleksey Didik
 wrote:
> Hello all,
>
> I create my own archetype and deploy it to my company repository (Nexus
> 1.5).
> Now some developers try to use my archetype by calling:
> mvn archetype:generate -DarchetypeGroupId=com.magenta.maven.archetypes
> -DarchetypeArtifactId=magenta-basic-project -DarchetypeVersion=0.1-SNAPSHOT
>
> Archetype plugin failed with unavailability to connect to central repo and
> said me: [WARNING] No archetype found in Remote catalog. Defaulting to
> internal Catalog.
>
> We use proxy server, and it's ok that archetype plugin can't get central
> catalog.
> My archetype is not registered in internal archetype-plugin catalog (it's
> predefined).
> And my archetype is not registered in local repository catalog, because it
> was installed on another developer computer.
> So, archetype plugin can't find my plugin in any available catalog on a
> developer computer.
>
> So my question is: Is archetype-plugin really need to have information about
> archetype in archetype catalog to generate project from it???
> And -DarchetypeGroupId=com.magenta.maven.archetypes
> -DarchetypeArtifactId=magenta-basic-project -DarchetypeVersion=0.1-SNAPSHOT
> is not enough???
> Just before I think, that plugin just looking  for archetype in repositories
> like any another artifact.
>
> Please, solve my doubt.
>
> Best regards,
> Aleksey Didik.
>
> P.S. Looks like I need to use nexus archetype plugin to create my nexus
> archetype catalog and define it usage on a 'generate' goal.
>
>
>
>
>
>
> -
> 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: maven-gae-plugin

2010-04-21 Thread Tim O'Brien
That's wonderful.   Do you have a question?

On Wed, Apr 21, 2010 at 5:32 AM, Manuel Grau  wrote:
> We have recently updated the plugin to use google app engine 1.3.2
>

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



Re: Compilation failure with Maven

2010-04-18 Thread Tim O'Brien
This is because of the space in your JAVA_HOME.   You should use
quotes, or use a a JAVA_HOME that truncates the "Program Files", like
this: set JAVA_HOME=c:\progra~1\java\jdk1.6.0_20

On Sun, Apr 18, 2010 at 12:09 PM, angisad  wrote:
>
> Hi,
> I am a newbie and I am trying to compile a code source that I've downloaded
> from the Internet.
> But I always get this message:
>
> [INFO] -
> [ERROR] BUILD FAILURE
> [INFO] -
> [INFO] Compilation failure
> Failure executing javac, but could not parse the error:
> 'C:\Program' n'est pas reconnu en tant que commande interne
> ou externe, un programme exécutable ou un fichier de commandes.
>
> ( 'C:\Program' is not recognizied as an internal command or external, an
> executable program or a commands file)
>
> I looked in some forums, they suggested to check Java_Home and Path. But
> they are both fine
> :-)
>
> JAVA_HOME=C:\Program Files\Java\jdk1.6.0_20
> Path=C:\Program Files\Java\jdk1.6.0_20\bin\
>
>
> Can anyone tell me what to do?
> Maven version 2.2.1
> --
> View this message in context: 
> http://old.nabble.com/Compilation-failure-with-Maven-tp28283585p28283585.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

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



Re: Using custom assembly descriptor from the command line

2010-04-16 Thread Tim O'Brien
You could configure the default command line execution.   The
following section provides an example with the Assembly plugin.   Use
the execution id "default-cli"

http://www.sonatype.com/books/mvnref-book/reference/configuring.html#d4e3735

Also, apologies for the assembly chapter, it needs some work.

On Fri, Apr 16, 2010 at 9:28 PM, leroybrownbpj  wrote:
>
> Hi,
>
> (...I apologize if this ends up being a duplicate post, but it seems like I
> screwed up the first one...)
>
> I have a project that I will be distributing as a package of source/poms etc
> (the 'project' id in assembly). There doesn't seem to be a way to customize
> the 'project' assembly descriptor to exclude some files I need to from the
> client pom.xml, so I need to run a custom assembly descriptor but I've run
> into an issue.
>
> This descriptor will be used by many poms, and I do not want to include it
> in my distribution. I've been following the directions in pages 252-255 of
> the Sonatype/O'Reilly "Maven: The Definitive guide" first edition paper back
> (this is maven 2.2) and I now have a custom descriptor installed such that I
> can use it when it is configured as a maven-assembly-plugin dependency, the
> appropriate assemblyId is specified as a descriptorRef in that pom and the
> assembly:single goal is attached to the package phase.
>
> How can I call the mvn assembly:assembly goal on a project from the command
> line, specifying this custom descriptor, without including references to it
> in a project's pom so that these project's builds will not fail when run by
> the recipients of my distribution? Generally, how do you use a custom
> assembly descriptor from the command line without adding it as an assembly
> plugin dependency to the target project's pom?
>
> Thank you.
> --
> View this message in context: 
> http://old.nabble.com/Using-custom-assembly-descriptor-from-the-command-line-tp28273687p28273687.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

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



Re: release:prepare ignores configuration in child of multi module project

2010-04-15 Thread Tim O'Brien
On Thu, Apr 15, 2010 at 9:06 AM, Raphael Ackermann
 wrote:
> Thanks for the answer.
>
> How could I have found out from the existing documentation on [1]
>

Right, you couldn't, that's why I had to go look at the ReleaseManager
source code to verify.   In general, the Release plugin is very
useful, but the documentation doesn't do it justice.   I sense that
the frustration quotient* for the Release Plugin is very high.

*Frustration Quotient is defined by ("promise of plugin" * "necessity
of plugin") / ("amount of sane documentation")

> It says Attributes:
>
> Requires a Maven 2.0 project to be executed.
> Executes as an aggregator plugin.
>
> Does the "Executes as an aggregator plugin" means that it will only
> take the root project into account? If so, that should be made clearer
> as this doesn't mean much to me".
>
> googling I found many plugins with this "Executes as an aggregator
> plugin." attribute, but I couldn't find information on what it means.


> There is also no reference to an "aggregator plugin" in the
> maven-by-example or maven-complete-reference pdf books.
>

I'll file a JIRA for those two books... there "WTF is an aggregator
plugin?" -> https://issues.sonatype.org/browse/MVNREF-144

> [1] http://maven.apache.org/plugins/maven-release-plugin/prepare-mojo.html
>
> Raphael
>
> On Thu, Apr 15, 2010 at 15:16, Tim O'Brien  wrote:
>> The DefaultReleaseManager is a part of the maven-release-manager, if
>> you look at the code in prepare(), you'll notice that it does not take
>> preparationGoals from anything other than the root project into
>> account.    If you are looking at DefaultReleaseManager.java from the
>> 2.0 branch the relevant line numbers are 203 and 199.
>>
>> So the answer is no, you can't customize in a submodule.   I'm sure,
>> with some effort you might be able to hack something into the
>> ReleasePhase logic, but there's no point.   Just configure the root
>> project with "clean install".
>>
>> Tim
>>
>> On Thu, Apr 15, 2010 at 4:28 AM, Raphael Ackermann
>>  wrote:
>>> if I have a project structure like below:
>>>
>>> project-root
>>> + --- project-a
>>> + --- project-b
>>> + --- project-c
>>>
>>> and in project-root I have
>>>
>>> 
>>>        maven-release-plugin
>>> 
>>>
>>> and in project-b I have
>>>
>>> 
>>>        maven-release-plugin
>>>        
>>>                clean install
>>>        
>>> 
>>>
>>> when I run mvn release:prepare   (mvn 2.2.1)  in the project-root directory
>>> I see
>>> [INFO] [INFO] Building project-b
>>> [INFO] [INFO]    task-segment: [clean, verify]
>>>
>>> and the build fails because project-c needs an artifact that gets
>>> generated in project-b's install phase.
>>>
>>> If I change the setup and add the configuration of the clean install
>>> preparation goals into the parent pom project-root
>>>
>>> 
>>>        maven-release-plugin
>>>        
>>>                clean install
>>>        
>>> 
>>>
>>> I can see the following output:
>>>
>>> [INFO] [INFO] Building project-b
>>> [INFO] [INFO]    task-segment: [clean, install]
>>>
>>> and the project builds successfully.
>>>
>>> I would like to only build one child module with clean install to save time.
>>>
>>> Does the release plugin ignore all configuration in child modules and
>>> only uses the configuration from the module where it is run from? Or
>>> do I need to add some other configuration?
>>>
>>> Raphael
>>>
>>> -
>>> 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
>
>

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



Re: release:prepare ignores configuration in child of multi module project

2010-04-15 Thread Tim O'Brien
The DefaultReleaseManager is a part of the maven-release-manager, if
you look at the code in prepare(), you'll notice that it does not take
preparationGoals from anything other than the root project into
account.If you are looking at DefaultReleaseManager.java from the
2.0 branch the relevant line numbers are 203 and 199.

So the answer is no, you can't customize in a submodule.   I'm sure,
with some effort you might be able to hack something into the
ReleasePhase logic, but there's no point.   Just configure the root
project with "clean install".

Tim

On Thu, Apr 15, 2010 at 4:28 AM, Raphael Ackermann
 wrote:
> if I have a project structure like below:
>
> project-root
> + --- project-a
> + --- project-b
> + --- project-c
>
> and in project-root I have
>
> 
>        maven-release-plugin
> 
>
> and in project-b I have
>
> 
>        maven-release-plugin
>        
>                clean install
>        
> 
>
> when I run mvn release:prepare   (mvn 2.2.1)  in the project-root directory
> I see
> [INFO] [INFO] Building project-b
> [INFO] [INFO]    task-segment: [clean, verify]
>
> and the build fails because project-c needs an artifact that gets
> generated in project-b's install phase.
>
> If I change the setup and add the configuration of the clean install
> preparation goals into the parent pom project-root
>
> 
>        maven-release-plugin
>        
>                clean install
>        
> 
>
> I can see the following output:
>
> [INFO] [INFO] Building project-b
> [INFO] [INFO]    task-segment: [clean, install]
>
> and the project builds successfully.
>
> I would like to only build one child module with clean install to save time.
>
> Does the release plugin ignore all configuration in child modules and
> only uses the configuration from the module where it is run from? Or
> do I need to add some other configuration?
>
> Raphael
>
> -
> 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: multi-module with assembly execution fail

2010-04-13 Thread Tim O'Brien
Frank,

In Project C's pom.xml, use the "single" goal instead of the
"assembly" goal.   This should fix the problem.

Tim

On Tue, Apr 13, 2010 at 12:01 PM, Frank Maritato
 wrote:
> Hi All,
>
> I have a multi module project and my "mvn package" command from the top
> level is failing when one of my modules defines the assembly plugin with an
>  block to make it part of the package phase. Specifically you
> will see that moduleC cannot resolve the artifact in moduleA and it looks
> like the unit tests are being run twice. When I comment out the executions
> block it all works as expected (except that I need a separate step to do my
> assembly).
>
> I put together a simple project that illustrates the problem and attached it
> to this message. Is this a known issue? Intended behavior? Am I just doing
> it wrong? Any help would be appreciated.
>
> Thanks!
> --
> Frank Maritato
>
>
>
> -
> 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: [Maven 2] Links plugins' executions

2010-04-13 Thread Tim O'Brien
On Tue, Apr 13, 2010 at 10:30 AM, Wayne Fay  wrote:
>> I use Maven 2 in a project and i would like to link plugin execution to the
>> execution of another plugin.
>
> No, you cannot link plugin executions.
>
>> With that, I thought that execution of my id process-ant was like a phase
>> process-ant that I could bind to executions of others plugins.
>
> No, it is not like a phase that you can bind.
>
>> Someone would have an idea to be able to bind 2 plugin which phases are not
>> standards Maven phases ?
>
> You must bind plugin executions to existing phases. If you require one
> plugin to be executed before another, you should bind them to separate
> phases, one right after the other. You can also just put them in the
> same phase if you order them properly in the pom, but this doesn't
> always seem to work right.
>

It's predictable for me, but I think the point here is that it isn't
very clear to an outside observer.   I've found that there are more
than enough lifecycles floating around in the default lifecycle so
that people can avoid relying on ordering within the same lifecycle.


> Wayne
>
> -
> 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: [Maven 2] Links plugins' executions

2010-04-13 Thread Tim O'Brien
You have to reference an existing phase.  The "process-ant' phase does
not exist in the Default Maven Lifecycle.  Look at the Lifecycle
Reference on this page:
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Build_Lifecycle_Basics


On Mon, Apr 12, 2010 at 5:22 PM, Sylvain Saurel
 wrote:
> Hi,
>
> I use Maven 2 in a project and i would like to link plugin execution to the
> execution of another plugin.
>
> In fact, in my project I've got a plugin A and a plugin B. And when I
> execute plugin A, I would like that plugin B be executed just before plugin
> A.
>
> In my use case, plugin A is gwt-maven-plugin and plugin B is
> maven-antrun-plugin.
>
> My POM configuration is the following :
>
> [CODE]
> ...
> 
> org.codehaus.mojo
> gwt-maven-plugin
> 1.2
> 
> 
> process-ant
> 
> compile
> generateAsync
> test
> 
> 
> 
> 
> war/WEB-INF/web.xml
>  fr.blabla.Appli/Appli.html
> 
> 
>
> 
> org.apache.maven.plugins
> maven-antrun-plugin
> 1.2
> 
> 
> process-ant
> 
> 
> 
> 
> 
> 
> run
> 
> 
> 
> 
> ...
> [/CODE]
>
> With that, I thought that execution of my id process-ant was like a phase
> process-ant that I could bind to executions of others plugins.
>
> However, that doesn't work. When I launch gwt:compile (of plugin
> gwt-maven-plugin), phase process-ant is not launched.
>
> Someone would have an idea to be able to bind 2 plugin which phases are not
> standards Maven phases ?
>
> Thanks by advance for your help.
>
> Sylvain.
>

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



Re: release process

2010-04-13 Thread Tim O'Brien
You can do whatever you need to do with versions, but this isn't
really the workflow associated with the maven-release-plugin.   The
release plugin exists to automate the following process:


Prepare

1. Take the current working copy - assume you have version 1.2-SNAPSHOT
2. Update the version number to 1.2
3. Run the build (as a result this will be running unit tests and
integration tests if you've configured them)
4. If the build is successful, commit 1.2 to SCM and create a tag.
5. Update code to the next snapshot, in this case assume it is 1.3-SNAPSHOT
4. Commit 1.3-SNAPSHOT to SCM

Perform

1. Export code from 1.2 tag
2. Run Build
3. Deploy

What you are talking about is some sort of custom workflow, I'd
suggest just using the versions plugin and the scm plugin to
accomplish what you need.   The Maven Release plugin doesn't really
respond well to alternative use cases.

On Tue, Apr 13, 2010 at 3:04 AM, Reynald JEGO  wrote:
> Hello,
>
> I'd like to perform a release (with mavean-release-plugin) with this
> process :
>
> Make release candidate v1-beta1 => ok
> Perform tests
> If tests are ko, make a new relesase candidate v1-beta2 => ok
> Perform tests
> If tests are ok, i'd like to make the final release (v1) and i want to be
> sure that code is the same as v1-beta2. So i'd like to re-tag the v1-beta2
> revision with ne v1 tag to perform the release.
>
> How can i do that with maven-release-plugin ?
> I don't see any parameter for the source tag/revision from which make the
> release, so i guess it is only possible with the latest version of branch.
>
> Thanks for answer
>
> Reynald Jégo - SII

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



Re: Problem with build process of multi module web project

2010-04-10 Thread Tim O'Brien



On Apr 10, 2010, at 1:38 AM, Vijay Shanker Dubey  
 wrote:



Hi,

I have a multi module web project. Four modules of the project are  
packaged
as jar and added as dependency to the fifth module, which is  
packaged as
war. When it is time to deploy the application i just run package on  
the war

project and my war is created with all the dependencies.




This I'd your problem, you need to run package from a higher level.   
Running package from the top-level of the multi-module project will  
fix this.



Now there is a problem.

One of the my module have heavy changes. Now when i created war for my
projects these changes was not reflected in the output war file(the  
jar in

lib folder of war has still the old code).

Can you please point the things i am missing from the release  
process? Why

the old code is being packaged with the war?



Because you were running "package" in a single module, and Maven used  
the version in the local repository.  Run "mvn package" from a higher  
level in the multimodule project.


Can you please point some good resource for real file build process  
using

maven?

Regards,
Vijay Shanker Dubey


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



Re: How to create patched artifact?

2009-08-04 Thread Tim O'Brien
On Tue, Aug 4, 2009 at 3:37 PM, Brian Fox wrote:
> That stuff is generated from the javadoc annotations. Take a look at
> the usage page:
>
> http://maven.apache.org/plugins/maven-dependency-plugin/usage.html#Overwrite%20Rules
>
> Overwrite Rules
>
> Artifacts are copied or unpacked using the following rules:
>
>    * If the artifact doesn't exist in the destination, then copy/unpack it.
>
>      Otherwise:
>    * For copy/unpack mojo only: if artifactItem / overWrite or
> overWrite is true, then it will force an overwrite.
>    * Releases check the overWriteReleases value (default = false). If
> true, then it will force an overwrite.
>    * Snapshots check the overWriteSnapshots value (default = false).
> If true, then it will force an overwrite.
>    * If none of the above is set to true, then it defaults to the
> overWriteIfNewer value (default = true). This value, if true, causes
> the plugin to only copy if the source is newer than the destination
> (or it doesn't exist in the destination). (for unpack, this checks the
> existence of the marker file, created in the markersDirectory path. To
> avoid unexpected behavior after mvn clean, this path should normally
> be contained within the /target hierarchy.)
>
> Examples:
>
>    * Using the default settings (overWriteReleases = false,
> overWriteSnapshots = false, overWriteIfNewer = true), then a release
> or snapshot artifact will only over write the destination if the
> source is newer than the destination (or marker file if unpacking).
>    * If overWriteReleases = true, then a release artifact (ie
> foo-1.0.jar) will always overwrite.
>    * If overWriteSnapshots = true, then a snapshot artifact (ie
> foo-1.0-SNAPSHOT.jar) will always overwrite.
>    * If all of the values are false, then a copy/unpack will only
> occur if it doesn't exist in the destination (or markersDirectory if
> unpacking).
>
>
> So I again assert that for a plugin the documentation is good.
>

Bleh, I still think it's awful, it reads like it was written by a cyborg.  :-)

If I'm going to "unpack" something, I'm going to expect that
"overwrite" would allow me to control whether or not the process of
unpacking was going to be destructive to existing files or not.
That's the conundrum here, I see not other way than excludes to do
this overlay without replacing files that already exist.

The alternative would be to set staleMillis on the compiler plugin to
a value that would always force a compile, but StaleSourceScanner
doesn't support anything like staleMillis = -1.

>
> On Tue, Aug 4, 2009 at 4:28 PM, Tim O'Brien wrote:
>> I love it how you are so close to the code, you think that this is
>> sufficient documentation for a plugin goal configuration property on
>> unpack:
>>
>> Property: overWriteIfNewer
>> Documentation: Overwrite if newer
>>
>> :-)
>>
>> Like I said, that leave a lot to be desired.
>>
>> On Tue, Aug 4, 2009 at 3:19 PM, Brian Fox wrote:
>>> On Tue, Aug 4, 2009 at 3:30 PM, Tim O'Brien wrote:
>>>> Use the excludes config property to exclude the specific files you
>>>> don't want to overwrite.
>>>>
>>>> http://maven.apache.org/plugins/maven-dependency-plugin/unpack-mojo.html
>>>>
>>>> The docs on that mojo leave much to be desired.
>>>>
>>>
>>> Oh come on, the dependency plugin is very well documented. It's just
>>> got a lot of options so it's non-trivial.
>>>
>>> -
>>> 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
>
>

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



Re: How to create patched artifact?

2009-08-04 Thread Tim O'Brien
I love it how you are so close to the code, you think that this is
sufficient documentation for a plugin goal configuration property on
unpack:

Property: overWriteIfNewer
Documentation: Overwrite if newer

:-)

Like I said, that leave a lot to be desired.

On Tue, Aug 4, 2009 at 3:19 PM, Brian Fox wrote:
> On Tue, Aug 4, 2009 at 3:30 PM, Tim O'Brien wrote:
>> Use the excludes config property to exclude the specific files you
>> don't want to overwrite.
>>
>> http://maven.apache.org/plugins/maven-dependency-plugin/unpack-mojo.html
>>
>> The docs on that mojo leave much to be desired.
>>
>
> Oh come on, the dependency plugin is very well documented. It's just
> got a lot of options so it's non-trivial.
>
> -
> 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: How to create patched artifact?

2009-08-04 Thread Tim O'Brien
Use the excludes config property to exclude the specific files you
don't want to overwrite.

http://maven.apache.org/plugins/maven-dependency-plugin/unpack-mojo.html

The docs on that mojo leave much to be desired.

On Tue, Aug 4, 2009 at 2:10 PM, David Hoffer wrote:
> Perhaps I'm not clear what you are suggesting.  I'm not trying to do a
> release, I'm trying to use a snapshot (that a different division at our
> company produces).  However I need to make a few overrides to this
> snapshot.  yes we do have a process to move our overrides into the
> snapshot...but that process takes some time.  In the meantime I have to
> build with the snapshot as it exists.
>
> So what I am trying to do is simply unpack the snapshot, compile/replace
> classes with my overrides, and re-jar.  I have chosen to rename the jar so
> there is no risk of confusing which jar is patched.
>
> yes we use a repository manager, all builds get deployed to it.
>
> -Dave
>
> On Tue, Aug 4, 2009 at 1:01 PM,  wrote:
>
>> Hi David,
>>
>> If you have all the source code, as you seem to suggest several times
>> in this convoluted post, then why don't you just deploy a new
>> -SNAPSHOT yourself to your local repository? You ARE using a
>> repository manager, right??
>>
>>
>> http://www.sonatype.com/people/2009/01/best-practices-for-releasing-with-3rd-party-snapshot-dependencies/
>>
>> -jesse
>>
>> On Tue, Aug 4, 2009 at 10:25 AM, David Hoffer wrote:
>> > What is the maven way of creating a patched jar?
>> >
>> > I have a case where I need to apply some overrides to a binary jar which
>> is
>> > one of my dependencies.  I have the source code for the overrides.  So I
>> > could create a child module with the source and the one dependency that
>> > needs the overrides applied.  What maven plugin would I use to extract
>> the
>> > class files from the dependency, combine with the new generated classes
>> from
>> > source, and then re-jar?  The final artifact would have a new name, i.e.
>> > _patched, so as to not get confused with the original.  How can I then
>> stop
>> > the transitive dependency on the original jar?  I would want the
>> dependency
>> > to be on the new patched version only.
>> >
>> > What's the maven way of doing this sort of thing?
>> >
>> > -Dave
>> >
>>
>>
>>
>> --
>> There are 10 types of people in this world, those
>> that can read binary and those that can not.
>>
>> -
>> 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: How to create patched artifact?

2009-08-04 Thread Tim O'Brien
On Tue, Aug 4, 2009 at 1:25 PM, David Hoffer wrote:
> Yeah, I meant install phase.  My pom's packaging is jar, and I have the
> source in src/main/java.
>
> It seems to find the source because for new files I do find the compiled
> classes in the right places.  However what I also find is that for classes
> in the dependent jar they seem to have overwrote the compiled ones.
>
> I think what is happening is that during the compile phase it simply skips
> the compile (or at least the writing of the class file to disk) if it
> already exists.  How can I configure the compile to always overwrite?

Move the copy goal that you declared to happen just after compilation.
  Look at the lifecycle list, I think you want "process-classes"

>
> -Dave
>
> On Tue, Aug 4, 2009 at 12:10 PM, Tim O'Brien  wrote:
>
>> On Tue, Aug 4, 2009 at 1:01 PM, David Hoffer wrote:
>> > Hum,
>> >
>> > I'm getting close but not quite there yet.  Here is my configuration.
>> >
>> > 
>> >                org.apache.maven.plugins
>> >                maven-dependency-plugin
>> >                
>> >                    
>> >                        unpack
>> >                        generate-sources
>> >                        
>> >                            unpack
>> >                        
>> >                        
>> >                            
>> >                                
>> >                                    wt
>> >                                    wt
>> >                                    4.0-SNAPSHOT
>> >                                    jar
>> >                                    true
>> >
>> > ${project.build.directory}/classes
>> >                                
>> >                            
>> >                            true
>> >                            true
>> >                        
>> >                    
>> >                
>> >            
>> >
>> > For some reason after running the install goal the unpack seems to have
>> > taken precedence over the compile!
>>
>> "install" isn't a goal in this case, it is a phase.   When you run
>> "install", you are asking Maven to walk through the entire lifecycle
>> (except the deploy phase).   Instead of trying to test with the
>> "install" phase, run "mvn generate-sources" then run "mvn compile".
>> Also use the -X flag to get more output.
>>
>> Take a look at the list of phases here:
>>
>> http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
>>
>>
>> >
>> > Since the generate-sources phase is before compile shouldn't the compile
>> > have over written the unpack?  I'm confused.
>> >
>>
>> Do you have source in src/main/java?   What is your project's packaging?
>>
>> > -Dave
>> >
>> >
>> > On Tue, Aug 4, 2009 at 8:39 AM, Tim O'Brien 
>> wrote:
>> >
>> >> On Tue, Aug 4, 2009 at 9:25 AM, David Hoffer wrote:
>> >> > What is the maven way of creating a patched jar?
>> >> >
>> >> > I have a case where I need to apply some overrides to a binary jar
>> which
>> >> is
>> >> > one of my dependencies.  I have the source code for the overrides.  So
>> I
>> >> > could create a child module with the source and the one dependency
>> that
>> >> > needs the overrides applied.  What maven plugin would I use to extract
>> >> the
>> >> > class files from the dependency, combine with the new generated
>> classes
>> >> from
>> >> > source, and then re-jar?  The final artifact would have a new name,
>> i.e.
>> >> > _patched, so as to not get confused with the original.  How can I then
>> >> stop
>> >> > the transitive dependency on the original jar?  I would want the
>> >> dependency
>> >> > to be on the new patched version only.
>> >> >
>> >>
>> >> 1. Create a project with a new groupId, artifactId, and version.
>> >>
>> >> 2.  Publish this third-party binary to a repository manager - you can
>> >> use one of the various repository managers that allow you to manually
>> >> upload an artifact.   (Me?  I'd recommend Nexus).
>> >>
>> >> 3. Use

Re: How to create patched artifact?

2009-08-04 Thread Tim O'Brien
On Tue, Aug 4, 2009 at 1:27 PM, Anders Hammar wrote:
> Tim,
>
>> 4. Package, publish your new patched artifact to a repository manager
>> (under a new groupId, artifactId, version).
>>
>> The key here is that you create a project that patches the original
>> artifact and then publishes it under a different GAV coordinate.   I
>> would not recommend patching the JAR and then writing it back to the
>> repository manager under the same GAV coordinate: 1. You are going to
>> have a GAV collision, and 2. It makes it difficult to update to a new
>> version of this binary dependency.
>
> Is it really best practise to change groupId and artifactId? I would
> only change the version so that Maven has a chance to detect
> collisions. Similar to what Brian recommends for converting a SNAPSHOT
> version to a release version in this blog entry (see rule #5):
> http://www.sonatype.com/people/2009/01/best-practices-for-releasing-with-3rd-party-snapshot-dependencies/
>


If it is something that is public, yes, only change the version.   I
was assuming this was some gnarly internal binary that someone handed
to him because that's what has happened to me in the past.Example:
you work on a system that depends on some proprietary, source-less JAR
binary.  In that case, I'd wrap it with my own GAV and call it a day.
  But, you are right, if you are patching something like commons-lang
or plexus-utils, you would totally preserve the GA and change the V.

> /Anders
>
> -
> 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: How to create patched artifact?

2009-08-04 Thread Tim O'Brien
On Tue, Aug 4, 2009 at 1:01 PM, David Hoffer wrote:
> Hum,
>
> I'm getting close but not quite there yet.  Here is my configuration.
>
> 
>                org.apache.maven.plugins
>                maven-dependency-plugin
>                
>                    
>                        unpack
>                        generate-sources
>                        
>                            unpack
>                        
>                        
>                            
>                                
>                                    wt
>                                    wt
>                                    4.0-SNAPSHOT
>                                    jar
>                                    true
>
> ${project.build.directory}/classes
>                                
>                            
>                            true
>                            true
>                        
>                    
>                
>            
>
> For some reason after running the install goal the unpack seems to have
> taken precedence over the compile!

"install" isn't a goal in this case, it is a phase.   When you run
"install", you are asking Maven to walk through the entire lifecycle
(except the deploy phase).   Instead of trying to test with the
"install" phase, run "mvn generate-sources" then run "mvn compile".
Also use the -X flag to get more output.

Take a look at the list of phases here:
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html


>
> Since the generate-sources phase is before compile shouldn't the compile
> have over written the unpack?  I'm confused.
>

Do you have source in src/main/java?   What is your project's packaging?

> -Dave
>
>
> On Tue, Aug 4, 2009 at 8:39 AM, Tim O'Brien  wrote:
>
>> On Tue, Aug 4, 2009 at 9:25 AM, David Hoffer wrote:
>> > What is the maven way of creating a patched jar?
>> >
>> > I have a case where I need to apply some overrides to a binary jar which
>> is
>> > one of my dependencies.  I have the source code for the overrides.  So I
>> > could create a child module with the source and the one dependency that
>> > needs the overrides applied.  What maven plugin would I use to extract
>> the
>> > class files from the dependency, combine with the new generated classes
>> from
>> > source, and then re-jar?  The final artifact would have a new name, i.e.
>> > _patched, so as to not get confused with the original.  How can I then
>> stop
>> > the transitive dependency on the original jar?  I would want the
>> dependency
>> > to be on the new patched version only.
>> >
>>
>> 1. Create a project with a new groupId, artifactId, and version.
>>
>> 2.  Publish this third-party binary to a repository manager - you can
>> use one of the various repository managers that allow you to manually
>> upload an artifact.   (Me?  I'd recommend Nexus).
>>
>> 3. Use the dependency plugin to unpack the artifact to your project's
>> target/classes.   Bind the unpack goal to generate-sources or
>> generate-resources so that the download and unpack.
>>
>> Unpack Mojo:
>> http://maven.apache.org/plugins/maven-dependency-plugin/examples/unpacking-artifacts.html
>> Intro to Lifecycle:
>>
>> http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
>>
>> 4. Package, publish your new patched artifact to a repository manager
>> (under a new groupId, artifactId, version).
>>
>> The key here is that you create a project that patches the original
>> artifact and then publishes it under a different GAV coordinate.   I
>> would not recommend patching the JAR and then writing it back to the
>> repository manager under the same GAV coordinate: 1. You are going to
>> have a GAV collision, and 2. It makes it difficult to update to a new
>> version of this binary dependency.
>>
>> > What's the maven way of doing this sort of thing?
>> >
>>
>> Good luck.
>>
>> > -Dave
>> >
>>
>> -
>> 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: How to create patched artifact?

2009-08-04 Thread Tim O'Brien
On Tue, Aug 4, 2009 at 9:25 AM, David Hoffer wrote:
> What is the maven way of creating a patched jar?
>
> I have a case where I need to apply some overrides to a binary jar which is
> one of my dependencies.  I have the source code for the overrides.  So I
> could create a child module with the source and the one dependency that
> needs the overrides applied.  What maven plugin would I use to extract the
> class files from the dependency, combine with the new generated classes from
> source, and then re-jar?  The final artifact would have a new name, i.e.
> _patched, so as to not get confused with the original.  How can I then stop
> the transitive dependency on the original jar?  I would want the dependency
> to be on the new patched version only.
>

1. Create a project with a new groupId, artifactId, and version.

2.  Publish this third-party binary to a repository manager - you can
use one of the various repository managers that allow you to manually
upload an artifact.   (Me?  I'd recommend Nexus).

3. Use the dependency plugin to unpack the artifact to your project's
target/classes.   Bind the unpack goal to generate-sources or
generate-resources so that the download and unpack.

Unpack Mojo: 
http://maven.apache.org/plugins/maven-dependency-plugin/examples/unpacking-artifacts.html
Intro to Lifecycle:
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html

4. Package, publish your new patched artifact to a repository manager
(under a new groupId, artifactId, version).

The key here is that you create a project that patches the original
artifact and then publishes it under a different GAV coordinate.   I
would not recommend patching the JAR and then writing it back to the
repository manager under the same GAV coordinate: 1. You are going to
have a GAV collision, and 2. It makes it difficult to update to a new
version of this binary dependency.

> What's the maven way of doing this sort of thing?
>

Good luck.

> -Dave
>

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



Re: How to use mvn install but have all options in the pom.xml?

2009-07-30 Thread Tim O'Brien
On Thu, Jul 30, 2009 at 2:19 PM, jvsrvcs wrote:
>
> We do have a maven repository manager in place but it's only accessible
> inside the network when we
> are on location.
>
> We have many consultants, some folks work at home on occasion and we want
> them to be able to build and write code for a day without having access to
> the local network.
>

Right, so setup a repo manager, and provide access to remote
consultants, telecommuters.   How do these people get access to source
control?   Probably through a VPN or maybe you have some server setup
that requires authentication.   Do whatever you want to do, but if you
have to have script that populates your local repo, you need to use a
repository manager.   I

If you use Maven, you should be using a repository manager.  If you
are not using a repository manager, you have to resort to shenanigans
to distribute binaries.

>
>
>
>
> Tim O'Brien wrote:
>>
>> You can define multiple executions.
>>
>> My advice is the same as Justin's, don't do this.  Use a repository
>> manager.    The fact that you have to configure multiple calls to
>> install-file means that you don't have a good way to distribute internal
>> or
>> third-party artifacts.
>>
>>
>>
>> On Thu, Jul 30, 2009 at 12:30 PM, Alexander  wrote:
>>
>>> But I cant find the way how install several files. It seems like
>>> maven-install could be configured only with one file to install. Actually
>>> It
>>> wont eat configuration in execution node as you mentioned. Works only
>>> that
>>> way
>>> 
>>>     org.apache.maven.plugins
>>>     maven-install-plugin
>>>     2.3
>>>     
>>>         org.heaven
>>>         bless
>>>         2.0.0
>>>         jar
>>>         ./bless
>>>     
>>>     
>>>         
>>>             install-bless
>>>             install
>>>             
>>>                 install-file
>>>             
>>>         
>>>     
>>> 
>>>
>>> And yeah I agree with you. Its better write script with batch of such
>>> install:install-file goals for every dependency rather that try to place
>>> such information to pom.xml [?] Anyway it is interesting if maven could
>>> do
>>> this.
>>>
>>> 2009/7/30 Edelson, Justin 
>>>
>>>> I should also say that I personally think using install-file is a bad
>>>> idea when there are good repository managers available.
>>>>
>>>> Justin
>>>>
>>>> -Original Message-
>>>> From: Edelson, Justin
>>>> Sent: Thursday, July 30, 2009 1:13 PM
>>>> To: Maven Users List
>>>> Subject: RE: How to use mvn install but have all options in the pom.xml?
>>>>
>>>> It does need to be bound to a phase if you want to do more than one
>>>> install. Also, the OP said he wanted to use a profile, which implied (to
>>>> me at least) that this would be part of the lifecycle. generate-sources
>>>> may or may not be the right phase, that's up to the OP.
>>>>
>>>> Justin
>>>>
>>>> 
>>>>
>>>> From: Alexander [mailto:the.malk...@gmail.com]
>>>> Sent: Thursday, July 30, 2009 11:10 AM
>>>> To: Maven Users List
>>>> Subject: Re: How to use mvn install but have all options in the pom.xml?
>>>>
>>>>
>>>> There is no need to bind it to any phase, right?  I think it is a pretty
>>>> Maven-style way of solving problem  Needa try..
>>>>
>>>>
>>>> 2009/7/30 Edelson, Justin 
>>>>
>>>>
>>>>        It's no different than any other plugin. Something like this
>>>> should
>>>>        work:
>>>>
>>>>                   
>>>>                       org.apache.maven.plugins
>>>>                       maven-install-plugin
>>>>                       
>>>>                           
>>>>                               install-1
>>>>                               generate-sources
>>>>                               
>>>>                                   install-file
>>>>                               
>>>>                                       
>>>>
>>>> blah
>>>>                                               

Re: How to use mvn install but have all options in the pom.xml?

2009-07-30 Thread Tim O'Brien
On Thu, Jul 30, 2009 at 1:23 PM, jvsrvcs wrote:
>
> Thanks, the reason we are doing this is because:
>
> 1.  We have a lot of new programmers coming on board (10) that need to
> quickly setup their local repo

Use a repository manager.   Distribute a settings.xml file.

> 2.  Many of these programmers/consultants are bash handicapped and don't
> have cygwin installed
> 3.  Doing it locally first is better than getting from a repo (and we can
> use this init to provision the repo
> once and will have it should we need to do it again).
>
> I appreciate the help and will give it a spin.
>
> thanks
>
> jv
>
> justinedelson wrote:
>>
>> It's no different than any other plugin. Something like this should
>> work:
>>
>>             
>>                 org.apache.maven.plugins
>>                 maven-install-plugin
>>                 
>>                     
>>                         install-1
>>                         generate-sources
>>                         
>>                             install-file
>>                         
>>                               
>>                                       blah
>>                                       blah
>>                                       v
>>                                       lib/somefile.jar
>>                               
>>                         
>>                     ...repeat...
>>                       
>>               
>>
>> I don't think this is particularly common because a) it's very verbose
>> compared with doing it on the command line and b) install-file only
>> needs to be run once, so including it in the build isn't necessary.
>>
>> Justin
>>
>>
>> -Original Message-
>> From: jvsrvcs [mailto:jvsr...@gmail.com]
>> Sent: Thursday, July 30, 2009 10:51 AM
>> To: users@maven.apache.org
>> Subject: How to use mvn install but have all options in the pom.xml?
>>
>>
>> The docs on the mvn install plugin state:
>>
>> mvn install:install-file -Dfile=your-artifact-1.0.jar \
>>                          [-DpomFile=your-pom.xml] \
>>                          [-Dsources=src.jar] \
>>                          [-Djavadoc=apidocs.jar] \
>>                          [-DgroupId=org.some.group] \
>>                          [-DartifactId=your-artifact] \
>>                          [-Dversion=1.0] \
>>                          [-Dpackaging=jar] \
>>                          [-Dclassifier=sources] \
>>                          [-DgeneratePom=true] \
>>                          [-DcreateChecksum=true]
>>
>> So I could build a bash shell script that executes the above $mvn
>> install command for each jar that I want to install into the local repo.
>>
>> What I want to do is to put all the options above into a pom.xml such
>> that the user would only have to run a single maven profile and type
>> only:
>>    $mvn -P init
>>
>> and have this profile run the  install plugin run on each of about 20
>> dot jar files in lib/.
>>
>> I have seen this done before on a project but did not write the code nor
>> do I have a copy of the code with me.  I know it is possible but can't
>> find any documentation on how to put options to $mvn install inside the
>> pom.xml file (instead of the command line).
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-use-mvn-install-but-have-all-options-in-the
>> -pom.xml--tp24739597p24739597.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/How-to-use-mvn-install-but-have-all-options-in-the-pom.xml--tp24739597p24744063.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

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



Re: Setting Mirror properties by profile?

2009-07-30 Thread Tim O'Brien
Upgrade your Maven installation.  If you haven't upgraded to at least
2.0.9, there is no telling what issues you are going to run up
against.

My suggestion would be to use two settings.xml files and instead of
trying to control this with a profile, just pass in different
settings.xml files with the "-s" command line option.

On Thu, Jul 30, 2009 at 8:47 AM,
dbruley wrote:
>
> Hello,
>
> Apologize if this posted twice, but it's been several days since I sent the
> first email and I have not seen my post come across. Trying again.
>
> I spent quite a bit of time reading the Maven documentation as well as
> trying my luck on Google, so hopefully I didn't miss something easy or
> obvious.
>
> For the usual reasons of governance, security, etc we use an internal maven
> repository for our builds (Artifactory).  In the settings.xml file under
> /conf we have defined two profiles: one that lists a variety of repositories
> in the external world (id=external-repos) and one that only defines our
> internal repository (id=internal-repos).  The internal-repos is set as
> active, but external-repos is available via the -P from command line if we
> need to look external to bring artifacts down locally for things such as
> version upgrades.
>
> Noticed running help:effective-pom that the maven super pom brings in
> repo1.maven.org/maven2 and I suspect that poms from third party dependencies
> might also specify external repos that get referenced during builds.  I did
> some browsing and came across the topic of specifying a mirror in the
> settings.xml file where one could redirect everything to an internal repo
> such as
>
>        
>            internal-repository-mirror
>            Internal Maven Repository Mirror Site
>            http://some.internal.url
>            *
>        
>
> That sounded exactly like what I needed except it seems to be global
> regardless of the profile and I don't want to have to comment it out all the
> time on the occasions I do need to point to an external repo.
>
> I fooled around with trying to use a property for mirrorOf based on the
> active profile such as what follows but that didn't seem to work:
>
>        
>            internal-repository-mirror
>            Internal Maven Repository Mirror Site
>            http://some.internal.url
>            ${repo.mirror}
>        
>
>        
>            external-repos
>            
>                internal
>            
>            
>                 
>            
>        
>
>        
>            internal-repos
>            
>                *
>            
>            
>                 
>            
>        
>
> So my question is, does Maven allow for any kind of dynamic mirror
> configuration or is there some way to accomplish what I need, which is if
> I'm using a profile for internal only all sites mirror to the internal repo
> and if I'm using the profile for external allowed, I bypass the mirror all
> rule so I can reach the external repos?
>
> Saw an existing JIRA that I believe is related -
> http://jira.codehaus.org/browse/MNG-3525 - but wondering if anyone has been
> able to work around the lack of mirrors in profiles.
>
> We're currently using Maven 2.0.5, although we need to migrate to a newer
> version.
>
> Thanks in advance for any assistance.
>
>
>
>
> --
> View this message in context: 
> http://www.nabble.com/Setting-Mirror-properties-by-profile--tp24738774p24738774.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

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



Re: How to use mvn install but have all options in the pom.xml?

2009-07-30 Thread Tim O'Brien
You can define multiple executions.

My advice is the same as Justin's, don't do this.  Use a repository
manager.The fact that you have to configure multiple calls to
install-file means that you don't have a good way to distribute internal or
third-party artifacts.



On Thu, Jul 30, 2009 at 12:30 PM, Alexander  wrote:

> But I cant find the way how install several files. It seems like
> maven-install could be configured only with one file to install. Actually It
> wont eat configuration in execution node as you mentioned. Works only that
> way
> 
> org.apache.maven.plugins
> maven-install-plugin
> 2.3
> 
> org.heaven
> bless
> 2.0.0
> jar
> ./bless
> 
> 
> 
> install-bless
> install
> 
> install-file
> 
> 
> 
> 
>
> And yeah I agree with you. Its better write script with batch of such
> install:install-file goals for every dependency rather that try to place
> such information to pom.xml [?] Anyway it is interesting if maven could do
> this.
>
> 2009/7/30 Edelson, Justin 
>
>> I should also say that I personally think using install-file is a bad
>> idea when there are good repository managers available.
>>
>> Justin
>>
>> -Original Message-
>> From: Edelson, Justin
>> Sent: Thursday, July 30, 2009 1:13 PM
>> To: Maven Users List
>> Subject: RE: How to use mvn install but have all options in the pom.xml?
>>
>> It does need to be bound to a phase if you want to do more than one
>> install. Also, the OP said he wanted to use a profile, which implied (to
>> me at least) that this would be part of the lifecycle. generate-sources
>> may or may not be the right phase, that's up to the OP.
>>
>> Justin
>>
>> 
>>
>> From: Alexander [mailto:the.malk...@gmail.com]
>> Sent: Thursday, July 30, 2009 11:10 AM
>> To: Maven Users List
>> Subject: Re: How to use mvn install but have all options in the pom.xml?
>>
>>
>> There is no need to bind it to any phase, right?  I think it is a pretty
>> Maven-style way of solving problem  Needa try..
>>
>>
>> 2009/7/30 Edelson, Justin 
>>
>>
>>It's no different than any other plugin. Something like this
>> should
>>work:
>>
>>   
>>   org.apache.maven.plugins
>>   maven-install-plugin
>>   
>>   
>>   install-1
>>   generate-sources
>>   
>>   install-file
>>   
>>   
>>
>> blah
>>   blah
>>   v
>>
>> lib/somefile.jar
>>   
>> 
>>   ...repeat...
>>   
>>   
>>
>>I don't think this is particularly common because a) it's very
>> verbose
>>compared with doing it on the command line and b) install-file
>> only
>>needs to be run once, so including it in the build isn't
>> necessary.
>>
>>Justin
>>
>>
>>
>>-Original Message-
>>From: jvsrvcs [mailto:jvsr...@gmail.com]
>>Sent: Thursday, July 30, 2009 10:51 AM
>>To: users@maven.apache.org
>>Subject: How to use mvn install but have all options in the
>> pom.xml?
>>
>>
>>The docs on the mvn install plugin state:
>>
>>mvn install:install-file -Dfile=your-artifact-1.0.jar \
>>[-DpomFile=your-pom.xml] \
>>[-Dsources=src.jar] \
>>[-Djavadoc=apidocs.jar] \
>>[-DgroupId=org.some.group] \
>>[-DartifactId=your-artifact] \
>>[-Dversion=1.0] \
>>[-Dpackaging=jar] \
>>[-Dclassifier=sources] \
>>[-DgeneratePom=true] \
>>[-DcreateChecksum=true]
>>
>>So I could build a bash shell script that executes the above
>> $mvn
>>install command for each jar that I want to install into the
>> local repo.
>>
>>What I want to do is to put all the options above into a pom.xml
>> such
>>that the user would only have to run a single maven profile and
>> type
>>only:
>>  $mvn -P init
>>
>>and have this profile run the  install plugin run on each of
>> about 20
>>dot jar files in lib/.
>>
>>I have seen this done before on a project but did not write the
>> code nor
>>do I have a copy of the code with me.  I know it is possible but
>> can't
>>find any documentation on how to put

Re: How to install jars into local maven repo (with $mvn ) - want to configure init profile in pom.xml

2009-07-29 Thread Tim O'Brien
On Wed, Jul 29, 2009 at 6:06 PM, jvsrvcs wrote:
>
>
> I want to create a maven profile called "init", such
> that a person would type:   $mvn init

This won't work, Maven has a lifecycle that consists of phases when
you execute "mvn init", Maven is going to complain because there is no
"init" phase.   What you need to do is configure a goal execution to
execute during one of the phases in the Maven build lifecycle:

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

>
> and this profile would take jars from the lib/ directory
> (on the same level as the pom.xml)
> and install every jar in the lib (and subdirectories)
> into the local maven repo only.
>

You are looking to use the Maven Install plugin, but take a step back
before you decide to do this with Maven.   The goal you want to run is
here: 
http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html
- but Maven isn't going to be able to traverse the lib directory and
deploy every single file recursively.It wasn't designed to do
this, and my advice is not to attempt to try to get Maven to do this.
 One Maven project, produces one artifact.

Do this using the Maven Ant Tasks, better yet... do this with a Groovy
script that calls out to the Maven Ant Tasks.

> I have many docs on maven profiles, but no good
> examples on integrating that with another plugin
> where I could use XML (pom.xml) to configure and install
> jars to the local repo.
>
> if anyone has done this and has a code sample
> they can post please send.  I have read all
> the docs that are available on the subject
> and do not need to be pointed there
> as I have read and googled all the
> documentation for about 3 hrs with
> no resolution.
>
> What I am looking for is the ability to type
>        $mvn init
>
> and have all jars under lib/ get installed to
> the local maven repo (and all /lib//*.jar
> and so on.
>
> thank you for your assistance
> --
> View this message in context: 
> http://www.nabble.com/How-to-install-jars-into-local-maven-repo-%28with-%24mvn-%3Ctarget%3E%29---want-to-configure-init-profile-in-pom.xml-tp24729720p24729720.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

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



Re: exec:java problem

2009-07-15 Thread Tim O'Brien
On Wed, Jul 15, 2009 at 1:42 AM, ykyuen wrote:
>
> it works in windows now.
> the problem is previously, i created the maven project directly in eclipse
> by the m2eclipse plugin and the project is located in the workspace.
>
> then i try to create the project in the maven repository by the mvn
> archetype:create and them import the project to the eclipse. it works fine
> now.
>
> but i can only retrieve the weather info once.
> http://xml.weather.yahoo.com/ns/rss/1.0 doesn't work now...

Alright, time to update this example to use a gov't feed from the US NWS.

Thanks for letting me know.


>
> anyway, the program works.
>
> thanks very much for your help. =)
>
> Regards,
> kit
>
>
>
> dchicks wrote:
>>
>> Did you check to make sure that the class was in the target/classes
>> directory?
>>
>> The UTF-8 encoding is normal on Linux.  That's the default encoding when
>> one is not specified.
>>
>>
>>
>> ykyuen wrote:
>>> Hi all,
>>>
>>> i just did the same thing in Linux environemt. the program can be
>>> executed
>>> without any problem.
>>> same warning appear at mvn install but this time the encoding is UTF-8.
>>>
>>> what makes the execution failure in windows env?
>>>
>>> Thanks.
>>>
>>> Regards,
>>> Kit
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/exec%3Ajava-problem-tp24491018p24492726.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

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



Re: when is relativePath used?

2009-07-14 Thread Tim O'Brien
On Tue, Jul 14, 2009 at 6:56 PM, Rusty Wright wrote:
> My pom starts with
>
>   
>       waitlist-parent
>       edu.berkeley.ist.waitlist
>       1.1
>       ../../waitlist-parent/pom.xml
>   
>
> When I run maven and the  inside the  tags doesn't match
> what's in the parent's pom, it uses the pom from the repository (assuming
> there's one there with that version).  Is this expected and something that
> needs to be documented?

Yes this is the expected behavior.  This is documented in the API for
Maven Model here http://tr.im/snbj

from the Javadoc for getRelativePath():

"Get the relative path of the parent pom.xml  file within the check
out. The default value is ../pom.xml. Maven looks for the parent pom
first in the reactor of currently building projects, then in this
location on the filesystem, then the local repository, and lastly in
the remote repo. relativePath allows you to select a different
location, for example when your structure is flat, or deeper without
an intermediate parent pom. However, the group ID, artifact ID and
version are still required, and must match the file in the location
given or it will revert to the repository for the POM. This feature is
only for enhancing the development in a local checkout of that
project."



>
> -
> 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: Passing Variables at JBoss Startup

2009-07-14 Thread Tim O'Brien
On Tue, Jul 14, 2009 at 5:34 PM, daniel.green wrote:
>
>
> Tim O'Brien wrote:
>>
>> You should take a look at Cargo: http://cargo.codehaus.org/
>>
> Thank you for the info! Is
> http://cargo.codehaus.org/Passing+system+properties what I'm looking for?
> That would have the effect of -D, right?
>

I believe so, although I have to admit I've never used JBoss so don't
hold me to it.


>
> Tim O'Brien wrote:
>>
>> You should take a look at Cargo: http://cargo.codehaus.org/
>>
>> Cargo has a Maven 2 plugin which will allow you complete control over
>> your JBoss server.
>>
>> Tim
>>
>> On Tue, Jul 14, 2009 at 5:20 PM, daniel.green wrote:
>>>
>>> I would like to configure my build scripts to deploy an ear file to a
>>> remote
>>> jboss server. However, as a requirement, I also need the ability to start
>>> the server, from the script, with parameters.
>>>
>>> Our current Perl and Bash scripts start the server with the following
>>> arguments:
>>>
>>> 
>>> --configuration="..." -b localhost -Djboss.jndi.conf.root="..."
>>> -Djboss.jndi.conf.specific="..."
>>> 
>>>
>>> Is it possible to replicate this behavior through maven and
>>> jboss-maven-plugin? Or am I stuck with Perl and Bash for now?
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Passing-Variables-at-JBoss-Startup-tp24488807p24488807.html
>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>>> For additional commands, e-mail: users-h...@maven.apache.org
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Passing-Variables-at-JBoss-Startup-tp24488807p24488990.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

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



Re: Passing Variables at JBoss Startup

2009-07-14 Thread Tim O'Brien
You should take a look at Cargo: http://cargo.codehaus.org/

Cargo has a Maven 2 plugin which will allow you complete control over
your JBoss server.

Tim

On Tue, Jul 14, 2009 at 5:20 PM, daniel.green wrote:
>
> I would like to configure my build scripts to deploy an ear file to a remote
> jboss server. However, as a requirement, I also need the ability to start
> the server, from the script, with parameters.
>
> Our current Perl and Bash scripts start the server with the following
> arguments:
>
> 
> --configuration="..." -b localhost -Djboss.jndi.conf.root="..."
> -Djboss.jndi.conf.specific="..."
> 
>
> Is it possible to replicate this behavior through maven and
> jboss-maven-plugin? Or am I stuck with Perl and Bash for now?
>
> --
> View this message in context: 
> http://www.nabble.com/Passing-Variables-at-JBoss-Startup-tp24488807p24488807.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

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



Re: Parallelization and skip compilation

2009-07-14 Thread Tim O'Brien
On Tue, Jul 14, 2009 at 1:40 PM, Subramanian,
N.Venkata wrote:
> Hi
>
>          Good morning!
>
>
>
> I have couple of question which is quite critical in our current project
> scenario
>
>
>
> 0) Our product is supporting around 14 platforms and our prodct code is
> divided into many components and subcomponents. We have big issue that
> for most of the platforms the build is taking too much time (10-14 hrs
> for the whole buid life cycle ) and we need to reduce the build
>
>
>
> Why this question is posted on maven forum than a s/w build forum.
> Ofcourse our builds are based on maven.
>
> But that's not the only reason for me to post this. I would like to know
>
>
> -         what are the possible ways to parallelize the maven component
> (and sub components)

You could always build a parent project with the -N flag, this would
have the effect of installing a parent POM.Then you could go into
submodules and kick off a separate build in each module (as long as
there are no cross-dependencies between submodules).   Usually you are
going to have interdependent submodules, so you'll have to figure out
a way to create isolated trees of submodules - I'll leave that
exercise up to you because I don't know anything about the
architecture of your multi-module project.

A better solution to support multiple platforms would be to setup a
number of Hudson builds running across a grid of machines.   This is
what happens on grid.sonatype.org - take a look at the core
integration tests for Maven 3:
https://grid.sonatype.org/ci/view/Maven%203.0.x/job/maven-core-integration-testing/
   - these tests are run on different nodes of a grid of build
machines managed by Hudson.

>
> -         if we can parallelize, how to identify depedencies between the
> components so that we can parallelize the *independent* components
>
> to avoid the conflicts across components while building. [we have mvn
> dependency:tree - but that is giving dependency information at the very
> granular level instead of at the top level]
>

Ok, you are right, dependency:tree is always going to show you the
resolved dependencies for a single project.What you are looking
for is something that would step through project dependencies in your
tree.   You will likely want to take a look at the Maven Reactor
plugin as a diagnostic tool that would point you in the right
direction.

http://maven.apache.org/plugins/maven-reactor-plugin/make-dependents-mojo.html

Run reactor:make and reactor:make-dependents and pass in
-DprintOnly=true  - this will shed some light on module dependencies
within your multimodule project.

>
>
>
>
> - how to skip compilation in maven - [ this question is being asked many
> times. ] I am not sure why this feature is not available. We have
> scenario that    We first compile and test, if it succeeds then we
> deploy on the same workspace. At this instance we don't need to really
> compile by which we can save around 50% of the deploy build time.
>

Ok, so you want to just run deploy? When you run "mvn deploy" it
is running every lifecycle stage up to deploy (including compile).
My advice, if you really want to omit compilation would be to
explictly run the goals you need.  It isn't pretty, but you could just
run "mvn deploy:deploy"

Take a look at this page about the lifecycle: http://tr.im/shS4 - look
at the default bindings to the default maven lifecycle and just pick
and choose which goals you want to run.  If you wanted to run the
final two stages, but you want to skip the lifecycle, you could run
"mvn install:install deploy:deploy".  It is unorthodox, but it might
be able to get you what you need.

>
>
>
>
> Appreciate your help!
>
> Thanks
>
> -Venkat
>
>

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



Re: Run ANT script first

2009-07-14 Thread Tim O'Brien
When you run Maven, you usually specify a lifecycle phase such as
install or package or deploy. Maven will then execute every
lifecycle phase sequentially until it reaches the specified phase.
If you want a full list of lifecycle phases take a look at the Maven
docs here:  http://tr.im/shS4   - I would suggest attaching your build
script to either verify or initialize.

If you have a build.xml file and you want it to run before anything
interesting happens, hook it up to the verify phase...


  [...]
  

  
maven-antrun-plugin

  
verify

  
  
  


  run

  

  

  
  [...]



On Tue, Jul 14, 2009 at 8:10 AM, REMIJAN, MICHAEL J
[AG/1000] wrote:
> I have an ANT script which I want to make sure runs first before any
> maven goal is run.  How would I go about configuring this?
>
> -
> This e-mail message may contain privileged and/or confidential information, 
> and is intended to be received only by persons entitled to receive such 
> information. If you have received this e-mail in error, please notify the 
> sender immediately. Please delete it and all attachments from any servers, 
> hard drives or any other media. Other use of this e-mail by you is strictly 
> prohibited.
>
>
> All e-mails and attachments sent and received are subject to monitoring, 
> reading and archival by Monsanto, including its subsidiaries. The recipient 
> of this e-mail is solely responsible for checking for the presence of 
> "Viruses" or other "Malware". Monsanto, along with its subsidiaries, accepts 
> no liability for any damage caused by any such code transmitted by or 
> accompanying this e-mail or any attachment.
> -
>
>
> -
> 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: maven spring eclipse and properties/spring config

2009-07-11 Thread Tim O'Brien
On Fri, Jul 10, 2009 at 1:54 PM, Vincent Fumo wrote:
> I'm converting an old project to maven and I have a question re: spring.
> This project has about 20 spring config files and it reads them all in on
> startup and uses the  In addition I have 4 properties files
> (local/dev/qa/prod) that I'd like to use to inject/filter/substitute values
> into them depending on the build. Lastly I am using the eclipse plugin to
> generate an eclipse project.
> What I need to know is the following :
>
> 1) where should I put the spring files? I am considering
> src/main/resources/spring

If you load them from the classpath, put them in src/main/resources.
By default everything in this directory will end up in target/classes
(if your project uses a packaging of "jar")

> 2) how should I best filter the props files? Should I use maven for this
> (using profiles in some way), or should I load the files in the app and use
> the spring properties configurator?

I don't think anyone on this list is qualified to make this
architectural decision for you.   But, if you wanted to use Maven
Resource filtering, you could. You would have a single properties
file:  whatever.properties which would contain references to arbitrary
properties such as "${whatever.jdbc.url}", then you would use profiles
and configure resource filtering on this properties file.

> 3) what is the best way to use the eclipse plugin to generate a project
> where I can run the app and it can see the newly filtered spring files
> (instead of the src ones)?
>

m2eclipse is going to automatically call "process-resources
resources:testResources" every time you change a resource and copy the
result to target/classes. You can control the profile via your
project's Maven preferences in m2eclipse.


> Can anyone help me out? I'd certainly give more info if needed.
>

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



Re: dependency on artifact javax.activation:activation version 1.1.1

2009-07-11 Thread Tim O'Brien
Instead of just adding the JBoss repository to your repositories in a
pom.xml.   Your best bet here is going to be to install a repository
manager, add all the repositories you need to a repository group, and
then configure your settings.xml to use a single repository group URL.

If you do this, you'll speed up your builds because Maven will only
need to query a single URL when trying to locate an artifact, and
you'll be able to search the group of repositories you have included
in your repository manager.

1. Download a repository manager
2. Add http://repository.jboss.com/maven2/ as a proxy repository
3. Add it to a repository group
4. Configure your Maven settings to use a single repo group as a mirrorOf *

An additional benefit is that you will no longer need to use
mavensearch.net which isn't as full featured as any of the search
capabilities already present in the three main repository managers.
Because the JBoss repository already generates the standard
lucene-based index format, you can just use the search capabilities of
your IDE plugin or your repo manager to search the repositories your
are using.   Make sure to configure your repository manager to
download the remote index for the JBoss repository manager.

Tim O'Brien


On Sat, Jul 11, 2009 at 5:29 AM, Edelson,
Justin wrote:
> As to your second question, m2eclipse will only index the repositories you 
> tell it to. Open up the Index View and you'll see the list of repos.
>
> Justin
>
> 
>
> From: Harper, Brad [mailto:brad.har...@fiserv.com]
> Sent: Fri 7/10/2009 6:00 PM
> To: Maven Users List
> Subject: dependency on artifact javax.activation:activation version 1.1.1
>
>
>
> While trying to keep our third-party dependencies current, we found that
> [1] reports a version 1.1.1 available for javax.activation:activation
> ... yet no such artifact version appears to exist in the central maven2
> repo.
>
>
>
> On the other hand, [2] reports this version for the JavaBeans Activation
> Framework and references the repo at http://repository.jboss.com/maven2.
>
>
>
>
> According to content at [3], this version of JAF was announced on
> 2007-Oct-22. The final release is available separately and in Java SE 6
> [presumably via subsequent updates].
>
>
>
> Oddly, an out-of-the-box maven running on the command line can't resolve
> javax.activation:activation:1.1.1, but it seems that m2eclipse can ...
> suggesting that the IDE plugin is hitting the jboss repo [even when the
> installed maven conf/settings.xml doesn't define jboss as a
> ].
>
>
>
> Questions:
>
>
>
>  Shouldn't this artifact version be available from the central repo?
> [Admittedly, the changes in the subject version appear to be minor.]
>
>
>
>  Does m2eclipse hit the jboss repo by default [in addition to central,
> etc.]?
>
>
>
> Brad
>
>
>
> [1] http://www.mavenbrowser.com/pom-report.html
>
> [2] http://www.mavensearch.net/
>
> [3] http://java.sun.com/javase/technologies/desktop/javabeans/jaf/
>
>
>
>
>
>

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



Re: mvn assembly:assembly won't package jars and ears, but mvn package will

2009-07-10 Thread Tim O'Brien
 clean package assembly:assembly
>> > *
>> > works! Suddenly. the assembly is built.
>> >
>> > Can someone explain the difference between
>> > *
>> >    $ mvn clean package
>> >    $ mvn assembly:assembly*
>> >
>> > and
>> >
>> >  * $ mvn clean package assembly:assembly*
>> >
>> > Why does the first one fail because of the dependency confusion, and the
>> > second one works fine?
>> >
>>
>> The first one is two _separate_ invocations of Maven.  invocations of
>> Maven
>> can only share artifacts via the local / remote repositories... so you
>> need
>> to run up as far as at least the *install* phase to allow the artifacts be
>> accessed from a subsequent invocation.
>>
>> so
>>
>> $ mvn clean install
>> $ mvn assembly:assembly
>>
>> would work (but this is not the solution you want)
>>
>> The second is_one single invocation of Maven_ thus the assembly:assembly
>> mojo can find the artifacts that were attached to the reactor during the
>> earlier phases/mojo executions.
>>
>> You should always try to make sure that your build will build successfully
>> when you have met the following conditions:
>>
>> 1. Blow away your local repository, e.g. rm -rf ~/.m2/repository
>> 2. Do a clean build without populating the local repository, e.g. mvn
>> clean
>> verify
>>
>> This will result in your build being one of the "holy grail maven builds".
>>
>> Such builds nearly always "just work"(TM) with the maven release plugin,
>> and
>> are generally considered to be the dog's bollicks
>>
>> If you want your build to be such a build, then what you need to do is
>> bind
>> an execution of the assembly plugin to a phase >= package.
>>
>> Then all you need to do to package your project is
>>
>> $ mvn clean package
>>
>> and you are done!
>>
>> -Stephen
>>
>> >
>> > On Thu, Jul 9, 2009 at 2:34 PM, Tim O'Brien 
>> > wrote:
>> >
>> > > David,
>> > >
>> > > It looks like
>> > > com.solbright.adinventory.projects.base:jar:jar:2.1.2-SNAPSHOT
>> > > can't be found in the local repository.   Instead of running
>> > > assembly:assembly by itself, try:  mvn install assembly:assembly
>> > >
>> > > Better yet, why not just bind the assembly goal to the package phase
>> > > of the project that is going to produce the assembly? like this:
>> > > http://tr.im/rBBw
>> > >
>> > > Maybe binding to the package phase isn't the right solution for you,
>> > > if you are looking for a list of phases, see  http://tr.im/rBAq
>> > >
>> > >
>> > > On Thu, Jul 9, 2009 at 12:49 PM, David Weintraub
>> > wrote:
>> > > > We have a project we're converting over to Maven. The structure is a
>> > bit
>> > > > convoluted:
>> > > >
>> > > > Project Root
>> > > >   apps.war: Builds apps.war
>> > > >   aimwebservices: Builds aimwebservices.war
>> > > >   ear: Builds adinventory.ear. Contains all other modules
>> > > >   projects
>> > > >      adplanning: Builds adplanning.jar
>> > > >      base
>> > > >         jar: Builds base.jar
>> > > >         har: Builds base-hib.har
>> > > >         servlet: Builds base-ui.jar
>> > > >
>> > > > For various reasons, we do not want the version names in any of
>> > > > these
>> > > files
>> > > > we create.
>> > > >
>> > > > The project is structured so that most of the components depend upon
>> > > > base.jar. The aimwebservices.war and apps.war also depend upon the
>> > > > base-hib.har and the base-ui.jar.
>> > > >
>> > > > The adinventory.ear file contains all of the built wars, hars, and
>> > jars.
>> > > > Each component directory contains a pom.xml.
>> > > >
>> > > > When I do a "mvn package", everything is built, and the final result
>> > > > is
>> > > the
>> > > > adinventory.ear file which contains all the jars, hars, and wars
>> > > > that
>> > it
>> > > is
>> > > > suppose to have. This is what I want. Beautiful.
>> > &

Re: mvn assembly:assembly won't package jars and ears, but mvn package will

2009-07-09 Thread Tim O'Brien
David,

It looks like com.solbright.adinventory.projects.base:jar:jar:2.1.2-SNAPSHOT
can't be found in the local repository.   Instead of running
assembly:assembly by itself, try:  mvn install assembly:assembly

Better yet, why not just bind the assembly goal to the package phase
of the project that is going to produce the assembly? like this:
http://tr.im/rBBw

Maybe binding to the package phase isn't the right solution for you,
if you are looking for a list of phases, see  http://tr.im/rBAq


On Thu, Jul 9, 2009 at 12:49 PM, David Weintraub wrote:
> We have a project we're converting over to Maven. The structure is a bit
> convoluted:
>
> Project Root
>   apps.war: Builds apps.war
>   aimwebservices: Builds aimwebservices.war
>   ear: Builds adinventory.ear. Contains all other modules
>   projects
>      adplanning: Builds adplanning.jar
>      base
>         jar: Builds base.jar
>         har: Builds base-hib.har
>         servlet: Builds base-ui.jar
>
> For various reasons, we do not want the version names in any of these files
> we create.
>
> The project is structured so that most of the components depend upon
> base.jar. The aimwebservices.war and apps.war also depend upon the
> base-hib.har and the base-ui.jar.
>
> The adinventory.ear file contains all of the built wars, hars, and jars.
> Each component directory contains a pom.xml.
>
> When I do a "mvn package", everything is built, and the final result is the
> adinventory.ear file which contains all the jars, hars, and wars that it is
> suppose to have. This is what I want. Beautiful.
>
> The problem is I want to package this adinventory.ear file with a bunch of
> scripts, configuration files, and other items that are in the
> src/main/instance directory. I configured a assembly, and am using the
> assembly plugin. The problem is when I run "mvn assembly:assembly", I get
> the following error:
>
> [INFO]
> 
> [INFO] Building servlet
> [INFO]
> 
> [INFO] [resources:resources]
> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered
> resources, i.e. build is platform dependent!
> [INFO] Copying 16 resources
> [INFO] snapshot com.solbright.adinventory.projects.base:jar:2.1.2-SNAPSHOT:
> checking for updates from snapshot
> Downloading:
> http://aladdin.solbright.com:8082/nexus/content/repositories/snapshots//com/solbright/adinventory/projects/base/jar/2.1.2-SNAPSHOT/jar-2.1.2-SNAPSHOT.jar
> [INFO] Unable to find resource
> 'com.solbright.adinventory.projects.base:jar:jar:2.1.2-SNAPSHOT' in
> repository snapshot
> (http://aladdin.solbright.com:8082/nexus/content/repositories/snapshots/)
> [INFO]
> 
> [ERROR] BUILD ERROR
> [INFO]
> 
> [INFO] Failed to resolve artifact.
>
> Missing:
> --
> 1) com.solbright.adinventory.projects.base:jar:jar:2.1.2-SNAPSHOT
>
>  Try downloading the file manually from the project website.
>
>  Then, install it using the command:
>      mvn install:install-file
> -DgroupId=com.solbright.adinventory.projects.base -DartifactId=jar
> -Dversion=2.1.2-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
>
>  Alternatively, if you host your own repository you can deploy the file
> there:
>      mvn deploy:deploy-file
> -DgroupId=com.solbright.adinventory.projects.base -DartifactId=jar
> -Dversion=2.1.2-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url]
> -DrepositoryId=[id]
>
>  Path to dependency:
>   1) com.solbright.adinventory.projects.base:servlet:jar:2.1.2-SNAPSHOT
>   2) com.solbright.adinventory.projects.base:jar:jar:2.1.2-SNAPSHOT
>
> --
> 1 required artifact is missing.
>
> for artifact:
>  com.solbright.adinventory.projects.base:servlet:jar:2.1.2-SNAPSHOT
>
> from the specified remote repositories:
>  snapshot
> (http://aladdin.solbright.com:8082/nexus/content/repositories/snapshots/),
>  production
> (http://aladdin.solbright.com:8082/nexus/content/repositories/releases/),
>  Nexus (http://aladdin.solbright.com:8082/nexus/content/groups/public)
>
>
>
> [INFO]
> 
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> 
> [INFO] Total time: 9 seconds
> [INFO] Finished at: Thu Jul 09 12:10:15 GMT-05:00 2009
> [INFO] Final Memory: 29M/194M
> [INFO]
> 
>
> Why does the build suddenly fail when I run the assembly:assembly lifecycle,
> yet the same setup succeeds when I do "mvn package"?
>
> For convinence, the pom files I use are at
> . I've also attached it to
> this message.
>
> --
> David Weintraub
> qazw...@gmail.com
>
>
>
> --

RE: Cookbook

2009-07-08 Thread Tim O'Brien

Don't get me started on the Maven site, I'd like to remain on speaking terms
with the Maven Developer's list.   I don't believe that the Site plugin
produces documentation for a few reasons.   I'm currently an advocate of
removing any and all pages on the Maven site that are half-finished.


mgainty wrote:
> 
> 
> you might want to update the maven site which currently has no cookbook
> http://maven.apache.org/users/cookbook/index.html
> right now there are yards of statements up there with almost no links to
> referenced terms
> 
> thanks
> Martin Gainty 
> __ 
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>  
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
> destinataire prévu, nous te demandons avec bonté que pour satisfaire
> informez l'expéditeur. N'importe quelle diffusion non autorisée ou la
> copie de ceci est interdite. Ce message sert à l'information seulement et
> n'aura pas n'importe quel effet légalement obligatoire. Étant donné que
> les email peuvent facilement être sujets à la manipulation, nous ne
> pouvons accepter aucune responsabilité pour le contenu fourni.
> 
> 
> 
> 
>> Date: Wed, 8 Jul 2009 17:09:21 +0930
>> Subject: Re: Cookbook
>> From: baerr...@gmail.com
>> To: users@maven.apache.org
>> 
>> On Wed, Jul 8, 2009 at 4:24 PM, Juven Xu wrote:
>> > Hi, Peter:
>> >
>> > The Maven Guide is still in progress, take a look at this blog:
>> >
>> http://www.sonatype.com/people/2009/04/maven-definitive-guide-project-infrastructure/
>> 
>> Thanks for that link.
>> I've been hassling Tim for an explanation of the tool chain they use for
>> books.
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>> 
> 
> _
> Hotmail® has ever-growing storage! Don’t worry about storage limits. 
> http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009
> 

-- 
View this message in context: 
http://www.nabble.com/Cookbook-tp24385718p24391342.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: Cookbook

2009-07-08 Thread Tim O'Brien



Peter Horlock wrote:
> 
> Hey, Tim,
> 
> where are you??? One year ago, you wrote and wrote and wrote for "The
> definitive guide".
> Now it's in Version 0.6 and not much if not nothing at all has changed
> during the last months.
> Also, I can't wait to see the new Maven cookbook! Maybe you got an alpha
> at
> hand?
> Just let me know, I would be at hand to read it and to give you some
> feedback!
> 
> I've got my copy of the Definitive guide, and I would buy the cookbook
> right
> away -
> if I could. Seems like you'r doing too much of sonatype / nexus / maven
> training / m2eclipse, hmmm?
> ;-)
> 
> Don't let them stop you from writing - keep up the good work!
> 
> Peter
> 
> 

Well thanks for the note, I'm still around.  The priority for a while has
been this book: http://tr.im/rnFW

The community has established Maven as the solid choice it might not have
been in 2006 by focusing on quality and keeping up the pace of releases.  
I'm sensing that "we" (and when I say "we", I mean the community of users
and developers), have to fight less to achieve Maven adoption at a company
or on a project now that Maven is a solid and tested tool.   I'm not
convinced that a majority of our audience is convinced about repository
management, and that's one of the reasons why I felt that we needed a
separate book on repository management.  I also didn't want the Maven book
to become a 1000-page book (see the sendmail book).

Look for the repo book to get a little thicker over the next month, and then
expect the m2eclipse book (which was also once a chapter in the maven def
guide) to get some attention after that. We do need a Maven Cookbook, I
don't have a secret alpha, but there is a GitHub repo for the effort that
has been seeded with the Nexus book content. 
-- 
View this message in context: 
http://www.nabble.com/Cookbook-tp24385718p24391200.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: Cookbook

2009-07-08 Thread Tim O'Brien

I announced the book as an open source project (Creative Commons ND-NC-BY) in
April.   It took us that long to clear up some lingering questions about
licensing.  Here's the announcement: http://tr.im/rnDc

If you want to see the code for the EN version:

http://github.com/sonatype/maven-guide-en/tree/master

If you are looking for a better multi-module approach to building a book,
look at the Nexus book.   This project separates examples, content, various
formats, and the site into separate projects.

http://github.com/sonatype/nexus-book/tree/master


baerrach wrote:
> 
> On Wed, Jul 8, 2009 at 4:24 PM, Juven Xu wrote:
>> Hi, Peter:
>>
>> The Maven Guide is still in progress, take a look at this blog:
>> http://www.sonatype.com/people/2009/04/maven-definitive-guide-project-infrastructure/
> 
> Thanks for that link.
> I've been hassling Tim for an explanation of the tool chain they use for
> books.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Cookbook-tp24385718p24390651.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: Definitive Guide - is it real?

2008-04-14 Thread Tim O'Brien
It's in the works. I think it would be better to write a book  
about writing a book, but only because I wanted to write that.


Tim

On Apr 14, 2008, at 11:07 AM, Dan Tran wrote:


big +1.

On Mon, Apr 14, 2008 at 8:23 AM, Brian E. Fox <[EMAIL PROTECTED] 
> wrote:
Maybe we should add a chapter to the book to show how to make the  
book?



-Original Message-
From: Manfred Moser [mailto:[EMAIL PROTECTED]
Sent: Monday, April 14, 2008 12:14 AM
To: users@maven.apache.org
Subject: Re: Definitive Guide - is it real?




Jason van Zyl-2 wrote:



Right, this is where the book-like features are missing from Doxia  
and



though I would like to fix them the primary concern at hand was
getting the Maven book out.




Sounds like my suspicion is correct and you can currently not use  
Doxia

to
create something like the Definitive Guide. I hope I am wrong and
somebody
can show me how to get it going but at this stage I have the  
feeling I

will
have to learn docbook ..
--
View this message in context:
http://www.nabble.com/Definitive-Guide---is-it-real--tp16656704s177p1667
0486.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


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




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




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



Re: Definitive Guide - is it real?

2008-04-14 Thread Tim O'Brien
Manfred,  sorry it took me so long to respond.   (I wasn't subscribed  
to the user list until yesterday ).


On Apr 13, 2008, at 11:14 PM, Manfred Moser wrote:





Jason van Zyl-2 wrote:



Right, this is where the book-like features are missing from Doxia  
and

though I would like to fix them the primary concern at hand was
getting the Maven book out.




Sounds like my suspicion is correct and you can currently not use  
Doxia to
create something like the Definitive Guide. I hope I am wrong and  
somebody
can show me how to get it going but at this stage I have the feeling  
I will

have to learn docbook ..


Here, I wrote about why we converted to DocBook:  
http://blogs.sonatype.com/book/2008/04/14/120817710.html

I know it isn't party line in Mavenland, but I can't stand APT.   
Writing a 500+ page book that has to stay up to date for a few  
decades, you've got to think about things like roundtrip from wiki- 
like to pre-print back to wiki-like.IMO, if you really are writing  
a big book, writing it in APT would be like trying to sail the pacific  
in a small raft, you can certainly do it. Now, there's an idea  
brewing out there about creating some good roundtrip tools from doxia  
markup to docbook and then back again.   If we ever see that, then I  
think that's going to be the thing that people migrate to, but I can't  
wait for that to materialize.




--
View this message in context: 
http://www.nabble.com/Definitive-Guide---is-it-real--tp16656704s177p16670486.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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




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