Re: Maven archetype

2011-10-03 Thread Dennis Lundberg
Hi

Did you try this variant?

  


On 2011-10-03 17:59, Nalini Chavala wrote:
> 
> Hi,
> 
> I am trying to create a maven archetype and followed the link
> 
> http://maven.apache.org/archetype/maven-archetype-plugin/
> 
> http://code.google.com/p/jianwikis/wiki/HowToCreateMavenArchetypeFromProject
> 
> 
> I was able to create an archetype with default structure but I like to create 
> a template with the artifact Id.
> Eg:
>Templeate-java
>Templeate-ejb
> 
> 
> I need to have a template with like
> 
>   Eg:
>  Artificatid-java
>  Artifactid-ejb
> 
> 
> I have specified the archetype-metadata.xml with "__artifactId__Client"
> 
> 
> 
>name="${artifactId}-Client">
>   
> 
>   src/main/java/sf/iasc
>   
> **/*.java
> **/*.xml
>   
> 
> 
>   src/test/java
>   
> **/*.xml
> **/*.java
>   
> 
>   
> 
>   
> 
>   
> 
> 
> 
> Please let me know how to resolve the issue.
> 
> Thanks
> 
> 


-- 
Dennis Lundberg

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



Maven archetype

2011-10-03 Thread Nalini Chavala

Hi,

I am trying to create a maven archetype and followed the link

http://maven.apache.org/archetype/maven-archetype-plugin/

http://code.google.com/p/jianwikis/wiki/HowToCreateMavenArchetypeFromProject


I was able to create an archetype with default structure but I like to create a 
template with the artifact Id.
Eg:
   Templeate-java
   Templeate-ejb


I need to have a template with like

  Eg:
 Artificatid-java
 Artifactid-ejb


I have specified the archetype-metadata.xml with "__artifactId__Client"



  
  

  src/main/java/sf/iasc
  
**/*.java
**/*.xml
  


  src/test/java
  
**/*.xml
**/*.java
  

  

  

  



Please let me know how to resolve the issue.

Thanks



Re: Dependency properties defined in settings.xml are not being resolved.

2011-10-03 Thread Maxime Gréau
Hi,

The best practice is to always define the default value for a property in a
parent pom. Then you can use settings.xml (local or global) to override this
property.

In your specific case, when the problem appears, you can execute the
followings goals :
1) mvn help:effective-settings to see the content of the settings file that
Maven is using
2) mvn help:active-profiles to see if your profile is active

Regards

Maxime Gréau.
mgreau.com
*Auteur du livre **Apache Maven - Maîtrisez l'infrastructure d'un projet
Java EE* 



2011/10/1 

>
> Using Maven 2.2.1
> I have defined a profile in my settings.xml file, and specified some
> properties. This profile is also listed as an active profile.
>
> For example:
>
>  third-party-lib-versions
>  
>1.2.16
>  
>
>
>  third-party-lib-versions
>
>
> Then I have a dependency in my pom, which references the property:
>
>
>log4j
>log4j
>${log4j.version}
>
>
> In most cases Maven 2.2.1 will inject the property just fine. But it seems
> to also end up creating a $M2_REPO/log4j/log4j/${log4j.version}, and when I
> run "mvn test", it complains
> [INFO] Unable to find resource 'log4j:log4j:pom:${log4j.version}' in
> repository central (xxx)
>
> Is there something else that I need to do to ensure that properties defined
> in settings.xml are always processed ?
>
> Thanks
> Aspi Engineer
> Putnam Investments
>
>
>
> This message is intended for the recipient only and is not meant to be
> forwarded or distributed in any other format. This communication is for
> informational purposes only. It is not intended as an offer or solicitation
> for the purchase or sale of any financial instrument, or security, or as an
> official confirmation of any transaction. Putnam does not accept purchase or
> redemptions of securities, instructions, or authorizations that are sent via
> e-mail. All market prices, data and other information are not warranted as
> to completeness or accuracy and are subject to change without notice. Any
> comments or statements made herein do not necessarily reflect those of
> Putnam Investments, LLC (DBA Putnam Investments) and its subsidiaries and
> affiliates. If you are not the intended recipient of this e-mail, please
> delete the e-mail.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: Problems with MAVEN's-ANT on OpenVMS

2011-10-03 Thread Wayne Fay
> I was never expecting that maven is using it's own ANT !

Its not "using its own Ant." It simply does not use the Ant that you
previously installed but rather uses the Ant jars directly from its
cache.

> Now with maven it just did not work and the reason why is: "Maven uses it's
> own ANT lib files !!!"
>
> I was not expecting that maven reinvents the wheel.

It doesn't. This is a failure of your understanding of how Maven works.

> So then - be it as it is --- how can we enforce maven to use a particular
> installed ANT version and not use the maven-internal ANT ?

You simply need to "release" your own version of Ant using a specific
version eg 1.8-JOSEPH and then specifically depend on that version in
your Maven pom. You probably want to lock down the version with
[1.8-JOSEPH] to prevent Maven from helpfully using
a different version. You could use a "real" version like 1.8.2 but
realize that **will** cause problems in the future if/when Ant
releases their own version 1.8.2 jars.

Deploy your Ant version to your Repo Manager (assuming you are using
Nexus et al) and you should be all set.

Wayne

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



Re: why annotation is in comment line for plugin class

2011-10-03 Thread Stephen Connolly
mojo's can be written in Java 1.4, which does not support annotations.

These are not annotations but actually javadoc tags

On 3 October 2011 10:00, justin tian  wrote:
> Hi,
>
> I see in this link
> http://maven.apache.org/guides/plugin/guide-java-plugin-development.html
>
> package sample.plugin;
>
> import org.apache.maven.plugin.AbstractMojo;
> import org.apache.maven.plugin.MojoExecutionException;
>
> /**
>  * Says "Hi" to the user.
>  ** @goal sayhi*
>  */
> public class GreetingMojo extends AbstractMojo
> {
>    public void execute() throws MojoExecutionException
>    {
>        getLog().info("Hello, world.");
>    }
> }
>
> The comment line starting with "@goal" is an example of an annotation. This
> annotation is required, but there are a number of annotations which can be
> used to control how and when the mojo is executed.
>
>
> I have one question, why annotation can be in comment line, whether it
> still take effect in comment line, I do a similiar testing, seems it
> can not work,
>
>
> Can anyone help to take a look, thanks a lot!
>

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



Re: Http(s) transport layer change (call for early adopters users)

2011-10-03 Thread Jeff MAURY
Hello,

I have build Hadoop trunk with this version without problems.

Jeff

On Mon, Oct 3, 2011 at 10:24 AM, Olivier Lamy  wrote:

> Hello,
> In the current maven core dev trunk, we have recently replace the
> http(s) transport layer from lightweight wagon (based on default jdk
> http(s) mechanism) to the wagon http module based on Apache httpclient
> [1].
>
> This change include two improvements:
> * connection pool mechanism (to avoid http(s) connection recreation
> for each artifacts download).
> * preemptive authz mechanism which will prevent uploading artifacts twice.
>
> As it's important change in the core distribution, we like to have
> some feedbacks from users a SNAPSHOT distribution (based on rev
> 1178324) is available here :
> http://people.apache.org/~olamy/core/maven-3-r1178324/
>
> mvn -v display:  Apache Maven 3.0.4-SNAPSHOT (r1178324; 2011-10-03
> 10:07:26+0200)
>
> An other way to test it with maven3 is to download the shaded jar [1]
> and copy it in $M2_HOME/lib/ext.
>
> Feel free to test it and report any issues you will have with this new
> default http(s) transport layer.
>
>
> Thanks in advance for your testing time!
> --
> Olivier Lamy
> Talend : http://talend.com
> http://twitter.com/olamy | http://linkedin.com/in/olamy
>
> [1] http://hc.apache.org/httpcomponents-client-ga/index.html
> [2]
> http://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-http/2.0/wagon-http-2.0-shaded.jar
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


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

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


Problems with MAVEN's-ANT on OpenVMS

2011-10-03 Thread Stadelmann Josef
Dear maven community,

 

I was never expecting that maven is using it's own ANT !

 

We are facing problems with ANT_171 on OpenVMS; 

ANT 1.7.1 was unable to do a mailto:philippe.vout...@laposte.net] 
Gesendet: Donnerstag, 29. September 2011 16:36
An: Stadelmann Josef
Betreff: Shit !!!

 

-BEGIN PGP SIGNED MESSAGE-

Hash: SHA1

 

Josef,

 

Maven downloads its own 1.8.1 Ant code to execute this attached pom.xml ant 
tasks. 

I shall have to find out a way Maven uses my own ant-1.7.1 jars. This is still 
in the goal of Maven/Ant Axis-2 build. 
First I shall try to modify the pom.xml so that it invokes ant to execute a 
build.xml as suggested as best in the plexus code extract you sent me.

 

Philippe

 

bash$ export M2_HOME=$HOME/apache-maven-2.2.1 bash$ mvn install ...

Downloading:

http://repo1.maven.org/maven2/org/apache/ant/ant-nodeps/1.8.1/ant-nodeps-1.8.1.pom

 

Downloading:

http://repo1.maven.org/maven2/org/apache/ant/ant-parent/1.8.1/ant-parent-1.8.1.pom

 

Downloading:

http://repo1.maven.org/maven2/org/apache/ant/ant/1.8.1/ant-1.8.1.pom

 

Downloading:

http://repo1.maven.org/maven2/org/apache/ant/ant-launcher/1.8.1/ant-launcher-1.8.1.pom

 

Downloading:

http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/2.0.5/plexus-utils-2.0.5.jar

Downloading:

http://repo1.maven.org/maven2/org/apache/ant/ant-nodeps/1.8.1/ant-nodeps-1.8.1.jar

 

Downloading:

http://repo1.maven.org/maven2/org/apache/ant/ant/1.8.1/ant-1.8.1.jar

 

 

Downloading:

http://repo1.maven.org/maven2/org/apache/ant/ant-launcher/1.8.1/ant-launcher-1.8.1.jar

...

 

[INFO] [antrun:run {execution: compile}] [INFO] Executing tasks

 

main:

 [echo] compile classpath: /PHV/PHV/target/classes

 [echo] runtime classpath: /PHV/PHV/target/classes

 [echo] test classpath:

/PHV/PHV/target/test-classes:/PHV/PHV/target/clas

ses

 [echo] plugin classpath:

/PHV/PHV/.m2/repository/org/codehaus/plexus/plexus-utils/2.0.5/plexus-utils-2.0.5.jar:/PHV/PHV/.m2/repository/org/apache/ant/ant-

nodeps/1.8.1/ant-nodeps-1.8.1.jar:/PHV/PHV/.m2/repository/org/apache/ant/ant/1.8

.1/ant-1.8.1.jar:/PHV/PHV/.m2/repository/org/apache/ant/ant-launcher/1.8.1/ant-l

auncher-1.8.1.jar:/PHV/PHV/apache-maven-2.2.1/lib/maven-2.2.1-uber.jar

...

bash$ env

TERM=vt100-80

ANT_HOME=/PHV/PHV/ANT_171

HOSTTYPE=ia64

PATH=/PHV/PHV/apache-maven-2.2.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/

usr/bin:/sbin:/bin:.

HOME=/PHV/PHV

SHELL=bash

USER=PHV

JAVA_HOME=/java_kit/jre

M2_HOME=/PHV/PHV/apache-maven-2.2.1

OSTYPE=VMS

SHLVL=1

_=/bin/env

bash$ alias

alias l.='ls -d .* --color=auto'

alias ll='ls -l --color=auto'

alias ls='ls --color=auto'

alias vi='vim'

 

- --

Philippe Vouters (Fontainebleau/France)

URL: http://vouters.dyndns.org/

-BEGIN PGP SIGNATURE-

Version: GnuPG v1.4.11 (GNU/Linux)

Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 

iEYEARECAAYFAk6EgkwACgkQsUYBDUbOpdqlXQCfS15I85FqbNOWVzNlAcT+qPVX

swAAn2LkwBLcMNZoXKddrvb8wtZqF7i5

=J8k2

-END PGP SIGNATURE-


  4.0.0
  my-test-app
  my-test-group
  1.0-SNAPSHOT

  


  
org.apache.maven.plugins
maven-antrun-plugin
1.6

  
compile
compile

  









  


  run

  

  

  


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

Error installing artifact's metadata: Error installing metadata: Error updating group repository metadata in epilog non whitespace content is not allowed but got > (position: END_TAG seen ...

2011-10-03 Thread viveikcpuglia
Hello Team,

I am getting following error message for one of my project in hudson build
and the build is failing continously.

I am getting this message after creation of new branch.

kindly provide me solution.

Error installing artifact's metadata: Error installing metadata: Error
updating group repository metadata

in epilog non whitespace content is not allowed but got > (position: END_TAG
seen ...\n>... @19:2) [INFO] 

--
View this message in context: 
http://maven-users.828.n2.nabble.com/Error-installing-artifact-s-metadata-Error-installing-metadata-Error-updating-group-repository-metad-tp6854307p6854307.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



why annotation is in comment line for plugin class

2011-10-03 Thread justin tian
Hi,

I see in this link
http://maven.apache.org/guides/plugin/guide-java-plugin-development.html

package sample.plugin;

import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;

/**
 * Says "Hi" to the user.
 ** @goal sayhi*
 */
public class GreetingMojo extends AbstractMojo
{
public void execute() throws MojoExecutionException
{
getLog().info("Hello, world.");
}
}

The comment line starting with "@goal" is an example of an annotation. This
annotation is required, but there are a number of annotations which can be
used to control how and when the mojo is executed.


I have one question, why annotation can be in comment line, whether it
still take effect in comment line, I do a similiar testing, seems it
can not work,


Can anyone help to take a look, thanks a lot!


Http(s) transport layer change (call for early adopters users)

2011-10-03 Thread Olivier Lamy
Hello,
In the current maven core dev trunk, we have recently replace the
http(s) transport layer from lightweight wagon (based on default jdk
http(s) mechanism) to the wagon http module based on Apache httpclient
[1].

This change include two improvements:
* connection pool mechanism (to avoid http(s) connection recreation
for each artifacts download).
* preemptive authz mechanism which will prevent uploading artifacts twice.

As it's important change in the core distribution, we like to have
some feedbacks from users a SNAPSHOT distribution (based on rev
1178324) is available here :
http://people.apache.org/~olamy/core/maven-3-r1178324/

mvn -v display:  Apache Maven 3.0.4-SNAPSHOT (r1178324; 2011-10-03
10:07:26+0200)

An other way to test it with maven3 is to download the shaded jar [1]
and copy it in $M2_HOME/lib/ext.

Feel free to test it and report any issues you will have with this new
default http(s) transport layer.


Thanks in advance for your testing time!
-- 
Olivier Lamy
Talend : http://talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

[1] http://hc.apache.org/httpcomponents-client-ga/index.html
[2] 
http://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-http/2.0/wagon-http-2.0-shaded.jar

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