Re: File name filtering in maven-archetype plugin

2010-02-19 Thread Adam Leggett (UPCO)
I blogged about how to do this here:
http://blogs.mikeci.com/2010/01/14/working-with-custom-maven-archetypes-part-1/

See step four - filtering a file name.

Cheers

Adam

On Fri, 2010-02-19 at 17:27 +0400, Aleksey Didik wrote:
> Hello all,
> I have some properties files in my maven archetype and I want to name it 
> in real project as /.properties/
> Is it possible to do?
> Create /${archetypeId}.properties /file in archetype project and use 
> src/main/properties/${artifactId}.properties in 
> archetype.xml is not work, as expected.
> May be anybody know solution?
> 
> Thanks and best regards,
> Aleksey Didik.
> 
> 
-- 
Adam Leggett
Chief Architect
Mike CI - Hosted Continuous Integration
http://mikeci.com

https://twitter.com/builtbyadam



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



Re: skip run of a plugin in a phase without changing pom.xml

2010-01-27 Thread Adam Leggett (UPCO)
If its skipping execution of your  task that's required, I expect
you could wrap an antcontrib  task around it. You'd probably need to
add the antcontrib dependency to the antrun plugin so it can find the
task too.

Adam

On Wed, 2010-01-27 at 13:32 +0200, Maruf Aytekin wrote:
> Hi All
> 
> Is there a way to not execute a maven ant run without being changeing pom.xml.
> 
> I have following setup:
> 
> 
>   
> org.apache.maven.plugins
> maven-antrun-plugin
> 
>   
> Findbugs_Run
> verify
> 
>   
> 
> 
>  refid="maven.compile.classpath"/>
> 
> 
>   
> 
> 
>   run
> 
>   
> 
>   
> 
> 
> Can I pass a parameter to maven execution to skip this ant run in phase 
> verify??
> 
> Many thanks
> Maruf
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 
-- 
Adam Leggett
Chief Architect
Mike CI - Hosted Continuous Integration
http://mikeci.com

https://twitter.com/builtbyadam



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



Re: install maven project from repository to local fs

2010-01-18 Thread Adam Leggett (UPCO)
When you say 'repo' do you mean source code repository? You can use the
Maven SCM plugin get checkout your project, prior to running install -

mvn scm:checkout
-DconnectionUrl=scm:svn:http://somehost/somepath/someproject

On Mon, 2010-01-18 at 14:40 +0200, eyal edri wrote:
> I'm not sure this plugin is what i need.
> 
> what i would want is simply to run "mvn install project-name" from any
> directory on the fs and maven will run the 'install' phase without
> having
> the pom & code locally (will read it from the repo).
> 
> Eyal.

-- 
Adam Leggett
Chief Architect
Mike CI - Hosted Continuous Integration
http://mikeci.com

https://twitter.com/builtbyadam



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



Re: How to customize the project info reports-project-info-reports:project-team

2010-01-11 Thread Adam Leggett (UPCO)
On Mon, 2010-01-11 at 05:35 -0800, DebasisM wrote:
> Hi All,
>  I am generating the site through site goal.The project-team list page
> contains some info which is not suitable for all type of project.Examle-
> 
> The Team
> 
> A successful project requires many people to play many roles. Some members
> write code or documentation, while others are valuable as testers,
> submitting patches and suggestions.
> 
> The team is comprised of Members and Contributors. Members have direct
> access to the source of a project and actively evolve the code-base.
> Contributors improve the project through submission of patches and
> suggestions to the Members. The number of Contributors to the project is
> unbounded. Get involved today. All contributions to the project are greatly
> appreciated.
> 
> Above is required for a opensource project.I want only the table.How can i
> remove this part?
> 
> Thanks,
> Debasis

I seem to remember adding a patch for this a while back -

http://jira.codehaus.org/browse/MPIR-35

The text you mention is contained in a properties file. I added a mojo
param to allow you to specify a custom file location.

Adam


-- 
Adam Leggett
Chief Architect
Mike CI - Hosted Continuous Integration
http://mikeci.com


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



Re: release plugin: Why is allowTimestampedSnapshots being ignored?

2009-12-10 Thread Adam Leggett (UPCO)
You dont need to use the release plugin to deploy a snapshot.

A simple 'mvn deploy' will suffice.

Thanks

Adam

On Thu, 2009-12-10 at 07:35 -0800, laredotornado wrote:
> Hi,
> 
> I'm using Maven 2 and trying to release a snapshot version of my Java web
> app.  Here is the command I'm running from my root project folder ...
> 
> > mvn release:prepare -DdryRun=true -Dresume=false
> > -DallowTimestampedSnapshots=true
> 
> Eventually the build dies because of "Can't release project due to non
> released dependencies".  I thought adding "-DallowTimestampedSnapshots=true"
> was supposed to allow this.  Could someone provide some clarity on how to
> release a snapshot version of my project?  Below is the last part of running
> the above command.
> 
> Thanks,  - Dave
> 
> 
> 
> [INFO] [release:prepare {execution: default-cli}]
> [INFO] Verifying that there are no local modifications...
> [INFO] Executing: /bin/sh -c cd /Users/dalvarado/source/tours && cvs -z3 -f
> -d :pserver:dalvar...@localhost:/usr/local/cvs/nic -n -q update -d
> [INFO] Working directory: /Users/dalvarado/source/tours
> [INFO] Checking dependencies and plugins for snapshots ...
> There are still some remaining snapshot dependencies.: Do you want to
> resolve them now? (yes/no) no: : yes
> Dependency type to resolve,: specify the selection number ( 0:All 1:Project
> Dependencies 2:Plugins 3:Reports 4:Extensions ): (0/1/2/3) 1: : 0
> Resolve All Snapshots.: 'myco.galc.capitol.tours:myco-galc-capitol-tours'
> set to release? (yes/no) yes: : yes
> What is the next development version? (1.1-SNAPSHOT) 1.1-SNAPSHOT: : 
> [INFO]
> 
> [ERROR] BUILD FAILURE
> [INFO]
> 
> [INFO] Can't release project due to non released dependencies :
> myco.galc.capitol.tours:myco-galc-capitol-tours:pom:1.0-SNAPSHOT
> in project 'myco GA Capitol Tours Webapp'
> (myco.galc.capitol.tours:myco-galc-capitol-tours-webapp:war:1.0-SNAPSHOT)
> [INFO]
> 
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> 
> [INFO] Total time: 23 seconds
> [INFO] Finished at: Thu Dec 10 08:28:55 MST 2009
> [INFO] Final Memory: 12M/23M
> [INFO]
> 
> 


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



Re: How to prevent deployment on release

2009-12-10 Thread Adam Leggett (UPCO)
Not massively complicated, have a look at the responses to this query
about a similar issue. In this case a need to prevent deploying the
sources jar as part of a release.

http://stackoverflow.com/questions/437085/mvn-releaseperform-without-source-ending-up-in-artifactory

On Thu, 2009-12-10 at 10:08 -0500, Jim Collings wrote:
> How complicated is that to do?  We don't generally use profiles around
> here so I've little experience with them.
> 
> On Thu, Dec 10, 2009 at 9:48 AM, Adam Leggett (UPCO)
>  wrote:
> > I believe its the default release profile that triggers the site
> > deployment stuff. There is an option for setting custom ones on the
> > perform mojo:
> >
> > http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html#releaseProfiles
> >
> >
> > On Thu, 2009-12-10 at 09:25 -0500, Jim Collings wrote:
> >> The objective is to prevent maven's attempt at site deployment.
> >> Everything else, though, I want. Problem is that when I use the xml
> >> below, it ONLY installs.
> >>
> >> So I added goals with install:
> >>
> >> 
> >> org.apache.maven.plugins
> >> maven-release-plugin
> >> ...someversion...
> >> 
> >> ...appropriate connection
> >> stuff...
> >> ...appropriate connection stuff...
> >> 
> >> install
> >> 
> >> 
> >>  
> >>
> >>
> >> Clue?
> >>
> >> -
> >> 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 prevent deployment on release

2009-12-10 Thread Adam Leggett (UPCO)
I believe its the default release profile that triggers the site
deployment stuff. There is an option for setting custom ones on the
perform mojo:

http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html#releaseProfiles


On Thu, 2009-12-10 at 09:25 -0500, Jim Collings wrote:
> The objective is to prevent maven's attempt at site deployment.
> Everything else, though, I want. Problem is that when I use the xml
> below, it ONLY installs.
> 
> So I added goals with install:
> 
> 
> org.apache.maven.plugins
> maven-release-plugin
> ...someversion...
> 
> ...appropriate connection
> stuff...
> ...appropriate connection stuff...
> 
> install
> 
> 
>  
> 
> 
> Clue?
> 
> -
> 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: If there any way to execute plugin conditionally?

2009-12-10 Thread Adam Leggett (UPCO)
No problem Dmitry, glad to share the knowledge :).

On Wed, 2009-12-09 at 13:08 -0500, Dmitry Skavish wrote:
> Thanks a lot! Works perfectly! That's exactly what I was looking for.
> 
> On Wed, Dec 9, 2009 at 12:28 PM, Adam Leggett (UPCO) <
> adam.legg...@upco.co.uk> wrote:
> 
> > Did you look at profiles for this -
> > http://maven.apache.org/guides/introduction/introduction-to-profiles.html?
> >
> > They can be activated with an env var.
> >
> > Thanks
> >
> > Adam
> >
> > On Wed, 2009-12-09 at 12:24 -0500, Dmitry Skavish wrote:
> > > Hi,
> > >
> > > I need to run dependency-copy plugin only when some environment variable
> > > set. Is it possible? I could not find anything even remotely related to
> > > that. Thanks!
> > >
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> > For additional commands, e-mail: users-h...@maven.apache.org
> >
> >
> 
> 


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



Re: If there any way to execute plugin conditionally?

2009-12-09 Thread Adam Leggett (UPCO)
Did you look at profiles for this -
http://maven.apache.org/guides/introduction/introduction-to-profiles.html ?

They can be activated with an env var.

Thanks

Adam

On Wed, 2009-12-09 at 12:24 -0500, Dmitry Skavish wrote:
> Hi,
> 
> I need to run dependency-copy plugin only when some environment variable
> set. Is it possible? I could not find anything even remotely related to
> that. Thanks!
> 


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



Re: Automating dependencyManagement enforcement

2009-12-01 Thread Adam Leggett (UPCO)
Have you checked the possibility of using the enforcer plugin for your
use case?

This does something close:
http://maven.apache.org/enforcer/enforcer-rules/bannedDependencies.html

or you could try creating a custom rule:

http://maven.apache.org/enforcer/enforcer-api/writing-a-custom-rule.html

Adam



On Tue, 2009-12-01 at 03:09 -0800, Bryan Loofbourrow wrote:
> I'm hoping for advice about the best way to accomplish something in
> Maven. I am willing to write a plugin if that's the right answer.
> 
>  
> 
> Here's the thing I want to accomplish:
> 
>  
> 
> Given a Maven project that builds an ear/war, and which contains a
> dependencyManagement section, generally inherited from its parent or a
> more distant ancestor, fail the Maven build if any version chosen for
> inclusion in the reactor (or the ear or war, if you want to look at it
> that way) does not match the version declared in the
> dependencyManagement section.
> 
>  
> 
> The point being, of course, to catch those cases where Maven's version
> choices override the ones I made in dependencyManagement, and fail fast.
> 
> 
>  
> 
> So, is there a way to do it now? If not, what would be the best practice
> for accomplishing it? Write a plugin that executes as part of the ear
> build? Write a plugin that executes as part of some separate analysis
> project, and which uses the ear artifact as a dependency or parameter?
> 
>  
> 
> I will confess that there's part of me that thinks that this whole need
> should not arise, that Maven should simply decline to add anything to
> the reactor that matches something declared in dependencyManagement in
> every way except for a mismatching version. That's a separate
> discussion. If anyone knows whether 3.0 operates more like that, I'd be
> interested to know it.
> 
>  
> 
> Thanks,
> 
>  
> 
> -- Bryan
> 
>  
> 
> Bryan Loofbourrow
> 
> Principal Software Engineer
> 
> Amdocs Interactive
> 
> o:+1.206.830.7724 | m: +1.707.849.8892 |
> 
> bry...@amdocs.com  
> 
> 
> 
> This message and the information contained herein is proprietary and 
> confidential and subject to the Amdocs policy statement,
> you may review at http://www.amdocs.com/email_disclaimer.asp


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



Re: adding jdbc for ms-sql as dependency from maven

2009-11-12 Thread Adam Leggett (UPCO)
You can get the deploy-file/install-file goals to generate a POM for
you:

http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html#generatePom

http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html#generatePom



On Thu, 2009-11-12 at 12:17 +0200, eyal edri wrote:
> [WARNING] Missing artifact metadata for
> com.microsoft.sqlserver.jdbc:sqljdbc:jar:2.0
> 
> is there any way i can create a metadata for this local jar?
> 
> Eyal.


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



Re: particular version of maven-dependency-plugin

2009-11-12 Thread Adam Leggett (UPCO)
Try using the FQ plugin name/coordinates:

mvn org.apache.maven.plugins:maven-dependency-plugin:2.1:tree

Cheers

Adam


On Thu, 2009-11-12 at 10:49 +0100, Karl Heinz Marbaise wrote:
> Hi,
> 
> i'm trying to run the maven-dependency-plugin from command line without
> putting the information into the pom of the project...
> 
> 
> Just simply using:
> 
> mvn dependency:tree
> 
> But what i'm astonished about is that it always will download the 2.0 
> release of the plugin and not the latest (2.1)...
> 
> So may be i oversight something...
> 
> How can i define to use a particular version of plugin in particular the 
> maven-dependency-plugin?
> 
> Using the following:
> mac:supose km$ mvn -version
> Using Java version: 1.6.0
> Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
> Java version: 1.6.0_13
> Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
> Default locale: en_US, platform encoding: MacRoman
> OS name: "mac os x" version: "10.5.8" arch: "x86_64" Family: "mac"
> 
> 
> Kind regards
> Karl Heinz Marbaise


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



Re: File system repo

2009-11-11 Thread Adam Leggett (UPCO)
Have you considered/tried specifying the arbitrary jars as system scoped
dependencies?

http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope

On Wed, 2009-11-11 at 08:34 -0800, monkeyden wrote:
> I own and have read the book.  Perhaps "repo" is overstating what I'm trying
> to do here.  I'm really just trying to pull 2 arbitrary jars into my build. 
> The phrase "file system repo" just seemed to do what I wanted.  Apparently,
> it doesn't mean what I took it to mean.  There is nothing in the book
> describing how to do this, to my knowledge.
> 
> 
> Anders Hammar wrote:
> > 
> > I would also argue that you should read up on Maven and how it uses repos.
> > It's much easier if you actually understand the core Maven stuff, than us
> > telling you what to do. Less misunderstandings for one thing.
> > http://www.sonatype.com/documentation/books/maven-defguide
> > 
> > /Anders
> > 
> > On Wed, Nov 11, 2009 at 00:23, Wendy Smoak  wrote:
> > 
> >> On Tue, Nov 10, 2009 at 3:34 PM, monkeyden  wrote:
> >>
> >> > These are simply directories in my maven project.  They are
> >> > created manually and they each contain a jar file and a pom file.  If
> >> this
> >> > isn't possible then what is a file system repository, if anything?  Is
> >> it
> >> > just the local maven repo (in the .m2 folder)?
> >>
> >> A file system repo is a remote repo that happens to be on the file
> >> system and uses a file:// url.  It is not the same as your local repo.
> >>
> >> For anyone to help you figure out what's wrong, we'll need more
> >> details.  If you've manually created the repo, then there's a chance
> >> you haven't done it right and that's why it's not working.  What
> >> exactly is the structure and contents under the 'lib' directory?
> >>
> >> --
> >> Wendy
> >>
> >> -
> >> 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: There are no tests to run

2009-11-11 Thread Adam Leggett (UPCO)
If you absolutely *must* put your tests in a dir other than the
convention then you can configure that too:

http://maven.apache.org/pom.html#Directories

On Wed, 2009-11-11 at 09:48 -0600, Wayne Fay wrote:
> >
> >${basedir}/src/**/Test*.java
> >
> 
> In Maven, tests belong in ${basedir}/src/test/java. Move them there,
> remove this include from surefire plugin node, and everything should
> run just fine. (AKA stop fighting Maven and start using it, drink the
> kool-aid, etc...)
> 
> 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: debug

2009-11-11 Thread Adam Leggett (UPCO)
If you created your added your project vy using the maven-eclipse-plugin
i.e mvn eclipse:eclipse, it will not by default create the appropriate
eclipse web tools platform metadata that results in you being able to do
Run As>Run On Server etc.

There is helpful page on the plug-in site that shows how you can
configure your project to do this though:

http://maven.apache.org/plugins/maven-eclipse-plugin/examples/multi-module-projects.html

I think that page also includes a downloadable example to look at too.

Cheers

Adam


On Wed, 2009-11-11 at 12:36 +0100, Anders Hammar wrote:
> What you want to use is remote debugging. That would be a complete
> Maven-independent setup.
> For Maven integration in Eclipse, I would suggest M2Eclipse.
> 
> /Anders
> 
> On Wed, Nov 11, 2009 at 11:45, maven apache  wrote:
> 
> > Hi:
> >
> > I have two project A and project B,and B is a web module which is to be
> > deployed under the servlet contain, the B has a dependency of A.
> > There is a servlet in A,and I config this servlet in the web.xml under the
> > B/web-info.
> > Now I want to add breakpoints in the servlet (in the project A) to get the
> > request raw data.
> > But I do not know how to debug it/
> > Since if it is a common web project created by the eclipse wizard,I can
> > start by the menu " debug on the server",but the web module created by the
> > maven did not have the menu.
> >


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



Re: Maven archetypes and Velocity

2009-11-09 Thread Adam Leggett (UPCO)
I think to define custom filtered properties you need to create an
archetype.properties file:

http://maven.apache.org/plugins/maven-archetype-plugin/examples/create-with-property-file.html

Thanks,

Adam

On Mon, 2009-11-09 at 14:21 +0100, Gajo Csaba wrote:
> Hello,
> 
> I have a very simple question regarding archetypes. I've created my own 
> basic archetype, and in archetype-resources/src/main/java/App.java I 
> wrote the following:
> 
> package $xxx
> 
> Installed the archetype, created a new project with it and also added 
> the -Dxxx=abc parameter... and it remained $xxx. I was expecting $xxx to 
> be replaced with abc. Is this not how it's supposed to work?
> 
> Thanks, Csaba
> 
> 
> 
> 
> -
> 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