Surefire - Copying test files to target/test-classes

2008-06-06 Thread saw303

Hi everyone

I have a small problem executing my JUnit test which depend on some test
files (xml and plaintext documents). Whenever I run mvn test surefire
compiles all JUnit Testclasses to target/test-classes but my test files
don´t get copied to target/test-classes and therefore my JUnit tests fail.

Now here is my question. How can I get maven2 to copy also my *.xml/*.txt to
target/test-classes?
Here is a snippet from my pom.xml. I have tried to use
additionalClasspathElements but it did not work up to now.

plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-surefire-plugin/artifactId
configuration
additionalClasspathElements
   
additionalClasspathElementC:\data\svn_pws\aktentemplate\trunk\server\core\src\test\java\de\corag\bpm\recordmgmt\domain\metadata\IvvSampleMetaData01Test.xml/additionalClasspathElement
   
additionalClasspathElementC:\data\svn_pws\aktentemplate\trunk\server\core\src\test\java\de\corag\bpm\recordmgmt\validation\java2xml\ivv-sample-01.xml/additionalClasspathElement
   
additionalClasspathElementC:\data\svn_pws\aktentemplate\trunk\server\core\src\test\java\de\corag\bpm\recordmgmt\validation\java2xml\IvvSample01Test_MetaData.xml/additionalClasspathElement
/additionalClasspathElements
/configuration
/plugin


Best regards,
Silvio
-- 
View this message in context: 
http://www.nabble.com/Surefire---Copying-test-files-to-target-test-classes-tp17685305p17685305.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: Calling ant tasks from maven pom

2008-06-06 Thread Tim Kettler

Niranjan Deshpande schrieb:

Tim i indeed wht u suggested
tasks
 ant antfile/
/tasks

but the build xmls just dont seem to to reached..


It's working for me with this test project:

  .
  |-- pom.xml
  `-- src
  `-- main
  |-- antscripts
  |   |-- antscript1.xml
  |   `-- antscript2.xml
  `-- java


relevant snippet from pom.xml:

  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-antrun-plugin/artifactId
executions
  execution
idhello-from-ant/id
phasegenerate-sources/phase
goals
  goalrun/goal
/goals
  /execution
/executions
configuration
  tasks
ant antfile=src/main/antscripts/antscript1.xml 
target=printhello/
ant antfile=src/main/antscripts/antscript2.xml 
target=printhello/

  /tasks
/configuration
  /plugin


When invoking maven with a phase liek 'mvn package' tha ant tasks get 
executed during the spcified 'generate-sources' phase. And when invoking 
the antrun-plugin directly via 'mvn antrun:run' the scripts get called, too.


As you see I used the default configuration/ section outside of the 
execution/. If you don't need to invoke the ant scripts standalone, I 
would move the configuration back inside the defined execution.


-Tim


On Thu, Jun 5, 2008 at 6:53 PM, Tim Kettler [EMAIL PROTECTED] wrote:


Hi, (again :-) )

Niranjan Deshpande schrieb:

 I am trying to execute ant tasks from maven's pom as below.


plugin

artifactIdmaven-antrun-plugin/artifactId

version1.1/version

executions

execution

phasegenerate-sources/phase

configuration

tasks

exec executable=AppWeb/src/main/scripts/generate.sh

failonerror=true

/exec

/tasks

/configuration

goals

goalrun/goal

/goals

/execution

/executions

/plugin
The generate.sh file has 10 xml files that i want to run as
ant -buildfile -filename

for the time being I am running the plugin as maven antrun:run, just to
find
whether the .sh file is called or not. But i am geting this:
[INFO] [antrun:run]
[INFO] Executing tasks
[INFO] Executed tasks

I have added a ECHO in the .sh file, but i see none at the output



First to answer your concrete problem: When you call a plugin goal directly
from the commandline it uses the common configuration under
plugin/configuration/ as there may be more than one execution defined
and there is no sane way to decide which ones configuration to use.

Secondly, just to recap that I understood correctly what you are doing:

You have a maven build from which you want to call a shell script which in
turn triggers a few ant builds?!?

Cant you just configure multiple calls of the ant/ task [1] in your
antrun-plugin configuration and throw away the shell script completely?

-Tim

[1] http://ant.apache.org/manual/CoreTasks/ant.html

-
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: Simple question - but totally frustrated - best way to define internal repo - but easily not use this repo when not at work?

2008-06-06 Thread Jan Fredrik Wedén
This might be easier in the short run, but consider what happens when
you do a release - your repo definitions are forever stuck in the
released POM and so would force you to keep running your internal repo
at that specific address forever (or force users to specify some
mirror settings if the location changes). This could be mitigated by
infrastructure, DNS mappings etc but the recommended practice is to
keep all repo definitions in your settings, together with any mirror
settings you may have so you are completely free to change your
infrastructure without affecting released artifacts.

On Fri, Jun 6, 2008 at 7:40 AM, Rick [EMAIL PROTECTED] wrote:
 I'm still a bit confused though... can't I define my repository in a
 parent.pom ? Why isn't this the preferred approach? Would seem to make sense
 to me - users check out a parent project from cvs. Run mvn install, put the
 parent pom in their repo. All new projects use this parent pom definition
 where the company's internal repo is definied.

 Wouldn't this be easier?


 On Thu, Jun 5, 2008 at 11:43 PM, Wayne Fay [EMAIL PROTECTED] wrote:

 The easiest would be to simply rename settings.xml to settings.x when
 you get home. This assumes that you don't have any special settings
 for your projects. But this would disable the artifactory repo. Or if
 you're on an operating system with symbolic links, you could adjust
 the link to settings.xml when you change locations.

 Another approach would involve creating copies of mvn.bat and
 settings.xml and calling mvn-copy when you're home. You would also set
 mvn-copy.bat up to append -s /path/to/settings-copy.xml to all calls
 to mvn.

 Wayne

 On Thu, Jun 5, 2008 at 10:06 PM, Rick [EMAIL PROTECTED] wrote:
  I'm totally confused and could use some help...
 
  I have an internal company repo setup fine. Currently, following the
  artifcatory docs, I defined this repo in my mavenhome/conf/settings.xml
 file
  such as:
 
 profile
 idacme-company/id
 repositories
 repository
 idcentral/id
 urlhttp://urlip:8081/artifactory/repo/url
 snapshots
 enabledfalse/enabled
 /snapshots
 /repository
 
 
  I can then set this profile to be active in the settings.xml file as well
  and all works fine.
 
  The problem is when I'm at home using this laptop I don't want to use
 this
  profile! I just want plain jane vanilla iblio repo.
 
  I'm confused how to set up things to get what I want - projects using our
  company parent pom using the repositories as defined above, and any other
  projects to not use the profile as above.
 
  What I was 'thinking' I could so is just set up the repository definition
 in
  my parent proejct pom.. but that didn't seem to work at all. To me this
  makes the most sense as users wouldn't even have to define anything in
 their
  settings.xml file. I see no examples of this however and can't seem to
 get
  ti to work. Assuming I keep this profile definition in my (and
 unfortunately
  the whole team's local settings.xml file) how do I set up parent company
  profile to use it? If I keep it alawys active then it's always active
 even
  when I'm not at work which seems to be a pain.
 
  Even if this kind of info shouldn't be in a parent pom, and should be in
 the
  settings.xml file, how do I then easily set things up so that I can do
 mvn
  install when I'm not at work and have it NOT try to connect to the
  acme-company profile? I'd prefer not to have a pass in a profile argument
 on
  the command line, but I suppose if I have to, I'll do it.
 
  I'm thinking this is a common situation so I must be totally doing
 something
  wrong,
 
  --
  Rick
 

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




 --
 Rick




-- 
- Jan Fredrik Wedén

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



Re: Surefire - Copying test files to target/test-classes

2008-06-06 Thread saw303

Hi Tim,


Tim Kettler wrote:
 
 Just put the files under src/test/resources and maven will copy them to 
 the correct destination, exactly like it's doing it for production files 
 under src/main/resources.
 

Thank you very much. This solved my problem.

Best regards
Silvio

-- 
View this message in context: 
http://www.nabble.com/Surefire---Copying-test-files-to-target-test-classes-tp17685305p17685989.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Build for multiple invocation

2008-06-06 Thread Timothy Reilly
I wanted to see if others have addressed this requirement before and
what approaches they have taken:
 
We have certain artifacts which need to be built for multiple platforms.
For example, we may have j2ee artifacts that get deployed to Websphere 6
and Websphere 6.1. We use profiles to setup the right build properties
for each and the resulting artifact has a qualifer like MyTime-1.0-WAS60
or MyTime-1.0-WAS61. The next thing we want to start doing is automating
the build process for these multi platform builds.
 
I think we have a few options for this, 
 
1) maven is executed currently by a provisioning tool which currently
pulls from our scm(1), kicks off maven and installs the artifacts to the
appropriate application server(s). The tool has some workflow
capabilities so we could just build a workflow around the build request
process and let this tool run maven the required number of times.
 
2) I think it would be a lot better if we declaratively provided this
information to maven in a pom file. To do this we could create a new
project aggregator pom. This new project's purpose would be to run
multiple invocations of the build using perhaps maven invoker plugin.
This seems pretty straight forward but the only problem is that we would
need to incorporate this new project into the build process and perhaps
make sure every project (a hundred plus) has one of these so called
here's what and how many times to build projects.
 
3) Finally, what I think is the best but harder to implement is to
somehow use the existing project's parent pom and configure it to run
the required number of builds with the various profiles activated. This
would probably be some sort of plugin, plus custom lifecycle and
extension. Has anyone done this?

What other ways are people address something like this? Is there a
maven way to handle it?
Any feedback appreciated.
 

 
 
 
(1) Our scm has no maven scm provider so we need the other tools help

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



Re: Build for multiple invocation

2008-06-06 Thread Johan Eltes
What about having a maven project for each platform using the same  
parent pom, rather than architecting the solution on profiles?


/Johan



6 jun 2008 kl. 09.47 Timothy Reilly [EMAIL PROTECTED] skrev:


I wanted to see if others have addressed this requirement before and
what approaches they have taken:

We have certain artifacts which need to be built for multiple  
platforms.
For example, we may have j2ee artifacts that get deployed to  
Websphere 6

and Websphere 6.1. We use profiles to setup the right build properties
for each and the resulting artifact has a qualifer like MyTime-1.0- 
WAS60
or MyTime-1.0-WAS61. The next thing we want to start doing is  
automating

the build process for these multi platform builds.

I think we have a few options for this,

1) maven is executed currently by a provisioning tool which currently
pulls from our scm(1), kicks off maven and installs the artifacts to  
the

appropriate application server(s). The tool has some workflow
capabilities so we could just build a workflow around the build  
request

process and let this tool run maven the required number of times.

2) I think it would be a lot better if we declaratively provided this
information to maven in a pom file. To do this we could create a new
project aggregator pom. This new project's purpose would be to run
multiple invocations of the build using perhaps maven invoker plugin.
This seems pretty straight forward but the only problem is that we  
would
need to incorporate this new project into the build process and  
perhaps

make sure every project (a hundred plus) has one of these so called
here's what and how many times to build projects.

3) Finally, what I think is the best but harder to implement is to
somehow use the existing project's parent pom and configure it to run
the required number of builds with the various profiles activated.  
This

would probably be some sort of plugin, plus custom lifecycle and
extension. Has anyone done this?

What other ways are people address something like this? Is there a
maven way to handle it?
Any feedback appreciated.





(1) Our scm has no maven scm provider so we need the other tools help

-
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: compile jaxb2 annotated files with maven2

2008-06-06 Thread Javier Diaz
We use jaxb and I must confess that was not easy to set up our 
environment. Our pom has the dependencies listed below. Let me know if 
that works for you.


Regards,

Javier

   dependency
   groupIdjavax.xml.bind/groupId
   artifactIdjaxb-api/artifactId
   version2.1/version
   scopecompile/scope
   /dependency
   !-- Core jaxb classes --
   dependency
   groupIdcom.sun.xml.bind/groupId
   artifactIdjaxb-impl/artifactId
   version2.0.2/version
   /dependency
   !-- Needed for schemagen --
   dependency
   groupIdcom.sun.xml.bind/groupId
   artifactIdjaxb-xjc/artifactId
   version2.0.2/version
   /dependency

   !-- Needed for schemagen --
   dependency
   groupIdjavax.activation/groupId
   artifactIdactivation/artifactId
   version1.1/version
   /dependency

   !-- Needed for schemagen --
   dependency
   groupIdjavax.xml.bind/groupId
   artifactIdjsr173_api/artifactId
   version1.0/version
   /dependency


Wayne Fay wrote:

Have you tried adding the jaxb2 jars to the list of dependencies with
scope compile? Did this not work? What error message(s) did you
receive?

I don't know much about jaxb2 but if you post more details on what
you've tried and what error(s) you've encountered, perhaps someone can
give you the guidance you are looking for.

Wayne

On Tue, Jun 3, 2008 at 5:50 AM, Trasca Virgil [EMAIL PROTECTED] wrote:
  

Hello,

  I am in the process of migrating from Ant to Maven2. I am stucked when I try 
to mvn compile because in some source files I use jaxb2 annotations and of 
course I need jaxb2 jars for building. I am not generating and xsd or any java 
sources with jaxb2 only compile some annotated src files. In ANT the only thing 
I do is that I am compiling my sources with jaxb2 in the classpath. How can I 
do this in Maven2? Do you have some links with documentation?

 Thank you,
Virgil
DocumentBurster,
http://java-hobby.blogspot.com/




-
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: Calling ant tasks from maven pom

2008-06-06 Thread Niranjan Deshpande
Tim thanks

I am finally able to reach the ant build file. I have moved the
configuration back into the exections as said by you, as I want the
pluging to run when my code is compiled, and dont want to run it stand
alone.

but the problem is the plugin does not run when i say mvn install or mvn
compile.

I have  phasegenerate-sources/phase right now
the plugin does not run even if i change this to compile.

My ant task is this: it takes my application's the compiled class, uses the
ant's javadoc utility
to generate a .property file from the javadocs in the class.

Hpe you got this.

Please help me on how to run the task on its own when i say mvn install.

The plugin runs standalone only when I say mvn antrun:run



On 6/6/08, Tim Kettler [EMAIL PROTECTED] wrote:

 Niranjan Deshpande schrieb:

 Tim i indeed wht u suggested
 tasks
  ant antfile/
 /tasks

 but the build xmls just dont seem to to reached..


 It's working for me with this test project:

  .
  |-- pom.xml
  `-- src
  `-- main
  |-- antscripts
  |   |-- antscript1.xml
  |   `-- antscript2.xml
  `-- java


 relevant snippet from pom.xml:

  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-antrun-plugin/artifactId
executions
  execution
idhello-from-ant/id
phasegenerate-sources/phase
goals
  goalrun/goal
/goals
  /execution
/executions
configuration
  tasks
ant antfile=src/main/antscripts/antscript1.xml
 target=printhello/
ant antfile=src/main/antscripts/antscript2.xml
 target=printhello/
  /tasks
/configuration
  /plugin


 When invoking maven with a phase liek 'mvn package' tha ant tasks get
 executed during the spcified 'generate-sources' phase. And when invoking the
 antrun-plugin directly via 'mvn antrun:run' the scripts get called, too.

 As you see I used the default configuration/ section outside of the
 execution/. If you don't need to invoke the ant scripts standalone, I
 would move the configuration back inside the defined execution.

 -Tim

 On Thu, Jun 5, 2008 at 6:53 PM, Tim Kettler [EMAIL PROTECTED] wrote:

 Hi, (again :-) )

 Niranjan Deshpande schrieb:

  I am trying to execute ant tasks from maven's pom as below.


 plugin

 artifactIdmaven-antrun-plugin/artifactId

 version1.1/version

 executions

 execution

 phasegenerate-sources/phase

 configuration

 tasks

 exec executable=AppWeb/src/main/scripts/generate.sh

 failonerror=true

 /exec

 /tasks

 /configuration

 goals

 goalrun/goal

 /goals

 /execution

 /executions

 /plugin
 The generate.sh file has 10 xml files that i want to run as
 ant -buildfile -filename

 for the time being I am running the plugin as maven antrun:run, just to
 find
 whether the .sh file is called or not. But i am geting this:
 [INFO] [antrun:run]
 [INFO] Executing tasks
 [INFO] Executed tasks

 I have added a ECHO in the .sh file, but i see none at the output


 First to answer your concrete problem: When you call a plugin goal
 directly
 from the commandline it uses the common configuration under
 plugin/configuration/ as there may be more than one execution defined
 and there is no sane way to decide which ones configuration to use.

 Secondly, just to recap that I understood correctly what you are doing:

 You have a maven build from which you want to call a shell script which
 in
 turn triggers a few ant builds?!?

 Cant you just configure multiple calls of the ant/ task [1] in your
 antrun-plugin configuration and throw away the shell script completely?

 -Tim

 [1] http://ant.apache.org/manual/CoreTasks/ant.html

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




-- 
Regards,
Niranjan Deshpande

Shut yourself from the world and create the reality you want


RE: HowTo: Create new Dependency Type?

2008-06-06 Thread nicklist
Hi,

Back in the days there used to be a piece of information on specifying a new 
package on the maven web site. I found a backup at [1]. Also at [2] there is 
issue with patch which adds a new packaging. So maybe you have to patch a 
custom maven installation to provide your package type.

Hth,

[1] 
http://www.propellors.net/maven/site/guides/introduction/introduction-to-the-lifecycle.html
[2] 
https://jira.codehaus.org/browse/MNG-3343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Nick Stolwijk
~Java Developer~

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



-Original Message-
From: Andrew Madu [mailto:[EMAIL PROTECTED]
Sent: Fri 6/6/2008 10:43
To: users@maven.apache.org
Subject: HowTo: Create new Dependency Type?
 
Hi,
I am in the process of re-architecting a project using the Spring 
framework on a Jboss5 AS and need to create a new dependency of type 
'spring', packagingspring/packaging.

How do I go about doing this?

My platform details are as follows:
Maven version: 2.0.9
JDK: 1.6.0_06
OS: Win XP SP1

Many thanks in advance

-- 
Know Thyself

Andrew


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




Re: checkstyle problem with maven : Unable to instantiate TreeWalker

2008-06-06 Thread Dennis Lundberg
Are you using your own custom checks or provide a custom 
packagenames.xml file? In that case see this page:


http://maven.apache.org/plugins/maven-checkstyle-plugin/examples/custom-developed-checkstyle.html

Julien Simon wrote:

Thanks for the answer. So, I tried maven-checkstyle-plugin 2.2 and it didn't
work either, but that's a good beginning to have the correct plugin
version...
In the xml checkstyle configuration file where modules are defined, i tried
to change
module name=TreeWalker by module
name=com.puppycrawl.tools.checkstyle.TreeWalkerand it now works. I don't
really understand why we have to specify the fully qualified name of this
class, because it works fine when not using maven.




On Wed, Jun 4, 2008 at 11:47 PM, Dennis Lundberg [EMAIL PROTECTED] wrote:


The Checkstyle plugin version 2.1 uses Checkstyle 4.1. So you can't use
stuff from Checkstyle 4.3 in your Checkstyle configuration.

Version 2.2 of the plugin, which is being released as we speak, uses
Checkstyle 4.4. Start by giving that version a try.


Julien Simon wrote:


Hi,
I'm trying  to integrate a checkstyle report in a maven project, but I'm
facing a problem. The checkstyle report is based on a custom checkstyle
check module I developed.
I'm using maven 2.0.9, maven-checkstyle-plugin 2.1, and checkstyle 4.3

When I execute mvn checkstyle:checkstyle or mvn site, I get the following
exception. I don't really understand why the TreeWalker can't be
instantiated.

Any help would be great!




[ERROR] BUILD ERROR
[INFO]

[INFO] An error has occurred in Checkstyle report generation.

Embedded error: Failed during checkstyle configuration
Unable to instantiate TreeWalkerCheck
[INFO]

[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: An error has
occurred in Checkstyle report generation.
   at

org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583)
   at

org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
   at

org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
   at

org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
   at

org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
   at

org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
   at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
   at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
   at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
   at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:615)
   at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
   at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
   at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
   at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: An error has
occurred in Checkstyle report generation.
   at

org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:79)
   at

org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
   at

org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
   ... 16 more
Caused by: org.apache.maven.reporting.MavenReportException: Failed during
checkstyle configuration
   at

org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(CheckstyleReport.java:488)
   at

org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:98)
   at

org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:73)
   ... 18 more
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: cannot
initialize module TreeWalker - Unable to instantiate TreeWalker
   at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:165)
   at

com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:209)
   at

org.apache.maven.plugin.checkstyle.CheckstyleReport.executeCheckstyle(CheckstyleReport.java:723)
   at

org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(CheckstyleReport.java:484)
   ... 20 more
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable
to instantiate TreeWalker
   at

com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObjectFactory.java:152)
   at 

Re: [m2] help getting site scp configuration

2008-06-06 Thread Dennis Lundberg
I think you need to accept the fingerprint for the server once. Try 
connecting to the server from the command line first:


  plink [EMAIL PROTECTED]

Mick Knutson wrote:

I keep getting this error:
*[INFO] [site:deploy]
The authenticity of host '208.96.48.200' can't be established.
RSA key fingerprint is 15:6f:d1:60:05:21:dd:43:4b:4d:d6:9e:4f:3b:aa:e4.
Are you sure you wan*t to continue connecting? (yes/no):

I have create a ppk and key from putty, and have added this to my pom.xml

site
idsite.internal/id
namesite.internal/name
url${siteUrl}/url
/site

And here is my settings.xml

server
idsite.internal/id
usernameadmin/username
password[password]/password
filePermissions664/filePermissions
directoryPermissions755/directoryPermissions
privateKeyc:/ssh/internal-private.ppk/privateKey
configuration
sshExecutableplink/sshExecutable
scpExecutablepscp/scpExecutable
/configuration
/server

...

siteUrlscp://208.0.50.1/:/var/www/html/site/siteUrl

I have spent all day on this, and can't find anything that fixes this issue.






--
Dennis Lundberg

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



Re: [m2] Error getting reports from the plugin 'org.apache.maven.plugins:maven-project-info-reports-plugin'

2008-06-06 Thread Dennis Lundberg

Specify a release version (2.0.1) for project-info-reports-plugin.

Mick Knutson wrote:

Yes, but I do not see a described resolution.

On Thu, Jun 5, 2008 at 9:34 AM, Tim Kettler [EMAIL PROTECTED] wrote:


Hi,

Mick Knutson schrieb:


I have the following for my reports declaration:
...

Then I noticed Checkstyle 2.2 got downloaded this morning on my build (mvn
site actually), but then I got this failure:


[...]

Could this be related to this [1] recent discussion on the dev list. I
haven't followed the discussion closely, but skimming through your log it's
about the same topic: site plugin, project-info-report and snapshots

-Tim

[1]
http://www.nabble.com/Multiple-concurrent-SNAPSHOTs-for-MSITE-and-MPIR-isn%27t-working-to17607858.html

-
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: HowTo: Create new Dependency Type?

2008-06-06 Thread Andrew Madu

Many thanks for the links, Nick,

Unfortunately the second link does not work. Could you possibly resend?

Many thanks.

--
Regards

Andrew



Hi,

Back in the days there used to be a piece of information on specifying a new 
package on the maven web site. I found a backup at [1]. Also at [2] there is 
issue with patch which adds a new packaging. So maybe you have to patch a 
custom maven installation to provide your package type.

Hth,

[1] 
http://www.propellors.net/maven/site/guides/introduction/introduction-to-the-lifecycle.html
[2] 
https://jira.codehaus.org/browse/MNG-3343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Nick Stolwijk
~Java Developer~

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



-Original Message-
From: Andrew Madu [mailto:[EMAIL PROTECTED]
Sent: Fri 6/6/2008 10:43
To: users@maven.apache.org
Subject: HowTo: Create new Dependency Type?
 
Hi,
I am in the process of re-architecting a project using the Spring 
framework on a Jboss5 AS and need to create a new dependency of type 
'spring', packagingspring/packaging.


How do I go about doing this?

My platform details are as follows:
Maven version: 2.0.9
JDK: 1.6.0_06
OS: Win XP SP1

Many thanks in advance

  




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



Ant mojo attach an artifact

2008-06-06 Thread Bengali Bengali
Hi,

i'd like to know if it's possible to attach an artifact from an Ant mojo. I
have seen archived posts
in the mailing list that suggest usage of the build helper mojo.
But, is it possible to use the build helper from my Ant mojo ? I mean from
my understanding, the build helper
plugin has to be executed from the pom that uses my Ant mojo but not from my
Ant mojo itself ?

How could i know the name of the project that executes my plugin in the
pom.xml of my Ant mojo ? I
need it to find out what artifact filename should be used. The build
helper plugin has to be used in conjunction
with the AntRun plugin but not from an Ant Mojo, right ?

Is it possible to attach an artifact to an ant mojo ?

  plugin
groupIdorg.codehaus.mojo/groupId
artifactIdbuild-helper-maven-plugin/artifactId

version1.1/version
executions
  execution
idattach-artifacts/id
phasepackage/phase
goals

  goalattach-artifact/goal
/goals
configuration
  artifacts
artifact
  fileHow could i know if executed in my ant mojo /file
  typeextension of your file /type
  classifieroptional/classifier
/artifact
...
  /artifacts

/configuration
  /execution
/executions
  /plugin


need help in ant's javadoc task (from maven)

2008-06-06 Thread Niranjan Deshpande
I am trying to generate a .properties file using javadocs in a java source
file, and i am using ant's javadoc task to do this.

but i am getting this error when i run the antrun plugin

generate.appcodes:
  [javadoc] Generating Javadoc
  [javadoc] Javadoc execution
  [javadoc] javadoc: Cannot find doclet class
com.company.app.util.doclet.AppCodesDoclet
  [javadoc] 1 error

Please help. Also can anyone tell me what the path and pathelement
elements are for? How are the paths relative to?

My ant build file is:


project name=generate.appcodes basedir=.. default=all

 path id=tools.classpath
  pathelement path=build/lib/tools.jar /
  pathelement path=lib/xerces.jar /
  pathelement path=WebContent/WEB-INF/lib/log4j-1.2.9.jar /
 /path

 target name=all depends=generate.appcodes/

 target name=generate.appcodes

  delete file=src/main/resources/appcodes.properties /

  javadoc
sourcefiles=src/main/com/company/app/shared/security/AppCodes.java
 failonerror=yes

   doclet name=com.company.app.util.doclet.AppCodesDoclet
 path=${tools.classpath}
param name=-outputfile
value=../src/main/resources/appcodes.properties /
param name=-sourcepath value=src/main/resources /
param name=-command value=properties /
   /doclet

  /javadoc

  mkdir dir=target/WEB-INF/classes/resources /
  copy file=src/main/resources/appcodes.properties
 todir=target/WEB-INF/classes/resources /

 /target

/project




-- 
Regards,
Niranjan Deshpande

Shut yourself from the world and create the reality you want


Re: HowTo: Create new Dependency Type?

2008-06-06 Thread Andrew Madu

Hi,
I'm currently editing the PLEXUS\components file:

[code]
   component
 roleorg.apache.maven.lifecycle.mapping.LifecycleMapping/role
 role-hintspring/role-hint
 
implementationorg.apache.maven.lifecycle.mapping.DefaultLifecycleMapping/implementation

 configuration
   lifecycles
 lifecycle
   iddefault/id
   phases
 
process-resourcesorg.apache.maven.plugins:maven-resources-plugin:resources/process-resources
 
compileorg.apache.maven.plugins:maven-compiler-plugin:compile/compile
 
process-test-resourcesorg.apache.maven.plugins:maven-resources-plugin:testResources/process-test-resources
 
test-compileorg.apache.maven.plugins:maven-compiler-plugin:testCompile/test-compile
 
testorg.apache.maven.plugins:maven-surefire-plugin:test/test
 
*packageorg.apache.maven.plugins:maven-jar-plugin:jar/package*
 
installorg.apache.maven.plugins:maven-install-plugin:install/install
 
deployorg.apache.maven.plugins:maven-deploy-plugin:deploy/deploy

   /phases
 /lifecycle
   /lifecycles
 /configuration
   /component
[/code]

and in regards to the package/ section what I wish to do is to specify 
a package returned with a file extension of .spring. I have tried to 
specify org.apache.maven.plugins:maven-jar-plugin:spring but of course 
an 'plugin does not exist' error is then generated. How do I specify 
this in the document?


Many thanks in advance.

--
Regards

Andrew


Hi,

Back in the days there used to be a piece of information on specifying a new 
package on the maven web site. I found a backup at [1]. Also at [2] there is 
issue with patch which adds a new packaging. So maybe you have to patch a 
custom maven installation to provide your package type.

Hth,

[1] 
http://www.propellors.net/maven/site/guides/introduction/introduction-to-the-lifecycle.html
[2] 
https://jira.codehaus.org/browse/MNG-3343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Nick Stolwijk
~Java Developer~

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



-Original Message-
From: Andrew Madu [mailto:[EMAIL PROTECTED]
Sent: Fri 6/6/2008 10:43
To: users@maven.apache.org
Subject: HowTo: Create new Dependency Type?
 
Hi,
I am in the process of re-architecting a project using the Spring 
framework on a Jboss5 AS and need to create a new dependency of type 
'spring', packagingspring/packaging.


How do I go about doing this?

My platform details are as follows:
Maven version: 2.0.9
JDK: 1.6.0_06
OS: Win XP SP1

Many thanks in advance

  





RE: HowTo: Create new Dependency Type?

2008-06-06 Thread nicklist
It also works as a shorter version:

https://jira.codehaus.org/browse/MNG-3343

Hth,

Nick Stolwijk
~Java Developer~

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



-Original Message-
From: Andrew Madu [mailto:[EMAIL PROTECTED]
Sent: Fri 6/6/2008 14:22
To: Maven Users List
Subject: Re: HowTo: Create new Dependency Type?
 
Many thanks for the links, Nick,

Unfortunately the second link does not work. Could you possibly resend?

Many thanks.

-- 
Regards

Andrew


 Hi,

 Back in the days there used to be a piece of information on specifying a new 
 package on the maven web site. I found a backup at [1]. Also at [2] there is 
 issue with patch which adds a new packaging. So maybe you have to patch a 
 custom maven installation to provide your package type.

 Hth,

 [1] 
 http://www.propellors.net/maven/site/guides/introduction/introduction-to-the-lifecycle.html
 [2] 
 https://jira.codehaus.org/browse/MNG-3343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

 Nick Stolwijk
 ~Java Developer~

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



 -Original Message-
 From: Andrew Madu [mailto:[EMAIL PROTECTED]
 Sent: Fri 6/6/2008 10:43
 To: users@maven.apache.org
 Subject: HowTo: Create new Dependency Type?
  
 Hi,
 I am in the process of re-architecting a project using the Spring 
 framework on a Jboss5 AS and need to create a new dependency of type 
 'spring', packagingspring/packaging.

 How do I go about doing this?

 My platform details are as follows:
 Maven version: 2.0.9
 JDK: 1.6.0_06
 OS: Win XP SP1

 Many thanks in advance

   



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




RE: HowTo: Create new Dependency Type?

2008-06-06 Thread nicklist
What you're seeing there is which plugin with which goal to run. As far as I 
know there is no plugin which creates such .spring files. Are they any 
special files?

One solution I see is to specify the assembly plugin there and provide a 
default configuration in your company's parent pom. (Sort like Maven does, the 
default configuration in the super pom)

If it involves something more then just assembling some files I think you need 
to create your own plugin.

Could you please inform us a little more about those .spring files? What are 
they? How should they be created? What do they contain?

With regards,

Nick Stolwijk
~Java Developer~

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



-Original Message-
From: Andrew Madu [mailto:[EMAIL PROTECTED]
Sent: Fri 6/6/2008 14:59
To: Maven Users List
Subject: Re: HowTo: Create new Dependency Type?
 
Hi,
I'm currently editing the PLEXUS\components file:

[code]
component
  roleorg.apache.maven.lifecycle.mapping.LifecycleMapping/role
  role-hintspring/role-hint
  
implementationorg.apache.maven.lifecycle.mapping.DefaultLifecycleMapping/implementation
  configuration
lifecycles
  lifecycle
iddefault/id
phases
  
process-resourcesorg.apache.maven.plugins:maven-resources-plugin:resources/process-resources
  
compileorg.apache.maven.plugins:maven-compiler-plugin:compile/compile
  
process-test-resourcesorg.apache.maven.plugins:maven-resources-plugin:testResources/process-test-resources
  
test-compileorg.apache.maven.plugins:maven-compiler-plugin:testCompile/test-compile
  
testorg.apache.maven.plugins:maven-surefire-plugin:test/test
  
*packageorg.apache.maven.plugins:maven-jar-plugin:jar/package*
  
installorg.apache.maven.plugins:maven-install-plugin:install/install
  
deployorg.apache.maven.plugins:maven-deploy-plugin:deploy/deploy
/phases
  /lifecycle
/lifecycles
  /configuration
/component
[/code]

and in regards to the package/ section what I wish to do is to specify 
a package returned with a file extension of .spring. I have tried to 
specify org.apache.maven.plugins:maven-jar-plugin:spring but of course 
an 'plugin does not exist' error is then generated. How do I specify 
this in the document?

Many thanks in advance.

-- 
Regards

Andrew

 Hi,

 Back in the days there used to be a piece of information on specifying a new 
 package on the maven web site. I found a backup at [1]. Also at [2] there is 
 issue with patch which adds a new packaging. So maybe you have to patch a 
 custom maven installation to provide your package type.

 Hth,

 [1] 
 http://www.propellors.net/maven/site/guides/introduction/introduction-to-the-lifecycle.html
 [2] 
 https://jira.codehaus.org/browse/MNG-3343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

 Nick Stolwijk
 ~Java Developer~

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



 -Original Message-
 From: Andrew Madu [mailto:[EMAIL PROTECTED]
 Sent: Fri 6/6/2008 10:43
 To: users@maven.apache.org
 Subject: HowTo: Create new Dependency Type?
  
 Hi,
 I am in the process of re-architecting a project using the Spring 
 framework on a Jboss5 AS and need to create a new dependency of type 
 'spring', packagingspring/packaging.

 How do I go about doing this?

 My platform details are as follows:
 Maven version: 2.0.9
 JDK: 1.6.0_06
 OS: Win XP SP1

 Many thanks in advance

   





Maven2: How to activate super pom profile to use it in child project?

2008-06-06 Thread s_marylka

Hi all,

I would like to activate profile which is placed in super pom for using 
it in child project.

The reason:
I would like to use common properties but depends on profile in many 
child projects.


Sample situation:
- super pom:
project ...
 groupIdmyGroupId/groupId
 artifactIdsuperLevel/artifactId
 packagingpom/packaging
 ...
 profiles
   profile
 idmainDevProperties/id
 properties
   filterFilePath/sample/filter.file/filterFilePath
 /properties
   /profile
 /profiles
/project

- project pom
project ...
 groupIdmyGroupId/groupId
 artifactIdproject1/artifactId
 ...
 parent
   groupIdmyGroupId/groupId
   artifactIdsuperLevel/artifactId
 /parent
 ...
 profiles
   profile
 idenv-dev/id
 build
   filters
 filter${filterFilePath}/filter
   /filters
 /build
   /profile
 /profiles
/project

Command run on super pom level:
mvn process-resources -P mainDevProperties,env-dev

Error:
Error loading property file '...\${filterFilePath}'


Command run on super pom level:
mvn help:active-profiles -P mainDevProperties,env-dev

Result:
Active Profiles for Project 'myGroupId:superLevel:pom:...':
The following profiles are active:
- mainDevProperties (source: pom)

Active Profiles for Project 'myGroupId:project1:war:...':
The following profiles are active:
- env-dev (source: pom)


How to activate profile mainDevProperties for project project1.
Please help me with this issue.

Regards,
sapo

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



Re: Simple question - but totally frustrated - best way to define internal repo - but easily not use this repo when not at work?

2008-06-06 Thread Rick
I'm still confused on why it wouldn't be a good idea to simply put the
company repository info in a parent pom that all company projects would use?
This seems a lot cleaner and easier to setup and maintain...

1) If it's in a parent pom and you need to change repository urls someone
can update the parent pom and everyone should have it. If a settings.xml
file is used and anything needs to change in it (internal repo urls), you
have to contact every developer and tell them to change their settings.xml
file to reflect the new changes.

2) avoids having to set up any of the things mentioned so far in this
thread. (The simple 'mvn install' on their project will work without any
other modifiications or activation profiles being set.)

Of course the user will have to first checkout the inital parent project
from version control, but this seems easier than having your team work with
a settings.xml file.

I'm new though, so maybe I'm missing a serious drawback to this approach?


On Fri, Jun 6, 2008 at 4:24 AM, Timothy Reilly [EMAIL PROTECTED]
wrote:


 Rick,

 A couple of other options
 If you automatically map a drive when you connect to your company lan
 you could activate the acme-company profile with a file activation.

 Or as Wayne says use your mvn script.

 For example on windows create %HOMEDRIVE%%HOMEPATH%\mavenrc_pre.bat file
 to do something like:

 maven_pre.bat

 call ping -n 1 -w 400 my_pdc_hostname
 if ERRORLEVEL  0 GOTO end
 MAVEN_CMD_LINE_ARGS=%MAVEN_CMD_LINE_ARGS% -Dcom.acme.onthenetwork=true
 
 :end

 Then use property profile activators com.acme.onthenetwork and
 !com.acme.onthenetwork

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




-- 
Rick


Re: HowTo: Create new Dependency Type?

2008-06-06 Thread Andrew Madu

Hi Nick,
the .spring archive is nothing special, just a means by which spring 
beans can be exposed via JNDI. The file will contain a class directory 
structure with a bean descriptor file located in the META-INF directory. 
The following document explains the .spring requirement:


http://wiki.jboss.org/wiki/JBossSpringIntegration

So I imply need carry out all the phases ala jar, pull a 
jboss-spring.xml file into the META-INF directory and create/store the 
files  in an archive such as myproject.spring for example


Many thanks in advance.

--
Know Thyself

Andrew


What you're seeing there is which plugin with which goal to run. As far as I know there 
is no plugin which creates such .spring files. Are they any special files?

One solution I see is to specify the assembly plugin there and provide a 
default configuration in your company's parent pom. (Sort like Maven does, the 
default configuration in the super pom)

If it involves something more then just assembling some files I think you need 
to create your own plugin.

Could you please inform us a little more about those .spring files? What are 
they? How should they be created? What do they contain?

With regards,

Nick Stolwijk
~Java Developer~

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



-Original Message-
From: Andrew Madu [mailto:[EMAIL PROTECTED]
Sent: Fri 6/6/2008 14:59
To: Maven Users List
Subject: Re: HowTo: Create new Dependency Type?
 
Hi,

I'm currently editing the PLEXUS\components file:

[code]
component
  roleorg.apache.maven.lifecycle.mapping.LifecycleMapping/role
  role-hintspring/role-hint
  
implementationorg.apache.maven.lifecycle.mapping.DefaultLifecycleMapping/implementation

  configuration
lifecycles
  lifecycle
iddefault/id
phases
  
process-resourcesorg.apache.maven.plugins:maven-resources-plugin:resources/process-resources
  
compileorg.apache.maven.plugins:maven-compiler-plugin:compile/compile
  
process-test-resourcesorg.apache.maven.plugins:maven-resources-plugin:testResources/process-test-resources
  
test-compileorg.apache.maven.plugins:maven-compiler-plugin:testCompile/test-compile
  
testorg.apache.maven.plugins:maven-surefire-plugin:test/test
  
*packageorg.apache.maven.plugins:maven-jar-plugin:jar/package*
  
installorg.apache.maven.plugins:maven-install-plugin:install/install
  
deployorg.apache.maven.plugins:maven-deploy-plugin:deploy/deploy

/phases
  /lifecycle
/lifecycles
  /configuration
/component
[/code]

and in regards to the package/ section what I wish to do is to specify 
a package returned with a file extension of .spring. I have tried to 
specify org.apache.maven.plugins:maven-jar-plugin:spring but of course 
an 'plugin does not exist' error is then generated. How do I specify 
this in the document?


Many thanks in advance.

  



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



Re: checkstyle problem with maven : Unable to instantiate TreeWalker

2008-06-06 Thread Julien Simon
I'm using custom checks, I followed the procedure described on the web link
you gave me. Everything now works correctly.
Maybe I'm wrong but I think there's a mistake in this documentation: in the
pom.xml example, dependencies containing custom developed checks are placed
in the build extensions ... /extensions /build section. But when I
run maven with my dependencies configured like that, these dependencies are
not placed on the classpath and maven can't resolve my custom developed
checks. If I place my dependencies containing custom developed checks in the
plugin dependencies ... /dependencies /plugin section, it works
fine.

On Fri, Jun 6, 2008 at 1:54 PM, Dennis Lundberg [EMAIL PROTECTED] wrote:

 Are you using your own custom checks or provide a custom packagenames.xml
 file? In that case see this page:


 http://maven.apache.org/plugins/maven-checkstyle-plugin/examples/custom-developed-checkstyle.html


 Julien Simon wrote:

 Thanks for the answer. So, I tried maven-checkstyle-plugin 2.2 and it
 didn't
 work either, but that's a good beginning to have the correct plugin
 version...
 In the xml checkstyle configuration file where modules are defined, i
 tried
 to change
 module name=TreeWalker by module
 name=com.puppycrawl.tools.checkstyle.TreeWalkerand it now works. I
 don't
 really understand why we have to specify the fully qualified name of this
 class, because it works fine when not using maven.




 On Wed, Jun 4, 2008 at 11:47 PM, Dennis Lundberg [EMAIL PROTECTED]
 wrote:

  The Checkstyle plugin version 2.1 uses Checkstyle 4.1. So you can't use
 stuff from Checkstyle 4.3 in your Checkstyle configuration.

 Version 2.2 of the plugin, which is being released as we speak, uses
 Checkstyle 4.4. Start by giving that version a try.


 Julien Simon wrote:

  Hi,
 I'm trying  to integrate a checkstyle report in a maven project, but I'm
 facing a problem. The checkstyle report is based on a custom checkstyle
 check module I developed.
 I'm using maven 2.0.9, maven-checkstyle-plugin 2.1, and checkstyle 4.3

 When I execute mvn checkstyle:checkstyle or mvn site, I get the
 following
 exception. I don't really understand why the TreeWalker can't be
 instantiated.

 Any help would be great!




 [ERROR] BUILD ERROR
 [INFO]
 
 [INFO] An error has occurred in Checkstyle report generation.

 Embedded error: Failed during checkstyle configuration
 Unable to instantiate TreeWalkerCheck
 [INFO]
 
 [DEBUG] Trace
 org.apache.maven.lifecycle.LifecycleExecutionException: An error has
 occurred in Checkstyle report generation.
   at


 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583)
   at


 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
   at


 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
   at


 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
   at


 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
   at


 org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
   at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
   at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
   at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at


 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
   at


 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:615)
   at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
   at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
   at
 org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
   at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
 Caused by: org.apache.maven.plugin.MojoExecutionException: An error has
 occurred in Checkstyle report generation.
   at


 org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:79)
   at


 org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
   at


 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
   ... 16 more
 Caused by: org.apache.maven.reporting.MavenReportException: Failed
 during
 checkstyle configuration
   at


 org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(CheckstyleReport.java:488)
   at


 org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:98)
   at


 org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:73)
   ... 18 

RE: HowTo: Create new Dependency Type?

2008-06-06 Thread nicklist
Then the assembly plugin would be your friend.

http://maven.apache.org/plugins/maven-assembly-plugin/

Hth,

Nick Stolwijk
~Java Developer~

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



-Original Message-
From: Andrew Madu [mailto:[EMAIL PROTECTED]
Sent: Fri 6/6/2008 16:27
To: Maven Users List
Subject: Re: HowTo: Create new Dependency Type?
 
Hi Nick,
the .spring archive is nothing special, just a means by which spring 
beans can be exposed via JNDI. The file will contain a class directory 
structure with a bean descriptor file located in the META-INF directory. 
The following document explains the .spring requirement:

http://wiki.jboss.org/wiki/JBossSpringIntegration

So I imply need carry out all the phases ala jar, pull a 
jboss-spring.xml file into the META-INF directory and create/store the 
files  in an archive such as myproject.spring for example

Many thanks in advance.

-- 
Know Thyself

Andrew

 What you're seeing there is which plugin with which goal to run. As far as I 
 know there is no plugin which creates such .spring files. Are they any 
 special files?

 One solution I see is to specify the assembly plugin there and provide a 
 default configuration in your company's parent pom. (Sort like Maven does, 
 the default configuration in the super pom)

 If it involves something more then just assembling some files I think you 
 need to create your own plugin.

 Could you please inform us a little more about those .spring files? What 
 are they? How should they be created? What do they contain?

 With regards,

 Nick Stolwijk
 ~Java Developer~

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



 -Original Message-
 From: Andrew Madu [mailto:[EMAIL PROTECTED]
 Sent: Fri 6/6/2008 14:59
 To: Maven Users List
 Subject: Re: HowTo: Create new Dependency Type?
  
 Hi,
 I'm currently editing the PLEXUS\components file:

 [code]
 component
   roleorg.apache.maven.lifecycle.mapping.LifecycleMapping/role
   role-hintspring/role-hint
   
 implementationorg.apache.maven.lifecycle.mapping.DefaultLifecycleMapping/implementation
   configuration
 lifecycles
   lifecycle
 iddefault/id
 phases
   
 process-resourcesorg.apache.maven.plugins:maven-resources-plugin:resources/process-resources
   
 compileorg.apache.maven.plugins:maven-compiler-plugin:compile/compile
   
 process-test-resourcesorg.apache.maven.plugins:maven-resources-plugin:testResources/process-test-resources
   
 test-compileorg.apache.maven.plugins:maven-compiler-plugin:testCompile/test-compile
   
 testorg.apache.maven.plugins:maven-surefire-plugin:test/test
   
 *packageorg.apache.maven.plugins:maven-jar-plugin:jar/package*
   
 installorg.apache.maven.plugins:maven-install-plugin:install/install
   
 deployorg.apache.maven.plugins:maven-deploy-plugin:deploy/deploy
 /phases
   /lifecycle
 /lifecycles
   /configuration
 /component
 [/code]

 and in regards to the package/ section what I wish to do is to specify 
 a package returned with a file extension of .spring. I have tried to 
 specify org.apache.maven.plugins:maven-jar-plugin:spring but of course 
 an 'plugin does not exist' error is then generated. How do I specify 
 this in the document?

 Many thanks in advance.

   


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




Re: Simple question - but totally frustrated - best way to define internal repo - but easily not use this repo when not at work?

2008-06-06 Thread Jan Fredrik Wedén
If your parent pom is always a snapshot, your option 1) will probably
work, but then you will sacrifice build reproducibility (old projects
built and released with one snapshot version could in the future
suddenly be built with a new parent pom - anything which might change
a released build is not good).

If, however, you do releases of your parent pom, which is the
recommended approach, old released projects are completely
reproducible but they will in turn be stuck with an old parent pom
which may suddenly contain wrong repo urls.

BTW, the Sonatype book has a chapter on repo management which you may
find useful:
http://www.sonatype.com/book/

On Fri, Jun 6, 2008 at 4:08 PM, Rick [EMAIL PROTECTED] wrote:
 I'm still confused on why it wouldn't be a good idea to simply put the
 company repository info in a parent pom that all company projects would use?
 This seems a lot cleaner and easier to setup and maintain...

 1) If it's in a parent pom and you need to change repository urls someone
 can update the parent pom and everyone should have it. If a settings.xml
 file is used and anything needs to change in it (internal repo urls), you
 have to contact every developer and tell them to change their settings.xml
 file to reflect the new changes.

 2) avoids having to set up any of the things mentioned so far in this
 thread. (The simple 'mvn install' on their project will work without any
 other modifiications or activation profiles being set.)

 Of course the user will have to first checkout the inital parent project
 from version control, but this seems easier than having your team work with
 a settings.xml file.

 I'm new though, so maybe I'm missing a serious drawback to this approach?


 On Fri, Jun 6, 2008 at 4:24 AM, Timothy Reilly [EMAIL PROTECTED]
 wrote:


 Rick,

 A couple of other options
 If you automatically map a drive when you connect to your company lan
 you could activate the acme-company profile with a file activation.

 Or as Wayne says use your mvn script.

 For example on windows create %HOMEDRIVE%%HOMEPATH%\mavenrc_pre.bat file
 to do something like:

 maven_pre.bat

 call ping -n 1 -w 400 my_pdc_hostname
 if ERRORLEVEL  0 GOTO end
 MAVEN_CMD_LINE_ARGS=%MAVEN_CMD_LINE_ARGS% -Dcom.acme.onthenetwork=true
 
 :end

 Then use property profile activators com.acme.onthenetwork and
 !com.acme.onthenetwork

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




 --
 Rick




-- 
- Jan Fredrik Wedén

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



RE: need help in ant's javadoc task (from maven)

2008-06-06 Thread Sean Hennessy

!-- BEG COMMENT ===
   add this debug Ant target to your depends= to expose the properties in play
   END COMMENT === --

   target name=display.properties.tgt description=display project 
properties.
 echoproperties destfile=${ant.file}.runtime.properties 
failonerror=false /
  echo message=- ${project.name.text} ${project.version} -/
  echo message=java.class.path = ${java.class.path}/
  echo message=java.home = ${java.home}/
  echo message=user.home = ${user.home}/
  echo message=ant.home = ${ant.home}/
  echo message=base.dir = ${basedir}/
/target

-Original Message-
From: Niranjan Deshpande [mailto:[EMAIL PROTECTED]
Sent: Friday, June 06, 2008 5:54 AM
To: [EMAIL PROTECTED]; Maven Users List
Subject: need help in ant's javadoc task (from maven)


I am trying to generate a .properties file using javadocs in a java source 
file, and i am using ant's javadoc task to do this.

but i am getting this error when i run the antrun plugin

generate.appcodes:
  [javadoc] Generating Javadoc
  [javadoc] Javadoc execution
  [javadoc] javadoc: Cannot find doclet class 
com.company.app.util.doclet.AppCodesDoclet
  [javadoc] 1 error

Please help. Also can anyone tell me what the path and pathelement elements 
are for? How are the paths relative to?

My ant build file is:


project name=generate.appcodes basedir=.. default=all

 path id=tools.classpath
  pathelement path=build/lib/tools.jar /
  pathelement path=lib/xerces.jar /
  pathelement path=WebContent/WEB-INF/lib/log4j-1.2.9.jar /  /path

 target name=all depends=generate.appcodes/

 target name=generate.appcodes

  delete file=src/main/resources/appcodes.properties /

  javadoc sourcefiles=src/main/com/company/app/shared/security/AppCodes.java
 failonerror=yes

   doclet name=com.company.app.util.doclet.AppCodesDoclet
 path=${tools.classpath}
param name=-outputfile value=../src/main/resources/appcodes.properties 
/
param name=-sourcepath value=src/main/resources /
param name=-command value=properties /
   /doclet

  /javadoc

  mkdir dir=target/WEB-INF/classes/resources /
  copy file=src/main/resources/appcodes.properties
 todir=target/WEB-INF/classes/resources /

 /target

/project




--
Regards,
Niranjan Deshpande

Shut yourself from the world and create the reality you want

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



Re: checkstyle problem with maven : Unable to instantiate TreeWalker

2008-06-06 Thread Dennis Lundberg

Hi

You probably still have the old version of that page cached in your 
browser. A new corrected version of the page was deployed on June 4. 
Check that the publish date matches.


You are correct that your checks should be added as a plugin dependency.

Julien Simon wrote:

I'm using custom checks, I followed the procedure described on the web link
you gave me. Everything now works correctly.
Maybe I'm wrong but I think there's a mistake in this documentation: in the
pom.xml example, dependencies containing custom developed checks are placed
in the build extensions ... /extensions /build section. But when I
run maven with my dependencies configured like that, these dependencies are
not placed on the classpath and maven can't resolve my custom developed
checks. If I place my dependencies containing custom developed checks in the
plugin dependencies ... /dependencies /plugin section, it works
fine.

On Fri, Jun 6, 2008 at 1:54 PM, Dennis Lundberg [EMAIL PROTECTED] wrote:


Are you using your own custom checks or provide a custom packagenames.xml
file? In that case see this page:


http://maven.apache.org/plugins/maven-checkstyle-plugin/examples/custom-developed-checkstyle.html


Julien Simon wrote:


Thanks for the answer. So, I tried maven-checkstyle-plugin 2.2 and it
didn't
work either, but that's a good beginning to have the correct plugin
version...
In the xml checkstyle configuration file where modules are defined, i
tried
to change
module name=TreeWalker by module
name=com.puppycrawl.tools.checkstyle.TreeWalkerand it now works. I
don't
really understand why we have to specify the fully qualified name of this
class, because it works fine when not using maven.




On Wed, Jun 4, 2008 at 11:47 PM, Dennis Lundberg [EMAIL PROTECTED]
wrote:

 The Checkstyle plugin version 2.1 uses Checkstyle 4.1. So you can't use

stuff from Checkstyle 4.3 in your Checkstyle configuration.

Version 2.2 of the plugin, which is being released as we speak, uses
Checkstyle 4.4. Start by giving that version a try.


Julien Simon wrote:

 Hi,

I'm trying  to integrate a checkstyle report in a maven project, but I'm
facing a problem. The checkstyle report is based on a custom checkstyle
check module I developed.
I'm using maven 2.0.9, maven-checkstyle-plugin 2.1, and checkstyle 4.3

When I execute mvn checkstyle:checkstyle or mvn site, I get the
following
exception. I don't really understand why the TreeWalker can't be
instantiated.

Any help would be great!




[ERROR] BUILD ERROR
[INFO]

[INFO] An error has occurred in Checkstyle report generation.

Embedded error: Failed during checkstyle configuration
Unable to instantiate TreeWalkerCheck
[INFO]

[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: An error has
occurred in Checkstyle report generation.
  at


org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583)
  at


org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
  at


org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
  at


org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
  at


org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
  at


org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
  at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
  at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at


sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
  at


sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:615)
  at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
  at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
  at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
  at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: An error has
occurred in Checkstyle report generation.
  at


org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:79)
  at


org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
  at


org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
  ... 16 more
Caused by: org.apache.maven.reporting.MavenReportException: Failed
during
checkstyle configuration
  at


org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(CheckstyleReport.java:488)

Re: need help in ant's javadoc task (from maven)

2008-06-06 Thread Niranjan Deshpande
I got this when I ran your debug script. Error executing ant tasks

_

Embedded error: The following error occurred while executing this line:
/home/apli/APPWeb/src/main/build/generate/generate-appcodes.xml:37:

Could not create task or type of type: echoproperties.

Ant could not find the task or a class this task relies upon.

This is common and has a number of causes; the usual
solutions are to read the manual pages then download and
install needed JAR files, or fix the build file:
 - You have misspelt 'echoproperties'.
   Fix: check your spelling.
 - The task needs an external JAR file to execute
 and this is not found at the right place in the classpath.
   Fix: check the documentation for dependencies.
   Fix: declare the task.
 - The task is an Ant optional task and the JAR file and/or libraries
 implementing the functionality were not found at the time you
 yourself built your installation of Ant from the Ant sources.
   Fix: Look in the ANT_HOME/lib for the 'ant-' JAR corresponding to the
 task and make sure it contains more than merely a META-INF/MANIFEST.MF.
 If all it contains is the manifest, then rebuild Ant with the needed
 libraries present in ${ant.home}/lib/optional/ , or alternatively,
 download a pre-built release version from apache.org
 - The build file was written for a later version of Ant
   Fix: upgrade to at least the latest release version of Ant
 - The task is not an Ant core or optional task
 and needs to be declared using taskdef.
 - You are attempting to use a task defined using
presetdef or macrodef but have spelt wrong or not
   defined it at the point of use

Remember that for JAR files to be visible to Ant tasks implemented
in ANT_HOME/lib, the files must be in the same directory or on the
classpath

Please neither file bug reports on this problem, nor email the
Ant mailing lists, until all of these causes have been explored,
as this is not an Ant bug.

_

my xml file is in src/main/build/generate folder
and the dependency jars are in folder src/main/build/lib and
src/main/webapp/WEB-INF/lib
I am using the path id=tools.classpath to point to these jars and and
the tools.classpath is used by the ant's doclet task fpr the path
attribute.

What might be wrong?



On 6/6/08, Sean Hennessy [EMAIL PROTECTED] wrote:


 !-- BEG COMMENT ===
   add this debug Ant target to your depends= to expose the properties in
 play
   END COMMENT === --

   target name=display.properties.tgt description=display project
 properties.
 echoproperties destfile=${ant.file}.runtime.properties
 failonerror=false /
  echo message=- ${project.name.text} ${project.version} -/
  echo message=java.class.path = ${java.class.path}/
  echo message=java.home = ${java.home}/
  echo message=user.home = ${user.home}/
  echo message=ant.home = ${ant.home}/
  echo message=base.dir = ${basedir}/
/target

 -Original Message-
 From: Niranjan Deshpande [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 06, 2008 5:54 AM
 To: [EMAIL PROTECTED]; Maven Users List
 Subject: need help in ant's javadoc task (from maven)


 I am trying to generate a .properties file using javadocs in a java source
 file, and i am using ant's javadoc task to do this.

 but i am getting this error when i run the antrun plugin

 generate.appcodes:
 [javadoc] Generating Javadoc
 [javadoc] Javadoc execution
 [javadoc] javadoc: Cannot find doclet class
 com.company.app.util.doclet.AppCodesDoclet
 [javadoc] 1 error

 Please help. Also can anyone tell me what the path and pathelement
 elements are for? How are the paths relative to?

 My ant build file is:


 project name=generate.appcodes basedir=.. default=all

 path id=tools.classpath
 pathelement path=build/lib/tools.jar /
 pathelement path=lib/xerces.jar /
 pathelement path=WebContent/WEB-INF/lib/log4j-1.2.9.jar /  /path

 target name=all depends=generate.appcodes/

 target name=generate.appcodes

 delete file=src/main/resources/appcodes.properties /

 javadoc
 sourcefiles=src/main/com/company/app/shared/security/AppCodes.java
 failonerror=yes

   doclet name=com.company.app.util.doclet.AppCodesDoclet
 path=${tools.classpath}
param name=-outputfile
 value=../src/main/resources/appcodes.properties /
param name=-sourcepath value=src/main/resources /
param name=-command value=properties /
   /doclet

 /javadoc

 mkdir dir=target/WEB-INF/classes/resources /
 copy file=src/main/resources/appcodes.properties
 todir=target/WEB-INF/classes/resources /

 /target

 /project




 --
 Regards,
 Niranjan Deshpande

 Shut yourself from the world and create the reality you want

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 

Moving from snapshot to release - how do _you_ do it

2008-06-06 Thread EJ Ciramella
I know - yet another survey type email.  After the last one, I could
sleep better at night knowing we're not barking up some strange,
difficult tree with the config file question.

 

So the next question is focused on those using Cruise Control and maven
2.

 

Initially, if a large product was being built via CC+M2, the only
version we'd get of any of the dependencies (internal ones) were the
ones generated by CC (which also did mvn deploy:deploy).  

 

What we did for another internal project was everyone could set the main
project pom to use snapshots and any of the dependencies (which lived
outside of the main structure) to snapshots.  Build locally, then check
in from the lowest level up (and CC would supply the label in the proper
format).  Then, at the highest level necessary, you'd enter the version
of the CC supplied dependency you'd like.  This allowed us to keep using
true version numbers AND allowed people to take advantage of snapshots
locally for quick turn around testing.  Few understood and more often
than not, there'd be issues.

 

For a smaller internal project, we moved everything to using snapshots.
The tricky part is, the deployable units are all named
major.minor-SNAPSHOT.

 

When it comes down to release time, how are people migrating from
snapshots to releases?  Our release numbering scheme has always been in
a major.minor.patch.build-number format.  Toward the end of a release
cycle, we build multiple times.  What I don't want to have happen is
needing release engineering to spin each and every build by hand when
it's deemed a releasable version (I'm very happy having CC spin up our
other deployable units).  Plus, it gives QA the ability to say, Found
in build 1.1.0.27 and Fixed in build 1.1.0.32.  Versus Found in
build 1.0-SNAPSHOT and Fixed in build sometimestamp.  Are people
building/testing/etc by hand in release engineering?

 

I'd love to know what people are truly doing.

 

 



Re: HowTo: Create new Dependency Type?

2008-06-06 Thread Andrew Madu

Hi Nick,
many thanks for the link.

Out of interest where exactly is the ArchiveManager located?! Also, 
would I be correct in assuming that the assembly descriptor xml file is 
situated as follows?:


myproject\src\assemble\mydescriptor.xml

Many thanks in advance.

--
Regards

Andrew



Then the assembly plugin would be your friend.

http://maven.apache.org/plugins/maven-assembly-plugin/

Hth,

Nick Stolwijk
~Java Developer~

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



-Original Message-
From: Andrew Madu [mailto:[EMAIL PROTECTED]
Sent: Fri 6/6/2008 16:27
To: Maven Users List
Subject: Re: HowTo: Create new Dependency Type?
 
Hi Nick,
the .spring archive is nothing special, just a means by which spring 
beans can be exposed via JNDI. The file will contain a class directory 
structure with a bean descriptor file located in the META-INF directory. 
The following document explains the .spring requirement:


http://wiki.jboss.org/wiki/JBossSpringIntegration

So I imply need carry out all the phases ala jar, pull a 
jboss-spring.xml file into the META-INF directory and create/store the 
files  in an archive such as myproject.spring for example


Many thanks in advance.

  




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



RE: need help in ant's javadoc task (from maven)

2008-06-06 Thread Sean Hennessy
 of course..echoproperties adds dependency..to another ant component.
 here is segment of my ugly pom.xml
[snip]
  !-- = --
  plugin
artifactIdmaven-antrun-plugin/artifactId
executions
  execution
phasepre-site/phase
configuration
  tasks
  typedef resource=org/apache/maven/artifact/ant/antlib.xml
  classpath refid=maven.dependency.classpath/
  /typedef
  echo message=pom.xml: maven-antrun-plugin/echo
tstamp
  format locale=en property=TODAY_UK 
pattern=d-MMM-/format
/tstamp
echopom.xml: timestamp ${TODAY_UK}/echo
property refid=maven.dependency.classpath 
name=mvndepClasspath /
  ant inheritRefs=true inheritAll=true 
antfile=${basedir}/src/4.bin/build.xml
  property environment=env/
  property value=true 
name=project.debug/property
  property file=${user.home}/build.properties/
  target name=cmn.outadate.tgt.nm /
  /ant
  /tasks
/configuration
goals
  goalrun/goal
/goals
  /execution
/executions
dependencies
dependency
groupIdorg.apache.maven/groupId
artifactIdmaven-artifact-ant/artifactId
version2.0.4/version
/dependency
dependency
groupIdant/groupId
artifactIdant/artifactId
version1.6.5/version
/dependency
dependency
groupIdant-contrib/groupId
artifactIdcpptasks/artifactId
version1.0b3/version
/dependency
dependency
groupIdant-contrib/groupId
artifactIdant-contrib/artifactId
version1.0b2/version
/dependency
dependency
groupIdant/groupId
artifactIdoptional/artifactId
version1.5.4/version
/dependency
dependency
groupIdant/groupId
artifactIdant-nodeps/artifactId
version1.6.5/version
/dependency

/dependencies
  /plugin
[snip]
!--== --
  in build.xml
  taskdef classpath=${mvndepClasspath} 
resource=org/apache/maven/artifact/ant/antlib.xml
   /taskdef

-Original Message-
From: Niranjan Deshpande [mailto:[EMAIL PROTECTED]
Sent: Friday, June 06, 2008 9:02 AM
To: Maven Users List; [EMAIL PROTECTED]
Subject: Re: need help in ant's javadoc task (from maven)


I got this when I ran your debug script. Error executing ant tasks

_

Embedded error: The following error occurred while executing this line:
/home/apli/APPWeb/src/main/build/generate/generate-appcodes.xml:37:

Could not create task or type of type: echoproperties.

Ant could not find the task or a class this task relies upon.

This is common and has a number of causes; the usual
solutions are to read the manual pages then download and install needed JAR 
files, or fix the build file:
 - You have misspelt 'echoproperties'.
   Fix: check your spelling.
 - The task needs an external JAR file to execute
 and this is not found at the right place in the classpath.
   Fix: check the documentation for dependencies.
   Fix: declare the task.
 - The task is an Ant optional task and the JAR file and/or libraries
 implementing the functionality were not found at the time you
 yourself built your installation of Ant from the Ant sources.
   Fix: Look in the ANT_HOME/lib for the 'ant-' JAR corresponding to the
 task and make sure it contains more than merely a META-INF/MANIFEST.MF.
 If all it contains is the manifest, then rebuild Ant with the needed
 libraries present in ${ant.home}/lib/optional/ , or alternatively,
 download a pre-built release version from apache.org
 - The build file was written for a later version of Ant
   Fix: upgrade to at least the latest release version of Ant
 - The task is not an Ant core or optional task
 and needs to be declared using taskdef.
 - You are attempting to use a task defined using
presetdef or macrodef but have spelt wrong or not
   defined it at the point of use

Remember that for JAR files to be visible to Ant tasks implemented in 
ANT_HOME/lib, the files must be in the same directory or on the classpath

Please neither file bug reports on this problem, nor email the Ant mailing 
lists, until all of these causes have been explored, as this is not an Ant bug.

_

my xml file is in src/main/build/generate folder
and the dependency jars are in folder src/main/build/lib and 

[ANN] JavaCC Maven Plugin 2.4.1 Released

2008-06-06 Thread Benjamin Bentmann

The Mojo team is pleased to announce the release of the JavaCC Maven Plugin
version 2.4.1.

http://mojo.codehaus.org/javacc-maven-plugin/

This maintenance release fixes bugs preventing the invocation of JTB and
JJDoc on systems that have spaces in their local repo path which is common
on Windows boxes using the default repo location.

To get this update, simply specify the version in your project's plugin
configuration:

  plugin
groupIdorg.codehaus.mojo/groupId
artifactIdjavacc-maven-plugin/artifactId
version2.4.1/version
  /plugin

A comprehensive list of changes is attached at the end of this mail.

Regards,


Benjamin Bentmann



Release Notes - Maven 2.x JavaCC Plugin - Version 2.4.1


** Bug
* [MJAVACC-85] - Forked jjdoc-command to generate BNF fails with
  NoClassDefFoundError: JJDocMain
* [MJAVACC-86] - Forked execution of JTB fails due to incomplete class
  path

-- 
View this message in context: 
http://www.nabble.com/-ANN--JavaCC-Maven-Plugin-2.4.1-Released-tp17698463p17698463.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: Moving from snapshot to release - how do _you_ do it

2008-06-06 Thread Geoffrey Wiseman
On Fri, Jun 6, 2008 at 12:34 PM, EJ Ciramella [EMAIL PROTECTED]
wrote:

 When it comes down to release time, how are people migrating from
 snapshots to releases?  Our release numbering scheme has always been in
 a major.minor.patch.build-number format.  Toward the end of a release
 cycle, we build multiple times.  What I don't want to have happen is
 needing release engineering to spin each and every build by hand when
 it's deemed a releasable version (I'm very happy having CC spin up our
 other deployable units).  Plus, it gives QA the ability to say, Found
 in build 1.1.0.27 and Fixed in build 1.1.0.32.  Versus Found in
 build 1.0-SNAPSHOT and Fixed in build sometimestamp.  Are people
 building/testing/etc by hand in release engineering?

 I'd love to know what people are truly doing.


I feel as if I'm missing something in this question, so if I'm answering the
wrong thing, lemme know, but basically we use version-SNAPSHOT for
development, then release using the maven release plugin, which'll deploy a
non-snapshot version and then move us up to the next version in line.

e.g, if I'm on myproject at version 1.1-SNAPSHOT, I'll do a release:prepare
(dry run), then a release:clean and release:prepare (not-dry run) and a
release:perform.

This creates and deploys myproject-1.1 (package, sources and pom), and
leaves me at 1.2-SNAPSHOT, unless I specify otherwise (like 2.0-SNAPSHOT).

Is that the kind of answer you're looking for?

  - Geoffrey

-- 
Geoffrey Wiseman


RE: Moving from snapshot to release - how do _you_ do it

2008-06-06 Thread EJ Ciramella
It works, but in our case, we tend to spin multiple builds hoping to release 
each candidate (as many as we can squeeze into a day sometimes).

What I don't want to do is move from a highly automated process to one that 
requires command line intervention.


-Original Message-
From: Geoffrey Wiseman [mailto:[EMAIL PROTECTED]
Sent: Fri 6/6/2008 5:14 PM
To: Maven Users List
Subject: Re: Moving from snapshot to release - how do _you_ do it
 
On Fri, Jun 6, 2008 at 12:34 PM, EJ Ciramella [EMAIL PROTECTED]
wrote:

 When it comes down to release time, how are people migrating from
 snapshots to releases?  Our release numbering scheme has always been in
 a major.minor.patch.build-number format.  Toward the end of a release
 cycle, we build multiple times.  What I don't want to have happen is
 needing release engineering to spin each and every build by hand when
 it's deemed a releasable version (I'm very happy having CC spin up our
 other deployable units).  Plus, it gives QA the ability to say, Found
 in build 1.1.0.27 and Fixed in build 1.1.0.32.  Versus Found in
 build 1.0-SNAPSHOT and Fixed in build sometimestamp.  Are people
 building/testing/etc by hand in release engineering?

 I'd love to know what people are truly doing.


I feel as if I'm missing something in this question, so if I'm answering the
wrong thing, lemme know, but basically we use version-SNAPSHOT for
development, then release using the maven release plugin, which'll deploy a
non-snapshot version and then move us up to the next version in line.

e.g, if I'm on myproject at version 1.1-SNAPSHOT, I'll do a release:prepare
(dry run), then a release:clean and release:prepare (not-dry run) and a
release:perform.

This creates and deploys myproject-1.1 (package, sources and pom), and
leaves me at 1.2-SNAPSHOT, unless I specify otherwise (like 2.0-SNAPSHOT).

Is that the kind of answer you're looking for?

  - Geoffrey

-- 
Geoffrey Wiseman


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



Creating integration tests for a complex project...

2008-06-06 Thread Kent Närling
I already wrote to ask about feedback how to organize a project (thanks for
the responses so far), now another question:

Let's assume we have a project like this:

 myproject -
EAR-module1
EAR-module2
plugins
plugin-module1
plugin-module2
doc
tools
etc

And let's say the main project generates RPM:s which actually include a full
bundled J2EE server (JBoss)

Now, what if I would like to have integration tests that do:
   1 - Install RPM:s
   2 - Start J2EE server (and hence the application)
   3 - Configure the application using a reference configuration (part of
the integration test files)
   4 - Run reference tests (already exists a test tool for this with
beanshell test scripts)
   5 - After all finished, stop system and un-install RPM:s

How would we do this?

Would the integration test simply be JUnit tests under
myproject/src/test/java etc ?
In that case I guess there would have to be one test (THEtest) executing
an external script/tool?

//Kent


Re: Moving from snapshot to release - how do _you_ do it

2008-06-06 Thread Kalle Korhonen
Now I feel like I'm probably missing something, but you do want to give some
kind of command to release the project, don't you? Releasing a properly
maintained build with the release plugin doesn't require command line
intervention, it can be just another build target on your continuous
integration system (in fact Continuum even has a button for it). If you run
the release:prepare with --batch-mode, it'll use the default values for
version and tag (
http://maven.apache.org/plugins/maven-release-plugin/usage.html). But it
really depends on your project what the best release strategy is. We have
one project producing a low-level library where releasing is literally just
one push of button, and a few other ones consisting of multiple sub-modules,
where the release tag is created days before actually performing the
release, allowing people time to examine the tag and run longer manual tests
on it. All of the projects are using the release plugin and the time spent
on making release process more automated and smoother with it is well spent
in my opinion.

Kalle


On Fri, Jun 6, 2008 at 2:40 PM, EJ Ciramella [EMAIL PROTECTED]
wrote:

 It works, but in our case, we tend to spin multiple builds hoping to
 release each candidate (as many as we can squeeze into a day sometimes).

 What I don't want to do is move from a highly automated process to one that
 requires command line intervention.


 -Original Message-
 From: Geoffrey Wiseman [mailto:[EMAIL PROTECTED]
 Sent: Fri 6/6/2008 5:14 PM
 To: Maven Users List
 Subject: Re: Moving from snapshot to release - how do _you_ do it

 On Fri, Jun 6, 2008 at 12:34 PM, EJ Ciramella [EMAIL PROTECTED]
 wrote:

  When it comes down to release time, how are people migrating from
  snapshots to releases?  Our release numbering scheme has always been in
  a major.minor.patch.build-number format.  Toward the end of a release
  cycle, we build multiple times.  What I don't want to have happen is
  needing release engineering to spin each and every build by hand when
  it's deemed a releasable version (I'm very happy having CC spin up our
  other deployable units).  Plus, it gives QA the ability to say, Found
  in build 1.1.0.27 and Fixed in build 1.1.0.32.  Versus Found in
  build 1.0-SNAPSHOT and Fixed in build sometimestamp.  Are people
  building/testing/etc by hand in release engineering?
 
  I'd love to know what people are truly doing.
 

 I feel as if I'm missing something in this question, so if I'm answering
 the
 wrong thing, lemme know, but basically we use version-SNAPSHOT for
 development, then release using the maven release plugin, which'll deploy a
 non-snapshot version and then move us up to the next version in line.

 e.g, if I'm on myproject at version 1.1-SNAPSHOT, I'll do a release:prepare
 (dry run), then a release:clean and release:prepare (not-dry run) and a
 release:perform.

 This creates and deploys myproject-1.1 (package, sources and pom), and
 leaves me at 1.2-SNAPSHOT, unless I specify otherwise (like 2.0-SNAPSHOT).

 Is that the kind of answer you're looking for?

  - Geoffrey

 --
 Geoffrey Wiseman


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




Re: need help in ant's javadoc task (from maven)

2008-06-06 Thread Niranjan Deshpande
so whts wrong in my case?

On Fri, Jun 6, 2008 at 7:31 PM, Sean Hennessy [EMAIL PROTECTED]
wrote:

  of course..echoproperties adds dependency..to another ant component.
  here is segment of my ugly pom.xml
 [snip]
  !-- = --
  plugin
artifactIdmaven-antrun-plugin/artifactId
executions
  execution
phasepre-site/phase
configuration
  tasks
  typedef resource=org/apache/maven/artifact/ant/antlib.xml
  classpath refid=maven.dependency.classpath/
  /typedef
  echo message=pom.xml: maven-antrun-plugin/echo
tstamp
  format locale=en property=TODAY_UK
 pattern=d-MMM-/format
/tstamp
echopom.xml: timestamp ${TODAY_UK}/echo
property refid=maven.dependency.classpath
 name=mvndepClasspath /
  ant inheritRefs=true inheritAll=true
 antfile=${basedir}/src/4.bin/build.xml
  property environment=env/
  property value=true
 name=project.debug/property
  property file=${user.home}/build.properties/
  target name=cmn.outadate.tgt.nm /
  /ant
  /tasks
/configuration
goals
  goalrun/goal
/goals
  /execution
/executions
dependencies
dependency
groupIdorg.apache.maven/groupId
artifactIdmaven-artifact-ant/artifactId
version2.0.4/version
/dependency
dependency
groupIdant/groupId
artifactIdant/artifactId
version1.6.5/version
/dependency
dependency
groupIdant-contrib/groupId
artifactIdcpptasks/artifactId
version1.0b3/version
/dependency
dependency
groupIdant-contrib/groupId
artifactIdant-contrib/artifactId
version1.0b2/version
/dependency
dependency
groupIdant/groupId
artifactIdoptional/artifactId
version1.5.4/version
/dependency
dependency
groupIdant/groupId
artifactIdant-nodeps/artifactId
version1.6.5/version
/dependency

/dependencies
  /plugin
 [snip]
 !--== --
  in build.xml
  taskdef classpath=${mvndepClasspath}
 resource=org/apache/maven/artifact/ant/antlib.xml
   /taskdef

 -Original Message-
 From: Niranjan Deshpande [mailto:[EMAIL PROTECTED]
  Sent: Friday, June 06, 2008 9:02 AM
 To: Maven Users List; [EMAIL PROTECTED]
 Subject: Re: need help in ant's javadoc task (from maven)


 I got this when I ran your debug script. Error executing ant tasks


 _

 Embedded error: The following error occurred while executing this line:
 /home/apli/APPWeb/src/main/build/generate/generate-appcodes.xml:37:

 Could not create task or type of type: echoproperties.

 Ant could not find the task or a class this task relies upon.

 This is common and has a number of causes; the usual
 solutions are to read the manual pages then download and install needed JAR
 files, or fix the build file:
  - You have misspelt 'echoproperties'.
   Fix: check your spelling.
  - The task needs an external JAR file to execute
 and this is not found at the right place in the classpath.
   Fix: check the documentation for dependencies.
   Fix: declare the task.
  - The task is an Ant optional task and the JAR file and/or libraries
 implementing the functionality were not found at the time you
 yourself built your installation of Ant from the Ant sources.
   Fix: Look in the ANT_HOME/lib for the 'ant-' JAR corresponding to the
 task and make sure it contains more than merely a META-INF/MANIFEST.MF.
 If all it contains is the manifest, then rebuild Ant with the needed
 libraries present in ${ant.home}/lib/optional/ , or alternatively,
 download a pre-built release version from apache.org
  - The build file was written for a later version of Ant
   Fix: upgrade to at least the latest release version of Ant
  - The task is not an Ant core or optional task
 and needs to be declared using taskdef.
  - You are attempting to use a task defined using
presetdef or macrodef but have spelt wrong or not
   defined it at the point of use

 Remember that for JAR files to be visible to Ant tasks implemented in
 ANT_HOME/lib, the files must be in the same directory or on the classpath

 Please neither file bug reports on this problem, nor email the Ant mailing
 lists, until all of these causes have been explored, as this is not an Ant
 bug.


 

RE: need help in ant's javadoc task (from maven)

2008-06-06 Thread Sean Hennessy

I have provided sample segments from a working pom.xml and build.xml for your 
reference.  One instruments ant echoproperties to help diagnose/debug the 
classpath and other properties passed along from maven.
Sorry there is a limit to amount of time can spend on wht wrong.

Sean

-Original Message-
From: Niranjan Deshpande [mailto:[EMAIL PROTECTED]
Sent: Friday, June 06, 2008 3:35 PM
To: Maven Users List
Subject: Re: need help in ant's javadoc task (from maven)


so whts wrong in my case?

On Fri, Jun 6, 2008 at 7:31 PM, Sean Hennessy [EMAIL PROTECTED]
wrote:

  of course..echoproperties adds dependency..to another ant component.
 here is segment of my ugly pom.xml [snip]
  !-- = --
  plugin
artifactIdmaven-antrun-plugin/artifactId
executions
  execution
phasepre-site/phase
configuration
  tasks
  typedef resource=org/apache/maven/artifact/ant/antlib.xml
  classpath refid=maven.dependency.classpath/
  /typedef
  echo message=pom.xml: maven-antrun-plugin/echo
tstamp
  format locale=en property=TODAY_UK
 pattern=d-MMM-/format
/tstamp
echopom.xml: timestamp ${TODAY_UK}/echo
property refid=maven.dependency.classpath
 name=mvndepClasspath /
  ant inheritRefs=true inheritAll=true
 antfile=${basedir}/src/4.bin/build.xml
  property environment=env/
  property value=true
 name=project.debug/property
  property file=${user.home}/build.properties/
  target name=cmn.outadate.tgt.nm /
  /ant
  /tasks
/configuration
goals
  goalrun/goal
/goals
  /execution
/executions
dependencies
dependency
groupIdorg.apache.maven/groupId
artifactIdmaven-artifact-ant/artifactId
version2.0.4/version
/dependency
dependency
groupIdant/groupId
artifactIdant/artifactId
version1.6.5/version
/dependency
dependency
groupIdant-contrib/groupId
artifactIdcpptasks/artifactId
version1.0b3/version
/dependency
dependency
groupIdant-contrib/groupId
artifactIdant-contrib/artifactId
version1.0b2/version
/dependency
dependency
groupIdant/groupId
artifactIdoptional/artifactId
version1.5.4/version
/dependency
dependency
groupIdant/groupId
artifactIdant-nodeps/artifactId
version1.6.5/version
/dependency

/dependencies
  /plugin
 [snip]
 !--== --
  in build.xml
  taskdef classpath=${mvndepClasspath}
 resource=org/apache/maven/artifact/ant/antlib.xml
   /taskdef

 -Original Message-
 From: Niranjan Deshpande [mailto:[EMAIL PROTECTED]
  Sent: Friday, June 06, 2008 9:02 AM
 To: Maven Users List; [EMAIL PROTECTED]
 Subject: Re: need help in ant's javadoc task (from maven)


 I got this when I ran your debug script. Error executing ant tasks


 __
 ___

 Embedded error: The following error occurred while executing this
 line:
 /home/apli/APPWeb/src/main/build/generate/generate-appcodes.xml:37:

 Could not create task or type of type: echoproperties.

 Ant could not find the task or a class this task relies upon.

 This is common and has a number of causes; the usual solutions are to
 read the manual pages then download and install needed JAR files, or
 fix the build file:
  - You have misspelt 'echoproperties'.
   Fix: check your spelling.
  - The task needs an external JAR file to execute
 and this is not found at the right place in the classpath.
   Fix: check the documentation for dependencies.
   Fix: declare the task.
  - The task is an Ant optional task and the JAR file and/or libraries
 implementing the functionality were not found at the time you
 yourself built your installation of Ant from the Ant sources.
   Fix: Look in the ANT_HOME/lib for the 'ant-' JAR corresponding to the
 task and make sure it contains more than merely a META-INF/MANIFEST.MF.
 If all it contains is the manifest, then rebuild Ant with the needed
 libraries present in ${ant.home}/lib/optional/ , or alternatively,
 download a pre-built release version from apache.org
  - The build file was written for a later version of Ant
   Fix: upgrade to at least the latest release version of Ant
  - The task is not an Ant core or optional task
 and needs to be declared using taskdef.
  - You are attempting to use a task