AW: sequence of plugin execution

2008-10-10 Thread Wolfgang.Winter
I want to download artifacts with dependency plugin and then do some
work on them with a self-made plugin. Of cause I must be sure that they
are first downloaded before I can work on them.
 
Wolfgang 


Answer to question 1: No, you can't control in which order the plugins
in a specific phase run.
And indeed, there are some pre and post phases (or other phases, which
normally are not very heavily used):

For the default lifecycle:

phases
  phasevalidate/phase
  phaseinitialize/phase
  phasegenerate-sources/phase
  phaseprocess-sources/phase
  phasegenerate-resources/phase
  phaseprocess-resources/phase
  phasecompile/phase
  phaseprocess-classes/phase
  phasegenerate-test-sources/phase
  phaseprocess-test-sources/phase
  phasegenerate-test-resources/phase
  phaseprocess-test-resources/phase
  phasetest-compile/phase
  phaseprocess-test-classes/phase
  phasetest/phase
  phasepackage/phase
  phasepre-integration-test/phase
  phaseintegration-test/phase
  phasepost-integration-test/phase
  phaseverify/phase
  phaseinstall/phase
  phasedeploy/phase
/phases

What are you trying to accomplish?

With regards,

Nick Stolwijk
~Java Developer~

Iprofs BV.
Claus Sluterweg 125
2012 WS Haarlem
www.iprofs.nl



On Thu, Oct 9, 2008 at 3:04 PM, Baptiste MATHUS [EMAIL PROTECTED] wrote:
 I never developed a real plugin, but I guess that having a look here
could
 here :

http://svn.apache.org/repos/asf/maven/components/branches/maven-2.0.x/ma
ven-core/src/main/resources/META-INF/plexus/components.xml

 In fact, you'll see there the existing phase (pre- or post- ones).

 Cheers.

 2008/10/9 [EMAIL PROTECTED]

 Hi,



 1. how can I control the sequence of execution when more than one
plugin
 is bound to the same phase?

 2. When I bind a plugin to a phase, can I control if it is executed
just
 before or after the phase?





 Wolfgang



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



sequence of plugin execution

2008-10-09 Thread Wolfgang.Winter
Hi,

 

1. how can I control the sequence of execution when more than one plugin
is bound to the same phase?

2. When I bind a plugin to a phase, can I control if it is executed just
before or after the phase?

 

 

Wolfgang 



Error on adding indexing context local

2008-10-08 Thread Wolfgang.Winter
On starting Eclipse with Maven plugin I get always these error messages,
saying system cannot find file _y.fnm:

 

08.10.08 08:01:10 CEST: Error on adding indexing context local;
D:\projekte\.metadata\.plugins\org.maven.ide.eclipse\nexus\local\_y.fnm
(Das System kann die angegebene Datei nicht finden)

08.10.08 08:01:46 CEST: Downloading central :
nexus-maven-repository-index.properties

08.10.08 08:01:46 CEST: Downloaded [central] -
http://repo1.maven.org/maven2/.index/nexus-maven-repository-index.proper
ties

08.10.08 08:01:46 CEST: No index update available for central

 

How can I repair this?

 

Kind regards

Wolfgang



dynamic addition of dependencies

2008-10-08 Thread Wolfgang.Winter
Hi,

In a plugin I want to dynamically check the dependencies and resolve
(download) correspondent artifacts with another classifier. Example: in
pom is declared dependency core-translation-0.2. The plugin should
download automatically core-translation-0.2-install. 

 

My idea:

Loop through the dependencies and create for each a new Artifact with
ArtifactFactory.createDependencyArtifact(). Download the artifact with
ArtifactResolver.resolve(...) 

Is this a correct approach?

 

Problems:

1.  in the dependencies list injected with ${project.dependencies}
only partly transitive dependencies are listed, they are not completely
resolved. In the example the dependencies of  core-translation-0.2 are
missing. However, I declared the mojo with @requiresDependencyResolution
compile 
2.  The ArtifactResolver.resolve() method needs the remote and local
repositories as parameter. The remote I can get from MavenProject but
from where do I get the local repository?

 

 

Kind regards

Wolfgang 

 



AW: from workaround to workaround 3

2008-10-06 Thread Wolfgang.Winter

I tried everything now: set activeByDefault to true, delete
activeByDefault entirely, delete the activeProfiles section, refreshed
the settings in Eclipse (what gives the error: 
Error on adding indexing context local; Cannot find file
D:\projekte\.metadata\.plugins\org.maven.ide.eclipse\nexus\local\_y.fnm
)

always same result: when I execute help:active-profiles on the top-pom
'There are no active profiles'.
I am absolutely frustrated with Maven.

 

I'm pretty sure activeByDefault is not used in settings, this is for the
pom only. That's what the activeProfiles section is for.

-Original Message-
From: Stephen Connolly [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 05, 2008 6:27 AM
To: Maven Users List
Subject: Re: from workaround to workaround 3

On Fri, Sep 5, 2008 at 9:45 AM, [EMAIL PROTECTED] wrote:

 
  By the way, the settings.xml contains this:
profile
  idjboss/id
  activation
 activeByDefault/


 You need to change this to

  activeByDefaulttrue/activeByDefault

 as

 assert true.equalsIgnoreCase() == false;


  /activation
  properties
 dbdriveroracle.jdbc.driver.OracleDriver/dbdriver
 dbusering_epa/dbuser
 dbpasswording_epa/dbpassword
 dburljdbc:oracle:thin:@deneb:1521:WLP/dburl
 ...
  /properties
/profile
   /profiles
 
   activeProfiles
 activeProfilejboss/activeProfile
   /activeProfiles
 

 [Winter, Wolfgang] okay, maybe. But I activated the profile explicitly
 in the last line! Please excuse me when I criticize, but for me this
is
 bad design. This is not what a dumb user like me expects, regardless
of
 the setting of activeByDefault


Actually no, when you specify activeByDefault/ (that is equivalent to
activeByDefaultfalse/activeByDefault) which AFAIK is overriding the
activeProfiles section.

If you had removed the activeByDefault/ entirely it would be active

-Stephen

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



mysterious assembly-plugin

2008-10-02 Thread Wolfgang.Winter
Hi,

I have great problems to solve a simple requirement with Maven2. I have
a Maven project with several sub-modules. Each submodule has its own
config- and install files. I want to distribute and deploy these files
together with its respective submodule artefact. The assembly-plugin
seems to be appropriate for this task but as I made always the
experience up to now with nearly every Maven functionality, it does not
work as expected and documented and error messages are mysterious.
Furthermore it is very hard to understand the different goals and
parameters of assembly-plugin and from where does it count paths.

 

I defined the plugin in my parent pom:

 

  plugin

artifactIdmaven-assembly-plugin/artifactId

configuration

  descriptors

descriptorassembly-descriptor.xml/descriptor

  /descriptors

  !--
archiveBaseDirectory${project.basedir}/archiveBaseDirectory--

/configuration

executions

  execution

idmake-assembly/id

phasepackage/phase

goals

  goalsingle/goal

/goals

  /execution

/executions

  /plugin

 

I defined the descriptor:

 

assembly

  idinstall/id

  formats

formatzip/format

  /formats

  fileSets

fileSet

  directorysrc/main/install/directory

  outputDirectory/outputDirectory

/fileSet

  /fileSets

  files

file

  sourcereadme.txt/source

  outputDirectory/outputDirectory

file

  /files

/assembly

 

I have modified these two in any possible way, I tried also goal
attached but when I execute mvn install I always get the error: you must
set at least one file.

 

[DEBUG] Configuring mojo
'org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-1:single' with
basic configurator --

[DEBUG]   (s) appendAssemblyId = true

[DEBUG]   (f) attach = true

[DEBUG]   (s) basedir = D:\projekte\core

[DEBUG]   (s) descriptors = [Ljava.io.File;@1742c56

[DEBUG]   (s) filters = []

[DEBUG]   (s) finalName = core-0.0.2-SNAPSHOT

[DEBUG]   (s) includeSite = false

[DEBUG]   (s) localRepository = [local] -
file://D:\projekte\maven-repository

[DEBUG]   (s) outputDirectory = D:\projekte\core\target

[DEBUG]   (f) project = MavenProject: net.atos.wlp:core:0.0.2-SNAPSHOT @
D:\projekte\core\pom.xml

[DEBUG]   (s) reactorProjects = [MavenProject:
net.atos.wlp:plugin-setproperties:0.0.2 @
D:\projekte\core\plugin-setproperties\pom.xml, MavenProject:
net.atos.wlp:grandparent-pom:0.0.2 @
D:\projekte\core\grandparent-pom\pom.xml, MavenProject:
net.atos.wlp:core-install:0.0.2-SNAPSHOT @
D:\projekte\core\install\pom.xml, MavenProject:
net.atos.wlp:plugin-jbossinstall:0.0.2-SNAPSHOT @
D:\projekte\core\plugin-jbossinstall\pom.xml, MavenProject:
net.atos.wlp:core:0.0.2-SNAPSHOT @ D:\projekte\core\pom.xml,
MavenProject: net.atos.wlp:core-database:0.0.2-SNAPSHOT @
D:\projekte\core\database\product\pom.xml, MavenProject:
net.atos.wlp:core-config:0.0.2-SNAPSHOT @
D:\projekte\core\config\product\pom.xml, MavenProject:
net.atos.wlp:core-template:0.0.2-SNAPSHOT @
D:\projekte\core\template\pom.xml, MavenProject:
net.atos.wlp:core-translation:0.0.2-SNAPSHOT @
D:\projekte\core\translation\product\pom.xml, MavenProject:
net.atos.wlp:plugin-translationimport:0.0.2-SNAPSHOT @
D:\projekte\core\plugin-translationimport\pom.xml, MavenProject:
net.atos.wlp:plugin-blobloader:0.0.2-SNAPSHOT @
D:\projekte\core\plugin-blobloader\pom.xml, MavenProject:
net.atos.wlp:parent-pom:0.0.2-SNAPSHOT @
D:\projekte\core\parent-pom\pom.xml, MavenProject:
net.atos.wlp:core-commonobjects:0.0.2-SNAPSHOT @
D:\projekte\core\commonobjects\pom.xml, MavenProject:
net.atos.wlp:core-log:0.0.2-SNAPSHOT @
D:\projekte\core\log\product\pom.xml, MavenProject:
net.atos.wlp:core-baselogservice:0.0.2-SNAPSHOT @
D:\projekte\core\baselogservice\product\pom.xml, MavenProject:
net.atos.wlp:core-logbean:0.0.2-SNAPSHOT @
D:\projekte\core\logbean\product\pom.xml, MavenProject:
net.atos.wlp:core-security:0.0.2-SNAPSHOT @
D:\projekte\core\security\product\pom.xml, MavenProject:
net.atos.wlp:core-batch:0.0.2-SNAPSHOT @ D:\projekte\core\batch\pom.xml,
MavenProject: net.atos.wlp:core-messaging:0.0.2-SNAPSHOT @
D:\projekte\core\messaging\product\pom.xml, MavenProject:
net.atos.wlp:core-starterservlet:0.0.2-SNAPSHOT @
D:\projekte\core\starterservlet\product\pom.xml, MavenProject:
net.atos.wlp:core-makeear:0.0.2-SNAPSHOT @
D:\projekte\core\makeear\pom.xml]

[DEBUG]   (f) remoteRepositories = [[internal] -
file://Y:/IPS/Produkt/maven-repository/internal, [central] -
http://repo1.maven.org/maven2]

[DEBUG]   (s) siteDirectory = D:\projekte\core\target\site

[DEBUG]   (s) tarLongFileMode = warn

[DEBUG]   (s) tempRoot = D:\projekte\core\target\archive-tmp

[DEBUG]   (s) workDirectory = D:\projekte\core\target\assembly\work

[DEBUG] -- end configuration --

[INFO] [assembly:single]

[DEBUG] Setting context classloader for plugin to:

release plugin with submodules

2008-09-19 Thread Wolfgang.Winter
Hi,

 

I am trying the release plugin on a project with sub-modules within
Eclipse. The project is named 'core' and the sub-module is
'plugin-setproperties'. I want to release only one sub-module, not the
whole project. I go into the sub-module project and execute
release:prepare. This works, sub-module is tagged in cvs and
release.properties is created. Then I execute release:perform which does
not work:

 

-  Cvs checks out the whole project, not only the tagged
sub-project. CVS checkout normally works in a way  that the directories
that do not belong to the tag are deleted at the end. This does not
happen

-  The deploy ends with an error saying a pom is missing. Maybe
there is missing a 'change directory' to go into the sub-module
directory?

 

[INFO] Executing: cvs -z3 -f -d :pserver:[EMAIL PROTECTED]:/cvs/remotepayment
-q checkout -r plugin-setproperties-0_0_2 -d checkout core

[INFO] Working directory: D:\projekte\core\plugin-setproperties\target

[DEBUG] Executing CVS command: checkout -r plugin-setproperties-0_0_2 -d
checkout core 

[DEBUG] 

[DEBUG] 

[DEBUG] U checkout/plugin-setproperties/.cvsignore

[DEBUG] U checkout/plugin-setproperties/pom.xml

[DEBUG] U
checkout/plugin-setproperties/src/main/java/net/atos/wlp/core/setpropert
ies/SetPropertiesMojo.java

[DEBUG] U
checkout/plugin-setproperties/src/main/resources/directory-info.txt

[DEBUG] U
checkout/plugin-setproperties/src/main/resources/log4j.properties

[INFO] Executing goals 'deploy'...

[INFO] Executing: mvn deploy --no-plugin-updates -DperformRelease=true
-f pom.xml

[INFO] Scanning for projects...

[INFO]


[INFO] Building Maven Default Project

[INFO]task-segment: [deploy]

[INFO]


[INFO] Ignoring available plugin update: 2.5 as it requires
Maven version 2.0.9

[INFO]


[ERROR] BUILD ERROR

[INFO]


[INFO] Cannot execute mojo: resources. It requires a project
with an existing pom.xml, but the build is not using one.

 

 

 

Kind regards

Wolfgang Winter



from workaround to workaround 1

2008-09-05 Thread Wolfgang.Winter
Hi,

 

here is a small story about working with Maven. In my experience of 6 months 
now this happened very often like this. Maven is very hard to manage, not 
intuitive and error messages are incomprehensible or misleading.

 

The problem: We have 5 Maven projects with sub projects. For test classes, the 
database connection should be defined only once, we put it into the user's 
settings.xml. Now, how accessing the db-properties in test classes?

First idea: Filtering! I created properties file in the test/resources 
directories and tried to filter db properties from the settings properties with

 

resources

  resource

directorysrc/test/resources/directory

filteringtrue/filtering

  /resource

/resources

 

Nothing happens. Filtering seems to be possible only in main/resources. Then I 
ask myself why have I to define a directory when only one value is working? 
You could hard-code it. This is not intuitive!

 

 

Freundliche Grüße / Kind regards

 

Wolfgang Winter

System Analyst



from workaround to workaround 2

2008-09-05 Thread Wolfgang.Winter
Hi,

 

This is the second part of: how accessing properties from settings in test 
classes?

 

Second idea: I found the properties-maven-plugin which has a goal that writes 
all settings properties into a file. Fine, that's what I need. However, this 
plugin is not on the rep01.maven server but only on a codehaus server. So I 
defined an additional repository: 

 

   pluginRepositories

  pluginRepository

 idcodehaus/id

 namecodehaus Repository for plugins/name

 urlhttp://snapshots.repository.codehaus.org/url

 layoutdefault/layout

  /pluginRepository

   /pluginRepositories

 

However, Maven was not able to download the plugin. It ignores the 
pluginRepository and searches only on central. Why defining a pluginRepository 
when it is not used by Maven?

 

 

Freundliche Grüße / Kind regards

 

Wolfgang Winter

System Analyst

 



from workaround to workaround 3

2008-09-05 Thread Wolfgang.Winter
Hi,

 

This is the third part of: how accessing properties from settings in test 
classes?

 

Finally I copied the -maven-plugin file by file from the codehaus server into 
our internal repository and now it was found by Maven. However, on running it 
during the generate-test-resources phase nothing happens. Why? I looked into 
the source code of the plugin. It uses project.getActiveProfiles() and this 
method returns an empty list. But I have a profile defined in settings which is 
set active with activeProfile. Why does the getActiveProfiles() method 
returns zero?
 
 
At the end of this frustrating story I wrote a plugin myself which did the task 
of writing all properties from settings into a file in target directory which 
uses ${project.properties} and finally this works but it was a really long way 
for a simple problem.

 

 

Freundliche Grüße / Kind regards

 

Wolfgang Winter

System Analyst



AW: from workaround to workaround 2

2008-09-05 Thread Wolfgang.Winter


 
On Friday 05 September 2008 [EMAIL PROTECTED] wrote:
pluginRepositories

   pluginRepository

  idcodehaus/id

  namecodehaus Repository for plugins/name

  urlhttp://snapshots.repository.codehaus.org/url

  layoutdefault/layout

   /pluginRepository

/pluginRepositories



 However, Maven was not able to download the plugin. It ignores the
 pluginRepository and searches only on central. Why defining a
 pluginRepository when it is not used by Maven?

What version of the plugin are you using? If it's a SNAPSHOT, you have
to 
enabled snapshots in your repository configuration by adding

  snapshots
enabledtrue/enabled
  /snapshots

If it's not a SNAPSHOT, you are using the wrong repository.

hth,
- martin

[Winter, Wolfgang] yes, Martin, it is a snapshot, so maybe that's the
reason. However, for my taste there is too much special knowledge
necessary for a simple task which could be more intuitive. But I do not
change now anything. You know: never change a running system :-)

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



AW: from workaround to workaround 2

2008-09-05 Thread Wolfgang.Winter

 Second idea: I found the properties-maven-plugin which has a goal that
writes all settings properties into a file. Fine, that's what I need.
However, this plugin is not on the rep01.maven server but only on a
codehaus server. So I defined an additional repository:

No need to use that plugin. You can use the maven-resources-plugin for
the same. See

 
http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.h
tml

[Winter, Wolfgang] Hi Jochen, please see my mail from workaround to
workaround 1: I did not succeed in filtering TEST/resources

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



AW: from workaround to workaround 3

2008-09-05 Thread Wolfgang.Winter

On Friday 05 September 2008 [EMAIL PROTECTED] wrote:

 I looked into the source code of the plugin. It uses
 project.getActiveProfiles() and this method returns an empty list. But
I
 have a profile defined in settings which is set active with
 activeProfile. Why does the getActiveProfiles() method returns zero?

Try using the maven-help-plugin to find out some details. The goal 
help:active-profiles shows you which profiles are active. 

help:effective-pom and help:effective-settings show you the effective 
pom.xml resp. settings.xml file. Are your profiles defined there?

You really don't need to write your own plugin just for filtering some 
resource-files.

hth,
- martin

[Winter, Wolfgang] help:active-profiles executed on the parent pom: 
Active Profiles for Project 'net.atos.wlp:core:pom:0.0.1-SNAPSHOT': 
There are no active profiles.
Active Profiles for Project
'net.atos.wlp:plugin-setproperties:maven-plugin:0.0.1-SNAPSHOT': 
There are no active profiles.
Active Profiles for Project
'net.atos.wlp:core-database:jar:0.0.1-SNAPSHOT': 
There are no active profiles.
...

Profiles are configured in the users/settings.xml so help:effective-pom
gives no information about profiles

Execution of help:effective-settings: The workaround story continues:
[ERROR] org.apache.maven.plugins.help.EffectiveSettingsMojo#execute()
caused a linkage error (java.lang.NoSuchMethodError). Check the realms:

NOTE:
Plugin realm is:
/plugins/org.apache.maven.plugins:maven-help-plugin:[EMAIL 
PROTECTED]/thread:main
Container realm is: plexus.core

Realm ID:
/plugins/org.apache.maven.plugins:maven-help-plugin:[EMAIL 
PROTECTED]/thread:main
urls[0] =
file:/D:/projekte/maven-repository/org/apache/maven/plugins/maven-help-p
lugin/2.1/maven-help-plugin-2.1.jar
urls[1] =
file:/D:/projekte/maven-repository/org/codehaus/plexus/plexus-utils/1.5.
6/plexus-utils-1.5.6.jar
urls[2] =
file:/D:/projekte/maven-repository/junit/junit/3.8.1/junit-3.8.1.jar
urls[3] =
file:/D:/projekte/maven-repository/org/apache/maven/wagon/wagon-http-sha
red/1.0-beta-2/wagon-http-shared-1.0-beta-2.jar
urls[4] =
file:/D:/projekte/maven-repository/jtidy/jtidy/4aug2000r7-dev/jtidy-4aug
2000r7-dev.jar
urls[5] =
file:/D:/projekte/maven-repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0
.b2.jar
urls[6] =
file:/D:/projekte/maven-repository/org/apache/maven/maven-error-diagnost
ics/2.0.6/maven-error-diagnostics-2.0.6.jar
urls[7] =
file:/D:/projekte/maven-repository/org/apache/maven/maven-plugin-registr
y/2.0.6/maven-plugin-registry-2.0.6.jar
urls[8] =
file:/D:/projekte/maven-repository/org/apache/maven/wagon/wagon-ssh-comm
on/1.0-beta-2/wagon-ssh-common-1.0-beta-2.jar
urls[9] =
file:/D:/projekte/maven-repository/org/apache/maven/plugin-tools/maven-p
lugin-tools-api/2.4.3/maven-plugin-tools-api-2.4.3.jar
urls[10] = file:/D:/projekte/maven-repository/jdom/jdom/1.0/jdom-1.0.jar
urls[11] =
file:/D:/projekte/maven-repository/com/thoughtworks/xstream/xstream/1.3/
xstream-1.3.jar
urls[12] =
file:/D:/projekte/maven-repository/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.
jar
urls[13] =
file:/D:/projekte/maven-repository/commons-lang/commons-lang/2.4/commons
-lang-2.4.jar

Realm ID: plexus.core



java.lang.NoSuchMethodError:
org.apache.maven.settings.Settings.getRuntimeInfo()Lorg/apache/maven/set
tings/RuntimeInfo;
at
org.apache.maven.plugins.help.EffectiveSettingsMojo.copySettings(Effecti
veSettingsMojo.java:189)
at
org.apache.maven.plugins.help.EffectiveSettingsMojo.execute(EffectiveSet
tingsMojo.java:89)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
nager.java:579)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Failures(DefaultLifecycleExecutor.java:498)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentFo
rProject(DefaultLifecycleExecutor.java:265)
...

By the way, the settings.xml contains this:
   profile
 idjboss/id
 activation
activeByDefault/
 /activation
 properties
dbdriveroracle.jdbc.driver.OracleDriver/dbdriver
dbusering_epa/dbuser
dbpasswording_epa/dbpassword
dburljdbc:oracle:thin:@deneb:1521:WLP/dburl
...
 /properties
   /profile
  /profiles

  activeProfiles
activeProfilejboss/activeProfile
  /activeProfiles

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



AW: from workaround to workaround 3

2008-09-05 Thread Wolfgang.Winter

  I looked into the source code of the plugin. It uses
  project.getActiveProfiles() and this method returns an empty list.
But
 I
  have a profile defined in settings which is set active with
  activeProfile. Why does the getActiveProfiles() method returns
zero?

 Try using the maven-help-plugin to find out some details. The goal
 help:active-profiles shows you which profiles are active.

 help:effective-pom and help:effective-settings show you the effective
 pom.xml resp. settings.xml file. Are your profiles defined there?

 You really don't need to write your own plugin just for filtering some
 resource-files.

 hth,
 - martin

 [Winter, Wolfgang] help:active-profiles executed on the parent pom:
 Active Profiles for Project 'net.atos.wlp:core:pom:0.0.1-SNAPSHOT':
 There are no active profiles.
 Active Profiles for Project
 'net.atos.wlp:plugin-setproperties:maven-plugin:0.0.1-SNAPSHOT':
 There are no active profiles.
 Active Profiles for Project
 'net.atos.wlp:core-database:jar:0.0.1-SNAPSHOT':
 There are no active profiles.
 ...

 Profiles are configured in the users/settings.xml so
help:effective-pom
 gives no information about profiles

 Execution of help:effective-settings: The workaround story continues:
 [ERROR] org.apache.maven.plugins.help.EffectiveSettingsMojo#execute()
 caused a linkage error (java.lang.NoSuchMethodError). Check the
realms:

 NOTE:
 Plugin realm is:
 /plugins/org.apache.maven.plugins:maven-help-plugin:[EMAIL 
 PROTECTED]/thread:main
 Container realm is: plexus.core

 Realm ID:
 /plugins/org.apache.maven.plugins:maven-help-plugin:[EMAIL 
 PROTECTED]/thread:main
 urls[0] =

file:/D:/projekte/maven-repository/org/apache/maven/plugins/maven-help-p
 lugin/2.1/maven-help-plugin-2.1.jar
 urls[1] =

file:/D:/projekte/maven-repository/org/codehaus/plexus/plexus-utils/1.5.
 6/plexus-utils-1.5.6.jar
 urls[2] =
 file:/D:/projekte/maven-repository/junit/junit/3.8.1/junit-3.8.1.jar
 urls[3] =

file:/D:/projekte/maven-repository/org/apache/maven/wagon/wagon-http-sha
 red/1.0-beta-2/wagon-http-shared-1.0-beta-2.jar
 urls[4] =

file:/D:/projekte/maven-repository/jtidy/jtidy/4aug2000r7-dev/jtidy-4aug
 2000r7-dev.jar
 urls[5] =

file:/D:/projekte/maven-repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0
 .b2.jar
 urls[6] =

file:/D:/projekte/maven-repository/org/apache/maven/maven-error-diagnost
 ics/2.0.6/maven-error-diagnostics-2.0.6.jar
 urls[7] =

file:/D:/projekte/maven-repository/org/apache/maven/maven-plugin-registr
 y/2.0.6/maven-plugin-registry-2.0.6.jar
 urls[8] =

file:/D:/projekte/maven-repository/org/apache/maven/wagon/wagon-ssh-comm
 on/1.0-beta-2/wagon-ssh-common-1.0-beta-2.jar
 urls[9] =

file:/D:/projekte/maven-repository/org/apache/maven/plugin-tools/maven-p
 lugin-tools-api/2.4.3/maven-plugin-tools-api-2.4.3.jar
 urls[10] =
file:/D:/projekte/maven-repository/jdom/jdom/1.0/jdom-1.0.jar
 urls[11] =

file:/D:/projekte/maven-repository/com/thoughtworks/xstream/xstream/1.3/
 xstream-1.3.jar
 urls[12] =

file:/D:/projekte/maven-repository/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.
 jar
 urls[13] =

file:/D:/projekte/maven-repository/commons-lang/commons-lang/2.4/commons
 -lang-2.4.jar

 Realm ID: plexus.core



 java.lang.NoSuchMethodError:

org.apache.maven.settings.Settings.getRuntimeInfo()Lorg/apache/maven/set
 tings/RuntimeInfo;
at

org.apache.maven.plugins.help.EffectiveSettingsMojo.copySettings(Effecti
 veSettingsMojo.java:189)
at

org.apache.maven.plugins.help.EffectiveSettingsMojo.execute(EffectiveSet
 tingsMojo.java:89)
at

org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
 nager.java:579)
at

org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
 Failures(DefaultLifecycleExecutor.java:498)
at

org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentFo
 rProject(DefaultLifecycleExecutor.java:265)
 ...

 By the way, the settings.xml contains this:
   profile
 idjboss/id
 activation
activeByDefault/


You need to change this to

  activeByDefaulttrue/activeByDefault

as

assert true.equalsIgnoreCase() == false;


 /activation
 properties
dbdriveroracle.jdbc.driver.OracleDriver/dbdriver
dbusering_epa/dbuser
dbpasswording_epa/dbpassword
dburljdbc:oracle:thin:@deneb:1521:WLP/dburl
...
 /properties
   /profile
  /profiles

  activeProfiles
activeProfilejboss/activeProfile
  /activeProfiles


[Winter, Wolfgang] okay, maybe. But I activated the profile explicitly
in the last line! Please excuse me when I criticize, but for me this is
bad design. This is not what a dumb user like me expects, regardless of
the setting of activeByDefault

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



AW: from workaround to workaround 1

2008-09-05 Thread Wolfgang.Winter
[Winter, Wolfgang] Hi all, thanks for your answers and sorry if I started this 
more general criticism about Maven. I am only a dumb user who just started 
setting up projects with Maven and it is really a great tool concerning project 
structuring and building. And Rainer is probably right when he states all you 
need is there but not easy to find.
But for me the problem is not only documentation but also a user-friendly 
design. Take the filtering example: For main/resources you have 
resourcesdirectorymain/resources ...
And for test/resources you have to say
testresourcesdirectorytest/resources ...
This is redundant information in the configuration! I am not used to have such 
redundancies. It is not what I (and probably many developers) expect. If you 
design this more obvious and intuitive lacks in documentation are much less 
bothering.


-Ursprüngliche Nachricht-
Von: Rainer Pruy [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 5. September 2008 10:40
An: Maven Users List
Betreff: Re: from workaround to workaround 1

After all,
I consider this classical paradigm of all you need is there, just obstructed 
by details all over.

Filtering did not work because resource does filtering for mainstream, but 
Wolfgang needed filtering for test.
If you know what to look for, this distinction is quite obvious from the docs.
But for the hurrying user trying to overcome an immediate problem, this is 
easily to be overlooked.

This is (implicit) reason to a number of complaints in maven related lists.
Due to the distributed and fine-grain nature of maven and it's plugins.
Information is spread across numerous locations without much interconnection 
of semantics.
For using a plugin, it is always implied the (potential) user is absolutely 
aware of any implications of the interaction of that
plugin with the rest of the maven runtime.


Probably we can keep that in mind when working on documentation:

- explicitly state the environment and effects of a plugin
- always encourage users/readers to get the overall picture first (or restate 
the essentials?)

May be that will improve user experience in the long.

As in most cases the problem is not some feature not being available,
but some wanted feature not being discoverable easily (esp. if it has to be 
constructed using several existing components).
And maven has a lot of bricks to build from. but also a lot of points to get 
something plugged to.
And is not (always) quite obvious to the ordinary user what effects are 
possible and what needs something new.

Regards
Rainer

Asgeir S. Nilsen schrieb:
 Wolfgang,
 For test resources you should use the testResources element, not the
 resources element.  The documentation is a bit shallow on this matter.
 
 Asgeir
 
 On Fri, Sep 5, 2008 at 08:46, [EMAIL PROTECTED] wrote:
 
 Hi,



 here is a small story about working with Maven. In my experience of 6
 months now this happened very often like this. Maven is very hard to manage,
 not intuitive and error messages are incomprehensible or misleading.



 The problem: We have 5 Maven projects with sub projects. For test classes,
 the database connection should be defined only once, we put it into the
 user's settings.xml. Now, how accessing the db-properties in test classes?

 First idea: Filtering! I created properties file in the test/resources
 directories and tried to filter db properties from the settings properties
 with



 resources

  resource

directorysrc/test/resources/directory

filteringtrue/filtering

  /resource

 /resources



 Nothing happens. Filtering seems to be possible only in main/resources.
 Then I ask myself why have I to define a directory when only one value is
 working? You could hard-code it. This is not intuitive!





 Freundliche Grüße / Kind regards



 Wolfgang Winter

 System Analyst



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



variables not resolved

2008-09-04 Thread Wolfgang.Winter
In my pom I declare a distributionManagement repository on a central server 
with url${remoteRepository}/url. This variable is defined in the 
settings.xml. The variable is resolved correctly on deploy goal.

In the same pom I declare the same repository for dependency checking, also 
with the variable ${remoteRepository}. However, on goal clean install, the 
variable is not resolved: 

[INFO] snapshot net.atos.wlp:parent-pom:0.0.1-SNAPSHOT: checking for updates 
from internal

[WARNING] repository metadata for: 'snapshot 
net.atos.wlp:parent-pom:0.0.1-SNAPSHOT' could not be retrieved from repository: 
internal due to an error: Unsupported Protocol: '': Cannot find wagon which 
supports the requested protocol: 

[INFO] Repository 'internal' will be blacklisted

 

Why is the same variable resolved in one case and in the other not?

 

I am running maven 2.0.8, Eclipse with Sonatype Maven plugin versions from 
17.7.2008

 

Here is a part of my pom:

  repositories

 repository

releases

   enabledtrue/enabled

   updatePolicydaily/updatePolicy

   checksumPolicywarn/checksumPolicy

/releases

snapshots

   enabledtrue/enabled

   updatePolicyalways/updatePolicy

   checksumPolicyfail/checksumPolicy

/snapshots

idinternal/id

nameftp Repository on deacr001/name

 url${remoteRepository}/url

layoutdefault/layout

 /repository

  /repositories

  

   distributionManagement

  repository

 idinternal/id

 url${remoteRepository}/url

  /repository

   /distributionManagement

 

   

 

 

Freundliche Grüße / Kind regards

 

Wolfgang Winter

System Analyst

 



ftp wagon not found

2008-09-04 Thread Wolfgang.Winter
Hi,

 

I don't know how I did get it but maven doesn't find the wagon ftp extension 
anymore:

 

[INFO] snapshot net.atos.wlp:parent-pom:0.0.1-SNAPSHOT: checking for updates 
from internal

[WARNING] repository metadata for: 'snapshot 
net.atos.wlp:parent-pom:0.0.1-SNAPSHOT' could not be retrieved from repository: 
internal due to an error: Unsupported Protocol: 'ftp': Cannot find wagon which 
supports the requested protocol: ftp

[INFO] Repository 'internal' will be blacklisted

 

 

 It had no problems since now with this. Wagon is in my local repository and it 
is declared in the pom:

 

  build

 extensions

extension

   groupIdorg.apache.maven.wagon/groupId

   artifactIdwagon-ftp/artifactId

   version1.0-beta-2/version

/extension

 /extensions

  /build

 

What can I do to help Maven find it? Or is the WARNING misleading and the error 
is something other? What is blacklisting a repository?

I am running maven 2.0.8, Eclipse with Sonatype Maven plugin versions from 
17.7.2008

 

 

Freundliche Grüße / Kind regards

 

Wolfgang Winter

System Analyst



repository definition

2008-09-04 Thread Wolfgang.Winter
Hi,

 

I don't know if this is an issue or a bug or both:

 

In my settings.xml I define an internal repository :

 

 repositories

repository

   idinternal/id

   nameRepository on deacr001/name

   urlfile://Y:/IPS/Produkt/maven-repository/internal/url

   layoutdefault/layout

/repository

 /repositories

 

In my pom I define a distributionManagement repository like this:

 

   distributionManagement

  repository

 idinternal/id

  /repository

   /distributionManagement

 

From intuitive feeling I would say: there is a reference to a defined 
repository in settings.xml, so Maven will find the missing attributes, but no 
it does not, it does like this:

 

Exception in thread main java.lang.NullPointerException

  at org.apache.maven.wagon.PathUtils.protocol(PathUtils.java:206)

  at 
org.apache.maven.wagon.repository.Repository.setUrl(Repository.java:121)

  at org.apache.maven.wagon.repository.Repository.init(Repository.java:74)

  at 
org.apache.maven.artifact.repository.DefaultArtifactRepository.init(DefaultArtifactRepository.java:75)

  at 
org.apache.maven.artifact.repository.DefaultArtifactRepositoryFactory.createDeploymentArtifactRepository(DefaultArtifactRepositoryFactory.java:84)

  at 
org.apache.maven.artifact.repository.DefaultArtifactRepositoryFactory.createDeploymentArtifactRepository(DefaultArtifactRepositoryFactory.java:65)

  at 
org.apache.maven.DefaultMavenTools.buildDeploymentArtifactRepository(DefaultMavenTools.java:73)

  at 
org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(DefaultMavenProjectBuilder.java:1031)

  at 
org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:812)

  at 
org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:504)

  at 
org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200)

  at org.apache.maven.DefaultMaven.build_aroundBody2(DefaultMaven.java:312)

  at 
org.apache.maven.DefaultMaven.build_aroundBody3$advice(DefaultMaven.java:447)

  at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:312)

  at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:282)

  at 
org.apache.maven.DefaultMaven.createReactorManager(DefaultMaven.java:103)

  at 
org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:160)

  at 
org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304)

  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)

  at 
org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:904)

  at 
org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder.java:304)

  at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)

  at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:176)

  at org.apache.maven.cli.MavenCli.main(MavenCli.java:63)

  at org.apache.maven.cli.MavenCli.main(MavenCli.java:52)

 

not very helpful this error message. It seems that I have to force my 
developers to define the URL two times in their settings.xml: First in the 
repositories/repository tag, second in the distributionManagement/repository 
tag. Not very convenient. 

 

My experience with Maven is: Don't use intuition

 

 

Freundliche Grüße / Kind regards

 

Wolfgang Winter

System Analyst

 

--

 

Atos Worldline GmbH

Pascalstraße 19

52076 Aachen

Germany

Phone:  +49 2408 148-0

Fax:  +49 2408 148-204

mailto: [EMAIL PROTECTED] BLOCKED::mailto:[EMAIL PROTECTED] 

http://www.atosworldline.de

 

Geschäftsführer: Erik Munk Koefoed

Aufsichtsratsvorsitzender: Dominique Illien

Sitz der Gesellschaft: Frankfurt/Main

Handelsregister: Frankfurt/Main HRB 58 268

 

Atos Worldline is an Atos Origin company: www.atosorigin.com

--

 

This e-mail is privileged and may contain confidential information intended 
only for the person(s) named above. If you receive this e-mail in error, please 
notify the sender immediately by telephone or return e-mail. 
Although the sender endeavours to maintain a computer virus free network, the 
sender does not warrant that this transmission is virus-free and will not be 
liable for any damages resulting from any virus transmitted. 

 



AW: repository definition

2008-09-04 Thread Wolfgang.Winter


 

 From intuitive feeling I would say: there is a reference to a defined
repository in settings.xml, so Maven will find the missing attributes,
but no it does not, it does like this:
...
 not very helpful this error message. It seems that I have to force my
developers to define the URL two times in their settings.xml: First in
the repositories/repository tag, second in the
distributionManagement/repository tag. Not very convenient.

I agree there should be a better error message and not a NPE.

However the urls for repositories and distribution management are
usually different-- file:// urls may be the only time they could be
shared.  For example, you may pull from a repository as http:// , but
publish to it with dav:http:// or scp:// .

[Winter, Wolfgang] ... or pulling and publishing with ftp what we did
first and where the urls are also equal. But we discarded ftp with
ftp-wagon because it was so buggy and unreliable:
- sometimes Maven does not find the wagon-ftp plugin
- sometimes 'connection reset by peer' error
- sometimes only half of a file is published without any error message
- sometimes the deployed file is corrupted without any error message
This must have to do s.th. with Maven because with other FTP client we
have no problems.

Further, distributionManagement is often set once, up in an
organization level pom, and repositories can go in a shared
conf/settings.xml, neither of which developers need to maintain.

[Winter, Wolfgang] that's what I try to do: I have the
distributionManagement in an organisation pom with a variable for the
url which is set in settings and the repositories in settings. That's
why the developers seem to have to define the url two times in their
settings.

HTH,
-- 
Wendy


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