Re: Mojos Attaching Artifacts to Project for Install Deploy

2008-02-02 Thread simon

On Fri, 2008-02-01 at 17:15 -0700, Cam wrote:
 Hi,
 
 I'm looking for a way to attach an extra generated artifact to a project 
 so it's installed and deployed in the standard project lifecycle, how 
 can i do this?  Do i need to write a mojo or can i just add this as part 
 of the pom config?

See build-helper-plugin:

  http://mojo.codehaus.org/build-helper-maven-plugin/index.html

 
 Also, does anyone know if it's possible to create a mojo which defines a 
 new project packaging?

This is definitely possible, although I don't personally know how.

See the standard jar, war, ear plugins, or the apache felix plugin
(defines packaging of bundle), etc.

Regards, Simon



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



Re: Lifecycle executions run twice?

2008-02-02 Thread Stephen Connolly
you are not understanding lifecycles!

mvn install means run every stage in the lifecycle upto and including
install
mvn deploy means run every stage in the lifecycle upto and including
deploy

mvn install deploy means run every stage in the lifecycle upto and
including install, then run every stage in the lifecycle upto and including
deploy

so you are asking it to run twice!

Since deploy is after install, you should not need to do mvn install
deploy, just mvn deploy

-Stephen



On Feb 1, 2008 10:45 PM, Cam [EMAIL PROTECTED] wrote:

 Hi,

 I have a project which launches jetty using the cargo plugin - i have it
 starting up as part of the initialize phase and tearing down in compile
 (i use it for generating stub classes for a web service). If i run the
 install or deploy goals on their own it all works great but if i run
 mvn install deploy after the install phase it tries to start the
 container again even though the phase isn't executed again. This ends up
 causing class path problems as it's trying to load the war twice not to
 mention the extra hit of having to start and stop the container.

 I would have thought that if you specify a phase which is part of a
 later phase they would combine to only execute each once, so since the
 install goal is included as part of deploy it would effectively be
 ignored. What i find really confusing is how the container can be
 started after the install phase when it's bound to 'initialize'.

 Thanks,
 Cam

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




Re: maven-changes-plugin 2.0-beta-2

2008-02-02 Thread Dennis Lundberg

If you send us your configuration we might be able to help you...
Also make sure that you are using 2.0-beta-3.

Savita_p_m wrote:

Hi Adam,

did u  fix this problem? even I am facing the same problem. Can you please
let me know how did u resolve it,

I am getting the following error when I  try to connect to Jira application
running on SSL

 sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find
vali
d certification path to requested target

I did configure the Jirauser ,jirapassword,webuser and webpassword. and if I
copy past the url to the browser it works.

Regards
Savita



Adam Hardy-4 wrote:
I'm sorry, I saw those when I first started looking, couldn't see how to 
incorporate them in the pom.xml, went off looking for examples and all I 
ended up with was the issueManagement node I mentioned. Forgot about 
these ones.


I'll see if I can work out what the xml should look like.


Regards
Adam

Dennis Lundberg wrote:

Adam Hardy wrote:
maven-changes-plugin can generate JIRA reports according to its 
documentation but I'm having a hard time setting it up - the docs on 
maven.apache.org specify an issueManagement config node and that's 
about it.

See this page for info on all configuration options for the jira-report:

http://maven.apache.org/plugins/maven-changes-plugin/jira-report-mojo.html


 From the mvn output though it looks like there's alot more going on 
than I know about, and I guess I need to find a way to specify project 
ids, server usernames  passwords and so forth.


The output I see on the console is below, but these are the main 
problems I see:


- there's a suspicious looking warning: [WARNING] Error loading report 
org.apache.maven.jira.JiraMojo - AbstractMethodError:

canGenerateReport()

- my JIRA server runs on HTTPS and mvn has problems connecting - so 
how can I specify my username and password?

See the link above.

- mvn also can't find a log4j logger for HttpClient, which looks like 
it is caching URLs from previous attempts! Where can I put


The only settings I can work out for my pom for this are:

issueManagement
  systemJIRA/system
  
urlhttps://support.nomadsoft.com/jira/BrowseProject.jspa?id=10060/url

/issueManagement



[INFO] [site:site]
[WARNING] Error loading report 
org.apache.maven.plugin.taglist.TagListReport - AbstractMethodError: 
canGenerateReport()
[WARNING] Error loading report org.apache.maven.changes.ChangesMojo - 
AbstractMethodError: canGenerateReport()
[WARNING] Error loading report org.apache.maven.jira.JiraMojo - 
AbstractMethodError: canGenerateReport()
[WARNING] No URL defined for the project - decoration links will not 
be resolved
[INFO] Skipped Jira Report report, file jira-report.html already 
exists for the English version.

[INFO] Generate Tag List report.
[ERROR] VM #displayTree: error : too few arguments to macro. Wanted 2 
got 0

[ERROR] VM #menuItem: error : too few arguments to macro. Wanted 1 got 0
[INFO] Generate Continuous Integration report.
[INFO] Generate Dependencies report.
[INFO] Generate Issue Tracking report.
[INFO] Generate Project License report.
[INFO] Generate Mailing Lists report.
[INFO] Generate Source Repository report.
[INFO] Generate Project Team report.
[INFO] Generate Changes Report Plugin report.
[ERROR] Cannot find the Changes XML file.
[INFO] Generate Jira Report Plugin report.
log4j:WARN No appenders could be found for logger 
(org.apache.commons.httpclient.HttpClient).

log4j:WARN Please initialize the log4j system properly.
[INFO] Jira lives at: https://support.nomadsoft.com/jira
[INFO] Downloading 
https://support.nomadsoft.com/jira/secure/IssueNavigator.jspa?view=rsspid=10060sorter/field=createdsorter/order=DESCsorter/field=prior 


itysorter/order=DESCtempMax=100reset=truedecorator=none
[ERROR] Error downloading issues from JIRA. Cause is 
sun.security.validator.ValidatorException: PKIX path building failed: 
sun.security.provider.certpath.Sun
CertPathBuilderException: unable to find valid certification path to 
requested target
java.io.FileNotFoundException: c:\projects\soa\target\jira-results.xml 
(The system cannot find the file specified)


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








--
Dennis Lundberg

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



Re: Maven Ant Tasks: Configured repository not available

2008-02-02 Thread Thomas Tardy
Hi all,

this is the output of ant -v.

As you can see, it cannot download the artefact
com.ibm.isov.grdm:grdm-parent:pom:2.0.1.3-SNAPSHOT which is the parent of
the pom file I'm loading with ant. The artefact is on the repository
configured in C:\Documents and Settings\Administrator\.m2\settings.xml. But
if I download the artefact and the ant task can validate the pom, the ant
tasks are able to download other artefacts from the repository.

Any idea what the problem could be?

Apache Ant version 1.7.0 compiled on December 13 2006
Buildfile: build-grdm.xml
Detected Java version: 1.5 in: C:\Program
Files\IBM\SDP70\runtimes\base_v61\java
\jre
Detected OS: Windows XP
parsing buildfile M:\services_trunk\IsovPlugin\build-grdm.xml with URI =
file:/M
:/services_trunk/IsovPlugin/build-grdm.xml
Project base dir set to: M:\services_trunk\IsovPlugin
[antlib:org.apache.tools.ant] Could not load definitions from resource
org/apach
e/tools/ant/antlib.xml. It could not be found.
parsing buildfile
jar:file:/M:/services_trunk/IsovFrameworkDeployment/utilLib/ma
ven-ant-tasks-2.0.8.jar!/org/apache/maven/artifact/ant/antlib.xml with URI =
jar
:file:/M:/services_trunk/IsovFrameworkDeployment/utilLib/maven-
ant-tasks-2.0.8.j
ar!/org/apache/maven/artifact/ant/antlib.xml
Build sequence for target(s) `setupLocalClient' is [deleteAllDependencies,
updat
eRemoteIsovDependencies, updateLocalIsovDependencies,
reloadRemoteTpdDependencie
s, reloadLocalTpdDependencies, setupLocalClient]
Complete build sequence is [deleteAllDependencies,
updateRemoteIsovDependencies,
 updateLocalIsovDependencies, reloadRemoteTpdDependencies,
reloadLocalTpdDepende
ncies, setupLocalClient, setupRemoteClient, ]

deleteAllDependencies:

updateRemoteIsovDependencies:
[artifact:pom] Loading Maven settings file: C:\Documents and
Settings\Administra
tor\.m2\settings.xml
[artifact:pom] Loading Maven settings file: C:\apps\build\apache-
maven-2.0.8\con
f\settings.xml
[artifact:pom] Using remote repositories:
  - id=central, url=http://repo1.maven.org/maven2, releases=enabled,
snapshots=d
isabled
[artifact:pom] Error downloading parent pom
com.ibm.isov.grdm:grdm-parent::2.0.1
.3-SNAPSHOT: Missing:
[artifact:pom] --
[artifact:pom] 1) com.ibm.isov.grdm:grdm-parent:pom:2.0.1.3-SNAPSHOT
[artifact:pom]   Path to dependency:
[artifact:pom]  1) unspecified:unspecified:jar:0.0
[artifact:pom]  2)
com.ibm.isov.grdm:grdm-parent:pom:2.0.1.3-SNAPSHOT
[artifact:pom]
[artifact:pom] --
[artifact:pom] 1 required artifact is missing.
[artifact:pom]
[artifact:pom] for artifact:
[artifact:pom]   unspecified:unspecified:jar:0.0
[artifact:pom]
[artifact:pom] from the specified remote repositories:
[artifact:pom]   central (http://repo1.maven.org/maven2)
[artifact:pom] An error has occurred while processing the Maven artifact
tasks.
[artifact:pom]  Diagnosis:
[artifact:pom]
[artifact:pom] Unable to initialize POM dependency-pom-isov-remote-grdm.xml:
Fai
led to validate POM for project com.ibm.isov.grdm:grdm-plugin-isov-remote at
M:\
services_trunk\IsovPlugin\dependency\dependency-pom-isov-remote-grdm.xml
[artifact:pom]

BUILD FAILED
M:\services_trunk\IsovPlugin\build-grdm.xml:10: Unable to initialize POM
depende
ncy-pom-isov-remote-grdm.xml: Failed to validate POM for project
com.ibm.isov.gr
dm:grdm-plugin-isov-remote at
M:\services_trunk\IsovPlugin\dependency\dependency
-pom-isov-remote-grdm.xml
at org.apache.maven.artifact.ant.Pom.initialise(Pom.java:173)
at org.apache.maven.artifact.ant.Pom.doExecute(Pom.java:374)
at org.apache.maven.artifact.ant.AbstractArtifactTask.execute
(AbstractAr
tifactTask.java:658)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java
:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(
DispatchUtils.jav
a:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java
:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.Main.runBuild(Main.java:698)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: org.apache.maven.project.InvalidProjectModelException: Failed to

Re: Maven Ant Tasks: Configured repository not available

2008-02-02 Thread Thomas Tardy
Even if I move the configuration of the repository to the pom I'm loading
with ant it cannot download the parent. It always says:

[artifact:pom] Using remote repositories:
  - id=central, url=http://repo1.maven.org/maven2, releases=enabled,
snapshots=disabled

On Feb 2, 2008 12:49 PM, Thomas Tardy [EMAIL PROTECTED] wrote:

 Hi all,

 this is the output of ant -v.

 As you can see, it cannot download the artefact
 com.ibm.isov.grdm:grdm-parent:pom:2.0.1.3-SNAPSHOT which is the parent of
 the pom file I'm loading with ant. The artefact is on the repository
 configured in C:\Documents and Settings\Administrator\.m2\settings.xml. But
 if I download the artefact and the ant task can validate the pom, the ant
 tasks are able to download other artefacts from the repository.

 Any idea what the problem could be?

 Apache Ant version 1.7.0 compiled on December 13 2006
 Buildfile: build-grdm.xml
 Detected Java version: 1.5 in: C:\Program
 Files\IBM\SDP70\runtimes\base_v61\java
 \jre
 Detected OS: Windows XP
 parsing buildfile M:\services_trunk\IsovPlugin\build-grdm.xml with URI =
 file:/M
 :/services_trunk/IsovPlugin/build-grdm.xml
 Project base dir set to: M:\services_trunk\IsovPlugin
 [antlib:org.apache.tools.ant] Could not load definitions from resource
 org/apach
 e/tools/ant/antlib.xml. It could not be found.
 parsing buildfile
 jar:file:/M:/services_trunk/IsovFrameworkDeployment/utilLib/ma
 ven-ant-tasks-2.0.8.jar!/org/apache/maven/artifact/ant/antlib.xml with URI
 = jar
 :file:/M:/services_trunk/IsovFrameworkDeployment/utilLib/maven-
 ant-tasks-2.0.8.j
 ar!/org/apache/maven/artifact/ant/antlib.xml
 Build sequence for target(s) `setupLocalClient' is [deleteAllDependencies,
 updat
 eRemoteIsovDependencies, updateLocalIsovDependencies,
 reloadRemoteTpdDependencie
 s, reloadLocalTpdDependencies, setupLocalClient]
 Complete build sequence is [deleteAllDependencies,
 updateRemoteIsovDependencies,
  updateLocalIsovDependencies, reloadRemoteTpdDependencies,
 reloadLocalTpdDepende
 ncies, setupLocalClient, setupRemoteClient, ]

 deleteAllDependencies:

 updateRemoteIsovDependencies:
 [artifact:pom] Loading Maven settings file: C:\Documents and
 Settings\Administra
 tor\.m2\settings.xml
 [artifact:pom] Loading Maven settings file: C:\apps\build\apache-
 maven-2.0.8\con
 f\settings.xml
 [artifact:pom] Using remote repositories:
   - id=central, url=http://repo1.maven.org/maven2, releases=enabled,
 snapshots=d
 isabled
 [artifact:pom] Error downloading parent pom
 com.ibm.isov.grdm:grdm-parent::2.0.1
 .3-SNAPSHOT: Missing:
 [artifact:pom] --
 [artifact:pom] 1) com.ibm.isov.grdm:grdm-parent:pom:2.0.1.3-SNAPSHOT
 [artifact:pom]   Path to dependency:
 [artifact:pom]  1) unspecified:unspecified:jar:0.0
 [artifact:pom]  2)
 com.ibm.isov.grdm:grdm-parent:pom:2.0.1.3-SNAPSHOT
 [artifact:pom]
 [artifact:pom] --
 [artifact:pom] 1 required artifact is missing.
 [artifact:pom]
 [artifact:pom] for artifact:
 [artifact:pom]   unspecified:unspecified:jar:0.0
 [artifact:pom]
 [artifact:pom] from the specified remote repositories:
 [artifact:pom]   central (http://repo1.maven.org/maven2)
 [artifact:pom] An error has occurred while processing the Maven artifact
 tasks.
 [artifact:pom]  Diagnosis:
 [artifact:pom]
 [artifact:pom] Unable to initialize POM
 dependency-pom-isov-remote-grdm.xml: Fai
 led to validate POM for project com.ibm.isov.grdm:grdm-plugin-isov-remoteat 
 M:\
 services_trunk\IsovPlugin\dependency\dependency-pom-isov-remote-grdm.xml
 [artifact:pom]

 BUILD FAILED
 M:\services_trunk\IsovPlugin\build-grdm.xml:10: Unable to initialize POM
 depende
 ncy-pom-isov-remote-grdm.xml: Failed to validate POM for project
 com.ibm.isov.gr
 dm:grdm-plugin-isov-remote at
 M:\services_trunk\IsovPlugin\dependency\dependency
 -pom-isov-remote-grdm.xml
 at org.apache.maven.artifact.ant.Pom.initialise(Pom.java:173)
 at org.apache.maven.artifact.ant.Pom.doExecute(Pom.java:374)
 at org.apache.maven.artifact.ant.AbstractArtifactTask.execute
 (AbstractAr
 tifactTask.java:658)
 at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java
 :288)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke
 (NativeMethodAccessorImpl.
 java:64)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke
 (DelegatingMethodAcces
 sorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:615)
 at org.apache.tools.ant.dispatch.DispatchUtils.execute(
 DispatchUtils.jav
 a:105)
 at org.apache.tools.ant.Task.perform(Task.java:348)
 at org.apache.tools.ant.Target.execute(Target.java:357)
 at org.apache.tools.ant.Target.performTasks(Target.java:385)
 at org.apache.tools.ant.Project.executeSortedTargets(Project.java
 :1329)
 at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
 at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
 

Re: Maven Ant Tasks: Configured repository not available

2008-02-02 Thread Hervé BOUTEMY
ok, I see.

 [artifact:pom] Using remote repositories:
   - id=central, url=http://repo1.maven.org/maven2, releases=enabled,
 snapshots=disabled

The repository defined in your settings.xml is not used, since it is defined 
in a profile.
This is a known limitation: profiles are not supported yet, neither in 
settings nor in POM.
See http://jira.codehaus.org/browse/MANTTASKS-35

Hervé

Le samedi 02 février 2008, Thomas Tardy a écrit :
 Hi all,

 this is the output of ant -v.

 As you can see, it cannot download the artefact
 com.ibm.isov.grdm:grdm-parent:pom:2.0.1.3-SNAPSHOT which is the parent of
 the pom file I'm loading with ant. The artefact is on the repository
 configured in C:\Documents and Settings\Administrator\.m2\settings.xml. But
 if I download the artefact and the ant task can validate the pom, the ant
 tasks are able to download other artefacts from the repository.

 Any idea what the problem could be?

 Apache Ant version 1.7.0 compiled on December 13 2006
 Buildfile: build-grdm.xml
 Detected Java version: 1.5 in: C:\Program
 Files\IBM\SDP70\runtimes\base_v61\java
 \jre
 Detected OS: Windows XP
 parsing buildfile M:\services_trunk\IsovPlugin\build-grdm.xml with URI =
 file:/M

 :/services_trunk/IsovPlugin/build-grdm.xml

 Project base dir set to: M:\services_trunk\IsovPlugin
 [antlib:org.apache.tools.ant] Could not load definitions from resource
 org/apach
 e/tools/ant/antlib.xml. It could not be found.
 parsing buildfile
 jar:file:/M:/services_trunk/IsovFrameworkDeployment/utilLib/ma
 ven-ant-tasks-2.0.8.jar!/org/apache/maven/artifact/ant/antlib.xml with URI
 = jar

 :file:/M:/services_trunk/IsovFrameworkDeployment/utilLib/maven-

 ant-tasks-2.0.8.j
 ar!/org/apache/maven/artifact/ant/antlib.xml
 Build sequence for target(s) `setupLocalClient' is [deleteAllDependencies,
 updat
 eRemoteIsovDependencies, updateLocalIsovDependencies,
 reloadRemoteTpdDependencie
 s, reloadLocalTpdDependencies, setupLocalClient]
 Complete build sequence is [deleteAllDependencies,
 updateRemoteIsovDependencies,
  updateLocalIsovDependencies, reloadRemoteTpdDependencies,
 reloadLocalTpdDepende
 ncies, setupLocalClient, setupRemoteClient, ]

 deleteAllDependencies:

 updateRemoteIsovDependencies:
 [artifact:pom] Loading Maven settings file: C:\Documents and
 Settings\Administra
 tor\.m2\settings.xml
 [artifact:pom] Loading Maven settings file: C:\apps\build\apache-
 maven-2.0.8\con
 f\settings.xml
 [artifact:pom] Using remote repositories:
   - id=central, url=http://repo1.maven.org/maven2, releases=enabled,
 snapshots=d
 isabled
 [artifact:pom] Error downloading parent pom
 com.ibm.isov.grdm:grdm-parent::2.0.1
 .3-SNAPSHOT: Missing:
 [artifact:pom] --
 [artifact:pom] 1) com.ibm.isov.grdm:grdm-parent:pom:2.0.1.3-SNAPSHOT
 [artifact:pom]   Path to dependency:
 [artifact:pom]  1) unspecified:unspecified:jar:0.0
 [artifact:pom]  2)
 com.ibm.isov.grdm:grdm-parent:pom:2.0.1.3-SNAPSHOT
 [artifact:pom]
 [artifact:pom] --
 [artifact:pom] 1 required artifact is missing.
 [artifact:pom]
 [artifact:pom] for artifact:
 [artifact:pom]   unspecified:unspecified:jar:0.0
 [artifact:pom]
 [artifact:pom] from the specified remote repositories:
 [artifact:pom]   central (http://repo1.maven.org/maven2)
 [artifact:pom] An error has occurred while processing the Maven artifact
 tasks.
 [artifact:pom]  Diagnosis:
 [artifact:pom]
 [artifact:pom] Unable to initialize POM
 dependency-pom-isov-remote-grdm.xml: Fai
 led to validate POM for project com.ibm.isov.grdm:grdm-plugin-isov-remote
 at M:\
 services_trunk\IsovPlugin\dependency\dependency-pom-isov-remote-grdm.xml
 [artifact:pom]

 BUILD FAILED
 M:\services_trunk\IsovPlugin\build-grdm.xml:10: Unable to initialize POM
 depende
 ncy-pom-isov-remote-grdm.xml: Failed to validate POM for project
 com.ibm.isov.gr
 dm:grdm-plugin-isov-remote at
 M:\services_trunk\IsovPlugin\dependency\dependency
 -pom-isov-remote-grdm.xml
 at org.apache.maven.artifact.ant.Pom.initialise(Pom.java:173)
 at org.apache.maven.artifact.ant.Pom.doExecute(Pom.java:374)
 at org.apache.maven.artifact.ant.AbstractArtifactTask.execute
 (AbstractAr
 tifactTask.java:658)
 at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java

 :288)

 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke
 (NativeMethodAccessorImpl.
 java:64)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke
 (DelegatingMethodAcces
 sorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:615)
 at org.apache.tools.ant.dispatch.DispatchUtils.execute(
 DispatchUtils.jav
 a:105)
 at org.apache.tools.ant.Task.perform(Task.java:348)
 at org.apache.tools.ant.Target.execute(Target.java:357)
 at org.apache.tools.ant.Target.performTasks(Target.java:385)
 at org.apache.tools.ant.Project.executeSortedTargets(Project.java

 :1329)

 at 

Re: Maven Ant Tasks: Configured repository not available

2008-02-02 Thread Thomas Tardy
But even if I copy the repository configuration from the settings.xml to the
pom it's not working. And in the pom it's not defined in a profile.

On Feb 2, 2008 1:07 PM, Hervé BOUTEMY [EMAIL PROTECTED] wrote:

 ok, I see.

  [artifact:pom] Using remote repositories:
- id=central, url=http://repo1.maven.org/maven2, releases=enabled,
  snapshots=disabled

 The repository defined in your settings.xml is not used, since it is
 defined
 in a profile.
 This is a known limitation: profiles are not supported yet, neither in
 settings nor in POM.
 See http://jira.codehaus.org/browse/MANTTASKS-35

 Hervé

 Le samedi 02 février 2008, Thomas Tardy a écrit :
  Hi all,
 
  this is the output of ant -v.
 
  As you can see, it cannot download the artefact
  com.ibm.isov.grdm:grdm-parent:pom:2.0.1.3-SNAPSHOT which is the parent
 of
  the pom file I'm loading with ant. The artefact is on the repository
  configured in C:\Documents and Settings\Administrator\.m2\settings.xml.
 But
  if I download the artefact and the ant task can validate the pom, the
 ant
  tasks are able to download other artefacts from the repository.
 
  Any idea what the problem could be?
 
  Apache Ant version 1.7.0 compiled on December 13 2006
  Buildfile: build-grdm.xml
  Detected Java version: 1.5 in: C:\Program
  Files\IBM\SDP70\runtimes\base_v61\java
  \jre
  Detected OS: Windows XP
  parsing buildfile M:\services_trunk\IsovPlugin\build-grdm.xml with URI =
  file:/M
 
  :/services_trunk/IsovPlugin/build-grdm.xml
 
  Project base dir set to: M:\services_trunk\IsovPlugin
  [antlib:org.apache.tools.ant] Could not load definitions from resource
  org/apach
  e/tools/ant/antlib.xml. It could not be found.
  parsing buildfile
  jar:file:/M:/services_trunk/IsovFrameworkDeployment/utilLib/ma
  ven-ant-tasks-2.0.8.jar!/org/apache/maven/artifact/ant/antlib.xml with
 URI
  = jar
 
  :file:/M:/services_trunk/IsovFrameworkDeployment/utilLib/maven-
 
  ant-tasks-2.0.8.j
  ar!/org/apache/maven/artifact/ant/antlib.xml
  Build sequence for target(s) `setupLocalClient' is
 [deleteAllDependencies,
  updat
  eRemoteIsovDependencies, updateLocalIsovDependencies,
  reloadRemoteTpdDependencie
  s, reloadLocalTpdDependencies, setupLocalClient]
  Complete build sequence is [deleteAllDependencies,
  updateRemoteIsovDependencies,
   updateLocalIsovDependencies, reloadRemoteTpdDependencies,
  reloadLocalTpdDepende
  ncies, setupLocalClient, setupRemoteClient, ]
 
  deleteAllDependencies:
 
  updateRemoteIsovDependencies:
  [artifact:pom] Loading Maven settings file: C:\Documents and
  Settings\Administra
  tor\.m2\settings.xml
  [artifact:pom] Loading Maven settings file: C:\apps\build\apache-
  maven-2.0.8\con
  f\settings.xml
  [artifact:pom] Using remote repositories:
- id=central, url=http://repo1.maven.org/maven2, releases=enabled,
  snapshots=d
  isabled
  [artifact:pom] Error downloading parent pom
  com.ibm.isov.grdm:grdm-parent::2.0.1
  .3-SNAPSHOT: Missing:
  [artifact:pom] --
  [artifact:pom] 1) com.ibm.isov.grdm:grdm-parent:pom:2.0.1.3-SNAPSHOT
  [artifact:pom]   Path to dependency:
  [artifact:pom]  1) unspecified:unspecified:jar:0.0
  [artifact:pom]  2)
  com.ibm.isov.grdm:grdm-parent:pom:2.0.1.3-SNAPSHOT
  [artifact:pom]
  [artifact:pom] --
  [artifact:pom] 1 required artifact is missing.
  [artifact:pom]
  [artifact:pom] for artifact:
  [artifact:pom]   unspecified:unspecified:jar:0.0
  [artifact:pom]
  [artifact:pom] from the specified remote repositories:
  [artifact:pom]   central (http://repo1.maven.org/maven2)
  [artifact:pom] An error has occurred while processing the Maven artifact
  tasks.
  [artifact:pom]  Diagnosis:
  [artifact:pom]
  [artifact:pom] Unable to initialize POM
  dependency-pom-isov-remote-grdm.xml: Fai
  led to validate POM for project
 com.ibm.isov.grdm:grdm-plugin-isov-remote
  at M:\
  services_trunk\IsovPlugin\dependency\dependency-pom-isov-remote-grdm.xml
  [artifact:pom]
 
  BUILD FAILED
  M:\services_trunk\IsovPlugin\build-grdm.xml:10: Unable to initialize POM
  depende
  ncy-pom-isov-remote-grdm.xml: Failed to validate POM for project
  com.ibm.isov.gr
  dm:grdm-plugin-isov-remote at
  M:\services_trunk\IsovPlugin\dependency\dependency
  -pom-isov-remote-grdm.xml
  at org.apache.maven.artifact.ant.Pom.initialise(Pom.java:173)
  at org.apache.maven.artifact.ant.Pom.doExecute(Pom.java:374)
  at org.apache.maven.artifact.ant.AbstractArtifactTask.execute
  (AbstractAr
  tifactTask.java:658)
  at org.apache.tools.ant.UnknownElement.execute(
 UnknownElement.java
 
  :288)
 
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke
  (NativeMethodAccessorImpl.
  java:64)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke
  (DelegatingMethodAcces
  sorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:615)
  at 

Multiple environment build; old story for new comer

2008-02-02 Thread Arash Bizhan zadeh
Hi all,
I know it is a well known issue but I am really stuck!
I am in the process of migrating some Java applications build system to
Maven 2. developers need to build the applications for different environment
like local/staging/QA/prod. in the old build system we have one property
file including all the environment related properties and we used to pass it
to build and get the job done.
These parameters includes actual values for filtered variables as well as
paths and plug in properties (ie. webapps.root for cargo plugin)
I created different profiles for different environment and everything was
going on well until I noticed that I can not load the property files inside
maven. Each profile needs to load one of the environment specific property
files; so that the rest of the maven could use it.
could somebody shed a light on this problem and guide me to load my property
file in maven, or tell me about any other solution.

regards,
Arash

-- 
You can not depend on your eyes when your imagination is out of focus.


Re: Maven Ant Tasks: Configured repository not available

2008-02-02 Thread Hervé BOUTEMY
ok, this one looks like a bug
Please file a Jira issue.

Le samedi 02 février 2008, Thomas Tardy a écrit :
 But even if I copy the repository configuration from the settings.xml to
 the pom it's not working. And in the pom it's not defined in a profile.

 On Feb 2, 2008 1:07 PM, Hervé BOUTEMY [EMAIL PROTECTED] wrote:
  ok, I see.
 
   [artifact:pom] Using remote repositories:
 - id=central, url=http://repo1.maven.org/maven2, releases=enabled,
   snapshots=disabled
 
  The repository defined in your settings.xml is not used, since it is
  defined
  in a profile.
  This is a known limitation: profiles are not supported yet, neither in
  settings nor in POM.
  See http://jira.codehaus.org/browse/MANTTASKS-35
 
  Hervé
 
  Le samedi 02 février 2008, Thomas Tardy a écrit :
   Hi all,
  
   this is the output of ant -v.
  
   As you can see, it cannot download the artefact
   com.ibm.isov.grdm:grdm-parent:pom:2.0.1.3-SNAPSHOT which is the parent
 
  of
 
   the pom file I'm loading with ant. The artefact is on the repository
   configured in C:\Documents and Settings\Administrator\.m2\settings.xml.
 
  But
 
   if I download the artefact and the ant task can validate the pom, the
 
  ant
 
   tasks are able to download other artefacts from the repository.
  
   Any idea what the problem could be?
  
   Apache Ant version 1.7.0 compiled on December 13 2006
   Buildfile: build-grdm.xml
   Detected Java version: 1.5 in: C:\Program
   Files\IBM\SDP70\runtimes\base_v61\java
   \jre
   Detected OS: Windows XP
   parsing buildfile M:\services_trunk\IsovPlugin\build-grdm.xml with URI
   = file:/M
  
   :/services_trunk/IsovPlugin/build-grdm.xml
  
   Project base dir set to: M:\services_trunk\IsovPlugin
   [antlib:org.apache.tools.ant] Could not load definitions from resource
   org/apach
   e/tools/ant/antlib.xml. It could not be found.
   parsing buildfile
   jar:file:/M:/services_trunk/IsovFrameworkDeployment/utilLib/ma
   ven-ant-tasks-2.0.8.jar!/org/apache/maven/artifact/ant/antlib.xml with
 
  URI
 
   = jar
  
   :file:/M:/services_trunk/IsovFrameworkDeployment/utilLib/maven-
  
   ant-tasks-2.0.8.j
   ar!/org/apache/maven/artifact/ant/antlib.xml
   Build sequence for target(s) `setupLocalClient' is
 
  [deleteAllDependencies,
 
   updat
   eRemoteIsovDependencies, updateLocalIsovDependencies,
   reloadRemoteTpdDependencie
   s, reloadLocalTpdDependencies, setupLocalClient]
   Complete build sequence is [deleteAllDependencies,
   updateRemoteIsovDependencies,
updateLocalIsovDependencies, reloadRemoteTpdDependencies,
   reloadLocalTpdDepende
   ncies, setupLocalClient, setupRemoteClient, ]
  
   deleteAllDependencies:
  
   updateRemoteIsovDependencies:
   [artifact:pom] Loading Maven settings file: C:\Documents and
   Settings\Administra
   tor\.m2\settings.xml
   [artifact:pom] Loading Maven settings file: C:\apps\build\apache-
   maven-2.0.8\con
   f\settings.xml
   [artifact:pom] Using remote repositories:
 - id=central, url=http://repo1.maven.org/maven2, releases=enabled,
   snapshots=d
   isabled
   [artifact:pom] Error downloading parent pom
   com.ibm.isov.grdm:grdm-parent::2.0.1
   .3-SNAPSHOT: Missing:
   [artifact:pom] --
   [artifact:pom] 1) com.ibm.isov.grdm:grdm-parent:pom:2.0.1.3-SNAPSHOT
   [artifact:pom]   Path to dependency:
   [artifact:pom]  1) unspecified:unspecified:jar:0.0
   [artifact:pom]  2)
   com.ibm.isov.grdm:grdm-parent:pom:2.0.1.3-SNAPSHOT
   [artifact:pom]
   [artifact:pom] --
   [artifact:pom] 1 required artifact is missing.
   [artifact:pom]
   [artifact:pom] for artifact:
   [artifact:pom]   unspecified:unspecified:jar:0.0
   [artifact:pom]
   [artifact:pom] from the specified remote repositories:
   [artifact:pom]   central (http://repo1.maven.org/maven2)
   [artifact:pom] An error has occurred while processing the Maven
   artifact tasks.
   [artifact:pom]  Diagnosis:
   [artifact:pom]
   [artifact:pom] Unable to initialize POM
   dependency-pom-isov-remote-grdm.xml: Fai
   led to validate POM for project
 
  com.ibm.isov.grdm:grdm-plugin-isov-remote
 
   at M:\
   services_trunk\IsovPlugin\dependency\dependency-pom-isov-remote-grdm.xm
  l [artifact:pom]
  
   BUILD FAILED
   M:\services_trunk\IsovPlugin\build-grdm.xml:10: Unable to initialize
   POM depende
   ncy-pom-isov-remote-grdm.xml: Failed to validate POM for project
   com.ibm.isov.gr
   dm:grdm-plugin-isov-remote at
   M:\services_trunk\IsovPlugin\dependency\dependency
   -pom-isov-remote-grdm.xml
   at org.apache.maven.artifact.ant.Pom.initialise(Pom.java:173)
   at org.apache.maven.artifact.ant.Pom.doExecute(Pom.java:374)
   at org.apache.maven.artifact.ant.AbstractArtifactTask.execute
   (AbstractAr
   tifactTask.java:658)
   at org.apache.tools.ant.UnknownElement.execute(
 
  UnknownElement.java
 
   :288)
  
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke

Re: Maven Ant Tasks: Configured repository not available

2008-02-02 Thread Thomas Tardy
Do you have any information about the
http://jira.codehaus.org/browse/MANTTASKS-35. When will it be implemented?

On Feb 2, 2008 1:07 PM, Hervé BOUTEMY [EMAIL PROTECTED] wrote:

 ok, I see.

  [artifact:pom] Using remote repositories:
- id=central, url=http://repo1.maven.org/maven2, releases=enabled,
  snapshots=disabled

 The repository defined in your settings.xml is not used, since it is
 defined
 in a profile.
 This is a known limitation: profiles are not supported yet, neither in
 settings nor in POM.
 See http://jira.codehaus.org/browse/MANTTASKS-35

 Hervé

 Le samedi 02 février 2008, Thomas Tardy a écrit :
  Hi all,
 
  this is the output of ant -v.
 
  As you can see, it cannot download the artefact
  com.ibm.isov.grdm:grdm-parent:pom:2.0.1.3-SNAPSHOT which is the parent
 of
  the pom file I'm loading with ant. The artefact is on the repository
  configured in C:\Documents and Settings\Administrator\.m2\settings.xml.
 But
  if I download the artefact and the ant task can validate the pom, the
 ant
  tasks are able to download other artefacts from the repository.
 
  Any idea what the problem could be?
 
  Apache Ant version 1.7.0 compiled on December 13 2006
  Buildfile: build-grdm.xml
  Detected Java version: 1.5 in: C:\Program
  Files\IBM\SDP70\runtimes\base_v61\java
  \jre
  Detected OS: Windows XP
  parsing buildfile M:\services_trunk\IsovPlugin\build-grdm.xml with URI =
  file:/M
 
  :/services_trunk/IsovPlugin/build-grdm.xml
 
  Project base dir set to: M:\services_trunk\IsovPlugin
  [antlib:org.apache.tools.ant] Could not load definitions from resource
  org/apach
  e/tools/ant/antlib.xml. It could not be found.
  parsing buildfile
  jar:file:/M:/services_trunk/IsovFrameworkDeployment/utilLib/ma
  ven-ant-tasks-2.0.8.jar!/org/apache/maven/artifact/ant/antlib.xml with
 URI
  = jar
 
  :file:/M:/services_trunk/IsovFrameworkDeployment/utilLib/maven-
 
  ant-tasks-2.0.8.j
  ar!/org/apache/maven/artifact/ant/antlib.xml
  Build sequence for target(s) `setupLocalClient' is
 [deleteAllDependencies,
  updat
  eRemoteIsovDependencies, updateLocalIsovDependencies,
  reloadRemoteTpdDependencie
  s, reloadLocalTpdDependencies, setupLocalClient]
  Complete build sequence is [deleteAllDependencies,
  updateRemoteIsovDependencies,
   updateLocalIsovDependencies, reloadRemoteTpdDependencies,
  reloadLocalTpdDepende
  ncies, setupLocalClient, setupRemoteClient, ]
 
  deleteAllDependencies:
 
  updateRemoteIsovDependencies:
  [artifact:pom] Loading Maven settings file: C:\Documents and
  Settings\Administra
  tor\.m2\settings.xml
  [artifact:pom] Loading Maven settings file: C:\apps\build\apache-
  maven-2.0.8\con
  f\settings.xml
  [artifact:pom] Using remote repositories:
- id=central, url=http://repo1.maven.org/maven2, releases=enabled,
  snapshots=d
  isabled
  [artifact:pom] Error downloading parent pom
  com.ibm.isov.grdm:grdm-parent::2.0.1
  .3-SNAPSHOT: Missing:
  [artifact:pom] --
  [artifact:pom] 1) com.ibm.isov.grdm:grdm-parent:pom:2.0.1.3-SNAPSHOT
  [artifact:pom]   Path to dependency:
  [artifact:pom]  1) unspecified:unspecified:jar:0.0
  [artifact:pom]  2)
  com.ibm.isov.grdm:grdm-parent:pom:2.0.1.3-SNAPSHOT
  [artifact:pom]
  [artifact:pom] --
  [artifact:pom] 1 required artifact is missing.
  [artifact:pom]
  [artifact:pom] for artifact:
  [artifact:pom]   unspecified:unspecified:jar:0.0
  [artifact:pom]
  [artifact:pom] from the specified remote repositories:
  [artifact:pom]   central (http://repo1.maven.org/maven2)
  [artifact:pom] An error has occurred while processing the Maven artifact
  tasks.
  [artifact:pom]  Diagnosis:
  [artifact:pom]
  [artifact:pom] Unable to initialize POM
  dependency-pom-isov-remote-grdm.xml: Fai
  led to validate POM for project
 com.ibm.isov.grdm:grdm-plugin-isov-remote
  at M:\
  services_trunk\IsovPlugin\dependency\dependency-pom-isov-remote-grdm.xml
  [artifact:pom]
 
  BUILD FAILED
  M:\services_trunk\IsovPlugin\build-grdm.xml:10: Unable to initialize POM
  depende
  ncy-pom-isov-remote-grdm.xml: Failed to validate POM for project
  com.ibm.isov.gr
  dm:grdm-plugin-isov-remote at
  M:\services_trunk\IsovPlugin\dependency\dependency
  -pom-isov-remote-grdm.xml
  at org.apache.maven.artifact.ant.Pom.initialise(Pom.java:173)
  at org.apache.maven.artifact.ant.Pom.doExecute(Pom.java:374)
  at org.apache.maven.artifact.ant.AbstractArtifactTask.execute
  (AbstractAr
  tifactTask.java:658)
  at org.apache.tools.ant.UnknownElement.execute(
 UnknownElement.java
 
  :288)
 
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke
  (NativeMethodAccessorImpl.
  java:64)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke
  (DelegatingMethodAcces
  sorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:615)
  at org.apache.tools.ant.dispatch.DispatchUtils.execute(
  DispatchUtils.jav
  

Re: Maven Ant Tasks: Configured repository not available

2008-02-02 Thread Hervé BOUTEMY
last time I worked on it was just before 2.0.8: I started to work on it, and 
it totally broke dependencies sorting in MANTTASKS, I had to revert for the 
release.
I'm actually working on this sorting issue to be sure it won't break anything 
when I'll try again to add profile feature in MANTTASKS.
I hope it will be ok for 2.0.9, but I can't promise, since I have to perfectly 
undestand profile handling code+spirit of Maven Core to integrate it...

If you open a Jira issue for the bug you've found, which would  enable the POM 
repository definition workaround, it will be ok for 2.0.9.

Le samedi 02 février 2008, Thomas Tardy a écrit :
 Do you have any information about the
 http://jira.codehaus.org/browse/MANTTASKS-35. When will it be implemented?

 On Feb 2, 2008 1:07 PM, Hervé BOUTEMY [EMAIL PROTECTED] wrote:
  ok, I see.
 
   [artifact:pom] Using remote repositories:
 - id=central, url=http://repo1.maven.org/maven2, releases=enabled,
   snapshots=disabled
 
  The repository defined in your settings.xml is not used, since it is
  defined
  in a profile.
  This is a known limitation: profiles are not supported yet, neither in
  settings nor in POM.
  See http://jira.codehaus.org/browse/MANTTASKS-35
 
  Hervé
 
  Le samedi 02 février 2008, Thomas Tardy a écrit :
   Hi all,
  
   this is the output of ant -v.
  
   As you can see, it cannot download the artefact
   com.ibm.isov.grdm:grdm-parent:pom:2.0.1.3-SNAPSHOT which is the parent
 
  of
 
   the pom file I'm loading with ant. The artefact is on the repository
   configured in C:\Documents and Settings\Administrator\.m2\settings.xml.
 
  But
 
   if I download the artefact and the ant task can validate the pom, the
 
  ant
 
   tasks are able to download other artefacts from the repository.
  
   Any idea what the problem could be?
  
   Apache Ant version 1.7.0 compiled on December 13 2006
   Buildfile: build-grdm.xml
   Detected Java version: 1.5 in: C:\Program
   Files\IBM\SDP70\runtimes\base_v61\java
   \jre
   Detected OS: Windows XP
   parsing buildfile M:\services_trunk\IsovPlugin\build-grdm.xml with URI
   = file:/M
  
   :/services_trunk/IsovPlugin/build-grdm.xml
  
   Project base dir set to: M:\services_trunk\IsovPlugin
   [antlib:org.apache.tools.ant] Could not load definitions from resource
   org/apach
   e/tools/ant/antlib.xml. It could not be found.
   parsing buildfile
   jar:file:/M:/services_trunk/IsovFrameworkDeployment/utilLib/ma
   ven-ant-tasks-2.0.8.jar!/org/apache/maven/artifact/ant/antlib.xml with
 
  URI
 
   = jar
  
   :file:/M:/services_trunk/IsovFrameworkDeployment/utilLib/maven-
  
   ant-tasks-2.0.8.j
   ar!/org/apache/maven/artifact/ant/antlib.xml
   Build sequence for target(s) `setupLocalClient' is
 
  [deleteAllDependencies,
 
   updat
   eRemoteIsovDependencies, updateLocalIsovDependencies,
   reloadRemoteTpdDependencie
   s, reloadLocalTpdDependencies, setupLocalClient]
   Complete build sequence is [deleteAllDependencies,
   updateRemoteIsovDependencies,
updateLocalIsovDependencies, reloadRemoteTpdDependencies,
   reloadLocalTpdDepende
   ncies, setupLocalClient, setupRemoteClient, ]
  
   deleteAllDependencies:
  
   updateRemoteIsovDependencies:
   [artifact:pom] Loading Maven settings file: C:\Documents and
   Settings\Administra
   tor\.m2\settings.xml
   [artifact:pom] Loading Maven settings file: C:\apps\build\apache-
   maven-2.0.8\con
   f\settings.xml
   [artifact:pom] Using remote repositories:
 - id=central, url=http://repo1.maven.org/maven2, releases=enabled,
   snapshots=d
   isabled
   [artifact:pom] Error downloading parent pom
   com.ibm.isov.grdm:grdm-parent::2.0.1
   .3-SNAPSHOT: Missing:
   [artifact:pom] --
   [artifact:pom] 1) com.ibm.isov.grdm:grdm-parent:pom:2.0.1.3-SNAPSHOT
   [artifact:pom]   Path to dependency:
   [artifact:pom]  1) unspecified:unspecified:jar:0.0
   [artifact:pom]  2)
   com.ibm.isov.grdm:grdm-parent:pom:2.0.1.3-SNAPSHOT
   [artifact:pom]
   [artifact:pom] --
   [artifact:pom] 1 required artifact is missing.
   [artifact:pom]
   [artifact:pom] for artifact:
   [artifact:pom]   unspecified:unspecified:jar:0.0
   [artifact:pom]
   [artifact:pom] from the specified remote repositories:
   [artifact:pom]   central (http://repo1.maven.org/maven2)
   [artifact:pom] An error has occurred while processing the Maven
   artifact tasks.
   [artifact:pom]  Diagnosis:
   [artifact:pom]
   [artifact:pom] Unable to initialize POM
   dependency-pom-isov-remote-grdm.xml: Fai
   led to validate POM for project
 
  com.ibm.isov.grdm:grdm-plugin-isov-remote
 
   at M:\
   services_trunk\IsovPlugin\dependency\dependency-pom-isov-remote-grdm.xm
  l [artifact:pom]
  
   BUILD FAILED
   M:\services_trunk\IsovPlugin\build-grdm.xml:10: Unable to initialize
   POM depende
   ncy-pom-isov-remote-grdm.xml: Failed to validate POM for project
   com.ibm.isov.gr
   dm:grdm-plugin-isov-remote at
   M:\services_trunk\IsovPlugin\dependency\dependency
   

Re: Multiple environment build; old story for new comer

2008-02-02 Thread Wayne Fay
Put the properties themselves inside the profiles. Or, use filtering
with various named filters eg qa.filter and specify the proper filter
to use in your profile.

Wayne

On 2/1/08, Arash Bizhan zadeh [EMAIL PROTECTED] wrote:
 Hi all,
 I know it is a well known issue but I am really stuck!
 I am in the process of migrating some Java applications build system to
 Maven 2. developers need to build the applications for different environment
 like local/staging/QA/prod. in the old build system we have one property
 file including all the environment related properties and we used to pass it
 to build and get the job done.
 These parameters includes actual values for filtered variables as well as
 paths and plug in properties (ie. webapps.root for cargo plugin)
 I created different profiles for different environment and everything was
 going on well until I noticed that I can not load the property files inside
 maven. Each profile needs to load one of the environment specific property
 files; so that the rest of the maven could use it.
 could somebody shed a light on this problem and guide me to load my property
 file in maven, or tell me about any other solution.

 regards,
 Arash

 --
 You can not depend on your eyes when your imagination is out of focus.


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



Re: Error in changes:annoucement-mail goal

2008-02-02 Thread Dennis Lundberg

Two more things to check:

1. The debug output shows that you are using 2.0-beta-2:
 [DEBUG] Configuring mojo 
'org.apache.maven.plugins:maven-changes-plugin:2.0-beta-2:announcement-generate' 
--

Please make sure that you have configured the version 2.0-beta-3 correctly.

2. Is the URL really valid? Running 'nslookup dev1.wa' returns 
'Non-existent domain'.


Ben Lidgey wrote:

I am getting an error when trying to do a mvn changes:announcement-mail that 
says:

[ERROR] BUILD ERROR
[INFO] 
[INFO] One or more required plugin parameters are invalid/missing for 
'changes:announcement-generate'

[0] inside the definition for plugin: 'maven-changes-plugin'specify the 
following:

configuration
  ...
  urlVALUE/url
/configuration

-OR-

on the command line, specify: '-Dproject.url=VALUE'

[INFO] 

BUT, the changes plugin in the pom.xml is configured as

plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-changes-plugin/artifactId
version2.0-beta-3/version
inheritedfalse/inherited
executions
execution
goals
goalannouncement-generate/goal
/goals
idannouncement-generate/id
/execution
execution
goals
goalannouncement-mail/goal
/goals
idannouncement-mail/id
/execution
/executions
configuration

urlhttp://dev1.wa:8280/maven-proxy/repository/inuknetworks/InukPlatform2ParentServiceProject//url
smtpHost
smtpserver
/smtpHost
smtpPort implementation=java.lang.Integer
25
/smtpPort
toAddresses
toAddress implementation=java.lang.String
javateamemail
/toAddress
/toAddresses
introduction
Common Web Service parent project.
/introduction
urlDownload

http://dev1.wa:8280/internal/inuknetworks/InukPlatform2ParentServiceProject/
/urlDownload
/configuration
/plugin

When I run it with -X it shows

[DEBUG] Configuring mojo 
'org.apache.maven.plugins:maven-changes-plugin:2.0-beta-2:announcement-generate' 
--
[DEBUG]   (s) artifactId = InukPlatform2ParentServiceProject
[DEBUG]   (s) developmentTeam = InukPlatform2ParentServiceProject-team
[DEBUG]   (s) finalName = InukPlatform2ParentServiceProject-1.0.4-SNAPSHOT.pom
[DEBUG]   (f) generateJiraAnnouncement = false
[DEBUG]   (s) groupId = inuknetworks
[DEBUG]   (s) introduction = Common Web Service parent project.
[DEBUG]   (f) jiraXML = 
c:\Development\Projects\utils\InukPlatform2ParentServiceProject\target/jira-announcement.xml
[DEBUG]   (f) nbEntries = 25
[DEBUG]   (s) outputDirectory = 
c:\Development\Projects\utils\InukPlatform2ParentServiceProject\target/announcement
[DEBUG]   (s) packaging = pom
[DEBUG]   (f) project = [EMAIL PROTECTED]
[DEBUG]   (f) resolutionId = Fixed
[DEBUG]   (f) setting = [EMAIL PROTECTED]
[DEBUG]   (f) statusId = Closed
[DEBUG]   (f) template = announcement.vm
[DEBUG]   (f) templateDirectory = org/apache/maven/plugin/announcement
[DEBUG]   (s) url = 
http://dev1.wa:8280/maven-proxy/repository/inuknetworks/InukPlatform2ParentServiceProject/
[DEBUG]   (s) urlDownload = 
http://dev1.wa:8280/internal/inuknetworks/InukPlatform2ParentServiceProject/
[DEBUG]   (s) version = 1.0.4-SNAPSHOT
[DEBUG]   (s) xmlPath = 
c:\Development\Projects\utils\InukPlatform2ParentServiceProject/src/changes/changes.xml
[DEBUG] -- end configuration --
[INFO] [changes:announcement-generate]

Which clearly shows the url defined.

Any idea what is going on here? I am using mvn 2.0.7.


Ben Lidgey
Senior Software Engineer
e: [EMAIL PROTECTED]

Inuk Networks Limited
Enterprise House
Navigation Park
Abercynon
CF45 4SN
t: +44 (0)844 546 0100
f: +44 (0)844 546 0200
w: www.inuknetworks.com


This e-mail is confidential and intended solely for the use of the 
individual(s) to whom it is addressed. Any views or opinions expressed are 
those of the author. If you are not the intended recipient, please be advised 
that any use, dissemination, printing or copying of this email is strictly 
prohibited.


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





--
Dennis Lundberg

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



Re: Mojos Attaching Artifacts to Project for Install Deploy

2008-02-02 Thread Erez Nahir
We are using
http://www.jfrog.org/sites/jade-plugins/latest/jade-plugin-parent/jade-build-plugin-parent/jade-multijar-plugin/index.html

Erez.

On Feb 2, 2008 10:12 AM, simon [EMAIL PROTECTED] wrote:


 On Fri, 2008-02-01 at 17:15 -0700, Cam wrote:
  Hi,
 
  I'm looking for a way to attach an extra generated artifact to a project
  so it's installed and deployed in the standard project lifecycle, how
  can i do this?  Do i need to write a mojo or can i just add this as part
  of the pom config?

 See build-helper-plugin:

  http://mojo.codehaus.org/build-helper-maven-plugin/index.html

 
  Also, does anyone know if it's possible to create a mojo which defines a
  new project packaging?

 This is definitely possible, although I don't personally know how.

 See the standard jar, war, ear plugins, or the apache felix plugin
 (defines packaging of bundle), etc.

 Regards, Simon



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




Re: Lifecycle executions run twice?

2008-02-02 Thread Cam

cool, thanks for the clarification :)

Stephen Connolly wrote:

you are not understanding lifecycles!

mvn install means run every stage in the lifecycle upto and including
install
mvn deploy means run every stage in the lifecycle upto and including
deploy

mvn install deploy means run every stage in the lifecycle upto and
including install, then run every stage in the lifecycle upto and including
deploy

so you are asking it to run twice!

Since deploy is after install, you should not need to do mvn install
deploy, just mvn deploy

-Stephen



On Feb 1, 2008 10:45 PM, Cam [EMAIL PROTECTED] wrote:

  

Hi,

I have a project which launches jetty using the cargo plugin - i have it
starting up as part of the initialize phase and tearing down in compile
(i use it for generating stub classes for a web service). If i run the
install or deploy goals on their own it all works great but if i run
mvn install deploy after the install phase it tries to start the
container again even though the phase isn't executed again. This ends up
causing class path problems as it's trying to load the war twice not to
mention the extra hit of having to start and stop the container.

I would have thought that if you specify a phase which is part of a
later phase they would combine to only execute each once, so since the
install goal is included as part of deploy it would effectively be
ignored. What i find really confusing is how the container can be
started after the install phase when it's bound to 'initialize'.

Thanks,
Cam

-
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: Mojos Attaching Artifacts to Project for Install Deploy

2008-02-02 Thread Cam

great - thanks for the links

cam

simon wrote:

On Fri, 2008-02-01 at 17:15 -0700, Cam wrote:
  

Hi,

I'm looking for a way to attach an extra generated artifact to a project 
so it's installed and deployed in the standard project lifecycle, how 
can i do this?  Do i need to write a mojo or can i just add this as part 
of the pom config?



See build-helper-plugin:

  http://mojo.codehaus.org/build-helper-maven-plugin/index.html

  
Also, does anyone know if it's possible to create a mojo which defines a 
new project packaging?



This is definitely possible, although I don't personally know how.

See the standard jar, war, ear plugins, or the apache felix plugin
(defines packaging of bundle), etc.

Regards, Simon



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



pom scripting tools?

2008-02-02 Thread Cam

hi,

i was wondering if there's any way to do simple scripting in a pom? the 
specific case i'm trying to solve is to generate a database schema name 
based on the version of the project. If my project version is 
0.1-SNAPSHOT i'd like the database to be called 0_1_snapshot since '.' 
and '-' are restricted characters in postgres. i think scripting would 
be the only way to accomplish this otherwise i would have to manually 
set the new database name with every version change.


another case i've got is where i want to negate a boolean property - 
this is in  the case of the sql plugin which has a 'skip' config 
parameter, in my case i want to have a property called 
'init.database.user' which has requires a property of true to activate 
instead of 'init.database.user.skip' which would require a false value. 
trivial i know, but i think it makes the properties a bit more 
intuitive. is there any way i can do boolean operators on properties, 
something like:


init.database.user.skip!${init.database.user}/init.database.user.skip

thanks,
cam


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



Re: Multiple environment build; old story for new comer

2008-02-02 Thread Cam

hi arash,

as far as i am aware (i've only been using maven for about 6 months so 
i'm no real authority on it) but the easiest way to accomplish is to 
have the properties defined in the environment profiles, eg in your main 
pom:


profile
   idbuild/id
   activation
   property
   nameenv/name
   valuebuild/value
   /property
   /activation
   properties
  ...
   /properties
/profile

Unfortunately i don't think it's possible to activate other profiles 
within this profile, so you couldn't have a generic environment profile 
which was activated by all other specific env profiles. What you can do 
however is 'override' this parent profile in module poms. This allows 
for a module to add env config into the same profile which can all be 
activated using the same command line parameter. I found this good in 
keeping module config in the module pom.


Reading 
http://maven.apache.org/guides/introduction/introduction-to-profiles.html 
section Profile Pitfalls, Maven promotes that env config should reside 
in the pom so that the project can always be built without relying on 
external property configuration. I've found this to be fine for 
everything but the env passwords which should be the only thing required 
to be configured outside the project in the build's settings.xml file, eg:



profile   
   idbuild/id

   activation
   property
   nameenv/name
   valuebuild/value
   /property
   /activation
   properties
  database.passwordAbCdEfG/database.password
   /properties
/profile

This has worked for me with local, dev, build, staging and prod 
environments. At first i found defining properties for each environment 
seperatly a bit of overhead but it does pay off with the simplicity and 
inherant flexibility of being able to change any property for a specific 
environment independently. The other great benefit is being able to 
change the build in this profile, so for example the build profile can 
automatically create the user and database during the build - something 
you might not want happening for prod.


Cam



Arash Bizhan zadeh wrote:

Hi all,
I know it is a well known issue but I am really stuck!
I am in the process of migrating some Java applications build system to
Maven 2. developers need to build the applications for different environment
like local/staging/QA/prod. in the old build system we have one property
file including all the environment related properties and we used to pass it
to build and get the job done.
These parameters includes actual values for filtered variables as well as
paths and plug in properties (ie. webapps.root for cargo plugin)
I created different profiles for different environment and everything was
going on well until I noticed that I can not load the property files inside
maven. Each profile needs to load one of the environment specific property
files; so that the rest of the maven could use it.
could somebody shed a light on this problem and guide me to load my property
file in maven, or tell me about any other solution.

regards,
Arash

  


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



Re: pom scripting tools?

2008-02-02 Thread Wayne Fay
You could probably achieve this with a little Beanshell or Groovy
plugin, or Java for that matter. You'd need to bind the property back
to the MavenProject so it would propagate throughout your build.

Wayne

On 2/2/08, Cam [EMAIL PROTECTED] wrote:
 hi,

 i was wondering if there's any way to do simple scripting in a pom? the
 specific case i'm trying to solve is to generate a database schema name
 based on the version of the project. If my project version is
 0.1-SNAPSHOT i'd like the database to be called 0_1_snapshot since '.'
 and '-' are restricted characters in postgres. i think scripting would
 be the only way to accomplish this otherwise i would have to manually
 set the new database name with every version change.

 another case i've got is where i want to negate a boolean property -
 this is in  the case of the sql plugin which has a 'skip' config
 parameter, in my case i want to have a property called
 'init.database.user' which has requires a property of true to activate
 instead of 'init.database.user.skip' which would require a false value.
 trivial i know, but i think it makes the properties a bit more
 intuitive. is there any way i can do boolean operators on properties,
 something like:

 init.database.user.skip!${init.database.user}/init.database.user.skip

 thanks,
 cam


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



eclipse:eclipse PDE version naming for incubator projects - changing a hyphen into a period, causing an error

2008-02-02 Thread Marshall Schor

We have a maven version for our incubating project which looks like:

2.3.0.incubating-SNAPSHOT

The dot before incubating is there to make the format fit the Eclipse 
syntax of major.minor.micro.qualifier


When eclipse:eclipse updates the MANIFEST.MF, it changes this version to:

2.3.0.incubating.SNAPSHOT

This causes Eclipse 3.3 to complain that the format (which now contains 
5 sections, separated by periods) is invalid.


Can I set some configuration parameter to get eclipse:eclipse to not 
change the last - before SNAPSHOT to a period?


-Marshall Schor

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