Issue with Release plugin

2006-05-11 Thread Sanjay Choudhary

Sometime back I fixed the bug Line too long when we  try to do mvn compile
with jdk 1.3.* *Later I submitted the patch to JIRA too but unfortunately it
is not released as yet.  http://jira.codehaus.org/browse/MCOMPILER-22

To use the compiler fix in our company, I released the patch in our company
snapshot repository. In pom.xml's I specified the compiler plugin and
version (Version is 2.0.1-SNAPSHOT).  It was working good until time came to
do the release.

When I do mvn release:prepare i get the following error

Caused by: org.apache.maven.plugin.MojoExecutionException: Can't release
project due to non released dependencies :

org.apache.maven.plugins:maven-compiler-plugin:maven-plugin:2.0.1-SNAPSHOT:runtime


pom.xml for reference is

 plugin
   groupIdorg.apache.maven.plugins/groupId

artifactIdmaven-compiler-plugin/artifactId
  version2.0.1-SNAPSHOT/version
   configuration
   target1.3/target
   source1.3/source
   forktrue/fork
   meminitial256m/meminitial
   maxmem512m/maxmem
   compilerArguments
   bootclasspath
   ${jre.home
}/lib/rt.jar
   /bootclasspath
   extdirs${jre.home
}/lib/ext/extdirs
   /compilerArguments
   /configuration
   inheritedtrue/inherited
   /plugin

Any idea how I can make this work?  do I have to relase the patch in our
local repository?  Is there a way I can avoid the release of patch but still
do release of my project jars?

-sanjay


Manifest.Mf

2006-05-09 Thread Sanjay Choudhary

Is there a way to add properties folder to Manifest.mf classpath entry when
building using maven?

Thx,
sanjay


Re: Best approach to deploy in websphere app server

2006-04-14 Thread Sanjay Choudhary
You may also use JACL Scripts to automate deployment of EAR or WAR on
server. As John said , in these scripts ou will call commads of wsadmin.

-Sanjay


On 4/14/06, John Sanda [EMAIL PROTECTED] wrote:

 I work in a WebSphere shop, primarily WAS 5.0.x, but I have worked on
 WAS 5.1.x some as well. I am new to Maven 2, and I do not know whether
 or not there are any plugins to handle WebSphere deployments.
 WebSphere come with a command line tool called Wsadmin, which provides
 a scripting environment for all administrative tasks including
 deployments. In version 5.0.x, the only language with which you can
 write scripts in Jacl. I believe that Jython support has been added in
 WAS 5.1. WebSphere also ships with a set of Ant tasks for deploying
 and installing apps, starting/stopping the a server, etc. These Ant
 tasks though, are just wrappers around Wsadmin scripts. If you are not
 familiar with Wsadmin and JMX, the Ant tasks are a good place to start
 in my opinion. You could use the antrun plugin to invoke the WAS ant
 tasks from within your Maven build.

 On 4/14/06, Vijay Shanker [EMAIL PROTECTED] wrote:
  Hi Maven users,
 
  Can anybody suggest the best approach to deploy maven built war and ear
 files in websphere application server?
 
  Thanks,
  Shanker
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --

 - John

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




Re: Deploying 3rd party SNAPSHOT libraries

2006-04-14 Thread Sanjay Choudhary
Roland,

We did this for multiple 3rd party jars and didn't have any issues.

In settings.xml define the server entry for your server where you want to
deploy the jar.

  1.  server
  idinhouse_release/id
  usernamemaven/username
  privateKey/home2/wasadm/.ssh/maven_key/privateKey
/server

then in the profile section define the entry

 2. idreleaserepository/id
 repositories
  repository
idinhouse_release/id
nameInhouse Release Repository/name
url
  http://foobar.org/maven2_repositories/inhouse_release/
/url
releases
 enabledtrue/enabled
/releases
snapshots
 enabledfalse/enabled
/snapshots
   /repository
 /repositories

ensure that you enable the profile

3. you need to deploy it using mvn deploy

mvn deploy:deploy-file -Dfile=ibm-j2ee.jar
-DgroupId=com.ibm-DartifactId=ibm-j2ee -Dversion=
1.3 -Dpackaging=jar -DgeneratePom=true -DrepositoryId=inhouse_release
-Durl=scp://foobar.org/apps/maven2/release_repository


4. In your pom you can use this

groupIdcom.ibm/groupId
artifactIdibm-j2ee/artifactId
version1.3/version

SNAPSHOTS should only be used for artifacts for whom work is in progress and
not for relased version of third party artifacts.

-Sanjay








On 4/14/06, Roland Asmann [EMAIL PROTECTED] wrote:

 Hi,

 I'm trying to deploy 3rd party snapshots to our local maven-proxy, but
 have
 problems when my builds try to access the libraries. I've already found
 out
 that the POM and JAR do not have the same name, but have a buildnumber
 appended to their names, which differs between the two.
 Then, when I add sources, those get an even higher number!

 Just wondering, is there a way to turn OFF the replacing of 'SNAPSHOT'
 with
 the deployment date/time, since this would solve my whole problem?!

 Thanks!

 Roland


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




Re: Maven and IRAD (WSAD)

2006-04-10 Thread Sanjay Choudhary
I have done this for our company.  It was a challenge in begining but now
things are very smooth.

It is not easy as saying do this and do that. If you give me your project
structure, I can give you some advice and RAD6 maven plugins.

I also plan to write an article on How to work on RAD6 using maven?

-Sanjay


On 4/10/06, Pierre Jacquot [EMAIL PROTECTED] wrote:

 I wan to create J2EE project on maven, moreover the project must work on
 the
 IDE IRAD( or websphere). I don't how to do this, and i would like to build
 a
 project from existing soures or from existing JAR or EAR files.
 Thanks for your help




MavenArchiveConfiguration - How to instantiate it with configuration values in POM.xml.

2006-03-24 Thread Sanjay Choudhary
I am in process of writting a plugin for RAD6/WSAD.  Most of the
functionality is provided by the eclipse plugin , ie, creating .classpath
and .project.  One thing that is missing is creating Manifest.mf for EJB and
WAR projects. For this IDE , I need to manuplate creation of MANIFEST.MF.
Basically, if an artifact is in list of modules, then in Manifest.mf should
have an entry as artifact.jar instead of
atrifact-version.jar.  (Something similar to what we do when we create
.classpath file) This change is only for IDE.

I started digging in the code.  I create EclipseManifestBuilder and
EclipseManifestCreater.  Currently, I am stuck on populating
ManifestConfiguration class in MavenArchiveConfiguration class.


In EclipsePlugin.java , I created variable

 private MavenArchiveConfiguration archive;

and in pom.xml I have the following configuration :-


plugin

 groupIdorg.apache.maven.plugins/groupId

 artifactIdmaven-eclipse-plugin/artifactId

 version2.2.1-SNAPSHOT/version

 configuration

archive

indextrue/index

manifest

   addClasspathtrue/addClasspath

   addExtensions /

   classpathPrefix /

   /manifest

manifestEntries

Source-Control-Identifier${scm.connection}-${pom.version
}/Source-Control-Identifier

/manifestEntries

/archive

/configuration

inheritedtrue/inherited

/plugin
I was hoping that maven will automatically populate
MavenArchiveConfiguration variable, but for some reason it is not. Is there
something extra I need to do to populate this.

Please advice.

Thanks,
Sanjay


Re: [M2] StringIndexOutOfBoundsException under linux

2006-03-23 Thread Sanjay Choudhary
try to compile it with mvn -X package.  you will see more debug details.
Also it will be easy to troubleshoot if you can post the parent pom.

-Sanjay


On 3/23/06, Alexandre Poitras [EMAIL PROTECTED] wrote:

 Hi,

 I have just installed a fresh Linux at my office (finally!).
 Everything works fine except I get a weird bug whenever I try to
 package my project :

 [INFO] Error assembling JAR
 Embedded error: String index out of range: 70

 Here's the pom :

 ?xml version=1.0 encoding=ISO-8859-1?

 project xmlns=http://maven.apache.org/POM/4.0.0;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
 http://maven.apache.org/maven-v4_0_0.xsd;

modelVersion4.0.0/modelVersion

groupIdca.qc.gouv.msp.fse/groupId

artifactIdintegration/artifactId

packagingjar/packaging

version1.0-SNAPSHOT/version

nameCouche d\'intrégration/name

parent

groupIdca.qc.gouv.msp/groupId

artifactIdfse/artifactId

version1.0-SNAPSHOT/version

/parent

dependencies

dependency

groupIdorg.hibernate/groupId

artifactIdhibernate/artifactId

version3.1.2/version

/dependency

dependency

artifactIdspring-hibernate/artifactId

groupIdorg.springframework/groupId

version1.2.6/version

/dependency

   dependency

groupIdca.qc.gouv.msp.fse/groupId

artifactIdcommun/artifactId

version1.0-SNAPSHOT/version

/dependency

/dependencies

 /project



 I just remove the parent declaration and everything build
 successfully. I put it back and it is still building succesfully
 (after performing a clean:clean). It's seem to be a very weird bug.

 Any suggestion?

 --
 Alexandre Poitras
 Québec, Canada

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




CRITICAL: Line too long error when I try to fork the compiler for jdk1.3

2006-03-11 Thread Sanjay Choudhary
On Windows XP ( haven't tried it on unix or linux as yet) I get line too
long error.  This only happens for the projects that have more than 40
files or classpath entries are too many.

Is there a way I can fix this? Please advice.

cheers,
Sanjay


maven 2 with jdk 1.3

2006-03-10 Thread Sanjay Choudhary
Hi All,

I have an application that run's on  JDK 1.3.

In the POM's I have the following setting


plugin

groupIdorg.apache.maven.plugins/groupId

artifactIdmaven-compiler-plugin/artifactId

configuration

compilerVersion1.3/compilerVersion

target1.3/target

showDeprecationtrue/showDeprecation

showWarningstrue/showWarnings

/configuration

inheritedtrue/inherited

/plugin

Is there anything else I need to do to make it work with JDK 1.3?  If not,
why will I get an error,

[3/10/06 11:24:10:538 PST] 65795dd9 WebGroup  E SRVE0026E: [Servlet
Error]-[java.lang.StringBuffer: method append#40;
Ljava/lang/StringBuffer#59;#41;Ljava/lang/StringBuffer#59; not found]:
javax.servlet.jsp.JspException: java.lang.String
Buffer: method append(Ljava/lang/StringBuffer;)Ljava/lang/StringBuffer; not
found
at org.apache.struts.taglib.template.InsertTag.doEndTag(
InsertTag.java:164)
at org.apache.jsp._index._jspService(_index.java:344)
at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(
HttpJspBase.java:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

StringBuffer.append(StringBuffer) is JDK 1.4.

Please advice,

Sanjay


Re: maven 2 with jdk 1.3

2006-03-10 Thread Sanjay Choudhary
No, I am sure that javax.servlet library is JDK 1.3. It is provided by ibm
was 5 and we used it to compile it.

-Sanjay


On 3/10/06, Wayne Fay [EMAIL PROTECTED] wrote:

 I suspect that you are using javax.servlet library which was compiled
 with JDK 1.4.

 Download the code and recompile with JDK 1.3 if you must use it along
 with code that targets 1.3.

 Wayne


 On 3/10/06, Sanjay Choudhary [EMAIL PROTECTED] wrote:
  Hi All,
 
  I have an application that run's on  JDK 1.3.
 
  In the POM's I have the following setting
 
 
  plugin
 
  groupIdorg.apache.maven.plugins/groupId
 
  artifactIdmaven-compiler-plugin/artifactId
 
  configuration
 
  compilerVersion1.3/compilerVersion
 
  target1.3/target
 
  showDeprecationtrue/showDeprecation
 
  showWarningstrue/showWarnings
 
  /configuration
 
  inheritedtrue/inherited
 
  /plugin
 
  Is there anything else I need to do to make it work with JDK 1.3?  If
 not,
  why will I get an error,
 
  [3/10/06 11:24:10:538 PST] 65795dd9 WebGroup  E SRVE0026E: [Servlet
  Error]-[java.lang.StringBuffer: method append#40;
  Ljava/lang/StringBuffer#59;#41;Ljava/lang/StringBuffer#59; not
 found]:
  javax.servlet.jsp.JspException: java.lang.String
  Buffer: method append(Ljava/lang/StringBuffer;)Ljava/lang/StringBuffer;
 not
  found
 at org.apache.struts.taglib.template.InsertTag.doEndTag(
  InsertTag.java:164)
 at org.apache.jsp._index._jspService(_index.java:344)
 at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(
  HttpJspBase.java:89)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 
  StringBuffer.append(StringBuffer) is JDK 1.4.
 
  Please advice,
 
  Sanjay
 
 



Re: maven 2 with jdk 1.3

2006-03-10 Thread Sanjay Choudhary
It worked fine until y'day. It broke when I changed the dependency version
of some other home build artifacts.

Not sure what would have caused it. Definitly it looks like JDK issue. BTW,
we use struts 1.1.

-Sanjay


On 3/10/06, Wayne Fay [EMAIL PROTECTED] wrote:

 OK then perhaps your Struts library was compiled with JDK 1.4. That's
 probably it, take a look at the stack trace again:

 javax.servlet.jsp.JspException: java.lang.StringBuffer:
 method append (Ljava/lang/StringBuffer;) Ljava/lang/StringBuffer; not
 found
at org.apache.struts.taglib.template.InsertTag.doEndTag(
 InsertTag.java:164)

 Wayne


 On 3/10/06, Sanjay Choudhary [EMAIL PROTECTED] wrote:
  No, I am sure that javax.servlet library is JDK 1.3. It is provided by
 ibm
  was 5 and we used it to compile it.
 
  -Sanjay
 
 
  On 3/10/06, Wayne Fay [EMAIL PROTECTED] wrote:
  
   I suspect that you are using javax.servlet library which was compiled
   with JDK 1.4.
  
   Download the code and recompile with JDK 1.3 if you must use it along
   with code that targets 1.3.
  
   Wayne
  
  
   On 3/10/06, Sanjay Choudhary [EMAIL PROTECTED] wrote:
Hi All,
   
I have an application that run's on  JDK 1.3.
   
In the POM's I have the following setting
   
   
plugin
   
groupIdorg.apache.maven.plugins/groupId
   
artifactIdmaven-compiler-plugin/artifactId
   
configuration
   
compilerVersion1.3/compilerVersion
   
target1.3/target
   
showDeprecationtrue/showDeprecation
   
showWarningstrue/showWarnings
   
/configuration
   
inheritedtrue/inherited
   
/plugin
   
Is there anything else I need to do to make it work with JDK 1.3
 ?  If
   not,
why will I get an error,
   
[3/10/06 11:24:10:538 PST] 65795dd9 WebGroup  E SRVE0026E:
 [Servlet
Error]-[java.lang.StringBuffer: method append#40;
Ljava/lang/StringBuffer#59;#41;Ljava/lang/StringBuffer#59; not
   found]:
javax.servlet.jsp.JspException: java.lang.String
Buffer: method
 append(Ljava/lang/StringBuffer;)Ljava/lang/StringBuffer;
   not
found
   at org.apache.struts.taglib.template.InsertTag.doEndTag(
InsertTag.java:164)
   at org.apache.jsp._index._jspService(_index.java:344)
   at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(
HttpJspBase.java:89)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java
 :853)
   
StringBuffer.append(StringBuffer) is JDK 1.4.
   
Please advice,
   
Sanjay
   
   
  
 
 



Re: maven 2 with jdk 1.3

2006-03-10 Thread Sanjay Choudhary
I discovered that there was a filter which had a method that was like
StringBuffer.append(StringBuffer) (API only available in 1.4 and above) .  I
looked at the generated bytecode and confirmed it. Same code when I compiled
using JDK 1.3 it used StringBuffer.append(Object).

I used the setting suggested by SIMON as below

plugin

groupIdorg.apache.maven.plugins/groupId

artifactIdmaven-compiler-plugin/artifactId

configuration

forktrue/fork

source1.3/source

target1.3/target

compilerArguments

bootclasspathC:/Program
Files/IBM/Rational/SDP/6.0/runtimes/base_v5/java/jre/lib/rt.jar/
bootclasspath

/compilerArguments

verbosetrue/verbose

/configuration

inheritedtrue/inherited

/plugin
Now when I run mvn -X clean install, I get the following error


Compiling 110 source files to
c:\rad6\security\kpusersecurityutil\target\classes
[INFO]

[ERROR] BUILD FAILURE
[INFO]

[INFO] Compilation failure

Failure executing javac,  but could not parse the error:


[INFO]

[DEBUG] Trace
org.apache.maven.BuildFailureException: Compilation failure
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
DefaultLifecycleExecutor.java
:551)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
(DefaultLifecycleE
xecutor.java:472)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
DefaultLifecycleExecutor.java:
451)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
(DefaultLifecy
cleExecutor.java:303)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments
(DefaultLifecycleExecut
or.java:270)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
DefaultLifecycleExecutor.java:139)

at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation
failure
at org.apache.maven.plugin.AbstractCompilerMojo.execute(
AbstractCompilerMojo.java:429)
at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java
:110)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
DefaultPluginManager.java:432)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
DefaultLifecycleExecutor.java
:530)
... 17 more
[INFO]

[INFO] Total time: 8 seconds
[INFO] Finished at: Fri Mar 10 18:25:17 PST 2006
[INFO] Final Memory: 6M/19M
[INFO]


It will be nice if someone can help me out with this


Thanks,
Sanjay

On 3/10/06, Simon Kitching [EMAIL PROTECTED] wrote:

 On Fri, 2006-03-10 at 16:30 -0600, Wayne Fay wrote:
  I have a solution... Everyone should just use JDK 1.5. ;-)
 
  PS Sanjay, you can find out what version a given class was compiled if
  you look at the unsigned short integers starting at byte offset 4,
  right after 0xCAFEBABE in every class file. See this Javaworld article
  for more details, page 2:
  http://www.javaworld.com/javaqa/2003-05/02-qa-0523-version.html

 An easier way to find the classfile version is to run

 javap -classpath {jarfile} -verbose {classname}

 eg
 javap -verbose java.lang.String

 For javap v1.4 or later the output includes:
 ...
 minor version: 0
 major version: 49
 ...

 These versions mean this particular String can only be run with java 1.5
 or later. I did see an official document somewhere that listed the
 actual versions (the vm spec?) but this doc has enough info:
 http://alumnus.caltech.edu/~leif/opensource/bcver/BcVerApp.html


 Cheers,

 Simon


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




mvn COMPILE FAILING!! for modules (FORK=true) AND NUMBER of .JAVA FILES ARE OVER 30

2006-03-10 Thread Sanjay Choudhary
If I try to use the following setting for maven compiler plugin


plugin

groupIdorg.apache.maven.plugins/groupId

artifactIdmaven-compiler-plugin/artifactId

configuration

source1.3/source

target1.3/target

showDeprecationtrue/showDeprecation

showWarningstrue/showWarnings

forktrue/fork

compilerArguments

bootclasspathC:/Program
Files/IBM/Rational/SDP/6.0/runtimes/base_v5/java/jre/lib/rt.jar/
bootclasspath

/compilerArguments

/configuration

inheritedtrue/inherited

/plugin

It works fine with 30 java files but after that it fails to compile.

Compiling 110 source files to
c:\rad6\security\kpusersecurityutil\target\classes
[INFO]

[ERROR] BUILD FAILURE
[INFO]


[INFO] Compilation failure

Failure executing javac,  but could not parse the error:


[INFO]

[DEBUG] Trace
org.apache.maven.BuildFailureException: Compilation failure
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
DefaultLifecycleExecutor.java
:551)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
(DefaultLifecycleE
xecutor.java:472)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal (
DefaultLifecycleExecutor.java:
451)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
(DefaultLifecy
cleExecutor.java:303)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecut
or.java:270)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
DefaultLifecycleExecutor.java:139)

at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:58)
at sun.reflect.DelegatingMethodAcc essorImpl.invoke(
DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at org.codehaus.classworlds.Launcher.launchEnhanced (Launcher.java
:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
:430)
at org.codehaus.classworlds.Launcher.main (Launcher.java:375)
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation
failure
at org.apache.maven.plugin.AbstractCompilerMojo.execute(
AbstractCompilerMojo.java:429)
at org.apache.maven.plugin.CompilerMojo.execute (CompilerMojo.java
:110)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
DefaultPluginManager.java:432)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
DefaultLifecycleExecutor.java
:530)
... 17 more
[INFO]

[INFO] Total time: 8 seconds
[INFO] Finished at: Fri Mar 10 18:25:17 PST 2006
[INFO] Final Memory: 6M/19M
[INFO]


It will be nice if someone can help us resolve it.

cheers,

Sanjay


Re: mvn COMPILE FAILING!! for modules (FORK=true) AND NUMBER of .JAVA FILES ARE OVER 30

2006-03-10 Thread Sanjay Choudhary
I looked at the maven and plexus compiler code and captured the cli
output from the debug details

When I ran it on the command line, it got line too long.

Debug error is below.  This is the output from maven.

I have NO issues compiling my code outside of maven and with fork=false.
Issues only come up when I try to fork it with 1.3

 [INFO] Compilation failure

 Failure executing javac,  but could not parse the error:


 [INFO]


 [DEBUG] Trace
 org.apache.maven.BuildFailureException: Compilation failure
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
(
 DefaultLifecycleExecutor.java
 :551)
at

org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
 (DefaultLifecycleE
 xecutor.java:472)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
 DefaultLifecycleExecutor.java:
 451)
at

org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
 (DefaultLifecy
 cleExecutor.java:303)
at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments
(DefaultLifecycleExecut
 or.java:270)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
 DefaultLifecycleExecutor.java:139)

at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
 NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(
 NativeMethodAccessorImpl.java:58)
at sun.reflect.DelegatingMethodAcc essorImpl.invoke(
 DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at org.codehaus.classworlds.Launcher.launchEnhanced (Launcher.java
 :315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
 :430)
at org.codehaus.classworlds.Launcher.main (Launcher.java:375)
 Caused by: org.apache.maven.plugin.CompilationFailureException:
Compilation
 failure
at org.apache.maven.plugin.AbstractCompilerMojo.execute(
 AbstractCompilerMojo.java:429)
at org.apache.maven.plugin.CompilerMojo.execute (CompilerMojo.java
 :110)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
 DefaultPluginManager.java:432)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
(
 DefaultLifecycleExecutor.java
 :530)
... 17 more
 [INFO]


 [INFO] Total time: 8 seconds
 [INFO] Finished at: Fri Mar 10 18:25:17 PST 2006
 [INFO] Final Memory: 6M/19M
 [INFO]



Sanjay


On 3/10/06, Wayne Fay [EMAIL PROTECTED] wrote:

 You're going to have to get us more error/debug/info details before we
 can provide much assistance, I think...

  [INFO] Compilation failure
 
  Failure executing javac,  but could not parse the error:

 That's just not giving us anything we can work with!!

 Can't think of any obvious reasons why it would work for 30 but not 31
 source files, perhaps there is something in your 31st file that is
 causing the compiler to have issues? Can you try changing the set of
 31 files (ie, first set is files 1-31, second is 32-63, third is
 64-95) and confirm that it always blows up on the 31st file, no matter
 what 31 files you are working on?

 Can you compile your project using the JDK 1.3 with standard javac
 commands? If you haven't tried this, go do that right away and confirm
 no issues compiling your full 110 source files.

 Wayne


 On 3/10/06, Sanjay Choudhary [EMAIL PROTECTED] wrote:
  If I try to use the following setting for maven compiler plugin
 
 
  plugin
 
  groupIdorg.apache.maven.plugins/groupId
 
  artifactIdmaven-compiler-plugin/artifactId
 
  configuration
 
  source1.3/source
 
  target1.3/target
 
  showDeprecationtrue/showDeprecation
 
  showWarningstrue/showWarnings
 
  forktrue/fork
 
  compilerArguments
 
  bootclasspathC:/Program
  Files/IBM/Rational/SDP/6.0/runtimes/base_v5/java/jre/lib/rt.jar/
  bootclasspath
 
  /compilerArguments
 
  /configuration
 
  inheritedtrue/inherited
 
  /plugin
 
  It works fine with 30 java files but after that it fails to compile.
 
  Compiling 110 source files to
  c:\rad6\security\kpusersecurityutil\target\classes
  [INFO]
 
 
  [ERROR] BUILD FAILURE
  [INFO]
 
 
 
  [INFO] Compilation failure
 
  Failure executing javac,  but could not parse the error:
 
 
  [INFO

War's - How to exclude bundling of jars in WEB-INF/lib? They are caused because of transitive depedencies

2006-02-28 Thread Sanjay Choudhary
Let us assume that we have an EAR which is dependent on Struts-x version.

Ear  dependent on Struts
java 1   dependent on Struts
java 2
web dependent on Struts



Now when we build, our EAR contains struts-x.jar and all the other
transitive dependencies of struts.  Since our classloader policy for EAR is
application, we don't want struts-x.jar and transitive dependencies in
web/web-inf/lib.  To avoid this, in the web project pom.xml we defined

dependency
 groupIdstruts/groupId
 artifactIdstruts/artifactId
 version1.1/version
 optionaltrue/optional
/dependency

By doing this, I am able to avoid bundling of struts.jar in web-inf/lib
folder in WAR but all the transitive dependent jars are still bundled in the
WAR.  Is there a way to avoid this?

-Sanjay


Re: War's - How to exclude bundling of jars in WEB-INF/lib? They are caused because of transitive depedencies

2006-02-28 Thread Sanjay Choudhary
That resolved the issue

On 2/28/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 If you set the scope of the Struts artifact to provided, do you still
 get
 the transitive dependencies in WEB-INF/lib?

 It's better to be hated for who you are
 than loved for who you are not

 Ian D. Stewart
 Appl Dev Analyst-Advisory, DCS Automation
 JPMorganChase Global Technology Infrastructure
 Phone: (614) 244-2564
 Pager: (888) 260-0078



  Sanjay
  Choudhary   To:   Maven Users List
 users@maven.apache.org
  choudharysanjay@cc:
  gmail.com   Subject:  War's - How to
 exclude bundling of jars in WEB-INF/lib? They are caused
because of transitive
 depedencies
  02/28/2006 03:56
  PM
  Please respond to
  Maven Users
  List





 Let us assume that we have an EAR which is dependent on Struts-x version.

 Ear  dependent on Struts
java 1   dependent on Struts
java 2
web dependent on Struts



 Now when we build, our EAR contains struts-x.jar and all the other
 transitive dependencies of struts.  Since our classloader policy for EAR
 is
 application, we don't want struts-x.jar and transitive dependencies in
 web/web-inf/lib.  To avoid this, in the web project pom.xml we defined

 dependency
 groupIdstruts/groupId
 artifactIdstruts/artifactId
 version1.1/version
 optionaltrue/optional
 /dependency

 By doing this, I am able to avoid bundling of struts.jar in web-inf/lib
 folder in WAR but all the transitive dependent jars are still bundled in
 the
 WAR.  Is there a way to avoid this?

 -Sanjay



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




Re: Not building EAR for an application

2006-02-26 Thread Sanjay Choudhary
Hi Emmanuel,

We use CVS (I wish it was svn). Each project of application corresponds to a
module in CVS.

at root level pom.xml (Not in cvs)  failed as it doesn't exist in CVS.  I
copied it manually to folder 1. In working directory I was able to see
pom.xml

parentPOM ( in cvs)  in continuum folder name 2

common (in cvs)  in continuum folder name 3

ejb1 (in cvs)   folder name 4

ejb2 (in cvs)  folder name 5

war (in cvs)  folder name 6

Java (in cvs) folder name 7

ear (in cvs) folder name 8

All the projects in CVS has pom.xml

Now when I run mvn compile (or anyother phase) it doesn't work. It looks for
the directory common , java, war etc. which are not present. (Which I
expected)

( I don't know the design reason, but it would have been great if we had
real folder names instead of numeric numbers.)

Let me know if I am doing something wrong here!!

-Sanjay


On 2/26/06, Emmanuel Venisse [EMAIL PROTECTED] wrote:

 ok you don't use the standard maven layout.

 If you want to build all in one time, you should add a new pom in the root
 directory of your parent
 pom and add one module in it (the parent pom), so all your modules will be
 checkout in the correct
 directory structure

 Emmanuel

 Sanjay Choudhary a écrit :
  Hi Emmanuel
 
  I like option 2 and I tried it too but it doesn't work
 
  My Parent pom has module definition as below:
 
  modules
  modules
module../common/module
module../ejb1/module
module../ejb2/module
module../war1/module
module../java1/module
module../ear/module
 /modules
  /modules
 
  But since Continuum uses number instead of folder name -N option doesn't
  work.  Is there a work around to this issue?
 
  -Sanjay
 
  On 2/25/06, Emmanuel Venisse [EMAIL PROTECTED] wrote:
 
 Actually a build start only if you have some changes in scm for your
 project. In future, we'll can
 start a build if a dependecies is new.
 
 If you want the latest EAR, without changes in your EAR project, you
 must
 build it manually from
 Continuum. or you can build all from parent project if you remove -N
 parameter in the build definition
 
 Emmanuel
 
 Sanjay Choudhary a écrit :
 
 Hi All,
 
 We hv. and application building thru continuum
 
 Our application is a normal J2EE application
 
 pom.xml
 
 EAR Project
 
 EJB1 Project
 
 EJB2 Project
 
 Jar Project
 
 Jar Project
 
 War Project
 
 Each of them has pom.xml.  Now if we have change in Jar Project and
 EJB1
 project, continuum builds the projects fine but doesn't rebuild the
 EAR.
 Now we don't have a latest EAR and deploy.  Is there a workaround to
 
 this?
 
 Or this is a normal behavior of Continuum.
 
 If it is the normal behavior, then how we we get the latest EAR?
 
 Thanks,
 Sanjay
 
 
 
 




Not building EAR for an application

2006-02-24 Thread Sanjay Choudhary
Hi All,

We hv. and application building thru continuum

Our application is a normal J2EE application

pom.xml

EAR Project

EJB1 Project

EJB2 Project

Jar Project

Jar Project

War Project

Each of them has pom.xml.  Now if we have change in Jar Project and EJB1
project, continuum builds the projects fine but doesn't rebuild the EAR.
Now we don't have a latest EAR and deploy.  Is there a workaround to this?
Or this is a normal behavior of Continuum.

If it is the normal behavior, then how we we get the latest EAR?

Thanks,
Sanjay


Re: tried to build and run continuum 1.1-SNAPSHOT

2006-02-17 Thread Sanjay Choudhary
Our  group of developers work almost 24 hrs. and changes are checked in into
cvs regularly.  We tag before build so that we know what we know what
exactly we built, or atleast attempted to build.

As you said, I can create a script and add it as a shell project to tag the
things in cvs.  Is there a way I can dynamically tell Continuum, to build
from that tag.  Tag will change almost everyday.  If it will be an update in
the DB using java program, can you tell me what table/s and column/s do I
need to update.

Thanks,
Sanjay


On 2/17/06, Emmanuel Venisse [EMAIL PROTECTED] wrote:

 Why do you tag before the build? I think that a better process would be to
 tag files only after a
 build in success.

 Actually, Continuum can't tag files after a build because we don't have
 yet dynamic data accessible
 in build definition for generating a tag name. But you can create a little
 script that do what you
 want and add your project as a Shell Project in continuum.

 Emmanuel

 Sanjay Choudhary a écrit :
  Hi Emmanuel,
 
  Thanks for your reply.
 
  Another quick advice.  We perform build nightly for our web application.
 So
  far we tag everything in the night (tag value is determined based on
 date
  and time, prefixed by a static value) and then checkout and build of a
 tag.
 
  We have successfull migrated all our code to maven2. we wish to use
  continuum to build for us. How is nightly tagging and building from a
 tag is
  possible using Continuum?  This is not release but just nightly tagging
 and
  building
 
  Please advice
 
  Cheers
  Sanjay
 
 
  On 2/16/06, Emmanuel Venisse [EMAIL PROTECTED] wrote:
 
 svn trunk isn't stable, if you want to build from svn, you must use
 continuum-1.0.x branch.
 
 but it isn't necessary to build continuum, you can use snapshot version
 generated after each commit
 :
 
 http://maven.zones.apache.org/~continuum/builds/branches/continuum-1.0.x/
 
 Emmanuel
 
 Sanjay Choudhary a écrit :
 
 Hi All,
 
 Today I build tried to build and run continuum. Build was successful
 but
 
 I
 
 got an error when I tried to logon on
 
 
 org.codehaus.plexus.action.ActionNotFoundException: Cannot find action:
 
 login
 
   at org.codehaus.plexus.action.DefaultActionManager.lookup(
 
 DefaultActionManager.java:61)
 
   at org.codehaus.plexus.summit.pipeline.valve.ActionValve.invoke(
 
 ActionValve.java:62)
 
   at org.codehaus.plexus.summit.pipeline.AbstractPipeline.invoke(
 
 AbstractPipeline.java:70)
 
   at org.codehaus.plexus.summit.Summit.doGet(Summit.java:54)
   at org.codehaus.plexus.summit.Summit.doPost(Summit.java:108)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:615)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
   at org.mortbay.jetty.servlet.ServletHolder.handle(
 
 ServletHolder.java:358)
 
   at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(
 
 WebApplicationHandler.java:294)
 
   at org.mortbay.jetty.servlet.ServletHandler.handle(
 
 ServletHandler.java:567)
 
   at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
   at org.mortbay.jetty.servlet.WebApplicationContext.handle(
 
 WebApplicationContext.java:525)
 
   at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
   at org.mortbay.http.HttpServer.service(HttpServer.java:879)
   at org.mortbay.http.HttpConnection.service(HttpConnection.java
 
 :789)
 
   at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java
 
 :960)
 
   at org.mortbay.http.HttpConnection.handle(HttpConnection.java
 :806)
   at org.mortbay.http.SocketListener.handleConnection(
 
 SocketListener.java:218)
 
   at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java
 :331)
   at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java
 :520)
 Caused by:
 
 
 org.codehaus.plexus.component.repository.exception.ComponentLookupException
 :
 
 Unable to lookup component 'org.codehaus.plexus.action.Actionlogin',
 it could not be started
   at org.codehaus.plexus.DefaultPlexusContainer.lookup(
 
 DefaultPlexusContainer.java:335)
 
   at org.codehaus.plexus.DefaultPlexusContainer.lookup(
 
 DefaultPlexusContainer.java:436)
 
   at
 
 
 org.codehaus.plexus.personality.plexus.lifecycle.phase.PlexusContainerLocator.lookup
 (PlexusContainerLocator.java:38)
 
   at org.codehaus.plexus.action.DefaultActionManager.lookup(
 
 DefaultActionManager.java:57)
 
   ... 19 more
 Caused by:
 
 
 org.codehaus.plexus.component.repository.exception.ComponentLifecycleException
 :
 
 Error starting component
   at
 
 
 org.codehaus.plexus.component.manager.AbstractComponentManager.startComponentLifecycle
 (AbstractComponentManager.java:109)
 
   at
 
 
 org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance
 (AbstractComponentManager.java:95)
 
   at
 
 
 org.codehaus.plexus.component.manager.ClassicSingletonComponentManager.getComponent

Re: Maven 2 EAR, WAR, EJB Common Dependencies

2006-01-27 Thread Sanjay Choudhary
Try this in your ejb pom

  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-ejb-plugin/artifactId
configuration
  archive
indextrue/index
manifest
  addClasspathtrue/addClasspath
/manifest
manifestEntries
  modedevelopment/mode
  url${pom.url}/url
/manifestEntries
  /archive
/configuration
inheritedtrue/inherited
  /plugin

WAR POM
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-war-plugin/artifactId
configuration
warSourceDirectorywebApplication/warSourceDirectory
warSourceExcludes
image/**,htmlapp/**,WEB-INF/lib/*.jar
/warSourceExcludes
archive
manifest
addClasspathtrue/addClasspath
/manifest
/archive
/configuration
/plugin

They should generate manifest.mf files for you.

-Sanjay

On 1/27/06, Rudolph, Gary [EMAIL PROTECTED] wrote:


 Any recommendations in Maven 2 on how to handle dependencies that are
 common
 across WAR's and EJB JAR's in an EAR?

 I'm used to including common dependencies in the EAR and then using
 manifest.mf a classpath to include these JAR's into each of the WAR or EJB
 JAR's. An example is when I have a common value object classes that I want
 shared between the entire EAR.

 With the war or ejb tasks I'm not seeing the capability to do this. Any
 recommendations on how to accomplish this, or if to code these into the
 plugins (I'm willing to jump in and extend the plugins if necessary).

 I understand I can specify a manifest file for these and set the classpath
 by hand, and then create dependencies for the EAR to have the jar's
 bundled,
 but... This gets around the whole beauty of maven to allow it to manage
 the
 dependencies.

 Thanks,
 Gary Rudolph

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




Re: [m2] how to handle SNAPSHOTS in a company?

2006-01-26 Thread Sanjay Choudhary
you may refer to Brett Porter blog explaning this

url is
http://blogs.codehaus.org/people/brett/archives/maven.html#001045_improved_snapshots_in_maven2

Sanjay


On 1/26/06, Fredy [EMAIL PROTECTED] wrote:

 Hi all,
 if I install a x.x-SNAPSHOT Version in the local repository, so i can
 depend on via x.x-SNAPSHOT.
 But if I deploy it to the internal company repository, the Version is
 something like x.x-20060126.131555-3.

 Is there a posibillity to depend on a snapshot an mvn will take the jar
 with the newest timestamp?

 Or must each mvn modul have an release Version before deploying and then
 all references have to be updated?
 This will be a problem, if many people work togehter in a company,
 everybody have to update the denpendencies, with each little fix.
 Ok, that is the right way, but not every project works like that ;-( And
 the dependency updates will take much time.

 Fredy

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




Re: maven2 war plugin error

2006-01-26 Thread Sanjay Choudhary
Hi Allan/Mouli,

My experience is that if we have scope as provided then these files don't
get included in the classpath entry of MANIFEST.MF file.

try this,

 groupIdflexpub/groupId
artifactIdflexpubcontroller/artifactId
optionaltrue/optional

this works well.

Thanks,
Sanjay
On 1/26/06, Allan Ramirez [EMAIL PROTECTED] wrote:

 Hi Mouli,

 Set the scope of those dependency to provided.

 -allan

 Mouli wrote:

 I am trying to build a web app with maven2.
 
 the WEB-INF/lib includes all the jar (fromt the dependency list).  I have
 tried the excludes tag but some how it doesn't seem to accept comma
 separated values (eg
 excludesWEB-INF/lib/xdoclet*.jar,WEB-INF/lib/servlet*.jar/excludes).
 
 It works fine if the excludes tag has only one value (eg:
 excludesWEB-INF/lib/xdoclet*.jar/excludes)
 
 Is there something different to be done?
 
 Regards,
 mouli
 
 
 
 
 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.1.375 / Virus Database: 267.14.23/240 - Release Date:
 1/25/2006
 
 



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




Re: Best Practice - Maven with WSAD or RAD6

2006-01-21 Thread Sanjay Choudhary
outputDirectorybin/outputDirectory
disableWtptrue/disableWtp
classpathContainers

 containerorg.eclipse.jdt.launching.JRE_CONTAINER/container
/classpathContainers
/configuration
/plugin

 It's still not perfect - we'd like to get the generated EAR copied to
 our Rapid Deployment directory for quicker development turnaround.  As
 is today, we still have to start and stop the container on every change.
 Hope this helps.

 -Original Message-
 From: Sanjay Choudhary [mailto:[EMAIL PROTECTED]
 Sent: Friday, January 20, 2006 8:53 PM
 To: Maven Users List
 Subject: Best Practice - Maven with WSAD or RAD6

 I am able to build my projects and EAR in both WSAD and RAD6.  Now
 problem I face is in third party jars.

 in RAD6/WSAD project structure is like this

 EAR Project
 contains application.xml for EAR
 contains all third party JAR required by application

 JAR project

 EJB Project

 WAR Project
  contains JSPs
  contains third party JARs like struts etc in the LIB folder

 Now when I used Maven in my development environment, I moved all the
 third party JARS to maven repository and changed the dependencies
 accordingly.  My java project, ejb projects and war project compiled
 fine. I am able to create EAR too.

 Now when I want to run/debug my application on built in Websphere
 application server, server complains about the third party JARs.
 Initially, I thought of adding all the third party jars in server
 classpath - but this is not a good idea.  Shall I explode my EAR into
 EAR project, so that I will have all the third party jars there. Is
 there someother best practice that I
 can follow?   I am sure someone may have resolved this issue, (maven is
 around for long).

 Please advice.

 Thanks,
 Sanjay


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




Re: Best Practice - Maven with WSAD or RAD6

2006-01-21 Thread Sanjay Choudhary
Hi Mike,

For 1, I have put jar dependency as default (compile) and option = true.
Manifest.mf is generated fine.  But please validate if this is fine.

For 2, I have use ANT - my POM has something like this

plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-antrun-plugin/artifactId
executions
 execution
  idCOPYMANIFEST/id
  phasepackage/phase
  configuration
   tasks
unzip src=${basedir}/target/${project.name}-${project.version}.jar
 dest=${basedir}/ejbModule
 patternset
  include name=**/META-INF/MANIFEST.MF /
 /patternset
/unzip
   /tasks
  /configuration
  goals
   goalrun/goal
  /goals
 /execution
/executions
/plugin
This copies my generated MANIFEST.MF into the ejbModule/META-INF folder.

Any feedback or comments?

I guess for 3 also I can use Ant task to extract jars from the EAR into EAR
project. But will wait for your feedback.

I will still need help from you on 3, 4 and 5.

It will be really helpfull if you can share your projects POM.

Thanks,
Sanjay

On 1/21/06, Sanjay Choudhary [EMAIL PROTECTED] wrote:

 Hi Mike,

 Thanks a lot.

 Currently, I am trying to make our existing application to use Maven 2,
 both in build and development env.  Great that you have already done so.
 Please help me by answering  some more questions below :-

 1.  I downloaded the new version  for WAR plug in. Build and used it.  My
 question is , In your WAR project, what is the scope of the dependencies for
 jar that are present at the EAR level? For example, log4j   If I give
 default (ie. compile) manifest is created correctly in WebContent/META-INF/
 but at the same time in the .War file we have all the dependent jars bundled
 in the lib folder.  This is causing the same sets of JARs to be in 2 places,
 once bundled in EAR and second time in the lib folder in the WAR.  Is there
 a way to avoid this? If you can share your Parent POM, JAR POM, WAR POM and
 EJB POM , it will be easy to understand the structure.

 2. Is there a manifest goal for EJB plugin?  Since EJB's projects are
 modules, at the package phase we need to create Manifest.mf too. Do have
 suggestions for this?

 3. Regards to copying of jars defined as dependencies in pom.xml in the
 EAR project, you mentioned that some builder is available. Pls. let me know
 from where I can download this. I googled for a while but in vain.  Or Is it
 possible to share the plugin written by you?

 4. In eclipse plugin you defined disableWTP true? What does this do?

 5. As you know Eclipse plugin configuration values differ in project
 types.  JAR , WAR and EJB's.  How do you manage your plugin definitions in
 POMs'?  Do you have a parent POM and one sub POM for each project type or
 someother strategy? Please advice. Again,  If you can share your Parent POM,
 JAR POM, WAR POM and EJB POM , it will be easy to understand the structure.

 Thanks for all the help and great work you have done in integrating Maven
 with RAD6.  I am sure lot of people will benefit from you.

 Thanks,
 Sanjay








 On 1/21/06, Mike Perham [EMAIL PROTECTED]  wrote:
 
  You don't say if you are using M1 or M2.
 
  For M2, we did the following to get things working with RSA6:
 
  WAR plugin config:
 
 plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-war-plugin/artifactId
 version2.0-beta-3-SNAPSHOT/version
 configuration
 
  warSourceDirectoryWebContent/warSourceDirectory
 
  warSourceExcludesWEB-INF/lib/*.jar/warSourceExcludes
 archive
 manifest
 addClasspathtrue/addClasspath
 classpathPrefixlib//classpathPrefix
 /manifest
 /archive
 /configuration
 executions
 execution
 phasepackage/phase
 goals
 goalmanifest/goal
 /goals
 inheritedtrue/inherited
 /execution
 /executions
 /plugin
 
  - The war:manifest goal updates WebContent/META-INF/MANIFEST.MF on every
 
  build.  It is in SVN but not in the latest released version.
  - Notice the jars are excluded from WEB-INF/lib when built.  This is
  because they are all packaged in the ear so 4 wars don't cause 4x the
  JAR bloat.
 
  EAR plugin config:
 
 plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-ear-plugin/artifactId
 !--
 Webify customized EAR plugin to handle
  RSA-specific stuff
 like copying jars to lib/.
 --
 version 2.1-20051209.230525-1/version

Best Practice - Maven with WSAD or RAD6

2006-01-20 Thread Sanjay Choudhary
I am able to build my projects and EAR in both WSAD and RAD6.  Now problem I
face is in third party jars.

in RAD6/WSAD project structure is like this

EAR Project
 contains application.xml for EAR
 contains all third party JAR required by application

JAR project

EJB Project

WAR Project
  contains JSPs
  contains third party JARs like struts etc in the LIB folder

Now when I used Maven in my development environment, I moved all the third
party JARS to maven repository and changed the dependencies accordingly.  My
java project, ejb projects and war project compiled fine. I am able to
create EAR too.

Now when I want to run/debug my application on built in Websphere
application server, server complains about the third party JARs.  Initially,
I thought of adding all the third party jars in server classpath - but this
is not a good idea.  Shall I explode my EAR into EAR project, so that I will
have all the third party jars there. Is there someother best practice that I
can follow?   I am sure someone may have resolved this issue, (maven is
around for long).

Please advice.

Thanks,
Sanjay


Re: M2 - Help needed with profiles

2006-01-14 Thread Sanjay Choudhary
I will try to decribe the Use Case.  Projects decribed below are using RAD
6.0 (base is eclipse 3.0.2)

In RAD6.0,  we have 3 different kind of projects, and more, but for this
discussion 3 are sufficient.

1. Java
2. EJB
3. Web

Each of the above projects have different entries in the following sections
in .project files
1. buildcommands.
2. project natures.

In my application we have

Parent POM
Project - A  extends parent POM  - Java project
Project - B  extends parent POM  - Java project
Project - C  extends parent POM -  EJB project
Project - D  extends parent POM -  EJB project
Project - F  extends parent POM  - Web project
Project - G  extends parent POM - Web project
(I have several projects in my workspace of different types).

Currently, I am forced to define Eclipse plugin entries in each of the
projects Also entries get duplicated in similar kind of projects.  For
example, Java projects ( project A and project B) will have the following
entries for eclipse plugin in the POM

buildcommands
   java.lang.String
  org.eclipse.jdt.core.javabuilder
   /java.lang.String
   java.lang.String
  com.ibm.sse.model.structuredbuilder
   /java.lang.String
   java.lang.String
  com.ibm.etools.ctc.serviceprojectbuilder
   /java.lang.String
/buildcommands
projectnatures
   java.lang.String
  org.eclipse.jdt.core.javanature
   /java.lang.String
   java.lang.String
  com.ibm.etools.ctc.javaprojectnature
   /java.lang.String
/projectnatures

Similarly, EJB projects will have dupliaction for properties I am trying to
avoid this duplication.  Thought profile should be the way to go (there may
be another way too) but don't know how exactly to achieve this.

Thanks,
Sanjay

On 1/13/06, Rinku [EMAIL PROTECTED] wrote:

 Hi,

 What's the exact use case here?

 Do you know that M2 can merge profiles so you can avoid some duplication
 by
 factoring out common elements into a parent POM.

 Having said that, it would be a good idea to have some more details on
 what you
 are intending to do.

 Cheers,

 Rahul


 - Original Message -
 From: Sanjay Choudhary [EMAIL PROTECTED]
 To: Maven Users List users@maven.apache.org
 Sent: Saturday, January 14, 2006 12:50 PM
 Subject: M2 - Help needed with profiles


 I read the following on maven website

 Profiles specified in the POM can modify the following POM elements:

   - *repositories*
   - *pluginRepositories*
   - *dependencies*
   - *plugins*
   - *properties* (not actually available in the main POM, but used
   behind the scenes)
   - *modules*
   - *reporting*
   - *dependencyManagement*
   - *distributionManagement*
   - a subset of the *build* element, which consists of:
  - *defaultGoal*
  - *resources*
  - *testResources*
  - *finalName*

 *I am interested in creating two profiles to modify eclipse plugin in the
 parent POM.  One profile is for EJB project and other one is for Java
 project.  I guess this is not the right way of doing it as I get errors
 when
 I do so.  Please help me in configuring the profile right way. This will
 save me from duplication the plugin in code in serveral projects.*
 **
 profiles
  profile
 idjavaprojects/id
 activation
property
   namepackage/name
   valuejar/value
/property
 /activation
 build
plugins
   plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-eclipse-plugin/artifactId
  configuration
 classpathContainers
java.lang.String
   org.eclipse.jdt.launching.JRE_CONTAINER
/java.lang.String
java.lang.String
   com.ibm.wtp.server.java.core.container
 /com.ibm.etools.websphere.runtime.core.runtimeTarget.v50/was.base.v5
/java.lang.String
 /classpathContainers
 buildcommands
java.lang.String
   org.eclipse.jdt.core.javabuilder
/java.lang.String
java.lang.String
   com.ibm.sse.model.structuredbuilder
/java.lang.String
java.lang.String
   com.ibm.etools.ctc.serviceprojectbuilder
/java.lang.String
 /buildcommands
 projectnatures
java.lang.String

M2 - Help needed with profiles

2006-01-13 Thread Sanjay Choudhary
I read the following on maven website

Profiles specified in the POM can modify the following POM elements:

   - *repositories*
   - *pluginRepositories*
   - *dependencies*
   - *plugins*
   - *properties* (not actually available in the main POM, but used
   behind the scenes)
   - *modules*
   - *reporting*
   - *dependencyManagement*
   - *distributionManagement*
   - a subset of the *build* element, which consists of:
  - *defaultGoal*
  - *resources*
  - *testResources*
  - *finalName*

*I am interested in creating two profiles to modify eclipse plugin in the
parent POM.  One profile is for EJB project and other one is for Java
project.  I guess this is not the right way of doing it as I get errors when
I do so.  Please help me in configuring the profile right way. This will
save me from duplication the plugin in code in serveral projects.*
**
profiles
  profile
 idjavaprojects/id
 activation
property
   namepackage/name
   valuejar/value
/property
 /activation
 build
plugins
   plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-eclipse-plugin/artifactId
  configuration
 classpathContainers
java.lang.String
   org.eclipse.jdt.launching.JRE_CONTAINER
/java.lang.String
java.lang.String
   com.ibm.wtp.server.java.core.container
/com.ibm.etools.websphere.runtime.core.runtimeTarget.v50/was.base.v5
/java.lang.String
 /classpathContainers
 buildcommands
java.lang.String
   org.eclipse.jdt.core.javabuilder
/java.lang.String
java.lang.String
   com.ibm.sse.model.structuredbuilder
/java.lang.String
java.lang.String
   com.ibm.etools.ctc.serviceprojectbuilder
/java.lang.String
 /buildcommands
 projectnatures
java.lang.String
   org.eclipse.jdt.core.javanature
/java.lang.String
java.lang.String
   com.ibm.etools.ctc.javaprojectnature
/java.lang.String
 /projectnatures
  /configuration
   /plugin
   plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-jar-plugin/artifactId
  configuration
 archive
indextrue/index
manifest
   addClasspathtrue/addClasspath
/manifest
manifestEntries
   modedevelopment/mode
   url${pom.url}/url
/manifestEntries
 /archive
  /configuration
   /plugin
   plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-compiler-plugin/artifactId
  configuration
 compilerVersion1.3/compilerVersion
  /configuration
   /plugin
/plugins
 /build
  /profile
  profile
 idejbprojects/id
 activation
property
   namepackage/name
   valueejb/value
/property
 /activation
 plugins
plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-antrun-plugin/artifactId
   executions
  execution
 idWSEJBDEPLOY/id
 phasepackage/phase
 configuration
tasks
   echo message=This is test message/
/tasks
 /configuration
 goals
goalrun/goal
 /goals
  /execution
  execution
 phasecompile/phase
 configuration
tasks
   copy todir=target/classes/META-INF
  fileset dir=ejbModule/META-INF
 include name=**.xm*/
  /fileset
   /copy
/tasks
 /configuration
 goals
goalrun/goal
 /goals
  /execution
   /executions
   

Re: Failures with downloads

2006-01-13 Thread Sanjay Choudhary
Hi Martin,

I can help you. Attach your POM with the email. We can work from there.

-Sanjay


On 1/13/06, [EMAIL PROTECTED] [EMAIL PROTECTED]  wrote:

 Hi,
I am trying to compile some code that requires the following
 dependencies and the POM files seem to be found but not the jar files
 why is this?

I am finding that maven has more promise than it appears to be able
 to deliver.  I have tried to use the eclipse plugin but virtaully
 everything I add as a dependency ends up with a failure so nothing else
 can then be added.

 Martin Roberts
 Group Research
 e-mail: [EMAIL PROTECTED]
 tel: +44(0) 1473 609785  clickdial
  http://clickdial.bt.co.uk/clickdial?001609785.cld
 fax: +44(0) 1473 609834
 Intranet Site :http://twiki.btlabs.bt.co.uk/twiki
 pp 16 Floor 5, Orion Building, Adastral Park, Martlesham, Ipswich IP5
 3RE, UK

British Telecommunications plc
Registered office: 81 Newgate Street London EC1A 7AJ
Registered in England no. 180
This electronic message contains information from British
 Telecommunications plc which may be privileged or confidential. The
 information is intended to be for the use of the individual(s) or entity
 named above. If you are not the intended recipient be aware that any
 disclosure, copying, distribution or use of the contents of this
 information is prohibited. If you have received this electronic message
 in error, please notify us by telephone or email (to the numbers or
 address above) immediately.











[M2] eclipse project dependecy - how to define?

2006-01-12 Thread Sanjay Choudhary
In maven 1.0.2 we were able to define eclipse project dependency. For
example

dependency
groupId
artifactId
 version
 properties
  eclipse.dependencytrue/eclipse.dependency
   /properties
/dependency


How can I define project depency for Eclipse in M2?  Pls. advice.

Thanks
-Sanjay


Re: [m2] Using variables from parent pom.xml - like version etc.

2006-01-11 Thread Sanjay Choudhary
I agree with Sean, it will be a pain and time comsuming effort if all the
child project's POM needs to be updated.

-Sanjay

On 1/11/06, Sean McNamara [EMAIL PROTECTED] wrote:

 Does this really address the issue that Sanjay is
 trying to solve?  If the parent definition requires
 the version to be added, then every time the version
 is incremented all child POMs must be updated to
 reflect the new parent version.  This means that all
 POMs in the inheritance heirarchy must be updated for
 every version increment.

 I've seen some postings talking about using the
 release-plugin to automate this behavior
 (re-versioning all POMs), but haven't found any good
 docs on that particular plugin.  Pointers would be
 appreciated.

 Seems odd that this very useful feature of M1 didn't
 make it into M2.

 --- Brian E. Fox [EMAIL PROTECTED] wrote:

  Once you've done that, you can leave off the child
  version/ elements,
  and the parent's version will be used. I'll add
  that it's common to
  inherit the group too.
 
  -Original Message-
  From: John Casey [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, January 10, 2006 11:56 PM
  To: Maven Users List
  Subject: Re: [m2] Using variables from parent
  pom.xml - like version
  etc.
 
  There are two requirements for versioning in this
  case:
 
  1. The parent POM has to have a valid version/
  element (no expressions
  here).
 
  2. Each child POM must specify a parent/ element
  that refers to the
  parent POM explicitly, including the version
  declared in the parent POM
  (again, no expressions here).
 
  Once you've done that, you can leave off the child
  version/ elements,
  and the parent's version will be used.
 
  HTH,
 
  John
 
  Sanjay Choudhary wrote:
   Thanks for taking time to reply.
  
   Let me ask my question in different way
  
   Parent Project  currentversion 4.0
  
   project 1 -  extends parent project
   project 2 -  extends parent project
   project 3 -  extends parent project and depends on
  project 1 and
   project 2 ..
   ..
   project 35 - extends parent project
  
  
   Parent project  + project1..35 make an
  Application.
  
   Life cycle of the parent project + child project's
  is same as
  application.
   Let us say current version of the application 4.0.
  
   In maven 1.0.2 , we used to define tag
  currentVersion
   4.0/currentVersionin parent project.xml Then in
  child projects, for
   example child project 3, that is dependendent on
  project 1 and project
 
   2, We define dependency as
  
   artifactIdproject1/artifactId
   version${pom.currentVersion}/version
  
artifactIdproject2/artifactId
   version${pom.currentVersion}/version
  
   Now if we hv. to release version 4.1 then all we
  need to do is change
   the parent project.xml - currentVersion attribute.
   We don't need to
   change all the 35 projects for the version.
  
   My question is how can a similar behavior achieved
  in M2.
  
   Thanks,
   Sanjay
  
  
  
  
  
  
  
  
  
   On 1/10/06, Napoleon Esmundo Ramirez
  [EMAIL PROTECTED] wrote:
   Hello,
  
   I just checked your pom's.  Your parent pom seems
  to be okay.  But I
   think your second pom isn't.  When declaring
  parent projects in child
 
   projects
   (modules) you should explicitly define the
  version. Try setting it
   with 1.0-8, and let's see what happens.
  
   I hope it works this time. :)
  
   Cheers!
   Nap
  
   On 1/11/06, Allan Ramirez [EMAIL PROTECTED]
  wrote:
   Hi there,
  
   Try to use the dependencyManangement element.
  
  
  
  
 
 http://maven.apache.org/guides/introduction/introduction-to-dependenc
   y-mechanism.html
   Regards,
   -allan
  
   Sanjay Choudhary wrote:
  
   I tried using ${project.version} but got the
  following error
  
  
   [INFO] Trace
  
  org.apache.maven.reactor.MavenExecutionException:
  POM '
   org.emember:org_kp_eme
   mber' not found in repository:
  
  
  org.kp.emember:org_kp_emember:pom:${project.version}
  
  
  
   project
  xmlns=http://maven.apache.org/POM/4.0.0;
  
 
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  
 
 xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
   http://maven.apache.org/maven-v4_0_0.xsd;
 modelVersion4.0.0/modelVersion
 parent
   groupIdorg.emember/groupId
   artifactIdorg_emember/artifactId
   versionCAN I USE VERSION VARIABLE FROM POM?
  /version
 /parent
  
  
  
  
   On 1/10/06, Napoleon Esmundo Ramirez
  [EMAIL PROTECTED]
  wrote:
  
  
   Hello,
  
   Please try ${project.version}.
  
   Cheers!
   Nap
  
   On 1/11/06, Sanjay Choudhary
  [EMAIL PROTECTED] wrote:
  
  
   I have parent  pom.xml as below
  
   project
  xmlns=http://maven.apache.org/POM/4.0.0;
  xmlns:xsi=
   http://www.w3.org/2001/XMLSchema-instance;
  
 
 xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
   http://maven.apache.org/maven-v4_0_0.xsd;
modelVersion4.0.0/modelVersion
groupIdorg.emember/groupId
artifactIdorg_emember/artifactId
packagingpom/packaging
version1.0-8

[M2] Build SLOW.

2006-01-11 Thread Sanjay Choudhary
I have copied several third party jars ( Websphere application server Lib
into the repository).  I installed them using the following commiand

 Now when I build I get the following message

call mvn install:install-file -Dfile=./filename -DgroupId=oracle
-DartifactId=classes12 -Dversion=9.0.2.0.0 -Dpackaging=jar

[WARNING] Unable to get resource from repository central (
http://repo1.maven.org
/maven2)
Downloading:
http://repo1.maven.org/maven2/ibm/was/ras/was.5.0/ras-was.5.0.pom
[WARNING] Unable to get resource from repository central (
http://repo1.maven.org
/maven2)
Downloading:
http://repo1.maven.org/maven2/ibm/was/querymd/was.5.0/querymd-was.5
.0.pom

When I run mvn -o package, it runs quite fast.  But then I have a
disadvantage of running in a disconnected state.

Is there a way to fix the above warning?  It is slowing down my build :-(

Sanjay


Re: [M2] Build SLOW.

2006-01-11 Thread Sanjay Choudhary
Hi Bret,

Had it been handful files I would have created the POMs?

Thanks for making the new plugin available. How will I know it is available?

Also, how do I know that plug in is associated with which phase?  Can I find
this information somewhere?

Regards,
sanjay


On 1/11/06, Brett Porter [EMAIL PROTECTED] wrote:

 A new version of the install plugin will be released shortly that you can
 use:
 -DgeneratePom=true

 In the mean time, you can create a small POM in the local repository
 for the libraries.

 - Brett

 On 1/12/06, Sanjay Choudhary [EMAIL PROTECTED] wrote:
  I have copied several third party jars ( Websphere application server
 Lib
  into the repository).  I installed them using the following commiand
 
   Now when I build I get the following message
 
  call mvn install:install-file -Dfile=./filename -DgroupId=oracle
  -DartifactId=classes12 -Dversion=9.0.2.0.0 -Dpackaging=jar
 
  [WARNING] Unable to get resource from repository central (
  http://repo1.maven.org
  /maven2)
  Downloading:
  http://repo1.maven.org/maven2/ibm/was/ras/was.5.0/ras-was.5.0.pom
  [WARNING] Unable to get resource from repository central (
  http://repo1.maven.org
  /maven2)
  Downloading:
  http://repo1.maven.org/maven2/ibm/was/querymd/was.5.0/querymd-was.5
  .0.pom
 
  When I run mvn -o package, it runs quite fast.  But then I have a
  disadvantage of running in a disconnected state.
 
  Is there a way to fix the above warning?  It is slowing down my build
 :-(
 
  Sanjay
 
 

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




Re: [M2] Build SLOW.

2006-01-11 Thread Sanjay Choudhary
Brett,

Thanks once again.

My question on plugin and phase association was generic.  For example, if I
want to know ejb plugin is associated with which phase. Where do I find this
information?  (I know from mailing list that is associated with package
phase).

Thanks,
sanjay


On 1/11/06, Brett Porter [EMAIL PROTECTED] wrote:

 The plugin is not associated with a phase at present. It is available
 now, but needs to reach the mirrors before being announced.

 - Brett

 On 1/12/06, Sanjay Choudhary [EMAIL PROTECTED] wrote:
  Hi Bret,
 
  Had it been handful files I would have created the POMs?
 
  Thanks for making the new plugin available. How will I know it is
 available?
 
  Also, how do I know that plug in is associated with which phase?  Can I
 find
  this information somewhere?
 
  Regards,
  sanjay
 
 
  On 1/11/06, Brett Porter [EMAIL PROTECTED] wrote:
  
   A new version of the install plugin will be released shortly that you
 can
   use:
   -DgeneratePom=true
  
   In the mean time, you can create a small POM in the local repository
   for the libraries.
  
   - Brett
  
   On 1/12/06, Sanjay Choudhary [EMAIL PROTECTED] wrote:
I have copied several third party jars ( Websphere application
 server
   Lib
into the repository).  I installed them using the following commiand
   
 Now when I build I get the following message
   
call mvn install:install-file -Dfile=./filename -DgroupId=oracle
-DartifactId=classes12 -Dversion=9.0.2.0.0 -Dpackaging=jar
   
[WARNING] Unable to get resource from repository central (
http://repo1.maven.org
/maven2)
Downloading:
http://repo1.maven.org/maven2/ibm/was/ras/was.5.0/ras-was.5.0.pom
[WARNING] Unable to get resource from repository central (
http://repo1.maven.org
/maven2)
Downloading:
http://repo1.maven.org/maven2/ibm/was/querymd/was.5.0/querymd-was.5
.0.pom
   
When I run mvn -o package, it runs quite fast.  But then I have a
disadvantage of running in a disconnected state.
   
Is there a way to fix the above warning?  It is slowing down my
 build
   :-(
   
Sanjay
   
   
  
   -
   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: M2 - add custom classpath to plugin compiler:compile

2006-01-10 Thread Sanjay Choudhary
Provided is similar to system.  For system we have SystemPath , how do I
specify the path for
provided?  Or Will  I need to copy the files to maven m2 repository?

It will be helpful if someone can provide me with a dependency block from
their pom.xml.

Thanks,
Sanjay


On 1/10/06, Stephen Duncan [EMAIL PROTECTED] wrote:

 The standard way to do this is to depend on those jars with
 scopeprovided/scope

 -Stephen

 On 1/10/06, Sanjay Choudhary [EMAIL PROTECTED] wrote:
  Hi All,
 
  We have several JARS that are present in Websphere Lib folder.  In my
  previous project we copied all these jars in maven local repository (we
 were
  using maven 1.0.2).   Then defined each dependency in project.xml (was
 very
  tedious :-(   )
 
  In M2, is there a way to set the classpath while performing
 compile?  Don't
  need these entries in the Manifest.
 
  When we used Ant , we used to set the classpath, which used to include
 all
  the jars in Websphere Lib folder. Need something similar.
 
  Thanks,
  Sanjay
 
 


 --
 Stephen Duncan Jr
 www.stephenduncanjr.com

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




[m2] Using variables from parent pom.xml - like version etc.

2006-01-10 Thread Sanjay Choudhary
I have parent  pom.xml as below

project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=
http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd;
  modelVersion4.0.0/modelVersion
  groupIdorg.emember/groupId
  artifactIdorg_emember/artifactId
  packagingpom/packaging
  version1.0-8/version
  nameMaven Quick Start Archetype/name
  urlhttp://maven.apache.org/url
  dependencies
  /dependencies
/project


Then I have pom.xml for each module
project xmlns=http://maven.apache.org/POM/4.0.0;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd;
   modelVersion4.0.0/modelVersion
   parent
 groupIdorg.emember/groupId
 artifactIdorg_emember/artifactId
 versionCAN I USE VERSION VARIABLE FROM POM?  /version
   /parent
   groupIdorg.kp.emember/groupId
   artifactIdkporgcommon/artifactId
   packagingjar/packaging
   versionCAN I USE VERSION VARIABLE FROM POM?  /version

in maven 1.0.2 we were able to use ${pom.currentVersion} but in maven 2.0.
${pom.version} doesn't work.  In my build I don't want to update 35 pom.xmls.
With maven 1.0.2, our scripts update parent pom and that was available in
all the child projects.  Please advice how we can use the variable from
parent POM in M2 or if there is a alternate solution.

-Sanjay


Re: [m2] Using variables from parent pom.xml - like version etc.

2006-01-10 Thread Sanjay Choudhary
I tried using ${project.version} but got the following error


[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: POM '
org.emember:org_kp_eme
mber' not found in repository:

  org.kp.emember:org_kp_emember:pom:${project.version}

 project xmlns=http://maven.apache.org/POM/4.0.0;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
 http://maven.apache.org/maven-v4_0_0.xsd;
modelVersion4.0.0/modelVersion
parent
 groupIdorg.emember/groupId
 artifactIdorg_emember/artifactId
 versionCAN I USE VERSION VARIABLE FROM POM?  /version
/parent



On 1/10/06, Napoleon Esmundo Ramirez [EMAIL PROTECTED] wrote:

 Hello,

 Please try ${project.version}.

 Cheers!
 Nap

 On 1/11/06, Sanjay Choudhary [EMAIL PROTECTED] wrote:
 
  I have parent  pom.xml as below
 
  project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=
  http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
  http://maven.apache.org/maven-v4_0_0.xsd;
modelVersion4.0.0/modelVersion
groupIdorg.emember/groupId
artifactIdorg_emember/artifactId
packagingpom/packaging
version1.0-8/version
nameMaven Quick Start Archetype/name
urlhttp://maven.apache.org/url
dependencies
/dependencies
  /project
 
 
  Then I have pom.xml for each module
  project xmlns=http://maven.apache.org/POM/4.0.0;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
  http://maven.apache.org/maven-v4_0_0.xsd;
 modelVersion4.0.0/modelVersion
 parent
  groupIdorg.emember/groupId
  artifactIdorg_emember/artifactId
  versionCAN I USE VERSION VARIABLE FROM POM?  /version
 /parent
 groupIdorg.kp.emember/groupId
 artifactIdkporgcommon/artifactId
 packagingjar/packaging
 versionCAN I USE VERSION VARIABLE FROM POM?  /version
 
  in maven 1.0.2 we were able to use ${pom.currentVersion} but in maven
 2.0.
  ${pom.version} doesn't work.  In my build I don't want to update 35
  pom.xmls.
  With maven 1.0.2, our scripts update parent pom and that was available
 in
  all the child projects.  Please advice how we can use the variable from
  parent POM in M2 or if there is a alternate solution.
 
  -Sanjay
 
 




Re: [m2] Using variables from parent pom.xml - like version etc.

2006-01-10 Thread Sanjay Choudhary
Thanks for taking time to reply.

Let me ask my question in different way

Parent Project  currentversion 4.0

project 1 -  extends parent project
project 2 -  extends parent project
project 3 -  extends parent project and depends on project 1 and project 2
..
..
project 35 - extends parent project


Parent project  + project1..35 make an Application.

Life cycle of the parent project + child project's is same as application.
Let us say current version of the application 4.0.

In maven 1.0.2 , we used to define tag currentVersion 4.0/currentVersionin
parent project.xml Then in child projects, for example child project 3, that
is dependendent on project 1 and project 2,
We define dependency as

artifactIdproject1/artifactId
version${pom.currentVersion}/version

 artifactIdproject2/artifactId
version${pom.currentVersion}/version

Now if we hv. to release version 4.1 then all we need to do is change the
parent project.xml - currentVersion attribute.  We don't need to change all
the 35 projects for the version.

My question is how can a similar behavior achieved in M2.

Thanks,
Sanjay









On 1/10/06, Napoleon Esmundo Ramirez [EMAIL PROTECTED] wrote:

 Hello,

 I just checked your pom's.  Your parent pom seems to be okay.  But I think
 your second pom isn't.  When declaring parent projects in child projects
 (modules) you should explicitly define the version. Try setting it with
 1.0-8, and let's see what happens.

 I hope it works this time. :)

 Cheers!
 Nap

 On 1/11/06, Allan Ramirez [EMAIL PROTECTED] wrote:
 
  Hi there,
 
  Try to use the dependencyManangement element.
 
 
 
 http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
 
  Regards,
  -allan
 
  Sanjay Choudhary wrote:
 
  I tried using ${project.version} but got the following error
  
  
  [INFO] Trace
  org.apache.maven.reactor.MavenExecutionException: POM '
  org.emember:org_kp_eme
  mber' not found in repository:
  
org.kp.emember:org_kp_emember:pom:${project.version}
  
  
  
  project xmlns=http://maven.apache.org/POM/4.0.0;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
  http://maven.apache.org/maven-v4_0_0.xsd;
 modelVersion4.0.0/modelVersion
 parent
  groupIdorg.emember/groupId
  artifactIdorg_emember/artifactId
  versionCAN I USE VERSION VARIABLE FROM POM?  /version
 /parent
  
  
  
  
  
  On 1/10/06, Napoleon Esmundo Ramirez [EMAIL PROTECTED] wrote:
  
  
  Hello,
  
  Please try ${project.version}.
  
  Cheers!
  Nap
  
  On 1/11/06, Sanjay Choudhary [EMAIL PROTECTED] wrote:
  
  
  I have parent  pom.xml as below
  
  project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=
  http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
  http://maven.apache.org/maven-v4_0_0.xsd;
modelVersion4.0.0/modelVersion
groupIdorg.emember/groupId
artifactIdorg_emember/artifactId
packagingpom/packaging
version1.0-8/version
nameMaven Quick Start Archetype/name
urlhttp://maven.apache.org/url
dependencies
/dependencies
  /project
  
  
  Then I have pom.xml for each module
  project xmlns=http://maven.apache.org/POM/4.0.0;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
  http://maven.apache.org/maven-v4_0_0.xsd;
 modelVersion4.0.0/modelVersion
 parent
  groupIdorg.emember/groupId
  artifactIdorg_emember/artifactId
  versionCAN I USE VERSION VARIABLE FROM POM?  /version
 /parent
 groupIdorg.kp.emember/groupId
 artifactIdkporgcommon/artifactId
 packagingjar/packaging
 versionCAN I USE VERSION VARIABLE FROM POM?  /version
  
  in maven 1.0.2 we were able to use ${pom.currentVersion} but in maven
  
  
  2.0.
  
  
  ${pom.version} doesn't work.  In my build I don't want to update 35
  pom.xmls.
  With maven 1.0.2, our scripts update parent pom and that was
 available
  
  
  in
  
  
  all the child projects.  Please advice how we can use the variable
 from
  parent POM in M2 or if there is a alternate solution.
  
  -Sanjay
  
  
  
  
  
  
  
  
  
 
 
  
  No virus found in this incoming message.
  Checked by AVG Free Edition.
  Version: 7.1.371 / Virus Database: 267.14.17/226 - Release Date:
  1/10/2006
  
  
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 




M2 - add custom classpath to plugin compiler:compile

2006-01-09 Thread Sanjay Choudhary
Hi All,

We have several JARS that are present in Websphere Lib folder.  In my
previous project we copied all these jars in maven local repository (we were
using maven 1.0.2).   Then defined each dependency in project.xml (was very
tedious :-(   )

In M2, is there a way to set the classpath while performing compile?  Don't
need these entries in the Manifest.

When we used Ant , we used to set the classpath, which used to include all
the jars in Websphere Lib folder. Need something similar.

Thanks,
Sanjay


Re: Best practices for release and version management?

2005-09-02 Thread Sanjay Choudhary
Hi David,
 Is it possible for you to share the internal process document with us? It 
will help a lot.
 -Sanjay

 On 9/2/05, David Jackman [EMAIL PROTECTED] wrote: 
 
 We're pretty much doing what Jose is doing, but we don't see these 
 timeouts. I think it's because the Maven properties are set up to look in 
 our internal repository first and then go global from there. Just about 
 everything is in the internal repository (certainly the artifacts for our 
 projects are there), so the download time isn't much at all.
 
 My maven.repo.remote property lists the internal repository first, and 
 ibiblio second.
 
 As far as the approach to take when releasing and incrementing versions, 
 the process you describe is essentially what we're doing. In fact, I just 
 wrote up a document outlining our internal process for releasing projects 
 for our developers (since we're about to release the big project soon), so I 
 know the details very well.
 
 ..David..
 
 
 -Original Message-
 From: Trygve Laugstøl [mailto:[EMAIL PROTECTED]
 Sent: Friday, September 02, 2005 4:14 AM
 To: Maven Users List
 Subject: Re: Best practices for release and version management?
 
 On Fri, Sep 02, 2005 at 11:46:49AM +0200, Jose Gonzalez Gomez wrote:
  Hi there,
 
  How do you use to manage your project version among releases? I
  mean... what do you exactly put in currentVersion in your pom and how
  do you change it among releases?
 
  I'm currently using the following approach:
 
  1. Developing version 0.1 - currentVersion = 0.1-SNAPSHOT 2. V0.1
  release: commit all pending changes, change currentVersion to 0.1,
  commit pom, tag/branch repository, make release.
  3. Developing version 0.2 - change currentVersion to 0.2-SNAPSHOT,
  commit pom, update and continue developing
 
 This is the way that we're recomending and using ourselfs.
 
  What do you think about this? This approach has one annoying thing:
  maven tries to download SNAPSHOT versions from remote repositories,
  although they're only locally installed in the developer repository.
  After some timeout maven uses the local version, but in case of large
  projects the sum of the timeouts may be big. Do you use any other
  approach?
 
 The easiest solution to this problem is to either configure a proxy so it 
 doesn't time out (but rather get a 404 response from the HTTP server) or 
 just run Maven in off-line mode (by using the -o switch)
 
 --
 Trygve
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



Maven unattended build process ---?

2005-08-18 Thread Sanjay Choudhary
We currently use Maven 1.0.2 only for building a J2EE application. *Developers 
aren't using it as yet.* :-( Our current process is described below. We run 
this process everynight to create EAR and deploy them in Sandbox. I will 
appreciate everyone's suggestions and comments to improve the process.
 1. Bootstrap all projects from CVS. Get latest from head or branch. (We 
have maven.xml in the our bootstrap project that does check outs for all the 
projects from CVS).
 2. Perform release - We use multiproject:goal with -Dgoal=performrelease. 
In this task we tag our code in CVS and update project.xml's with the new 
version.
 3. Use maven and build EAR.
 4. Deploy EAR in sandbox - This is done using Jackal scripts.
 we have a unix shell script that runs(from cron job) the above mentioned 
process. Value of CVS tag and version numbers are determined using perl and 
passed to maven.
 Issues with this process.
==
 For some reason, if step 3 fails to build the EAR file. (For reasons like 
compilation errors etc) Getting build process back in line is lot of work. 
For example, if my last successfull build was 1.0.1 and now I am trying to 
build 1.0.2. 
 1. Bootstrap works ok
2. Prepare release will tag the cvs and update the project.xml for current 
version to be 1.0.2
3. BUILD FAILS.
 Developer fixes the bug and now when we will try to do release 
 1. Bootstrap new code.
2. Attempt Prepare Release - it fails when it tries to find the depencies 
for version 1.0.2.
 Since this is a J2EE application, there are dependencies of EJB's , WAR 
project on Java projects.Also some Java projects are dependent on other java 
projects.
 I am not sure if we are following the right process to build. Our goal is 
to tag code in CVS and build everynight ( and may be multiple times in a day 
in future). Also if build fails, email out the notifications.
 I will appreciate any comments, suggestions and any experience.
 Thanks,
Sanjay


Re: Maven unattended build process ---?

2005-08-18 Thread Sanjay Choudhary
Hi Tom,
 Is your plug-in public or private? If its public, whats the name of your 
plug-in?

 On 8/18/05, Thomas Van de Velde [EMAIL PROTECTED] wrote: 
 
 Sanjay,
 
 You might want to look at continuous integration engines like 
 CruiseControl,
 Anthill or Luntbuild, which take care of the tagging and are ideal for
 nightly builds. Maven would then just be used for build and packaging. CVS
 operations are handled by the build server. However, for application
 releases (meaning a software release to production), I would use Maven to
 tag and assign a version number. These type of releases are not part of a
 continuous build and are often refered to as push-button operations.
 
 Maven could go a bit further with the automation of releases. Right now a
 lot of it still manual (e.g. assigning a version number, etc.). I've 
 written
 a plugin that automates all of that by automatically incrementing the last
 digit of an application's version upon release.
 
 Cheers,
 Thomas
 
 On 8/18/05, Sanjay Choudhary [EMAIL PROTECTED] wrote:
 
  We currently use Maven 1.0.2 only for building a J2EE application.
  *Developers
  aren't using it as yet.* :-( Our current process is described below. We
  run
  this process everynight to create EAR and deploy them in Sandbox. I will
  appreciate everyone's suggestions and comments to improve the process.
  1. Bootstrap all projects from CVS. Get latest from head or branch. (We
  have maven.xml in the our bootstrap project that does check outs for all
  the
  projects from CVS).
  2. Perform release - We use multiproject:goal with 
 -Dgoal=performrelease.
  In this task we tag our code in CVS and update project.xml's with the 
 new
  version.
  3. Use maven and build EAR.
  4. Deploy EAR in sandbox - This is done using Jackal scripts.
  we have a unix shell script that runs(from cron job) the above mentioned
  process. Value of CVS tag and version numbers are determined using perl
  and
  passed to maven.
  Issues with this process.
  ==
  For some reason, if step 3 fails to build the EAR file. (For reasons 
 like
  compilation errors etc) Getting build process back in line is lot of 
 work.
  For example, if my last successfull build was 1.0.1 and now I am trying 
 to
  build 1.0.2.
  1. Bootstrap works ok
  2. Prepare release will tag the cvs and update the project.xml for 
 current
  version to be 1.0.2
  3. BUILD FAILS.
  Developer fixes the bug and now when we will try to do release
  1. Bootstrap new code.
  2. Attempt Prepare Release - it fails when it tries to find the 
 depencies
  for version 1.0.2.
  Since this is a J2EE application, there are dependencies of EJB's , WAR
  project on Java projects.Also some Java projects are dependent on other
  java
  projects.
  I am not sure if we are following the right process to build. Our goal 
 is
  to tag code in CVS and build everynight ( and may be multiple times in a
  day
  in future). Also if build fails, email out the notifications.
  I will appreciate any comments, suggestions and any experience.
  Thanks,
  Sanjay
 
 
 



Re: Maven unattended build process ---?

2005-08-18 Thread Sanjay Choudhary
Hi Dan,
 thanks for your comments and I tried it but it fails
 First Build
1. Bootstrap code for release 1.0.1
2. multiproject:prepare-release will Tag in CVS and project.xml gets updated 
with version 1.0.1
3. maven goal-name
 Second build
1. Bootstrap code.
2. mulitproject:prepare-release will Tag in CVS and project.xml gets updated 
with version 1.0.2
3. maven goal-name --- Build fails
 Third build
1. Bootstrap code
2. multiproject:prepare-release - at time of tagging and updating POM's 
maven will check for the dependecies. My local repository and remote 
repository doesn't have dependencies for version 1.0.2. Hence, this fails.
3. Even build fails for the same reason.
 You said If your have a night build fail. You should increment the build
number and tag it again for the next build. But how is this possible? 
Please help me understand with details.
 Appreciate your time.
  -sanjay
On 8/18/05, dan tran [EMAIL PROTECTED] wrote: 
 
 Sanjay, beside from CI as Thomas suggested.
 
 If your have a night build fail. You should increment the build
 number and tag it again for the next build.
 
 However even with simple cron job to do scm:update and build every
 hour would reduce your chance of failed nightly build big time. It
 works great for me.
 
 -Dan
 
 
 
 
 
 On 8/18/05, Thomas Van de Velde [EMAIL PROTECTED] wrote:
  Sanjay,
 
  You might want to look at continuous integration engines like 
 CruiseControl,
  Anthill or Luntbuild, which take care of the tagging and are ideal for
  nightly builds. Maven would then just be used for build and packaging. 
 CVS
  operations are handled by the build server. However, for application
  releases (meaning a software release to production), I would use Maven 
 to
  tag and assign a version number. These type of releases are not part of 
 a
  continuous build and are often refered to as push-button operations.
 
  Maven could go a bit further with the automation of releases. Right now 
 a
  lot of it still manual (e.g. assigning a version number, etc.). I've 
 written
  a plugin that automates all of that by automatically incrementing the 
 last
  digit of an application's version upon release.
 
  Cheers,
  Thomas
 
  On 8/18/05, Sanjay Choudhary [EMAIL PROTECTED] wrote:
  
   We currently use Maven 1.0.2 only for building a J2EE application.
   *Developers
   aren't using it as yet.* :-( Our current process is described below. 
 We
   run
   this process everynight to create EAR and deploy them in Sandbox. I 
 will
   appreciate everyone's suggestions and comments to improve the process.
   1. Bootstrap all projects from CVS. Get latest from head or branch. 
 (We
   have maven.xml in the our bootstrap project that does check outs for 
 all
   the
   projects from CVS).
   2. Perform release - We use multiproject:goal with 
 -Dgoal=performrelease.
   In this task we tag our code in CVS and update project.xml's with the 
 new
   version.
   3. Use maven and build EAR.
   4. Deploy EAR in sandbox - This is done using Jackal scripts.
   we have a unix shell script that runs(from cron job) the above 
 mentioned
   process. Value of CVS tag and version numbers are determined using 
 perl
   and
   passed to maven.
   Issues with this process.
   ==
   For some reason, if step 3 fails to build the EAR file. (For reasons 
 like
   compilation errors etc) Getting build process back in line is lot of 
 work.
   For example, if my last successfull build was 1.0.1 and now I am 
 trying to
   build 1.0.2.
   1. Bootstrap works ok
   2. Prepare release will tag the cvs and update the project.xml for 
 current
   version to be 1.0.2
   3. BUILD FAILS.
   Developer fixes the bug and now when we will try to do release
   1. Bootstrap new code.
   2. Attempt Prepare Release - it fails when it tries to find the 
 depencies
   for version 1.0.2.
   Since this is a J2EE application, there are dependencies of EJB's , 
 WAR
   project on Java projects.Also some Java projects are dependent on 
 other
   java
   projects.
   I am not sure if we are following the right process to build. Our goal 
 is
   to tag code in CVS and build everynight ( and may be multiple times in 
 a
   day
   in future). Also if build fails, email out the notifications.
   I will appreciate any comments, suggestions and any experience.
   Thanks,
   Sanjay
  
  
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



Re: Maven unattended build process ---?

2005-08-18 Thread Sanjay Choudhary
Hi Dan,
 This makes perfect sense. Thanks for your help.
 In one of your steps you said tag the entire source source. How do you 
tag it? Do you use ant rtag or someother mechanism?
 Thanks,
Sanjay
 On 8/18/05, dan tran [EMAIL PROTECTED] wrote: 
 
 Sanjay, you and I have the same build requirements ( tag daily build)
 but I dont use
 multiproejct:prepare-release. This is the different.
 
 In my case, I have a single version property defined at the root pom, and 
 all
 subproject's version and dependency's version, except the thirdpary
 ones, reuse that property. For each build, i do:
 
 - fetch the root property file
 - increment the build
 - check it in
 - tag the entire source tree
 - fetch the entire source tree using the tag
 - build and deploy all built artifacts
 
 All those steps can be done by a bootstrap project that is not part of
 your source
 tree.
 
 In your CI, like a watch dog build, your can keep scm:update or 
 scm:checkout
 the source and build WITHOUT deploy so that when it fails you can
 notify developer.
 
 hope it helps!!!
 
 -D
 
 
 
 
 On 8/18/05, Sanjay Choudhary [EMAIL PROTECTED] wrote:
  Hi Dan,
  thanks for your comments and I tried it but it fails
  First Build
  1. Bootstrap code for release 1.0.1
  2. multiproject:prepare-release will Tag in CVS and project.xml gets 
 updated
  with version 1.0.1
  3. maven goal-name
  Second build
  1. Bootstrap code.
  2. mulitproject:prepare-release will Tag in CVS and project.xml gets 
 updated
  with version 1.0.2
  3. maven goal-name --- Build fails
  Third build
  1. Bootstrap code
  2. multiproject:prepare-release - at time of tagging and updating POM's
  maven will check for the dependecies. My local repository and remote
  repository doesn't have dependencies for version 1.0.2. Hence, this 
 fails.
  3. Even build fails for the same reason.
  You said If your have a night build fail. You should increment the 
 build
  number and tag it again for the next build. But how is this possible?
  Please help me understand with details.
  Appreciate your time.
  -sanjay
  On 8/18/05, dan tran [EMAIL PROTECTED] wrote:
  
   Sanjay, beside from CI as Thomas suggested.
  
   If your have a night build fail. You should increment the build
   number and tag it again for the next build.
  
   However even with simple cron job to do scm:update and build every
   hour would reduce your chance of failed nightly build big time. It
   works great for me.
  
   -Dan
  
  
  
  
  
   On 8/18/05, Thomas Van de Velde [EMAIL PROTECTED] wrote:
Sanjay,
   
You might want to look at continuous integration engines like
   CruiseControl,
Anthill or Luntbuild, which take care of the tagging and are ideal 
 for
nightly builds. Maven would then just be used for build and 
 packaging.
   CVS
operations are handled by the build server. However, for application
releases (meaning a software release to production), I would use 
 Maven
   to
tag and assign a version number. These type of releases are not part 
 of
   a
continuous build and are often refered to as push-button 
 operations.
   
Maven could go a bit further with the automation of releases. Right 
 now
   a
lot of it still manual (e.g. assigning a version number, etc.). I've
   written
a plugin that automates all of that by automatically incrementing 
 the
   last
digit of an application's version upon release.
   
Cheers,
Thomas
   
On 8/18/05, Sanjay Choudhary [EMAIL PROTECTED] wrote:

 We currently use Maven 1.0.2 only for building a J2EE application.
 *Developers
 aren't using it as yet.* :-( Our current process is described 
 below.
   We
 run
 this process everynight to create EAR and deploy them in Sandbox. 
 I
   will
 appreciate everyone's suggestions and comments to improve the 
 process.
 1. Bootstrap all projects from CVS. Get latest from head or 
 branch.
   (We
 have maven.xml in the our bootstrap project that does check outs 
 for
   all
 the
 projects from CVS).
 2. Perform release - We use multiproject:goal with
   -Dgoal=performrelease.
 In this task we tag our code in CVS and update project.xml's with 
 the
   new
 version.
 3. Use maven and build EAR.
 4. Deploy EAR in sandbox - This is done using Jackal scripts.
 we have a unix shell script that runs(from cron job) the above
   mentioned
 process. Value of CVS tag and version numbers are determined using
   perl
 and
 passed to maven.
 Issues with this process.
 ==
 For some reason, if step 3 fails to build the EAR file. (For 
 reasons
   like
 compilation errors etc) Getting build process back in line is lot 
 of
   work.
 For example, if my last successfull build was 1.0.1 and now I am
   trying to
 build 1.0.2.
 1. Bootstrap works ok
 2. Prepare release will tag the cvs and update the project.xml for
   current
 version to be 1.0.2
 3

SCM plugin-1.5 and Java 1.3.1

2005-08-10 Thread Sanjay Choudhary
I am using SCM plugin -1.5. When I use JRE 1.4.1, my build works fine. But 
when I switch to JRE 1.3.1 I get the following error
 Root cause
java.lang.NoSuchMethodError: java.lang.Character: method 
toString(C)Ljava/lang/String; not found
at org.apache.maven.scm.provider.cvslib.CvsScmProvider.parseScmUrl(
CvsScmProvider.java:110)
at 
org.apache.maven.scm.provider.cvslib.CvsScmProvider.makeProviderScmRepository
(CvsScmProvider.java:71)
at org.apache.maven.scm.manager.DefaultScmManager.makeScmRepository(
DefaultScmManager.java:104)
at org.apache.maven.plugins.scm.ScmBean.getScmRepository(ScmBean.java:103)
at org.apache.maven.plugins.scm.ScmStatusBean.status(ScmStatusBean.java:45)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.commons.jelly.impl.DynamicBeanTag.doTag(DynamicBeanTag.java
:230)
at org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java
:145)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(
MavenGoalTag.java:79)
at 
org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.performAction
(MavenGoalTag.java:110)
at com.werken.werkz.Goal.fire(Goal.java:639)
at com.werken.werkz.Goal.attain(Goal.java:575)
at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:671)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
at org.apache.maven.cli.App.doMain(App.java:488)
at org.apache.maven.cli.App.main(App.java:1239)
at java.lang.reflect.Method.invoke(Native Method)
at com.werken.forehead.Forehead.run(Forehead.java:551)
at com.werken.forehead.Forehead.main(Forehead.java:581)
 I need to create an EAR file which will be deployed on Websphere 
Application server 5.0 (WAS 5.0 doesn't support java 1.4.1) . 
 1. Shall I switch to a lower version of SCM plugin? if yes, which one?
2. Is it fine to build using JRE 1.4.1 with Java version as 1.3.1 and 
continue my build? are there any risk?
3. Is there any other suggestion to fix this problem?
 Please advice.
 Thanks,
Sanjay


Fwd: maven.jar.final.name usage - plugin 1.7

2005-08-09 Thread Sanjay Choudhary
Posting again!!
 Sanjay
-- Forwarded message --
From: Sanjay Choudhary [EMAIL PROTECTED]
Date: Aug 8, 2005 3:15 PM
Subject: maven.jar.final.name http://maven.jar.final.name usage - plugin 
1.7
To: Maven Users List users@maven.apache.org

 I wish to use maven.jar.final.name http://maven.jar.final.name/ property. 
I want my jar file name to be different.(basiclly, don't want any version 
appended to it, I know it is not in alignment with maven best practice but 
life is not always straight). 
 If I use maven jar:install -Dmaven.jar.final.name=foo.jar
 1. It creates foo.jar in target directory.
2. It copies foo.jar to foo-1.1.jar in maven local repository. ?? what is 
the use of maven.jar.final.name http://maven.jar.final.name/?
 Let us assumt, I have another java project fred that is dependent on 
project foo. fred and foo - both extend from same project.xml and share the 
same pom-version. In fred project, project.xml is as below
 dependency
artifactIdfoo/artifactId
groupId${pom.groupId}/groupId
properties 
jar.manifest.classpathtrue/jar.manifest.classpath
/properties 
version${pom.currentVersion}/version
/dependency
 Is it possible to define dependecy of fred on foo in project.xml without 
the version # ? so that when I use multiproject:goal -Djar:install it will 
first build foo and then fred.
 Please advice.
 Thanks,
sanjay


maven.jar.final.name usage - plugin 1.7

2005-08-08 Thread Sanjay Choudhary
I wish to use maven.jar.final.name http://maven.jar.final.name property. I 
want my jar file name to be different.(basiclly, don't want any version 
appended to it, I know it is not in alignment with maven best practice but 
life is not always straight). 
 If I use maven jar:install -Dmaven.jar.final.name=foo.jar
 1. It creates foo.jar in target directory.
2. It copies foo.jar to foo-1.1.jar in maven local repository. ?? what is 
the use of maven.jar.final.name http://maven.jar.final.name?
 Let us assumt, I have another java project fred that is dependent on 
project foo. fred and foo - both extend from same project.xml and share the 
same pom-version. In fred project, project.xml is as below
 dependency
artifactIdfoo/artifactId
groupId${pom.groupId}/groupId
properties 
jar.manifest.classpathtrue/jar.manifest.classpath
/properties
version${pom.currentVersion}/version
/dependency
 Is it possible to define dependecy of fred on foo in project.xml without 
the version # ? so that when I use multiproject:goal -Djar:install it will 
first build foo and then fred.
 Please advice.
 Thanks,
sanjay


Fwd: SCM tag 1.5.

2005-08-01 Thread Sanjay Choudhary
-- Forwarded message --
From: Sanjay Choudhary [EMAIL PROTECTED]
Date: Jul 31, 2005 11:01 PM
Subject: Re: SCM tag 1.5.
To: Brett Porter [EMAIL PROTECTED]

Is there a way to do cvs rtag, w/o checkout the whole project?
 This is what I plan to do
 1. In the build script , tag a project at 11:00 PM
2. Checkout project for a tag.
3. Build it
 Sanjay
  On 7/31/05, Sanjay Choudhary [EMAIL PROTECTED] wrote: 
 
 perfect, works like a charm :-)
  I was trying maven.scm.sticky.tag.
   Sanjay
 
  On 7/31/05, Brett Porter [EMAIL PROTECTED]  wrote: 
  
  The URL stays the same, but you need to specify maven.scm.tag.
  
  Cheers
  Brett
  
  On 8/1/05, Sanjay Choudhary  [EMAIL PROTECTED] wrote:
   My mistake, I didn't specify the repository path. Darn.!! 
  
   what should be the URL to checkout something out of the branch? I 
  tried 
   various combinations but none worked :-(
  
   Thanks,
   Sanjay
  
  
  
   On 7/31/05, Brett Porter  [EMAIL PROTECTED] wrote: 
It appears the connection it is using is
   
   scm:cvs:pserver:[EMAIL PROTECTED]:commonearproject
   
This is invalid (after the hostname, you need to rest of the root, 
then : and then the module, here you just have the module) 
   
It is probably being picked up from the project.xml in the current
directory - this command is designed to run when there is no project 
  
in the current directory.

To set the password, you should manually do a cvs login command
outside of maven first.
   
- Brett

On 8/1/05, Sanjay Choudhary  [EMAIL PROTECTED] wrote:
 Hi All,
 My configuration details are as below 
 1. Maven SCM Plug In 1.5
 2. Source Control Repository CVS
 I am doing something very simple, that is checkout a project from 
  a cvs
 repository. Command is as below:- 
 maven scm:bootstrap - 

   Dmaven.scm.url=scm:cvs:pserver:[EMAIL PROTECTED]
 :NAOL_Conversion_2_NKP_R5/CodeTableEJB 
 NAOL_Conversion_2_NKP_R5 is branch name and CodeTableEJB is the 
  project
 name.
 I get the error

 build:start:

 scm:find-connection:
 [echo] Using connection:
   scm:cvs:pserver:[EMAIL PROTECTED]
 :commonearproject 

 scm:checkout:
 [echo] Checking out
   scm:cvs:pserver:[EMAIL PROTECTED]
 :commonearproject

 BUILD FAILED
 File.. C:\Documents and
   Settings\choudhsa\.maven\cache\maven- 
 scm-plugin-1.5\plugin.jelly
 Element... scm:checkout
 Line.. 110
 Column 233
 The scm url is invalid.
 Total time: 4 seconds 
 Finished at: Sun Jul 31 19:43:24 PDT 2005 
 What is it I am doing wrong?
 How can I specify my cvs password? (other than setting it in 
  properties
 file). As you can see, I am using pserver and not ssh. 
 Please advice. 
 Thanks,
 Sanjay


   
  
  
  
 



Re: SCM tag 1.5.

2005-08-01 Thread Sanjay Choudhary
thanks a lot for your prompt help.
 regards,
sanjay

 On 7/31/05, Brett Porter [EMAIL PROTECTED] wrote: 
 
 Not presently. You can use the ant:cvs / command to do this until we
 have one built in.
 
 - Brett
 
 On 8/1/05, Sanjay Choudhary [EMAIL PROTECTED] wrote:
  Is there a way to do cvs rtag, w/o checkout the whole project?
  This is what I plan to do
  1. In the build script , tag a project at 11:00 PM
  2. Checkout project for a tag.
  3. Build it



Re: SCM tag 1.5.

2005-08-01 Thread Sanjay Choudhary
Brett,
 Just want to confirm.
 if we want to tag something that is in a cvs branch, in that case tag value 
should be specified using maven.scm.tag and branch in which we are tagging 
should be specified using maven.scm.svn.tag.base. Pls. confirm if my 
assumption is correct.
 Thanks,
Sanjay

 On 7/31/05, Brett Porter [EMAIL PROTECTED] wrote: 
 
 Not presently. You can use the ant:cvs / command to do this until we
 have one built in.
 
 - Brett
 
 On 8/1/05, Sanjay Choudhary [EMAIL PROTECTED] wrote:
  Is there a way to do cvs rtag, w/o checkout the whole project?
  This is what I plan to do
  1. In the build script , tag a project at 11:00 PM
  2. Checkout project for a tag.
  3. Build it



Re: SCM tag 1.5.

2005-08-01 Thread Sanjay Choudhary
cvs branch name = wonka
project name = codetableejb
Tag name = Release_07312005
 Need to tag project name codetableejb in cvs branch name wonka with tag 
name Release_07312005
 maven scm:tag -Dmaven.scm.tag=wonka -
Dmaven.scm.url=scm:cvs::/home/cvs/repository:codetablejb.
 Now where do I specify the Tag name=Release_07312005?
 Sanjay
 

 On 8/1/05, Brett Porter [EMAIL PROTECTED] wrote: 
 
 No, you are not using SVN (at least according to your original mail),
 so you don't use the svn.tag.base property at all.
 
 You just need to use the maven.scm.tag property.
 
 - Brett
 
 On 8/1/05, Sanjay Choudhary [EMAIL PROTECTED] wrote:
  Brett,
 
  Just want to confirm.
 
  if we want to tag something that is in a cvs branch, in that case tag 
 value
  should be specified using maven.scm.tag and branch in which we are 
 tagging
  should be specified using maven.scm.svn.tag.base. Pls. confirm if my
  assumption is correct.
 
  Thanks,
  Sanjay
 
 
  On 7/31/05, Brett Porter [EMAIL PROTECTED] wrote:
   Not presently. You can use the ant:cvs / command to do this until we
   have one built in.
  
   - Brett
  
   On 8/1/05, Sanjay Choudhary [EMAIL PROTECTED] wrote:
Is there a way to do cvs rtag, w/o checkout the whole project?
This is what I plan to do
1. In the build script , tag a project at 11:00 PM
2. Checkout project for a tag.
3. Build it
  
 
 



Re: scm tagging!!

2005-08-01 Thread Sanjay Choudhary
Hi 
 scm:cvs:local:/cvsnt/source:petstore:petstore
you are specifying petstore:petstore twice.
 either it should be 
scm:cvs:local:/cvsnt/source:petstore
 or 
scm:cvs:local:/cvsnt/source/petstore:petstore
 Depends on your repository and module name.
 -Sanjay
 

 On 8/1/05, NIRMALA Manivasagam [EMAIL PROTECTED] wrote: 
 
 Hi all,
 
 when iam trying to checkout a project iam getting the following 
 error.cananyone help me?
 
 
 D:\maven1.0.2\binmaven scm:checkout
 __ __
 | \/ |__ _Apache__ ___
 | |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
 |_| |_\__,_|\_/\___|_||_| v. 1.0.2
 
 build:start:
 
 scm:find-connection:
 [echo] DEPRECATED: the maven.scm.cvs.root property is deprecated. Please 
 spe
 cify maven.scm.url
 [echo] Using connection: scm:cvs:local:/cvsnt/source:petstore:petstore
 
 scm:checkout:
 [echo] Checking out scm:cvs:local:/cvsnt/source:petstore:petstore
 Provider message:
 The cvs command failed.
 Command output:
 cvs [checkout aborted]: /cvsnt/source/CVSROOT: No such file or directory
 
 
 BUILD FAILED
 File.. C:\Documents and Settings\mnirmala\.maven\cache\maven-
 scm-plugin-1.5\
 plugin.jelly
 Element... scm:checkout
 Line.. 110
 Column 233
 Error!
 Total time: 5 seconds
 Finished at: Mon Aug 01 12:48:02 GMT+05:30 2005
 
 Thanks,
 Nirmala
 Confidentiality Statement:
 
 This message is intended only for the individual or entity to which it is 
 addressed. It may contain privileged, confidential information which is 
 exempt from disclosure under applicable laws. If you are not the intended 
 recipient, please note that you are strictly prohibited from disseminating 
 or distributing this information (other than to the intended recipient) or 
 copying this information. If you have received this communication in error, 
 please notify us immediately by return email.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



SCM tag 1.5.

2005-07-31 Thread Sanjay Choudhary
Hi All,
 My configuration details are as below
 1. Maven SCM Plug In 1.5
2. Source Control Repository CVS
 I am doing something very simple, that is checkout a project from a cvs 
repository. Command is as below:-
 maven scm:bootstrap -
Dmaven.scm.url=scm:cvs:pserver:[EMAIL PROTECTED]
:NAOL_Conversion_2_NKP_R5/CodeTableEJB
 NAOL_Conversion_2_NKP_R5 is branch name and CodeTableEJB is the project 
name.
 I get the error 
  
build:start:

scm:find-connection:
[echo] Using connection: scm:cvs:pserver:[EMAIL PROTECTED]
:commonearproject

scm:checkout:
[echo] Checking out scm:cvs:pserver:[EMAIL PROTECTED]
:commonearproject

BUILD FAILED
File.. C:\Documents and Settings\choudhsa\.maven\cache\maven-
scm-plugin-1.5\plugin.jelly
Element... scm:checkout
Line.. 110
Column 233
The scm url is invalid.
Total time: 4 seconds
Finished at: Sun Jul 31 19:43:24 PDT 2005
 What is it I am doing wrong?
 How can I specify my cvs password? (other than setting it in properties 
file). As you can see, I am using pserver and not ssh.
 Please advice.
 Thanks,
 Sanjay


Re: SCM tag 1.5.

2005-07-31 Thread Sanjay Choudhary
My mistake, I didn't specify the repository path. Darn.!!
 what should be the URL to checkout something out of the branch? I tried 
various combinations but none worked :-(
 Thanks,
Sanjay

 On 7/31/05, Brett Porter [EMAIL PROTECTED] wrote: 
 
 It appears the connection it is using is
 scm:cvs:pserver:[EMAIL PROTECTED]:commonearproject
 
 This is invalid (after the hostname, you need to rest of the root,
 then : and then the module, here you just have the module)
 
 It is probably being picked up from the project.xml in the current
 directory - this command is designed to run when there is no project
 in the current directory.
 
 To set the password, you should manually do a cvs login command
 outside of maven first.
 
 - Brett
 
 On 8/1/05, Sanjay Choudhary [EMAIL PROTECTED] wrote:
  Hi All,
  My configuration details are as below
  1. Maven SCM Plug In 1.5
  2. Source Control Repository CVS
  I am doing something very simple, that is checkout a project from a cvs
  repository. Command is as below:-
  maven scm:bootstrap -
  Dmaven.scm.url=scm:cvs:pserver:[EMAIL PROTECTED]
  :NAOL_Conversion_2_NKP_R5/CodeTableEJB
  NAOL_Conversion_2_NKP_R5 is branch name and CodeTableEJB is the project
  name.
  I get the error
 
  build:start:
 
  scm:find-connection:
  [echo] Using connection: 
 scm:cvs:pserver:[EMAIL PROTECTED]
  :commonearproject
 
  scm:checkout:
  [echo] Checking out scm:cvs:pserver:[EMAIL PROTECTED]
  :commonearproject
 
  BUILD FAILED
  File.. C:\Documents and Settings\choudhsa\.maven\cache\maven-
  scm-plugin-1.5\plugin.jelly
  Element... scm:checkout
  Line.. 110
  Column 233
  The scm url is invalid.
  Total time: 4 seconds
  Finished at: Sun Jul 31 19:43:24 PDT 2005
  What is it I am doing wrong?
  How can I specify my cvs password? (other than setting it in properties
  file). As you can see, I am using pserver and not ssh.
  Please advice.
  Thanks,
  Sanjay