Re: Scp an ear artifact on a server and running a remote command inside a phase

2007-01-29 Thread Manuel Ledesma

Benoît Clouet wrote:

Hi,

I'm trying to extend the maven build lifecycle in order to put an EAR
on a remote server via scp and to run a command to install that EAR on
a remote websphere server in order to test it.

I managed to write a first mojo which does copy my EAR on a local dir
but I would like now to transfer that EAR remotely.

As I'm lazy, I tried to extend the wagon component mechanism in order
to avoid developping everything.

I tried to build a Mojo which uses a plexus component I wrote, copying
various other components.xml but everytime I'm executing the plugin, I
get a NullPointerException probably caused by the fact I can't manage
to initialize the component correctly.

1. Is there a dedicated phase in the build lifecycle to do such tasks
? I choosed deploy but I now hesitate between install (I'm trying to
bind my plugin on this phase) and integration-tests.

2. Is there a particular way to initialize a plexus component (My
component reuses classes from the wagon and the artifact-manager
components)

3. Is there any documentation on writing such mojo + extending maven
plexus components ?

I can provide my whole code if someone is interrested.

Thanks in advance.

Benoît

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



You could use websphere deployment capabilities instead. No need to use 
maven at all. You can easily call websphere deployment classes from maven.



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



Re: JWSC ant task of BEA Weblogic 9.2

2006-10-27 Thread Manuel Ledesma
Just need weblogic.jar in classpath, you need to take from the 
installation directory otherwise you end pushing a lot of jars to 
repository.


An easy way to do it, It's defining the WL_HOME directory and using it 
to include weblogic.jar. I'm using it that way and it works perfect.


That way you don't need to push weblogic jars to repository.


I talked with BEA guys and they don't suggest pushing all jars to 
repository since weblogic.jar look for others by itself, but you must 
use it from its installation directory.


dboeckli wrote:

Sorry for repeating my question but in Nabble it was placed in the wrong
subject of another question. I deleted the old one and replaced the same
question again.

We have an ant build process to generate Webservices. Our target container
is BEA Weblogic 9.2.
That's why we use BEA specific ant tasks to do this job of generating the
webservices.
We now want to migrate our ant build process into maven2. 
Theoretically it is possible to call ant tasks from maven. That works for

'simple' tasks. Tested it. all fine!
But i do not manage to get the JWSC ant task of BEA to work.
In the end it might boil down to just having to know which JAR files to
include in the dependencies of the maven pom?!

My current dependencies look like this:



junit
junit
3.8.1
test


apache.ant.lib
ant-launcher
1.7alpha


bea.weblogic.server.lib
weblogic
9.2


bea.weblogic.server.lib
webservices
9.2


bea.weblogic
wlw-system
9.2


bea.weblogic.server.lib
xbean
9.2


com.sun.java.lib
tools
1.5.0_07


maven.xmlbeans.jars
xbean
2.2.0



But maven still results in following error:

Embedded error: weblogic.wsee.tools.jws.build.CompileException:
Error compiling web service:
D:\JAVA_Projects\SOA_testcases\webservice\src\main\java\com\eds\soa\ws\hello\JwscTestImpl.java
failed to find root element corresponding to
weblogic.j2ee.descriptor.JavaWsdlMappingBeanImpl


By any chance would anybody have an idea how to get this JWSC task to work?


  




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



Re: Plugin Documentation and the Index Page

2006-10-19 Thread Manuel Ledesma

I downloaded version 2.0.5-SNAPSHOT, still getting the same problem. Do I
have to specifically tell which version of plugin-plugin to use ?


jrduncans wrote:
> 
> Thanks.
> 
> (Notes for anyone else: 2.0.5-SNAPSHOT builds are here:
> http://maven.zones.apache.org/~maven/builds/branches/maven-2.0.x/ )
> 
> -Stephen
> 
> On 9/21/06, Brett Porter <[EMAIL PROTECTED]> wrote:
>> It was a bug in the current release of the plugin plugin. You can use
>> the new version, but it also requires a snapshot of maven 2.0.5. I'm
>> hoping to work on correcting that shortly, but for now if you grab a
>> Maven nightly and build the plugin plugin from SVN you should be good
>> to go.
>>
>> - Brett
>>
>> On 22/09/06, Stephen Duncan <[EMAIL PROTECTED]> wrote:
>> > I'm working on a new maven plugin (see an upcoming e-mail soon), and
>> > I'm trying to create  the site generally matching the best
>> > practices of the new maven plugin sites.  I'm having trouble though: I
>> > have an src/site/apt/index.apt, but the contents of index.html is the
>> > auto-generated plugin documentation.  Am I doing something wrong?  Is
>> > there some workaround?
>> >
>> > --
>> > Stephen Duncan Jr
>> > www.stephenduncanjr.com
>> >
>> > -
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>>
>>
>> --
>> Apache Maven - http://maven.apache.org
>> "Better Builds with Maven" book - http://library.mergere.com/
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> Stephen Duncan Jr
> www.stephenduncanjr.com
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Plugin-Documentation-and-the-Index-Page-tf2315168.html#a6896561
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Problem with site plugin

2006-10-19 Thread Manuel Ledesma
I writing sites for my custom plugins, but I have an issue with 
index.apt, Maven seems to ignore it, instead it always shows me the list 
of goals. But if I run it in a non-plugin project, everything works 
fine. Can someone explain how can i use my index.apt ?


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



Re: XSD or DTD support for Site's XML files.

2006-10-15 Thread Manuel Ledesma

Thanks for the information.

Wendy Smoak wrote:

On 10/15/06, Manuel Ledesma <[EMAIL PROTECTED]> wrote:

It could be nice to have an XSD or DTD file, which can be attached to
each xml file use by the site plugin, since there are a lot of XML
editors aware of those, It would make life easier for us, so we don't
have to be remembering or looking at someone else file to understand and
write XML files.


There's an issue open for this:  
http://jira.codehaus.org/browse/MSITE-118






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



XSD or DTD support for Site's XML files.

2006-10-15 Thread Manuel Ledesma
It could be nice to have an XSD or DTD file, which can be attached to 
each xml file use by the site plugin, since there are a lot of XML 
editors aware of those, It would make life easier for us, so we don't 
have to be remembering or looking at someone else file to understand and 
write XML files.



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



Re: System scope and transitive dependencies

2006-10-13 Thread Manuel Ledesma
I did it, I installed hundreds of jars and add them as dependency of 
weblogic.jar, still did not work.I talked with BEA folks and they told 
that basically that it needs to be taken from their installation 
directory  because it look for the license and other stuff that are not 
jar related.



Wayne Fay wrote:

Have you tried adding ALL of those jars to your vendor repo, and
adding each one as a dependency in your pom? If they're all available
on the CLASSPATH while executing the plugin, I don't know why it would
need to access WL_HOME at all.

I'm not currently a Weblogic user, so I'm not sure what it expects etc...

Wayne

On 10/12/06, Manuel Ledesma <[EMAIL PROTECTED]> wrote:

I did it, but Weblogic jar does not work that way, It looks for other
jars in there WL_HOME/server/lib directory, reason why? it needs to be
taken from there.

Wayne Fay wrote:
> We are suggesting that you install the weblogic jar(s) into your
> vendor repo. And stop using system scope...
>
> Wayne
>
> On 10/12/06, Manuel Ledesma <[EMAIL PROTECTED]> wrote:
>>
>> Thanks for the advide, I already create a similar layout (application
>> repo,
>> vendor repo and public). Back to the case of weblogic, It needs to be
>> taken
>> from its installation directoy and I'm having hard time writing
>> puglins for
>> it. The workaround that I found it's using the Ant java task to 
fork and

>> setting the right classpath for it. But it would be great that system
>> scope
>> artifacts could go beyond compile (runtime).
>>
>>
>> Max Cooper wrote:
>> >
>> > I would expand that a bit to say that there are three types of 
repos

>> > that I think are common for teams using maven:
>> >
>> > * the public repos like ibiblio
>> >
>> > * a repo that your team maintains for your project or organization
>> > (often using the "local repo" part of a "maven-proxy" or 
"proximity"
>> > instance), to serve as a common place to store jars that are 
neither

>> > built as part of your project nor available on public repos (due to
>> > license restrictions, etc.). This is a good place to put
>> proprietary db
>> > driver libs, weblogic.jar,
>> project-that-does-not-publish-on-ibiblio.jar,
>> > etc.
>> >
>> > * Your own personal local repo. Don't try to share it. It caches
>> > artifacts from the other repos, and it is where jars end up when 
you

>> > 'mvn install' your project.
>> >
>> > -Max
>> >
>> > Manuel Ledesma wrote:
>> >> There cases where jars needs to be taken from there installation
>> >> directory
>> >> otherwise, It won't work. That's the case for weblogic.jar, which
>> will
>> >> load
>> >> jars are need it base of its own path.
>> >>
>> >>
>> >> Simon Kitching-2 wrote:
>> >>> On Thu, 2006-03-23 at 04:28 -0800, Richard Sladek wrote:
>> >>>> Thanks for your opinion, it seems to me that I am gonna to
>> abondon the
>> >>>> use of
>> >>>> system scope then.
>> >>>>
>> >>>> However, I still think there should be a way how to define
>> dependencies
>> >>>> that
>> >>>> are specific to a certain project only and you do not want to 
store

>> >>>> them
>> >>>> in
>> >>>> a repository. This is maybe because of my bad underastanding of
>> what a
>> >>>> repository is intended to be for: I understand it as a store
>> where I
>> >>>> can
>> >>>> place my SHARED /=common/ libraries so that I have a central
>> management
>> >>>> point over them.
>> >>>>
>> >>>> For project specific libs, I do not want to have them in a repo
>> as they
>> >>>> are
>> >>>> pretty unlikely to be used in any other project and I don't see
>> a point
>> >>>> to
>> >>>> have a lib in repo just because of one specific project.
>> >>>> Another reason for this might be some kind of encapsulation when
>> I want
>> >>>> to
>> >>>> have all my project-related stuff on one place only (so that I
>> can back
>> >>>> it
>> >>>> up easily, for instance. If local repository was involved, I
>> would have
>> >>>> at
>> >>>> least 2 things to backup

Re: Confused about Maven 2 Eclipse plugin

2006-10-12 Thread Manuel Ledesma

Look at external tools. You can launch lifecycle and goals from there.

Los Morales wrote:
I'm currently using Eclipse 3.2 and Maven 2 plugin version 0.0.9.  
When I enable Maven 2 and right-click on my main project, there are 
only 2 options for me in the popup menu:  1) Update Source Folders and 
2) Add Dependency...   Where are the lifecycle phases or custom 
goals?  Seems like the NetBeans plugin works fine but I'm totally 
frustrated for the one with Eclipse.  Everytime I need to 
clean/compile/package my Eclipse project, I got to do it via the 
command line.  Am I missing something here?  Thanks in advance.


-los

_
Express yourself - download free Windows Live Messenger themes! 
http://clk.atdmt.com/MSN/go/msnnkwme002001msn/direct/01/?href=http://imagine-msn.com/themes/vibe/default.aspx?locale=en-us&source=hmtagline 




-
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: System scope and transitive dependencies

2006-10-12 Thread Manuel Ledesma
I did it, but Weblogic jar does not work that way, It looks for other 
jars in there WL_HOME/server/lib directory, reason why? it needs to be 
taken from there.


Wayne Fay wrote:

We are suggesting that you install the weblogic jar(s) into your
vendor repo. And stop using system scope...

Wayne

On 10/12/06, Manuel Ledesma <[EMAIL PROTECTED]> wrote:


Thanks for the advide, I already create a similar layout (application 
repo,
vendor repo and public). Back to the case of weblogic, It needs to be 
taken
from its installation directoy and I'm having hard time writing 
puglins for

it. The workaround that I found it's using the Ant java task to fork and
setting the right classpath for it. But it would be great that system 
scope

artifacts could go beyond compile (runtime).


Max Cooper wrote:
>
> I would expand that a bit to say that there are three types of repos
> that I think are common for teams using maven:
>
> * the public repos like ibiblio
>
> * a repo that your team maintains for your project or organization
> (often using the "local repo" part of a "maven-proxy" or "proximity"
> instance), to serve as a common place to store jars that are neither
> built as part of your project nor available on public repos (due to
> license restrictions, etc.). This is a good place to put 
proprietary db
> driver libs, weblogic.jar, 
project-that-does-not-publish-on-ibiblio.jar,

> etc.
>
> * Your own personal local repo. Don't try to share it. It caches
> artifacts from the other repos, and it is where jars end up when you
> 'mvn install' your project.
>
> -Max
>
> Manuel Ledesma wrote:
>> There cases where jars needs to be taken from there installation
>> directory
>> otherwise, It won't work. That's the case for weblogic.jar, which 
will

>> load
>> jars are need it base of its own path.
>>
>>
>> Simon Kitching-2 wrote:
>>> On Thu, 2006-03-23 at 04:28 -0800, Richard Sladek wrote:
>>>> Thanks for your opinion, it seems to me that I am gonna to 
abondon the

>>>> use of
>>>> system scope then.
>>>>
>>>> However, I still think there should be a way how to define 
dependencies

>>>> that
>>>> are specific to a certain project only and you do not want to store
>>>> them
>>>> in
>>>> a repository. This is maybe because of my bad underastanding of 
what a
>>>> repository is intended to be for: I understand it as a store 
where I

>>>> can
>>>> place my SHARED /=common/ libraries so that I have a central 
management

>>>> point over them.
>>>>
>>>> For project specific libs, I do not want to have them in a repo 
as they

>>>> are
>>>> pretty unlikely to be used in any other project and I don't see 
a point

>>>> to
>>>> have a lib in repo just because of one specific project.
>>>> Another reason for this might be some kind of encapsulation when 
I want

>>>> to
>>>> have all my project-related stuff on one place only (so that I 
can back

>>>> it
>>>> up easily, for instance. If local repository was involved, I 
would have

>>>> at
>>>> least 2 things to backup: repo and project itself.)
>>>>
>>>> But as I said, this is probably just my bad understanding of 
things and

>>>> ALL
>>>> depenendies in Maven /both common and special/ shall be stored 
in repo.

>>>> Any
>>>> discussion on this is welcome :)
>>> There are two types of repository:
>>>
>>> * "remote" ones, such as ibiblo, or a repo for your development team
>>> * the local repository on your development machine (really a 
"cache").

>>>   It typically exists in directory ~/.m2
>>>
>>> If your project has dependencies on something available from a 
remote

>>> repository, then declare that as normal; the dependencies will
>>> automatically be downloaded to your local repository.
>>>
>>> If your project has dependencies on other projects you've developed,
>>> however, you can simply check those out and run "mvn install" to 
get the
>>> jar that project generates installed into your *local* 
repository. That

>>> is much tidier than trying to use "system" scope.
>>>
>>> If the local projects you have dependencies on are not built with 
maven,

>>> then you can take each jar and run a command to install it into your
>>> local repo anyway (a pom is created

Re: System scope and transitive dependencies

2006-10-12 Thread Manuel Ledesma

Thanks for the advide, I already create a similar layout (application repo,
vendor repo and public). Back to the case of weblogic, It needs to be taken
from its installation directoy and I'm having hard time writing puglins for
it. The workaround that I found it's using the Ant java task to fork and
setting the right classpath for it. But it would be great that system scope
artifacts could go beyond compile (runtime). 


Max Cooper wrote:
> 
> I would expand that a bit to say that there are three types of repos 
> that I think are common for teams using maven:
> 
> * the public repos like ibiblio
> 
> * a repo that your team maintains for your project or organization 
> (often using the "local repo" part of a "maven-proxy" or "proximity" 
> instance), to serve as a common place to store jars that are neither 
> built as part of your project nor available on public repos (due to 
> license restrictions, etc.). This is a good place to put proprietary db 
> driver libs, weblogic.jar, project-that-does-not-publish-on-ibiblio.jar, 
> etc.
> 
> * Your own personal local repo. Don't try to share it. It caches 
> artifacts from the other repos, and it is where jars end up when you 
> 'mvn install' your project.
> 
> -Max
> 
> Manuel Ledesma wrote:
>> There cases where jars needs to be taken from there installation
>> directory
>> otherwise, It won't work. That's the case for weblogic.jar, which will
>> load
>> jars are need it base of its own path.
>> 
>> 
>> Simon Kitching-2 wrote:
>>> On Thu, 2006-03-23 at 04:28 -0800, Richard Sladek wrote:
>>>> Thanks for your opinion, it seems to me that I am gonna to abondon the
>>>> use of
>>>> system scope then.
>>>>
>>>> However, I still think there should be a way how to define dependencies
>>>> that
>>>> are specific to a certain project only and you do not want to store
>>>> them
>>>> in
>>>> a repository. This is maybe because of my bad underastanding of what a
>>>> repository is intended to be for: I understand it as a store where I
>>>> can
>>>> place my SHARED /=common/ libraries so that I have a central management
>>>> point over them.
>>>>
>>>> For project specific libs, I do not want to have them in a repo as they
>>>> are
>>>> pretty unlikely to be used in any other project and I don't see a point
>>>> to
>>>> have a lib in repo just because of one specific project.
>>>> Another reason for this might be some kind of encapsulation when I want
>>>> to
>>>> have all my project-related stuff on one place only (so that I can back
>>>> it
>>>> up easily, for instance. If local repository was involved, I would have
>>>> at
>>>> least 2 things to backup: repo and project itself.)
>>>>
>>>> But as I said, this is probably just my bad understanding of things and
>>>> ALL
>>>> depenendies in Maven /both common and special/ shall be stored in repo.
>>>> Any
>>>> discussion on this is welcome :)
>>> There are two types of repository: 
>>>
>>> * "remote" ones, such as ibiblo, or a repo for your development team
>>> * the local repository on your development machine (really a "cache").
>>>   It typically exists in directory ~/.m2
>>>
>>> If your project has dependencies on something available from a remote
>>> repository, then declare that as normal; the dependencies will
>>> automatically be downloaded to your local repository.
>>>
>>> If your project has dependencies on other projects you've developed,
>>> however, you can simply check those out and run "mvn install" to get the
>>> jar that project generates installed into your *local* repository. That
>>> is much tidier than trying to use "system" scope.
>>>
>>> If the local projects you have dependencies on are not built with maven,
>>> then you can take each jar and run a command to install it into your
>>> local repo anyway (a pom is created for it). I can't remember the actual
>>> command for the moment, but it has been discussed on this list in the
>>> last day or two. 
>>>
>>> If the process of installing jars into a local repo is inconvenient
>>> because there are lots of them, or a development *team* that needs to do
>>> this, then you should look at setting up a real shared 

Re: System scope and transitive dependencies

2006-10-12 Thread Manuel Ledesma

There cases where jars needs to be taken from there installation directory
otherwise, It won't work. That's the case for weblogic.jar, which will load
jars are need it base of its own path.


Simon Kitching-2 wrote:
> 
> On Thu, 2006-03-23 at 04:28 -0800, Richard Sladek wrote:
>> Thanks for your opinion, it seems to me that I am gonna to abondon the
>> use of
>> system scope then.
>> 
>> However, I still think there should be a way how to define dependencies
>> that
>> are specific to a certain project only and you do not want to store them
>> in
>> a repository. This is maybe because of my bad underastanding of what a
>> repository is intended to be for: I understand it as a store where I can
>> place my SHARED /=common/ libraries so that I have a central management
>> point over them.
>> 
>> For project specific libs, I do not want to have them in a repo as they
>> are
>> pretty unlikely to be used in any other project and I don't see a point
>> to
>> have a lib in repo just because of one specific project.
>> Another reason for this might be some kind of encapsulation when I want
>> to
>> have all my project-related stuff on one place only (so that I can back
>> it
>> up easily, for instance. If local repository was involved, I would have
>> at
>> least 2 things to backup: repo and project itself.)
>> 
>> But as I said, this is probably just my bad understanding of things and
>> ALL
>> depenendies in Maven /both common and special/ shall be stored in repo.
>> Any
>> discussion on this is welcome :)
> 
> There are two types of repository: 
> 
> * "remote" ones, such as ibiblo, or a repo for your development team
> * the local repository on your development machine (really a "cache").
>   It typically exists in directory ~/.m2
> 
> If your project has dependencies on something available from a remote
> repository, then declare that as normal; the dependencies will
> automatically be downloaded to your local repository.
> 
> If your project has dependencies on other projects you've developed,
> however, you can simply check those out and run "mvn install" to get the
> jar that project generates installed into your *local* repository. That
> is much tidier than trying to use "system" scope.
> 
> If the local projects you have dependencies on are not built with maven,
> then you can take each jar and run a command to install it into your
> local repo anyway (a pom is created for it). I can't remember the actual
> command for the moment, but it has been discussed on this list in the
> last day or two. 
> 
> If the process of installing jars into a local repo is inconvenient
> because there are lots of them, or a development *team* that needs to do
> this, then you should look at setting up a real shared repository
> instead. A repository is just a webserver or ftpserver; nothing
> complicated.
> 
> There's really no reason to use "system" scope at all, except for libs
> that may vary from machine to machine, eg the "tools.jar" of whatever
> the locally installed JDK is.
> 
> And there is no need to back up the "local repository"; it is only a
> cache of stuff that is already available elsewhere.
> 
> Regards,
> 
> Simon
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/System-scope-and-transitive-dependencies-tf1326219.html#a6786849
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: [M2] How do I run J2EE compilers?

2006-10-11 Thread Manuel Ledesma

Manuel Ledesma wrote:

kurron wrote:
Our build system requires us to run vendor-specific J2EE compilers on 
our EAR
files.  I ran across the Weblogic plugin that can execute the appc 
program
on an archive but it requires that you specify archive information in 
the
POMs that create EARs.  What I would really like is to automagically 
invoke
appc on any EAR that gets built.  To that end, I've been 
experimenting with

writing a Java mojo that will invoke appc (or any other program we might
need) right after an archive is created.  My mojo is getting handed the
maven session, executed project,  current project and settings but, 
to this
point, I haven't been able to figure out how to obtain the artifact 
that was
just created.  I see printouts from my mojo so I know it is getting 
called. When the mojo asks the executed project or the current 
project what the

artifact is, they return null.The artifact id comes back as
empty-project from both objects.  Can anyone offer any advice on how to
obtain the full path to the artifact that was just created?My 
mojo is
registered to go off during the package phase ( @phase package) and I 
see it

executing after the EAR/JAR/WARs are created so it appears to be getting
called when I want it to.  Any help is appreciated.

Thanks,
Ron
  

You can use the following expression

//parameter 
expression="${project.build.directory}/${project.build.finalName}"


base on packaging you can know if it's an ear, war or ejb.

//




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



This all you need to write the plugin

**
  * Compile classpath
  *
  * @parameter expression="${project.compileClasspathElements}"
  * @required
  * @readonly
  */
 private List classpathElements;

 /**
  * @parameter expression="${project.artifact}
  */
 private Artifact artifact;

 /**
  * @parameter expression="${project.packaging}
  */
 private String packaging;

I wrote a plugin for appc too.

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



Re: [M2] How do I run J2EE compilers?

2006-10-11 Thread Manuel Ledesma

kurron wrote:

Our build system requires us to run vendor-specific J2EE compilers on our EAR
files.  I ran across the Weblogic plugin that can execute the appc program
on an archive but it requires that you specify archive information in the
POMs that create EARs.  What I would really like is to automagically invoke
appc on any EAR that gets built.  To that end, I've been experimenting with
writing a Java mojo that will invoke appc (or any other program we might
need) right after an archive is created.  My mojo is getting handed the
maven session, executed project,  current project and settings but, to this
point, I haven't been able to figure out how to obtain the artifact that was
just created.  I see printouts from my mojo so I know it is getting called. 
When the mojo asks the executed project or the current project what the

artifact is, they return null.The artifact id comes back as
empty-project from both objects.  Can anyone offer any advice on how to
obtain the full path to the artifact that was just created?My mojo is
registered to go off during the package phase ( @phase package) and I see it
executing after the EAR/JAR/WARs are created so it appears to be getting
called when I want it to.  Any help is appreciated.

Thanks,
Ron
  

You can use the following expression

//parameter expression="${project.build.directory}/${project.build.finalName}"

base on packaging you can know if it's an ear, war or ejb.

//




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



How can I make a system dependency available in runtime scope ?

2006-10-11 Thread Manuel Ledesma
I need a jar to be available in runtime scope, but it's defined with 
system scope.  Is there any way of making it available in runtime scope ?


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



RE: Understanding Maven classpath

2006-10-09 Thread Manuel Ledesma
Looks like a similar problem but it's related to Eclipse's plugin, so, it's
a different issue.

Thanks for your quick response.

-Original Message-
From: Edwin Punzalan [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 09, 2006 11:47 PM
To: Maven Users List
Subject: Re: Understanding Maven classpath


probably related to MNG-1379 ?


Manuel Ledesma wrote:
> I'm writing a plug-in for Weblogic 9.2 and I having a hard time make it
> work. The issue arrives because I need to use Weblogic from the
installation
> directory, otherwise it won't work.
>
>  
>
> So I'm specifying the dependency using system scope, but it does not help.
> Still behaving like I'm getting the jar from a different directory. But If
I
> create a simple project in eclipse and attach it as an external jar, the
> same code works fine. Somehow Maven is not reporting correctly the
> dependencies. 
>
>  
>
> I'm logging the runtime dependencies and it only shows the classes
> directory, every dependency is coming out of the ${plugin.artifacts}.
>
>  
>
> The class I'm trying to use is WLSTInterpreter and the error I'm getting
is
> java.lang.RuntimeException: error in finding weblogic.Home'. As I said
> before If I write a program outside of maven, the same code works fine. 
>
>
>   

-
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]



What is the difference between resources and config?

2006-10-09 Thread Manuel Ledesma
According to Betters Builds with Maven book

*   src/main/resource : standard location for application resources
(images, etc, and properties files, which can be used for configuration
too).
*   src/main/config  : standard location for application configuration
files.

 

Src/main/config does look to involve in any of the lifecycle of maven, Can
someone explain me the difference?

 

I can see a use in my case, But I don't see how to apply the concept in
maven worlds. For example we could use resource to hold configurations,
which values do not change from environment-environment (eg: testing, User
Acceptance, Staging and Production) and use config to hold configuration for
values that change from environment-environment like a database name, etc.

 

The problem I'm having is how I can produce such a jar or a procedure to get
all configuration files coming from config directories, apply some filters.
I can see probably various solutions for it:

1.  Create a plugin, which will produce a jar following some standard,
like ${artifactId}-config-${version}, but the problem with this is that
maven only outputs and deploys a single file.
2.  Create another plugin to push all configuration files under some
project directory and use a simple jar for it.

 

I like option 1, but I will need help or hints on how to produce additional
jars and deploying too.

 



Understanding Maven classpath

2006-10-09 Thread Manuel Ledesma
I'm writing a plug-in for Weblogic 9.2 and I having a hard time make it
work. The issue arrives because I need to use Weblogic from the installation
directory, otherwise it won't work.

 

So I'm specifying the dependency using system scope, but it does not help.
Still behaving like I'm getting the jar from a different directory. But If I
create a simple project in eclipse and attach it as an external jar, the
same code works fine. Somehow Maven is not reporting correctly the
dependencies. 

 

I'm logging the runtime dependencies and it only shows the classes
directory, every dependency is coming out of the ${plugin.artifacts}.

 

The class I'm trying to use is WLSTInterpreter and the error I'm getting is
java.lang.RuntimeException: error in finding weblogic.Home'. As I said
before If I write a program outside of maven, the same code works fine. 



Re: release plugin failed to authenticate

2006-10-04 Thread Manuel Ledesma

Manuel Ledesma wrote:

I'm using scpexe and my private key is at my ${home}/.m2/settings.xml, Maven
is able deploy without prompting for password but if I tried the
release:perform it just hangs at "The authenticity of host
'www.whatever.com' can't be established", it looks like is not using scpexe
to release the jars. The same problem happens if I using scp of sftp to
deploy the artifacts. The release version I'm using is 2.0-beta-4. 
 
I Googled the problem, the solution I found was that I need to create the

.ssh directory to avoid the msg, but it did not work for me. I can ssh, scp
to the system without problem. But release perform does not work for me,
either scp or sftp. Could be really helpful if I can use scp or sftp, they
seems to be faster than scpexe.

 



  
I deleted my local repository and everything start working fine. Now 
after release:perfom runs successfully, i getting error while 
downloading the artifacts.


This is the exception i'm getting:
aused by: org.apache.maven.wagon.TransferFailedException: Error 
transferring file
   at 
org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData(LightweightHttpWagon.java:99)

   at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:68)
   at 
org.apache.maven.artifact.manager.DefaultWagonManager.verifyChecksum(DefaultWagonManager.java:520)
   at 
org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(DefaultWagonManager.java:380)
   at 
org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:282)
   at 
org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:244)
   at 
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:124)

   ... 22 more


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



release plugin failed to authenticate

2006-10-03 Thread Manuel Ledesma
I'm using scpexe and my private key is at my ${home}/.m2/settings.xml, Maven
is able deploy without prompting for password but if I tried the
release:perform it just hangs at "The authenticity of host
'www.whatever.com' can't be established", it looks like is not using scpexe
to release the jars. The same problem happens if I using scp of sftp to
deploy the artifacts. The release version I'm using is 2.0-beta-4. 
 
I Googled the problem, the solution I found was that I need to create the
.ssh directory to avoid the msg, but it did not work for me. I can ssh, scp
to the system without problem. But release perform does not work for me,
either scp or sftp. Could be really helpful if I can use scp or sftp, they
seems to be faster than scpexe.

 



RE: Maven read Eclipse .project and .classpath, then deploy

2006-09-20 Thread Manuel Ledesma
You could use the eclipse pluging, which will create a .propject and
.classpath base on maven dependencies. Or you could install the maven plugin
for eclipse, which will be your next steps after running eclipse plugin.

You can add dependencies and run lifecycles from inside eclipse, keeping you
pom.xml and eclipse classpath in sync.

-Original Message-
From: Dave Briccetti [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 20, 2006 2:58 PM
To: users@maven.apache.org
Subject: Maven read Eclipse .project and .classpath, then deploy

Hi. I've been reading about and playing with Maven and it looks  
great. There's something I want to do that I can't figure out.  
Perhaps someone can help.

I have a Java application I'm developing with Eclipse, so all the  
dependencies are specified there. It's a rather long classpath. I  
want a tool to read whatever's needed from Eclipse  
(.project, .classpath), and then collect all the jars and build me a  
"java -cp ..." command line or script to invoke the application on  
another machine. I want to be able to change the dependencies in  
Eclipse, and then regenerate this business, always reflecting the  
current dependencies from Eclipse.

Thanks in advance.

Dave Briccetti
Lafayette, California


-
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]



Calling plugins sequentially

2006-09-17 Thread Manuel Ledesma
First of all, I only have two days working with maven. I have read the book
Better Buils with Maven completely and any possible documentation found in
maven.apache.org.

 

I would like to call two o more plugins sequentially, example

- user-profile-plugin - loads user properties into maven runtime
environment.

- weblogic-plugin - start weblogic, needs some property set by previous
plugin

 

They are no part of any phase since they can be called outside of maven
lifecycle.

 

Example:

mvn org.company.plugin:weblogic-plugin:startwl  - this will start weblogic

 

I would like the plug-in user-profile-plugin be called before running
weblogic-plugin. Please, let me know is there a way of doing or which
approach should I follow in case that Maven does not support it.

 

 

Thx in advance.