Maven Repository: Search/Browse/Explore

2008-03-27 Thread Gerald Reinhart
Hi,

Where can we go to search groupId ArtifactId of frameworks when  www.*mvn*
repository.com/  is out of order ?

Regards,

Gerald


Launch a plugin after a site:stage call

2007-12-08 Thread Gerald Reinhart
Hi,

I generate my report site by the maven-site-plugin ( mvn site:stage
-DstagingDirectory=...), I would like to launch a plugin after this call.

How can i do It ?

This configuration do not work because site is a plugin and not a phase:

   ...
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-antrun-plugin/artifactId
executions
execution
idjob-after-site-stage-call/id
phasesite/phase
  configuration
 tasks
  

Regards,

Gerald Reinhart


Difference between System.setProperty in Mojo.execute() AND mvn -Dproperty=value

2007-09-27 Thread Gerald Reinhart
Hi,

I don't understand the difference between
mvn -Dweblogic.home=C:/Dev/program/bea/weblogic92
and
System.setProperty(weblogic.home,  C:/Dev/program/bea/weblogic92);
in the implementation of Mojo.execute().

In the first case the java system property is send to the plugin thread
execution
In the second case it doesn't.

Details:

I'm using a plugin which needs a java system property (weblogic-maven-plugin
needs weblogic.home)

With
   set MAVEN_OPTS=-Dweblogic.home=%WL_HOME%
   mvn package

   or

   mvn -Dweblogic.home=%WL_HOME% package

It's OK: the Dweblogic.home java system property is find by the weblogic ant
task called by the weblogic-maven-plugin.

This value of weblogic.home will be the same in all executions of the plug
in.
I would like to have a different value of this java system property in order
to be linked to several version of weblogic. So I'm trying to customize the
plugin to set this java system property in the plugin
but the variable

In the implementation of Mojo.execute(), I put this :
System.setProperty(weblogic.home,  C:/Dev/program/bea/weblogic92);

In order to validate that we can change the java system property. But it
doesn't work: this property is not send the plugin thread execution.


Regards,

Gerald Reinhart


[m2] In which order are called plugins of a same phase?

2007-09-24 Thread Gerald Reinhart
Hi,

I've got a simple question: In which order are called plugins of a same
phase?
- in the pom's order?
- what about parent plugins?
- can we be sure it will always be in that order?

Regards,

Gerald Reinhart


Re: [m2] to be resolved : generate an artifact with a plugin and do dependency with it in a multimodule project.

2007-09-20 Thread Gerald Reinhart
Hi,

I'have post a message in my blog to explain the pb. There are sample sources
:

http://www.jroller.com/greinhart/entry/generate_an_artifact_with_a

Gerald Reinhart

On 20/09/2007, Gerald Reinhart  @googlemail.com wrote:

 Hi,

 I've got a general problem: the core maven can't generate all artifact, so
 there are some plugin to do that for a specific context (for instance,
 maven-antrun-plugin ). How can we do a dependency to the artifact generated
 by a plugin ?

 I tried to
  - configure the packaging of the pom with the same packaging of the
 plugin
  - generate the artifact from the plugin with the same path that the pom's
 target artifact
  = the plugin replace the artifact generated by the core.

 This works well in a simple project: you can deploy your artifact in your
 local repository and make a dependency to it from another project.

 BUT, if you do this kind of dependency in a multimodule project the global
 build do not work: the dependency is made with the artifact generated by the
 core and not by the plugin

 An idea ?

 Regards,

 Gerald Reinhart




Re: [m2] How can we replace the artifact created by Maven by another artifact created by antrun ?

2007-09-18 Thread Gerald Reinhart
Nobody have this kind of problem?

Regards

Gerald Reinhart

On 24/08/2007, Gerald Reinhart [EMAIL PROTECTED] wrote:

 Hi,

 Hypothesis:
 - in a multi-modules project managed by Maven2
 - an specific artifact can't be created by Maven2 [1]
 - this artifact is created by an antrun call [2]
 - another antrun call replace the fake artifact created by Maven by the
 right artifact created antrun [2]
 - the install goal is OK: the right artifact is installed in my repository
 - another module depends of the artifact of the first module

 Problem:
 - when I do an install of the first artifact in my repository and a
 compile the other module = BUILD SUCCESSFUL [3]
 - when I do a global build from the parent = BUILD FAILURE [4]

 On the first build,  it's OK because maven resolve the dependency by the
 local repository.
 On the second build, it's KO because maven takes the artifact it has
 created during the global build, so the fake artifact

 I don't know what to do with that... an idea ?

 Regards

 Gerald Reinhart


 [1] In my context, I have a split weblogic directory, some ant weblogic
 targets generate EJBs, EJBs Client, WebService and an EAR. It would be a
 nightmare to transform those ant weblogic target in Maven (
 http://edocs.bea.com/wls/docs92/programming/splitcreate.html).
 The only artifact that other modules of the project needs is a EJB Client
 Jar.

 [2] My antrun call create a target/service-ant-client.jar file.

 my pom.xml:
 [...]
   groupIdmyproject/groupId
   artifactIdservice/artifactId
   version1.0/version
   packagingejb/packaging
 [...]
   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-ejb-plugin/artifactId
 configuration
 generateClienttrue/generateClient
 clientExcludes
   clientExclude**/ejb/*Bean.class/clientExclude
   /clientExcludes
 /configuration
   /plugin
 [...]
   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-antrun-plugin/artifactId
 executions
 execution
 idantrun_compile/id
 phasecompile/phase
 configuration
   tasks
   [...]
   !-- weblogic ant call =target/service-
 ant-client.jar --
   [...]
   /tasks
 /configuration
 goalsgoalrun/goal/goals
   /execution
   execution
 idantrun_package/id
 phasepackage/phase
 configuration
   tasks
   echoReplace the fake 
 target/service-1.0-client.jargenerated by maven
 by the service-ant-client.jar generated by
 weblogic ant targets./echo
   delete file=target/service- 1.0-client.jar/
   copy file=target/service-ant-client.jar  tofile=
 service-1.0-client.jar  /
   /tasks
 /configuration
 goalsgoalrun/goal/goals
   /execution
 /executions
  /plugin
 [...]
 /project

 Targets :
   target/service- 1.0.jar (fake EJB Jar)
   target/service-1.0-client.jar (fake EJB Client Jar)
   target/service-ant-client.jar (generated by weblogic ant
 targets)



 the pom dependency from another module:

 dependency
   groupIdmyproject/groupId
   artifactIdservice/artifactId
   version1.0/version
   typeejb-client/type
 /dependency


 [3]
 mvn -f service\pom.xml clean install
 mvn -f othermodule\pom.xml clean install
 = BUILD SUCESSFULL

 [4]
 parent pom.xml
 [...]
modules
   moduleservice/module
   moduleothermodule/module
/modules
 [...]

 mvn -f pom.xml clean install




[m2] How can we replace the artifact created by Maven by another artifact created by antrun ?

2007-08-25 Thread Gerald Reinhart
Hi,

Hypothesis:
- in a multi-modules project managed by Maven2
- an specific artifact can't be created by Maven2 [1]
- this artifact is created by an antrun call [2]
- another antrun call replace the fake artifact created by Maven by the
right artifact created antrun [2]
- the install goal is OK: the right artifact is installed in my repository
- another module depends of the artifact of the first module

Problem:
- when I do an install of the first artifact in my repository and a compile
the other module = BUILD SUCCESSFUL [3]
- when I do a global build from the parent = BUILD FAILURE [4]

On the first build,  it's OK because maven resolve the dependency by the
local repository.
On the second build, it's KO because maven takes the artifact it has created
during the global build, so the fake artifact

I don't know what to do with that... an idea ?

Regards

Gerald Reinhart


[1] In my context, I have a split weblogic directory, some ant weblogic
targets generate EJBs, EJBs Client, WebService and an EAR. It would be a
nightmare to transform those ant weblogic target in Maven (
http://edocs.bea.com/wls/docs92/programming/splitcreate.html).
The only artifact that other modules of the project needs is a EJB Client
Jar.

[2] My antrun call create a target/service-ant-client.jar file.

my pom.xml:
[...]
  groupIdmyproject/groupId
  artifactIdservice/artifactId
  version1.0/version
  packagingejb/packaging
[...]
  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-ejb-plugin/artifactId
configuration
generateClienttrue/generateClient
clientExcludes
  clientExclude**/ejb/*Bean.class/clientExclude
  /clientExcludes
/configuration
  /plugin
[...]
  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-antrun-plugin/artifactId
executions
execution
idantrun_compile/id
phasecompile/phase
configuration
  tasks
  [...]
  !-- weblogic ant call =target/service-ant-client.jar--
  [...]
  /tasks
/configuration
goalsgoalrun/goal/goals
  /execution
  execution
idantrun_package/id
phasepackage/phase
configuration
  tasks
  echoReplace the fake
target/service-1.0-client.jargenerated by maven
by the service-ant-client.jar generated by weblogic
ant targets./echo
  delete file=target/service-1.0-client.jar/
  copy file=target/service-ant-client.jar  tofile=
service-1.0-client.jar  /
  /tasks
/configuration
goalsgoalrun/goal/goals
  /execution
/executions
 /plugin
[...]
/project

Targets :
  target/service-1.0.jar (fake EJB Jar)
  target/service-1.0-client.jar (fake EJB Client Jar)
  target/service-ant-client.jar (generated by weblogic ant targets)



the pom dependency from another module:

dependency
  groupIdmyproject/groupId
  artifactIdservice/artifactId
  version1.0/version
  typeejb-client/type
/dependency


[3]
mvn -f service\pom.xml clean install
mvn -f othermodule\pom.xml clean install
= BUILD SUCESSFULL

[4]
parent pom.xml
[...]
   modules
  moduleservice/module
  moduleothermodule/module
   /modules
[...]

mvn -f pom.xml clean install