Re: maven-eclipse-plugin 2.4 & versioned project

2008-02-27 Thread Salman Moghal
Hello:

Just wanted to confirm that maven-eclipse-plugin 2.5-SNAPSHOT contains the 
correct code for 
org.apache.maven.plugin.eclipse.writers.wtp.EclipseWtpComponentWriter (line 
134):

// we should use the eclipse project name as the deploy name.
writer.addAttribute( ATTR_DEPLOY_NAME, 
this.config.getEclipseProjectName() );

Interestingly enough, looking at the svn revision history for 
EclipseWtpComponentWriter, there were .component bug fixes from '06 :-)

I've also recompiled and tested maven-eclipse-plugin 2.4 with the above code 
change, and its now generating the component file correctly! Tested  
maven-eclipse-plugin goals - eclipse:eclipse, eclipse:rad and eclipse:m2eclipse.

Regards
Salman Moghal

- Original Message 
From: Siarhei Dudzin <[EMAIL PROTECTED]>
To: Maven Users List 
Sent: Wednesday, February 27, 2008 11:49:16 AM
Subject: Re: maven-eclipse-plugin 2.4 & versioned projec

On 
Wed, 
Feb 
27, 
2008 
at 
5:37 
PM, 
Salman 
Moghal 
<[EMAIL PROTECTED]> 
wrote:

>
> 
Thanks 
so 
much 
for 
the 
response.  
Yes, 
I 
agree 
that 
it 
would 
be 
ideal 
if
> 
the 
name 
of 
the 
generated 
jar/war/ear 
file 
is 
kept 
same 
as 
the 
project
> 
directory 
name 
-- 
I 
believe 
that's 
what 
finalName 
does 
as 
per 
the 
docs 
(?).
>  
However, 
my 
teammates 
responsible 
for 
maven 
builds 
don't 
like 
the 
idea 
at
> 
all.. 
tried 
really 
hard 
to 
convince 
otherwise 
even 
before 
we 
ran 
into 
this
> 
issue.  
They 
want 
the 
generated 
file 
name 
template 
to 
contain 
project 
POM
> 
version, 
e.g. 
given 
POM 
project 
name 
"myproject" 
and 
POM 
version 
1.0, 
the
> 
name 
of 
the 
generated 
JAR 
file 
will 
be 
myproject-1.0.jar.  
Same 
goes 
for
> 
WAR 
and 
EAR 
modules.  
 
And 
as 
soon 
as 
version'd 
project 
names 
are 
used,
> 
where 
the 
physical 
directory 
name 
does 
not 
contain 
POM 
version 
numbers
> 
obviously, 
it 
causes 
RAD 
6/7 
loose 
configuration 
to 
fail 
miserably, 
in
> 
context 
of 
WebSphere 
v6.1 
runtime.
>

It 
is 
indeed 
as 
you 
mentioned 
finalName.
If 
they 
don't 
want 
to 
have 
final 
name 
fixed 
you 
could 
probably 
somehow 
parse
the 
ibm-specific 
deployment 
descriptors. 
Because 
artifact 
names 
are 
actually
hardcoded 
there. 
So 
if 
your 
version 
changes 
- 
you 
have 
a 
problem.



>
> 
Since 
you 
brought 
up 
maven-eclipse-plugin 
2.5, 
it 
seems 
like 
it's 
pretty
> 
close 
to 
being 
officially 
realized.  
Do 
you 
have 
the 
exact 
timeframe 
as 
to
> 
when 
it 
will 
be?  
Days.. 
weeks.. 
months?
>

Hard 
to 
say, 
my 
impression 
is 
that 
it's 
in 
the 
state 
of 
"days" 
for 
a 
few
weeks 
now...


>
> 
I 
will 
take 
a 
look 
at 
the 
maven-eclipse-plugin 
2.5 
SNAPSHOT 
code.  
The
> 
alternative 
is 
to 
recompile 
maven-eclipse-plugin 
2.4 
with 
the 
one-line
> 
code 
change 
as 
outlined 
earlier.. 
which 
I 
plan 
on 
doing 
today.  
Any
> 
thoughts 
on 
this 
approach?
>

It's 
likely 
you 
will 
run 
into 
many 
more 
issues. 
To 
know 
which 
ones 
you 
can
see 
at 
all 
the 
closed 
issues 
that 
are 
scheduled 
for 
2.5 
release. 
I 
can 
tell
you 
in 
advance 
- 
if 
you 
use 
webservices 
you 
will 
have 
a 
problem.

It's 
really 
easier 
just 
to 
use 
2.5-SNAPSHOT 
(unless 
you 
use 
release 
plugin).

Siarhei





Re: maven-eclipse-plugin 2.4 & versioned project

2008-02-27 Thread Arnaud HERITIER
and another task not recorded : to test the plugin with all 2.0.X version to
update the minimum requirement.

Arnaud

On Wed, Feb 27, 2008 at 11:01 AM, Siarhei Dudzin <[EMAIL PROTECTED]>
wrote:

> I've done quite some troubleshooting around RAD6+maven. I would advise to
> override the finalName for the artifact so it doesn't have version at the
> end.
> It's even better if those match the project directory names.
>
> maven-eclipse-plugin 2.5-SNAPSHOT has quite a lot of improvements in
> RAD6/7
> support. It is currently only 1 jira issue away from being released.
>
> Siarhei
>
> On Wed, Feb 27, 2008 at 9:04 AM, Salman Moghal <[EMAIL PROTECTED]> wrote:
>
> > I've been pouring through maven-eclipse-plugin 2.4 code and realized
> that
> > there is potentially a problem with
> >
> org.apache.maven.plugin.eclipse.writers.wtp.EclipseWtpComponentWriterclass
> > (line 125), IMHO:
> >
> >writer.addAttribute( ATTR_DEPLOY_NAME,
> > config.getProject().getArtifactId() );
> >
> > It seems like the code above assumes deploy-name cannot contain version
> > numbers, project name templates etc. It would be great if the code could
> > follow similar structured approach for setting/getting the project name
> as
> > in org.apache.maven.plugin.eclipse.writers.EclipseProjectWriter (line
> > 169),
> > which generates .project file:
> >
> >writer.writeText( config.getEclipseProjectName() );
> >
> > Here the project name is set during configuration/dependancy resolution
> > phase by org.apache.maven.plugin.eclipse.EclipsePlugin and later used by
> > the
> > EclipseProjectWriter class.
> >
> > So I'm curious if this issue could be resolved by simply using
> > getEclipseProjectName() method in
> >
> org.apache.maven.plugin.eclipse.writers.wtp.EclipseWtpComponentWriterclass
> :
> >
> >writer.addAttribute( ATTR_DEPLOY_NAME, config.getEclipseProjectName()
> > );
> >
> > Please advise..
> >
> > --
> > Salman Moghal
> >
> > - Original Message -
> > From: "Salman Moghal" <[EMAIL PROTECTED]>
> > To: 
> > Sent: Tuesday, February 26, 2008 3:38 PM
> > Subject: maven-eclipse-plugin 2.4 & versioned projects
> >
> >
> > > Hello:
> > >
> > > I'm using maven-eclipse-plugin v2.4 to generate WTP 1.5 resource for
> > > Eclipse 3.2.x / RAD v6.x environment.  The goal of this exercise is to
> > > take advantage of Eclipse 3.2 /  RAD v6.x
> > > integrated development, debugging, and hot code deployment features.
> >  The
> > > runtime environment is WebSphere Application Server v6.1.  Eclipse /
> RAD
> > > also have M2Eclipse plugin installed for dependency management, etc.
> > > There is one slight issue that has me scratching my head for a few
> days.
> > > It has to do with generated WTP v1.5 files.
> > >
> > > Essentially, maven eclipse plugin goal "eclipse:m2eclipse" generates
> all
> > > WTP 1.5 files correctly.  However, once
> > > true is added to
> > plugin
> > > config,  .settings/org.eclipse.wst.common.component contains an
> > incorrect
> > > entry.  The goal generates the .project WTP file properly with a
> project
> > > name containing the POM version number, but the corresponding
> > > .settings/org.eclipse.wst.common.component contains an incorrect value
> > for
> > > .  The value of deploy-name=  does not
> > > contain a POM version number along with the project name.
> > >
> > > The reason why having a version number in  entry
> > is
> > > important is because if the EAR / WAR module is deployed to WebSphere
> > > runtime in "loose configuration" mode, the runtime complains about not
> > > being able to locate corresponding modules.  Loose configuration
> allows
> > > the class files to reside in Eclipse / RAD workspace and speeds up the
> > EAR
> > > deployment process many folds since no real EAR is generated and
> > installed
> > > into WebSphere.  Eclipse / RAD loose config file is located under
> > >
> >
> WORKSPACE/.metadata/.plugins/com.ibm.etools.wrd.websphere/looseconfigurations/ > > NAME>/looseconfig.xmi.
> > >
> > > Note that if I manually make the change to the generated
> > > .settings/org.eclipse.wst.common.component file by adding version
> number
> > > along with the project name, the runtime doesn't complain and
> everything
> > > works well in loose configuration mode.
> > >
> > > May be I'm missing something in maven-eclipse-plugin configuration.
> > Here's
> > > what I have:
> > >
> > > 
> > > 
> > >   org.apache.maven.plugins
> > >   maven-eclipse-plugin
> > >
> > >   
> > > 
> > >   ${basedir}/src/main/resources/META-INF/MANIFEST.MF
> > > 
> > >
> > > true
> > > false
> > >
> > > true
> > > true
> > > 1.5
> > >
> > > 
> > >
> > > com.ibm.etools.common.migration.MigrationBuilder
> > 
> > > org.eclipse.jdt.core.javabuilder
> > >
> > > org.eclipse.wst.common.project.facet.core.builder
> > 
> > >
> > > org.eclipse.wst.validation.validationbuilder
> > 
> > > 
> > > 
> > >
> > > org.eclipse.wst.common.project.facet.core.nature
> > 
> > >

Re: maven-eclipse-plugin 2.4 & versioned project

2008-02-27 Thread Salman Moghal
Hello:

Thanks so much for the response.  Yes, I agree that it would be ideal if the 
name of the generated jar/war/ear file is kept same as the project directory 
name -- I believe that's what finalName does as per the docs (?).  However, my 
teammates responsible for maven builds don't like the idea at all.. tried 
really hard to convince otherwise even before we ran into this issue.  They 
want the generated file name template to contain project POM version, e.g. 
given POM project name "myproject" and POM version 1.0, the name of the 
generated JAR file will be myproject-1.0.jar.  Same goes for WAR and EAR 
modules.   And as soon as version'd project names are used, where the physical 
directory name does not contain POM version numbers obviously, it causes RAD 
6/7 loose configuration to fail miserably, in context of WebSphere v6.1 runtime.

Since you brought up maven-eclipse-plugin 2.5, it seems like it's pretty close 
to being officially realized.  Do you have the exact timeframe as to when it 
will be?  Days.. weeks.. months?

I will take a look at the maven-eclipse-plugin 2.5 SNAPSHOT code.  The
alternative is to recompile maven-eclipse-plugin 2.4 with the one-line
code change as outlined earlier.. which I plan on doing today.  Any
thoughts on this approach?

Regards
Salman Moghal

- Original Message 
From: Siarhei Dudzin <[EMAIL PROTECTED]>
To: Maven Users List 
Sent: Wednesday, February 27, 2008 5:01:44 AM
Subject: Re: maven-eclipse-plugin 2.4 & versioned project

I've 
done 
quite 
some 
troubleshooting 
around 
RAD6+maven. 
I 
would 
advise 
to
override 
the 
finalName 
for 
the 
artifact 
so 
it 
doesn't 
have 
version 
at 
the
end.
It's 
even 
better 
if 
those 
match 
the 
project 
directory 
names.

maven-eclipse-plugin 
2.5-SNAPSHOT 
has 
quite 
a 
lot 
of 
improvements 
in 
RAD6/7
support. 
It 
is 
currently 
only 
1 
jira 
issue 
away 
from 
being 
released.

Siarhei

On 
Wed, 
Feb 
27, 
2008 
at 
9:04 
AM, 
Salman 
Moghal 
<[EMAIL PROTECTED]> 
wrote:

> 
I've 
been 
pouring 
through 
maven-eclipse-plugin 
2.4 
code 
and 
realized 
that
> 
there 
is 
potentially 
a 
problem 
with
> 
org.apache.maven.plugin.eclipse.writers.wtp.EclipseWtpComponentWriterclass
> 
(line 
125), 
IMHO:
>
>  
  
writer.addAttribute( 
ATTR_DEPLOY_NAME,
> 
config.getProject().getArtifactId() 
);
>
> 
It 
seems 
like 
the 
code 
above 
assumes 
deploy-name 
cannot 
contain 
version
> 
numbers, 
project 
name 
templates 
etc. 
It 
would 
be 
great 
if 
the 
code 
could
> 
follow 
similar 
structured 
approach 
for 
setting/getting 
the 
project 
name 
as
> 
in 
org.apache.maven.plugin.eclipse.writers.EclipseProjectWriter 
(line
> 
169),
> 
which 
generates 
.project 
file:
>
>  
  
writer.writeText( 
config.getEclipseProjectName() 
);
>
> 
Here 
the 
project 
name 
is 
set 
during 
configuration/dependancy 
resolution
> 
phase 
by 
org.apache.maven.plugin.eclipse.EclipsePlugin 
and 
later 
used 
by
> 
the
> 
EclipseProjectWriter 
class.
>
> 
So 
I'm 
curious 
if 
this 
issue 
could 
be 
resolved 
by 
simply 
using
> 
getEclipseProjectName() 
method 
in
> 
org.apache.maven.plugin.eclipse.writers.wtp.EclipseWtpComponentWriterclass:
>
>  
  
writer.addAttribute( 
ATTR_DEPLOY_NAME, 
config.getEclipseProjectName()
> 
);
>
> 
Please 
advise..
>
> 
--
> 
Salman 
Moghal
>
> 
- 
Original 
Message 
-
> 
From: 
"Salman 
Moghal" 
<[EMAIL PROTECTED]>
> 
To: 

> 
Sent: 
Tuesday, 
February 
26, 
2008 
3:38 
PM
> 
Subject: 
maven-eclipse-plugin 
2.4 
& 
versioned 
projects
>
>
> 
> 
Hello:
> 
>
> 
> 
I'm 
using 
maven-eclipse-plugin 
v2.4 
to 
generate 
WTP 
1.5 
resource 
for
> 
> 
Eclipse 
3.2.x 
/ 
RAD 
v6.x 
environment.  
The 
goal 
of 
this 
exercise 
is 
to
> 
> 
take 
advantage 
of 
Eclipse 
3.2 
/  
RAD 
v6.x
> 
> 
integrated 
development, 
debugging, 
and 
hot 
code 
deployment 
features.
>  
The
> 
> 
runtime 
environment 
is 
WebSphere 
Application 
Server 
v6.1.  
Eclipse 
/ 
RAD
> 
> 
also 
have 
M2Eclipse 
plugin 
installed 
for 
dependency 
management, 
etc.
> 
> 
There 
is 
one 
slight 
issue 
that 
has 
me 
scratching 
my 
head 
for 
a 
few 
days.
> 
> 
It 
has 
to 
do 
with 
generated 
WTP 
v1.5 
files.
> 
>
> 
> 
Essentially, 
maven 
eclipse 
plugin 
goal 
"eclipse:m2eclipse" 
generates 
all
> 
> 
WTP 
1.5 
files 
correctly.  
However, 
once
> 
> 
true 
is 
added 
to
> 
plugin
> 
> 
config,  
.settings/org.eclipse.wst.common.component 
contains 
an
> 
incorrect
> 
> 
entry.  
The 
goal 
generates 
the 
.project 
WTP 
file 
properly 
with 
a 
project
> 
> 
name 
containing 
the 
POM 
version 
number, 
but 
the 
corresponding
> 
> 
.settings/org

Re: maven-eclipse-plugin 2.4 & versioned project

2008-02-27 Thread Siarhei Dudzin
I've done quite some troubleshooting around RAD6+maven. I would advise to
override the finalName for the artifact so it doesn't have version at the
end.
It's even better if those match the project directory names.

maven-eclipse-plugin 2.5-SNAPSHOT has quite a lot of improvements in RAD6/7
support. It is currently only 1 jira issue away from being released.

Siarhei

On Wed, Feb 27, 2008 at 9:04 AM, Salman Moghal <[EMAIL PROTECTED]> wrote:

> I've been pouring through maven-eclipse-plugin 2.4 code and realized that
> there is potentially a problem with
> org.apache.maven.plugin.eclipse.writers.wtp.EclipseWtpComponentWriterclass
> (line 125), IMHO:
>
>writer.addAttribute( ATTR_DEPLOY_NAME,
> config.getProject().getArtifactId() );
>
> It seems like the code above assumes deploy-name cannot contain version
> numbers, project name templates etc. It would be great if the code could
> follow similar structured approach for setting/getting the project name as
> in org.apache.maven.plugin.eclipse.writers.EclipseProjectWriter (line
> 169),
> which generates .project file:
>
>writer.writeText( config.getEclipseProjectName() );
>
> Here the project name is set during configuration/dependancy resolution
> phase by org.apache.maven.plugin.eclipse.EclipsePlugin and later used by
> the
> EclipseProjectWriter class.
>
> So I'm curious if this issue could be resolved by simply using
> getEclipseProjectName() method in
> org.apache.maven.plugin.eclipse.writers.wtp.EclipseWtpComponentWriterclass:
>
>writer.addAttribute( ATTR_DEPLOY_NAME, config.getEclipseProjectName()
> );
>
> Please advise..
>
> --
> Salman Moghal
>
> - Original Message -
> From: "Salman Moghal" <[EMAIL PROTECTED]>
> To: 
> Sent: Tuesday, February 26, 2008 3:38 PM
> Subject: maven-eclipse-plugin 2.4 & versioned projects
>
>
> > Hello:
> >
> > I'm using maven-eclipse-plugin v2.4 to generate WTP 1.5 resource for
> > Eclipse 3.2.x / RAD v6.x environment.  The goal of this exercise is to
> > take advantage of Eclipse 3.2 /  RAD v6.x
> > integrated development, debugging, and hot code deployment features.
>  The
> > runtime environment is WebSphere Application Server v6.1.  Eclipse / RAD
> > also have M2Eclipse plugin installed for dependency management, etc.
> > There is one slight issue that has me scratching my head for a few days.
> > It has to do with generated WTP v1.5 files.
> >
> > Essentially, maven eclipse plugin goal "eclipse:m2eclipse" generates all
> > WTP 1.5 files correctly.  However, once
> > true is added to
> plugin
> > config,  .settings/org.eclipse.wst.common.component contains an
> incorrect
> > entry.  The goal generates the .project WTP file properly with a project
> > name containing the POM version number, but the corresponding
> > .settings/org.eclipse.wst.common.component contains an incorrect value
> for
> > .  The value of deploy-name=  does not
> > contain a POM version number along with the project name.
> >
> > The reason why having a version number in  is
> > important is because if the EAR / WAR module is deployed to WebSphere
> > runtime in "loose configuration" mode, the runtime complains about not
> > being able to locate corresponding modules.  Loose configuration allows
> > the class files to reside in Eclipse / RAD workspace and speeds up the
> EAR
> > deployment process many folds since no real EAR is generated and
> installed
> > into WebSphere.  Eclipse / RAD loose config file is located under
> >
> WORKSPACE/.metadata/.plugins/com.ibm.etools.wrd.websphere/looseconfigurations/ > NAME>/looseconfig.xmi.
> >
> > Note that if I manually make the change to the generated
> > .settings/org.eclipse.wst.common.component file by adding version number
> > along with the project name, the runtime doesn't complain and everything
> > works well in loose configuration mode.
> >
> > May be I'm missing something in maven-eclipse-plugin configuration.
> Here's
> > what I have:
> >
> > 
> > 
> >   org.apache.maven.plugins
> >   maven-eclipse-plugin
> >
> >   
> > 
> >   ${basedir}/src/main/resources/META-INF/MANIFEST.MF
> > 
> >
> > true
> > false
> >
> > true
> > true
> > 1.5
> >
> > 
> >
> > com.ibm.etools.common.migration.MigrationBuilder
> 
> > org.eclipse.jdt.core.javabuilder
> >
> > org.eclipse.wst.common.project.facet.core.builder
> 
> >
> > org.eclipse.wst.validation.validationbuilder
> 
> > 
> > 
> >
> > org.eclipse.wst.common.project.facet.core.nature
> 
> > org.eclipse.jdt.core.javanature
> >
> > org.eclipse.wst.common.modulecore.ModuleCoreNature
> 
> >
> > org.eclipse.jem.workbench.JavaEMFNature
> > 
> > 
> >
> > org.eclipse.jst.j2ee.internal.module.container
> 
> > 
> >   
> >
> > 
> > 
> >
> >
> > Is there any way to manipulate or affect entries in
> > .settings/org.eclipse.wst.common.component via maven-eclipse-plugin
> > configuration?  to If you guys have any clues / pointers /
> > recommendations, please do share.
> >
> > Rega