Re: Netbeans maven project with invalid POM/classpath problem

2014-05-01 Thread Glenn Brown
You might want to blow away the file from your local maven repo and
re-download it.  Possible that you were firewalled away from your repo at
some point?
On Apr 30, 2014 6:32 PM, Mark mark@gmail.com wrote:

 Hi ,

 I am new to Maven and Glassfish (and pretty new to Java and Netbeans!) and
 am struggling to build a JPA based 'injection' project that I want to run
 as an application client (using Glassfish appclient) to inject rows from an
 Oracle db table into a JMS queue.

 Specifically the problem is:

 When I build the 'injection' project' I get an invalid pom message but it
 builds.

 The POM for com.oracle:ojdbc6:jar:11.2.0 is invalid, transitive
 dependencies (if any) will not be available, enable debug logging for more
 details

 Running it with appclient however it fails as I get the following error:

 org.eclipse.persistence.DatabaseException. Exception description:
 Configuration error message - Class [oracle.jdbc.Oracle driver] not found.

 Browsing the local Maven repository using Netbeans I find the following
  if I right-click on the ojdbc 11.2.0 jar and select 'View Details'

 --
 org.apache.maven.project.InvalidProjectModelException: 1 problem was
 encountered while building the effective model
 [FATAL] Non-parseable POM C:\Users\mcedward\.m2\
 repository\com\oracle\ojdbc6\11.2.0\ojdbc6-11.2.0.pom: end tag name
 /body must be the same as start tag meta from line 142 (position: TEXT
 seen ...!-- End of carousel script --\n/body... @453:8)  @ line 453,
 column 8  for project  for project
 at org.apache.maven.project.DefaultMavenProjectBuilder.
 transformError(DefaultMavenProjectBuilder.java:193)
 at org.apache.maven.project.DefaultMavenProjectBuilder.
 buildFromRepository(DefaultMavenProjectBuilder.java:240)
 at org.apache.maven.project.DefaultMavenProjectBuilder.
 buildFromRepository(DefaultMavenProjectBuilder.java:251)
 at org.apache.maven.project.DefaultMavenProjectBuilder.
 buildFromRepository(DefaultMavenProjectBuilder.java:258)
 at org.netbeans.modules.maven.repository.ui.
 ArtifactMultiViewFactory.readMavenProject(ArtifactMultiViewFactory.java:
 231)
 at org.netbeans.modules.maven.repository.ui.
 ArtifactMultiViewFactory.access$000(ArtifactMultiViewFactory.java:104)
 at org.netbeans.modules.maven.repository.ui.
 ArtifactMultiViewFactory$1.run(ArtifactMultiViewFactory.java:187)
 at org.openide.util.RequestProcessor$Task.run(
 RequestProcessor.java:1423)
 at org.openide.util.RequestProcessor$Processor.
 run(RequestProcessor.java:2033)

 --

 It says this could be because :
 - I'm offline (but I'm not)
 - The repository content is wrong - no reason to suppose it is
 - The project or dependences cannot be resolved for the given set of
 repositories - no reason to suppose this either - 'Find Usages' seems to
 give the right answer
 - bug in the Maven or Netbeans codebase -? Hence posting to Netbeans
 and Maven forums


 I have successfully compiled and run an early version that just loads text
 to JMS so have got appclient to run successfully. I now want to use JPA to
 read the db. I have a separate Maven 'persistence' project that defines the
 persistence entities and have used this successfuly with another
 'generation' project that generates the database table content in the first
 place.
 When I build the persistence project I get the same 'Invalid POM' message
 but it still works fine when included as a compile-time dependency in the
 'generation' project.


 The persistence project has the following POM:
 ---
 ?xml version=1.0 encoding=UTF-8?
 project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://
 maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd;
 modelVersion4.0.0/modelVersion
 groupIdcom.oracle/groupId
 artifactIdcepdemodatagen/artifactId
 version1.0-SNAPSHOT/version
 packagingjar/packaging
 dependencies
 dependency
 groupIdorg.eclipse.persistence/groupId
 artifactIdjavax.persistence/artifactId
 version2.1.0/version
 typejar/type
 /dependency
 dependency
 groupIdcepdemo/groupId
 artifactIdcepdemopersistence/artifactId
 version1.1-SNAPSHOT/version
 typejar/type
 /dependency
 dependency
 groupIdcom.oracle/groupId
 artifactIdcepdemopersistence/artifactId
 version1.0-SNAPSHOT/version
 typejar/type
 /dependency
 /dependencies
 properties
 project.build.sourceEncodingUTF-8/project.build.sourceEncoding
 maven.compiler.source1.7/maven.compiler.source
 maven.compiler.target1.7/maven.compiler.target
 /properties
 /project
 -
 Note: cepdemopersistence-1.1-SNAPSHOT dependency is not used in any code
 - don't know 

Re: Netbeans maven project with invalid POM/classpath problem

2014-05-01 Thread Glenn Brown
The reason I ask is because what maven is saying is the content of the pom
for the Oracle jar in your local repo looks suspiciously like an HTML file.
Like one from a corporate firewall
On Apr 30, 2014 6:32 PM, Mark mark@gmail.com wrote:

 Hi ,

 I am new to Maven and Glassfish (and pretty new to Java and Netbeans!) and
 am struggling to build a JPA based 'injection' project that I want to run
 as an application client (using Glassfish appclient) to inject rows from an
 Oracle db table into a JMS queue.

 Specifically the problem is:

 When I build the 'injection' project' I get an invalid pom message but it
 builds.

 The POM for com.oracle:ojdbc6:jar:11.2.0 is invalid, transitive
 dependencies (if any) will not be available, enable debug logging for more
 details

 Running it with appclient however it fails as I get the following error:

 org.eclipse.persistence.DatabaseException. Exception description:
 Configuration error message - Class [oracle.jdbc.Oracle driver] not found.

 Browsing the local Maven repository using Netbeans I find the following
  if I right-click on the ojdbc 11.2.0 jar and select 'View Details'

 --
 org.apache.maven.project.InvalidProjectModelException: 1 problem was
 encountered while building the effective model
 [FATAL] Non-parseable POM C:\Users\mcedward\.m2\
 repository\com\oracle\ojdbc6\11.2.0\ojdbc6-11.2.0.pom: end tag name
 /body must be the same as start tag meta from line 142 (position: TEXT
 seen ...!-- End of carousel script --\n/body... @453:8)  @ line 453,
 column 8  for project  for project
 at org.apache.maven.project.DefaultMavenProjectBuilder.
 transformError(DefaultMavenProjectBuilder.java:193)
 at org.apache.maven.project.DefaultMavenProjectBuilder.
 buildFromRepository(DefaultMavenProjectBuilder.java:240)
 at org.apache.maven.project.DefaultMavenProjectBuilder.
 buildFromRepository(DefaultMavenProjectBuilder.java:251)
 at org.apache.maven.project.DefaultMavenProjectBuilder.
 buildFromRepository(DefaultMavenProjectBuilder.java:258)
 at org.netbeans.modules.maven.repository.ui.
 ArtifactMultiViewFactory.readMavenProject(ArtifactMultiViewFactory.java:
 231)
 at org.netbeans.modules.maven.repository.ui.
 ArtifactMultiViewFactory.access$000(ArtifactMultiViewFactory.java:104)
 at org.netbeans.modules.maven.repository.ui.
 ArtifactMultiViewFactory$1.run(ArtifactMultiViewFactory.java:187)
 at org.openide.util.RequestProcessor$Task.run(
 RequestProcessor.java:1423)
 at org.openide.util.RequestProcessor$Processor.
 run(RequestProcessor.java:2033)

 --

 It says this could be because :
 - I'm offline (but I'm not)
 - The repository content is wrong - no reason to suppose it is
 - The project or dependences cannot be resolved for the given set of
 repositories - no reason to suppose this either - 'Find Usages' seems to
 give the right answer
 - bug in the Maven or Netbeans codebase -? Hence posting to Netbeans
 and Maven forums


 I have successfully compiled and run an early version that just loads text
 to JMS so have got appclient to run successfully. I now want to use JPA to
 read the db. I have a separate Maven 'persistence' project that defines the
 persistence entities and have used this successfuly with another
 'generation' project that generates the database table content in the first
 place.
 When I build the persistence project I get the same 'Invalid POM' message
 but it still works fine when included as a compile-time dependency in the
 'generation' project.


 The persistence project has the following POM:
 ---
 ?xml version=1.0 encoding=UTF-8?
 project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://
 maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd;
 modelVersion4.0.0/modelVersion
 groupIdcom.oracle/groupId
 artifactIdcepdemodatagen/artifactId
 version1.0-SNAPSHOT/version
 packagingjar/packaging
 dependencies
 dependency
 groupIdorg.eclipse.persistence/groupId
 artifactIdjavax.persistence/artifactId
 version2.1.0/version
 typejar/type
 /dependency
 dependency
 groupIdcepdemo/groupId
 artifactIdcepdemopersistence/artifactId
 version1.1-SNAPSHOT/version
 typejar/type
 /dependency
 dependency
 groupIdcom.oracle/groupId
 artifactIdcepdemopersistence/artifactId
 version1.0-SNAPSHOT/version
 typejar/type
 /dependency
 /dependencies
 properties
 project.build.sourceEncodingUTF-8/project.build.sourceEncoding
 maven.compiler.source1.7/maven.compiler.source
 maven.compiler.target1.7/maven.compiler.target
 /properties
 /project
 -
 Note: cepdemopersistence-1.1-SNAPSHOT dependency is 

Netbeans maven project with invalid POM/classpath problem

2014-04-30 Thread Mark

Hi ,

I am new to Maven and Glassfish (and pretty new to Java and Netbeans!) 
and am struggling to build a JPA based 'injection' project that I want 
to run as an application client (using Glassfish appclient) to inject 
rows from an Oracle db table into a JMS queue.


Specifically the problem is:

When I build the 'injection' project' I get an invalid pom message but 
it builds.


The POM for com.oracle:ojdbc6:jar:11.2.0 is invalid, transitive 
dependencies (if any) will not be available, enable debug logging for 
more details


Running it with appclient however it fails as I get the following error:

org.eclipse.persistence.DatabaseException. Exception description: 
Configuration error message - Class [oracle.jdbc.Oracle driver] not found.


Browsing the local Maven repository using Netbeans I find the following 
 if I right-click on the ojdbc 11.2.0 jar and select 'View Details'


--
org.apache.maven.project.InvalidProjectModelException: 1 problem was 
encountered while building the effective model
[FATAL] Non-parseable POM 
C:\Users\mcedward\.m2\repository\com\oracle\ojdbc6\11.2.0\ojdbc6-11.2.0.pom: 
end tag name /body must be the same as start tag meta from line 142 
(position: TEXT seen ...!-- End of carousel script --\n/body... 
@453:8)  @ line 453, column 8  for project  for project
	at 
org.apache.maven.project.DefaultMavenProjectBuilder.transformError(DefaultMavenProjectBuilder.java:193)
	at 
org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:240)
	at 
org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:251)
	at 
org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:258)
	at 
org.netbeans.modules.maven.repository.ui.ArtifactMultiViewFactory.readMavenProject(ArtifactMultiViewFactory.java:231)
	at 
org.netbeans.modules.maven.repository.ui.ArtifactMultiViewFactory.access$000(ArtifactMultiViewFactory.java:104)
	at 
org.netbeans.modules.maven.repository.ui.ArtifactMultiViewFactory$1.run(ArtifactMultiViewFactory.java:187)

at 
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
	at 
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)


--

It says this could be because :
- I'm offline (but I'm not)
- The repository content is wrong - no reason to suppose it is
- The project or dependences cannot be resolved for the given set of 
repositories - no reason to suppose this either - 'Find Usages' seems to 
give the right answer
- bug in the Maven or Netbeans codebase -? Hence posting to Netbeans 
and Maven forums



I have successfully compiled and run an early version that just loads 
text to JMS so have got appclient to run successfully. I now want to use 
JPA to read the db. I have a separate Maven 'persistence' project that 
defines the persistence entities and have used this successfuly with 
another 'generation' project that generates the database table content 
in the first place.
When I build the persistence project I get the same 'Invalid POM' 
message but it still works fine when included as a compile-time 
dependency in the 'generation' project.



The persistence project has the following POM:
---
?xml version=1.0 encoding=UTF-8?
project xmlns=http://maven.apache.org/POM/4.0.0; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;

modelVersion4.0.0/modelVersion
groupIdcom.oracle/groupId
artifactIdcepdemodatagen/artifactId
version1.0-SNAPSHOT/version
packagingjar/packaging
dependencies
dependency
groupIdorg.eclipse.persistence/groupId
artifactIdjavax.persistence/artifactId
version2.1.0/version
typejar/type
/dependency
dependency
groupIdcepdemo/groupId
artifactIdcepdemopersistence/artifactId
version1.1-SNAPSHOT/version
typejar/type
/dependency
dependency
groupIdcom.oracle/groupId
artifactIdcepdemopersistence/artifactId
version1.0-SNAPSHOT/version
typejar/type
/dependency
/dependencies
properties
project.build.sourceEncodingUTF-8/project.build.sourceEncoding
maven.compiler.source1.7/maven.compiler.source
maven.compiler.target1.7/maven.compiler.target
/properties
/project
-
Note: cepdemopersistence-1.1-SNAPSHOT dependency is not used in any code 
- don't know how it got there!


The 'injection' project has the following POM:

--
?xml version=1.0 encoding=UTF-8?
project xmlns=http://maven.apache.org/POM/4.0.0; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 

Re: Netbeans maven project with invalid POM/classpath problem

2014-04-30 Thread Barrie Treloar
On 1 May 2014 06:48, Mark mark@gmail.com wrote:

 Browsing the local Maven repository using Netbeans I find the following
  if I right-click on the ojdbc 11.2.0 jar and select 'View Details'

 --
 org.apache.maven.project.InvalidProjectModelException: 1 problem was
 encountered while building the effective model
 [FATAL] Non-parseable POM C:\Users\mcedward\.m2\
 repository\com\oracle\ojdbc6\11.2.0\ojdbc6-11.2.0.pom: end tag name
 /body must be the same as start tag meta from line 142 (position: TEXT
 seen ...!-- End of carousel script --\n/body... @453:8)  @ line 453,
 column 8  for project  for project
 at org.apache.maven.project.DefaultMavenProjectBuilder.
 transformError(DefaultMavenProjectBuilder.java:193)
 at org.apache.maven.project.DefaultMavenProjectBuilder.
 buildFromRepository(DefaultMavenProjectBuilder.java:240)
 at org.apache.maven.project.DefaultMavenProjectBuilder.
 buildFromRepository(DefaultMavenProjectBuilder.java:251)
 at org.apache.maven.project.DefaultMavenProjectBuilder.
 buildFromRepository(DefaultMavenProjectBuilder.java:258)
 at org.netbeans.modules.maven.repository.ui.
 ArtifactMultiViewFactory.readMavenProject(ArtifactMultiViewFactory.java:
 231)
 at org.netbeans.modules.maven.repository.ui.
 ArtifactMultiViewFactory.access$000(ArtifactMultiViewFactory.java:104)
 at org.netbeans.modules.maven.repository.ui.
 ArtifactMultiViewFactory$1.run(ArtifactMultiViewFactory.java:187)
 at org.openide.util.RequestProcessor$Task.run(
 RequestProcessor.java:1423)
 at
 org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)


Have you opened that file in a text editor?
It looks like malformed xml to me.

How did you install the ojdbc jars?
These need to be manually installed since they require you to agree to the OTN
License Agreement.


Runtime Classpath Problem

2010-02-26 Thread Peter Andreas Chronz
Hi,

I have a problem in a project. It contains a jar (xbean.jar from xmlbeans/lib), 
which I have deployed in my repo.

The dependency is being resolved by maven and appears under Maven 
dependencies in eclipse. This is a runtime dependcy, not needed during 
compiation.
During runtime I get a ClassNotFoundException and a hint, that xbean.jar is not 
on the classpath.

If I reference the exact same file (in my local repo) with eclipse directly 
everything runs smoothly (at least in eclipse).

I have tried to declare this dependency's scope as runtime, which did not 
help.

Thanks in Advance
Peter


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Runtime Classpath Problem

2010-02-26 Thread Wayne Fay
 I have tried to declare this dependency's scope as runtime, which did not 
 help.

Could you try declaring it as compile, just to see if it resolves your problem?

Sounds like you're missing an entry in Manifest.mf or something...

Wayne

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



JUnit Classpath problem

2008-08-24 Thread Michael McGrady


Below is my POM and the error log.  How do I get maven to seem my  
junit jar?


Mike

Here is the POM

project
xmlns=http://maven.apache.org/POM/4.0.0;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  	xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd 


  modelVersion4.0.0/modelVersion
  groupIdcom.micascientific/groupId
  artifactIdmicascientific/artifactId
  packagingjar/packaging
  version1.0-SNAPSHOT/version
  namemicascientific/name
  urlhttp://maven.apache.org/url
  dependencies
dependency
  groupIdjunit/groupId
  artifactIdjunit/artifactId
  version3.8.1/version
  scopetest/scope
/dependency
  /dependencies
  build
plugins
  plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-compiler-plugin/artifactId
 configuration
  source1.5/source
  target1.5/target
 /configuration
  /plugin
/plugins
  /build
/project

HERE is the ERROR

[ERROR] BUILD FAILURE
[INFO]  


[INFO] Compilation failure

/Users/michaelmcgrady/Documents/workspace/micascientific/src/main/java/ 
com/micascientific/cellardoor/impl/CellarDoorChannelReadWrite.java: 
[19,23] package junit.framework does not exist


/Users/michaelmcgrady/Documents/workspace/micascientific/src/main/java/ 
com/micascientific/riverdancer/lipstick/SendingManagerImpl.java: 
[12,37] cannot find symbol

symbol  : class MockObserver
location: package com.micascientific.casablanca

/Users/michaelmcgrady/Documents/workspace/micascientific/src/main/java/ 
com/micascientific/riverdancer/Driver.java:[4,37] cannot find symbol

symbol  : class MockObserver
location: package com.micascientific.casablanca

/Users/michaelmcgrady/Documents/workspace/micascientific/src/main/java/ 
com/micascientific/riverdancer/Driver.java:[8,34] cannot find symbol

symbol  : class MockMoblet
location: package com.micascientific.moblets

/Users/michaelmcgrady/Documents/workspace/micascientific/src/main/java/ 
com/micascientific/riverdancer/lipstick/SendingManagerImpl.java: 
[113,40] cannot find symbol

symbol  : class MockObserver
location: class  
com.micascientific.riverdancer.lipstick.SendingManagerImpl


/Users/michaelmcgrady/Documents/workspace/micascientific/src/main/java/ 
com/micascientific/riverdancer/Driver.java:[46,23] cannot find symbol

symbol  : class MockMoblet
location: class com.micascientific.riverdancer.Driver

/Users/michaelmcgrady/Documents/workspace/micascientific/src/main/java/ 
com/micascientific/riverdancer/Driver.java:[61,22] cannot find symbol

symbol  : class MockMoblet
location: class com.micascientific.riverdancer.Driver

/Users/michaelmcgrady/Documents/workspace/micascientific/src/main/java/ 
com/micascientific/riverdancer/Driver.java:[71,36] cannot find symbol

symbol  : class MockObserver
location: class com.micascientific.riverdancer.Driver

/Users/michaelmcgrady/Documents/workspace/micascientific/src/main/java/ 
com/micascientific/riverdancer/Driver.java:[85,43] cannot find symbol

symbol  : class MockMoblet
location: class com.micascientific.riverdancer.Driver


[INFO]  


[INFO] Trace
org.apache.maven.BuildFailureException: Compilation failure
	at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java: 
579)
	at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor 
.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
	at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
	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: 
39)
	at  
sun 
.reflect 
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 
25)

at java.lang.reflect.Method.invoke(Method.java:585)
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.CompilationFailureException:  
Compilation 

Re: JUnit Classpath problem

2008-08-24 Thread Geoffrey Wiseman
junit is scoped to test, and the file that references junit is in src/main,
which wouldn't have access to test-scope deps.

On Sun, Aug 24, 2008 at 1:47 PM, Michael McGrady 
[EMAIL PROTECTED] wrote:


 Below is my POM and the error log.  How do I get maven to seem my junit
 jar?

 Mike



-- 
Geoffrey Wiseman


Re: Test classpath problem in multi module project

2008-03-04 Thread VUB Stefan Seidel

Hi Petr,

I have a default.persistence.properties in the artifact with the EJB3 
abstract test case. There I can specify whatever I like. Also, in the 
jboss in deploy/ejb3.deployer/META-INF there is another 
persistence.properties where I specify the production properties.


Stefan

Petr Nejedly wrote:

Thanks Stefan,

 


Very helpful. Just a question:

 


You said you're using only one persistence.xml for both, testing and
live deployment. How do you specify different Hibernate properties for
those, eg dialect (Oracle vs HSQLDB), auto create schema (on vs off),
etc?

 


Cheers, Petr



The information contained in this email and its attachments is confidential and may be the subject of legal, professional or other privileged information. It is intended only for the named addressees and may not be disclosed to anyone else without consent from On Demand. If you are not the named addressee you must not use, disclose, distribute, copy, print or rely on the contents of this email and should destroy it immediately. Whilst On Demand takes care to protect its systems from electronic virus attack or other harmful event, the firm gives no warranty that this email message (including any attachments to it) is free of any virus or other harmful matter and accepts no responsibility for any loss or damage resulting from the recipient receiving, opening or using it. If you need any further information, please contact the originator of this message on +44 (0)20 7131 6700. Website: www.ondemand.co.uk. Registered Office: 1 Stephen Street, London, W1T 1AL. Registered in the 

UK No.4094951.


This message has been scanned for viruses by BlackSpider MailControl - 
www.blackspider.com




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



Re: Test classpath problem in multi module project

2008-02-28 Thread Petr Nejedly
Thanks Stefan,

 

Very helpful. Just a question:

 

You said you're using only one persistence.xml for both, testing and
live deployment. How do you specify different Hibernate properties for
those, eg dialect (Oracle vs HSQLDB), auto create schema (on vs off),
etc?

 

Cheers, Petr



The information contained in this email and its attachments is confidential and 
may be the subject of legal, professional or other privileged information. It 
is intended only for the named addressees and may not be disclosed to anyone 
else without consent from On Demand. If you are not the named addressee you 
must not use, disclose, distribute, copy, print or rely on the contents of this 
email and should destroy it immediately. Whilst On Demand takes care to protect 
its systems from electronic virus attack or other harmful event, the firm gives 
no warranty that this email message (including any attachments to it) is free 
of any virus or other harmful matter and accepts no responsibility for any loss 
or damage resulting from the recipient receiving, opening or using it. If you 
need any further information, please contact the originator of this message on 
+44 (0)20 7131 6700. Website: www.ondemand.co.uk. Registered Office: 1 Stephen 
Street, London, W1T 1AL. Registered in the UK No.4094951.

This message has been scanned for viruses by BlackSpider MailControl - 
www.blackspider.com


Test classpath problem in multi module project

2008-02-26 Thread Petr Nejedly
Hi guys,

 

I'm trying to solve this issue for a few days and haven't been able to
crack it so far. The scenario is following:

 

I have a parent project that includes sub-modules, each having their own
pom.xml. Each of these modules produces an ejb3 package. I want to be
able to run unit/integration tests using the JBoss embedded container on
those modules from the parent project (so that it builds all modules).
The resources are different for the test phase from the ones to be
deployed (obviously). Normally it could all be achieved using
src/main/resources and src/test/tesources but in this case SureFire can
see all the resource files on its classpath and tries to use them (eg
persistence.xml - tries to deploy test AND live persistence units which
fails the tests).

 

I kind of hacked it so that I'm able to run tests in one module and
package it. I end up with the following structure:

 

A

--target

classes

--META-INF (incl resources for tests, dependent modules can use
these, when deploying this module's EJBs in the embedded JBoss for
example)

test-classes

--A.jar (includes META-INF with resources for deployment)

 

When I run the build from the parent project though, it builds the first
one properly (eg A.jar) and when testing project B (which depends on A)
it can see on its classpath A/target/classes + A/target/test-classes
(this includes the proper resources for passing the tests) AND the built
A.jar (deployment - ready, including resources that fail the tests).

 

Dependency in B pom.xml is:

 

dependency

groupIdfoo/groupId

artifactIdA/artifactId

typeejb/type

scopeprovided/scope

/dependency

 

Is there a way how to exclude built A.jar from classpath when two
modules are dependent?

 

Hope this makes sense,

 

Petr 



The information contained in this email and its attachments is confidential and 
may be the subject of legal, professional or other privileged information. It 
is intended only for the named addressees and may not be disclosed to anyone 
else without consent from On Demand. If you are not the named addressee you 
must not use, disclose, distribute, copy, print or rely on the contents of this 
email and should destroy it immediately. Whilst On Demand takes care to protect 
its systems from electronic virus attack or other harmful event, the firm gives 
no warranty that this email message (including any attachments to it) is free 
of any virus or other harmful matter and accepts no responsibility for any loss 
or damage resulting from the recipient receiving, opening or using it. If you 
need any further information, please contact the originator of this message on 
+44 (0)20 7131 6700. Website: www.ondemand.co.uk. Registered Office: 1 Stephen 
Street, London, W1T 1AL. Registered in the UK No.4094951.

This message has been scanned for viruses by BlackSpider MailControl - 
www.blackspider.com


Re: Test classpath problem in multi module project

2008-02-26 Thread VUB Stefan Seidel

Hi Petr,

is seems to me that you're trying to work around maven mechanisms, which 
is usually not a good idea. In this case, although I haven't completely 
understood what you are trying to do, I can share some experience about 
EJB3 and Testing.
I have one artifact P where the JBoss embedded container xml files are 
in P/src/test/resources:

-- default.persistence.properties
-- ejb3-interceptors-aop.xml
-- embedded-jboss-beans.xml

Of P I build a test-jar. P has dependencies to
 -- jboss-ejb3-all
 -- thirdparty-all
 -- hibernate-all
JARs as scopesystem/.

The artifacts A...O contain EJB3 beans, with only a persistence.xml in
A/src/main/resources/META-INF
which is the production persistence.xml and usually only contains the 
jta-data-source. The artifacts also contain a test-scope dependency to 
the test-jar of P.


There is no other persistence.xml in the projects.

Then I changed embedded-jboss-beans.xml so that our own datasources are 
being created as HSQLDB instances.


For testing EJB3 within their own build cycle, a trick is needed: in 
buildplugins I declare that the normal tests should not be run in 
the test phase, but rather in the integration-test phase:

  plugin
artifactIdmaven-surefire-plugin/artifactId
configuration
  skipExectrue/skipExec
/configuration
executions
  execution
phaseintegration-test/phase
goals
  goaltest/goal
/goals
configuration
  skipExec${maven.test.skip.exec}/skipExec
/configuration
  /execution
/executions
  /plugin

This has two advantages: Firstly, the built jar is available during the 
tests, secondly, the other dependencies are available as JAR files, not 
as directories.


Then, I have created an Abstract Test Case in P/src/test/java/...:
--- SNIP
import java.io.File;
import java.net.URISyntaxException;

import junit.framework.TestCase;

import org.jboss.ejb3.embedded.EJB3StandaloneBootstrap;

public abstract class AbstractEJB3TestCase extends TestCase {

public AbstractEJB3TestCase() {
super();
}

public AbstractEJB3TestCase(String _name) {
super(_name);
}

public void addEJB3BeanJar(Class _class) {
appendPathToClasspath(_class.getResource(
/ + _class.getCanonicalName().replace(., /) + 
.class).toString().replaceAll(
-client.jar!, .jar!).replaceFirst(jar:file:([^!]+).*, 
$1));

}

@Override
protected void setUp() throws Exception {
System.setProperty(java.naming.factory.initial,
org.jnp.interfaces.LocalOnlyContextFactory);
System.setProperty(java.naming.factory.url.pkgs, 
org.jboss.naming:org.jnp.interfaces);


addBuildJarToClasspath();

EJB3StandaloneBootstrap.boot(null);
EJB3StandaloneBootstrap.scanClasspath();
}

protected void addBuildJarToClasspath() throws URISyntaxException {
final File targetDir = new 
File(this.getClass().getResource(/).toURI()).getParentFile();

File myJar = null;
for (File f : targetDir.listFiles()) {
final String name = f.getName();
if (name.endsWith(.jar)  !name.contains(-test)  
!name.contains(-client)) {

myJar = f;
break;
}
}
if (myJar != null) {
appendPathToClasspath(myJar.getAbsolutePath());
} else {
System.err.println(WARNING: JAR could not be found in the 
classpath.);

System.err.println(Make sure that surefire runs in phase 
+ \u00bbintegration-test\u00ab, not in the default 
phase \u00bbtest\u00ab.);

}
}

protected void appendPathToClasspath(final String _ap) {
final String oldCP = System.getProperty(java.class.path);
if (oldCP.contains(_ap) || !_ap.endsWith(.jar)) {
return;
}
System.setProperty(java.class.path, oldCP + 
File.pathSeparatorChar + _ap);

}

@Override
protected void tearDown() throws Exception {
EJB3StandaloneBootstrap.shutdown();
}
}
--- SNIP

This will do several things: Firstly, it searches for the jar that has 
just been built by accessing / through the classloader, secondly, it 
will modify java.class.path in order that the JBoss embedded deployer 
will find the JARs and deploy them, thirdly, it allows you to specify 
any EJB3 bean class in addEJB3BeanJar and will search for the 
appropriate JAR file in the classpath and will add it to java.class.path.


The in the EJB3 modules, your test cases just need to extend the 
abstract test case, and your EJB3 beans will be deployed just like in 
production environment, but to a local in-memory HSQLDB. You can insert 
test data after the deploy using dbUnit. You can test your beans without 
any mock objects and just as if you had a JBoss running.


Hope 

[Surefire2.3] Resources classpath problem

2008-01-10 Thread Olivier Catteau
Hello,

We have a few problems with the classpath used by surefire. Some tests fail
randomly due to the order of the classpath managed by Surefire.
During the execution of unit tests, it seems that the classpath used by
maven differs from the classpath used by my IDE (IntelliJ).
In IntelliJ, resources are loaded with the following order :
/target/test-classes
/target/classes
.../aLib.jar
.../anotherLib.jar
...

But, by using maven2, the order is :
...
.../aLib.jar
/target/test-classes
/target/classes
.../anotherLib.jar
...

Our projects use Surefire2.3.
Is it possible to patch surefire to get a correct classpath (such as
IntelliJ) ? Has this bug been fixed with maven2.0.8 ?


Thanks.

Regards,
Alexandre Bunod and Olivier Catteau


Re: [Surefire2.3] Resources classpath problem

2008-01-10 Thread Cory Prowse
Yes this does appear to be a problem still in Maven 2.0.8 and I've
raised what seems to be a similar issue here: 
http://jira.codehaus.org/browse/SUREFIRE-427

Although my issue is focusing on test-resources completely missing in
the test-classpath.

 -- Cory

Olivier Catteau wrote:
 Hello,

 We have a few problems with the classpath used by surefire. Some tests fail
 randomly due to the order of the classpath managed by Surefire.
 During the execution of unit tests, it seems that the classpath used by
 maven differs from the classpath used by my IDE (IntelliJ).
 In IntelliJ, resources are loaded with the following order :
 /target/test-classes
 /target/classes
 .../aLib.jar
 .../anotherLib.jar
 ...

 But, by using maven2, the order is :
 ...
 .../aLib.jar
 /target/test-classes
 /target/classes
 .../anotherLib.jar
 ...

 Our projects use Surefire2.3.
 Is it possible to patch surefire to get a correct classpath (such as
 IntelliJ) ? Has this bug been fixed with maven2.0.8 ?


 Thanks.

 Regards,
 Alexandre Bunod and Olivier Catteau

   

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



1.0.2 -- 1.1 classpath problem

2007-12-17 Thread John.E.Gregg
Hi all,

I'm trying to move from 1.0 to 1.1 but am having a classpath problem
with my junit tests.  In particular, I have a test that extends Spring's
AbstractTransactionalDataSourceSpringContextTests.  Hibernate is
involved there also.  In 1.0.2 LocalSessionFactoryBean's
(spring-hibernate) mappingLocations contains a number of Hibernate
mapping files from target/classes.  However in 1.1, I see all those
files plus the same files, but loaded from src/java.  In other words,
both test/classes and src/java are being searched.  This causes my
Hibernate initialization to fail when it tries to load the same file a
second time.  I don't seem to have overridden the src locations
anywhere.  Can someone suggest a solution?

Thanks

John



Re: embedded jetty in maven test phase classpath problem.

2007-08-15 Thread Wayne Fay
I don't use JSP declared methods with %!.

Keep in mind, the jspc-maven-plugin is simply a wrapper calling out to
Tomcat's Jasper compiler. So if what you're doing is not supported in
Jasper, then Maven can't do much for you. But if it is supported, and
you're having a problem, then you might need to talk to the Jasper
guys to see if they have some ideas.

Wayne

On 8/15/07, John Coleman [EMAIL PROTECTED] wrote:
 Hi Wayne,

 I tried this plugin recently but it fails to compile JSPs with calls to
 JSP declared methods in containing JSPs. Is there a solution to this, or
 do you just avoid using ! methods?

 TIA
 John

 -Original Message-
 From: Wayne Fay [mailto:[EMAIL PROTECTED]
 Sent: 14 August 2007 23:19
 To: Maven Users List
 Subject: Re: embedded jetty in maven test phase classpath problem.

 I have been using the jspc plugin for some time now very successfully.
 I agree with Andy -- you should check it out.

 Wayne

 On 8/13/07, Andrew Williams [EMAIL PROTECTED] wrote:
 
  On 1 Aug 2006, at 17:14, Meghan Pike wrote:
 
  [snip]
  
   Does anybody know if this is the case and how I can fix it?
  
   I though maybe I could compile the jsp's to _jsp.java files in the
   pre-test
   phase, but I wasn't sure about how to go about this.
  
 
  You could try using the maven-jspc-plugin (http://mojo.codehaus.org/
  jspc-maven-plugin/usage.html) to precompile the .jsps to get around
  this issue.
 
 
   Also has anybody got jetty working with maven 2? And has any body
   got the
   jetty maven plugin working in the pre-test phase to test their web
   applications with? I would really like to know, cos that would
   provide a
   different solution to my problem.
  
   thanks
  
   meghan
 
  Hope that helps,
  Andy
 
  -
  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]


 Eurobase International Limited and its subsidiaries (Eurobase) are unable to 
 exercise control over the content of information in E-Mails. Any views and 
 opinions expressed may be personal to the sender and are not necessarily 
 those of Eurobase. Eurobase will not enter into any contractual obligations 
 in respect of any part of its business in any E-mail.

 Privileged / confidential information may be contained in this message and 
 /or any attachments. This E-mail is intended for the use of the addressee(s) 
 only and may contain confidential information. If you are not the / an 
 intended recipient, you are hereby notified that any use or dissemination of 
 this communication is strictly prohibited.  If you receive this transmission 
 in error, please notify us immediately, and then delete this E-mail.

 Neither the sender nor Eurobase accepts any liability whatsoever for any 
 defects of any kind either in or arising from this E-mail transmission. 
 E-Mail transmission cannot be guaranteed to be secure or error-free, as 
 messages can be intercepted, lost, corrupted, destroyed, contain viruses, or 
 arrive late or incomplete. Eurobase does not accept any responsibility for 
 viruses and it is your responsibility to scan any attachments.

 Eurobase Systems Limited is the main trading company in the Eurobase 
 International Group; registered in England and Wales as company number 
 02251162; registered address: Essex House, 2 County Place, Chelmsford, Essex 
 CM2 0RE, UK.


 -
 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: embedded jetty in maven test phase classpath problem.

2007-08-14 Thread Wayne Fay
I have been using the jspc plugin for some time now very successfully.
I agree with Andy -- you should check it out.

Wayne

On 8/13/07, Andrew Williams [EMAIL PROTECTED] wrote:

 On 1 Aug 2006, at 17:14, Meghan Pike wrote:

 [snip]
 
  Does anybody know if this is the case and how I can fix it?
 
  I though maybe I could compile the jsp's to _jsp.java files in the
  pre-test
  phase, but I wasn't sure about how to go about this.
 

 You could try using the maven-jspc-plugin (http://mojo.codehaus.org/
 jspc-maven-plugin/usage.html) to precompile the .jsps to get around
 this issue.


  Also has anybody got jetty working with maven 2? And has any body
  got the
  jetty maven plugin working in the pre-test phase to test their web
  applications with? I would really like to know, cos that would
  provide a
  different solution to my problem.
 
  thanks
 
  meghan

 Hope that helps,
 Andy

 -
 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: embedded jetty in maven test phase classpath problem.

2007-08-13 Thread Andrew Williams


On 1 Aug 2006, at 17:14, Meghan Pike wrote:

[snip]


Does anybody know if this is the case and how I can fix it?

I though maybe I could compile the jsp's to _jsp.java files in the  
pre-test

phase, but I wasn't sure about how to go about this.



You could try using the maven-jspc-plugin (http://mojo.codehaus.org/ 
jspc-maven-plugin/usage.html) to precompile the .jsps to get around  
this issue.



Also has anybody got jetty working with maven 2? And has any body  
got the

jetty maven plugin working in the pre-test phase to test their web
applications with? I would really like to know, cos that would  
provide a

different solution to my problem.

thanks

meghan


Hope that helps,
Andy

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



[M2] Weird classpath problem (servlet-api)

2007-01-19 Thread kcheang

Hi All,

I have a web application which uses Maven2. It was working fine until I 
started to add additional features which requires more 3rd-party 
libraries. After I added these libraries to my dependency list, Maven 
couldn't compile the application because servlet-api was not on the 
classpath anymore. But servlet-api is still in my dependency list and 
its scope is set to provided.


If I remove these libraries, servlet-api will again get back to the 
classpath. And it seems this is not related to a particular library. It 
is completely random. It will get to a point that servlet-api will get 
removed when I add a random library to the dependency list.


I am completely lost and frustrated. Could someone please help me?

Thanks much!

Kenny


pgpWxWJgZM9q5.pgp
Description: signature


Classpath problem

2006-11-23 Thread Roozbeh

Hi,

I have a serious problem with kodo and maven2. Kodo needs it's license file
to be put in the root of the class path and I have written a kodo plugin for
maven 2 which is basically ant tasks and I have tried a hell of different
ways to put this license file in different places but it seems that it is
not inserted in the root of the classpath that my ant tasks use. Does anyone
have any idea?

Regards,
Roozbeh Maadani
-- 
View this message in context: 
http://www.nabble.com/Classpath-problem-tf2689837s177.html#a7500843
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Jetty Embedded maven classpath problem.

2006-08-01 Thread Meghan Pike

HI, I'm attempting to use embedded jetty 6.0 and maven 2.0. Unfortunately
jetty has an issue where it requires a copy of tools.jar on the classpath,
in order to compile jsp's. Compiling jsp's is what I want to do. I have been
attempting to mangle maven's classpaths (very wrong, I know) with code like:


build
plugins
  plugin
 artifactIdmaven-antrun-plugin/artifactId
 executions
   execution
 phasegenerate-sources/phase
 configuration
   tasks
   path id=maven.test.classpath
 pathelement location=${JAVA_HOME}/lib/tools.jar/
   /path
   /tasks
 /configuration
 goals
   goalrun/goal
 /goals
   /execution
 /executions
   /plugin
/plugins
 /build

but it hasn't worked. I think maybe because the modified classpath isn't
permanent and is just modified for the phase it is in, and not the test
phase where I need it.

Does anybody know if this is the case and how I can fix it?

I though maybe I could compile the jsp's to _jsp.java files in the pre-test
phase, but I wasn't sure about how to go about this.

Also has anybody got jetty working with maven 2? And has any body got the
jetty maven plugin working in the pre-test phase to test their web
applications with? I would really like to know, cos that would provide a
different solution to my problem.


embedded jetty in maven test phase classpath problem.

2006-08-01 Thread Meghan Pike

HI, I'm attempting to use embedded jetty 6.0 and maven 2.0. Unfortunately
jetty has an issue where it requires a copy of tools.jar on the classpath,
in order to compile jsp's. Compiling jsp's is what I want to do. I have been
attempting to mangle maven's classpaths (very wrong, I know) with code like:


build
plugins
  plugin
 artifactIdmaven-antrun-plugin/artifactId
 executions
   execution
 phasegenerate-sources/phase
 configuration
   tasks
   path id=maven.test.classpath
 pathelement location=${JAVA_HOME}/lib/tools.jar/
   /path
   /tasks
 /configuration
 goals
   goalrun/goal
 /goals
   /execution
 /executions
   /plugin
/plugins
 /build

but it hasn't worked. I think maybe because the modified classpath isn't
permanent and is just modified for the phase it is in, and not the test
phase where I need it.

Does anybody know if this is the case and how I can fix it?

I though maybe I could compile the jsp's to _jsp.java files in the pre-test
phase, but I wasn't sure about how to go about this.

Also has anybody got jetty working with maven 2? And has any body got the
jetty maven plugin working in the pre-test phase to test their web
applications with? I would really like to know, cos that would provide a
different solution to my problem.

thanks

meghan


embedded jetty in maven test phase classpath problem.

2006-08-01 Thread Meghan Pike

HI, I'm attempting to use embedded jetty 6.0 and maven 2.0. Unfortunately
jetty has an issue where it requires a copy of tools.jar on the classpath,
in order to compile jsp's. Compiling jsp's is what I want to do. I have been
attempting to mangle maven's classpaths (very wrong, I know) with code like:


build
plugins
  plugin
 artifactIdmaven-antrun-plugin/artifactId
 executions
   execution
 phasegenerate-sources/phase
 configuration
   tasks
   path id=maven.test.classpath
 pathelement location=${JAVA_HOME}/lib/tools.jar/
   /path
   /tasks
 /configuration
 goals
   goalrun/goal
 /goals
   /execution
 /executions
   /plugin
/plugins
 /build

but it hasn't worked. I think maybe because the modified classpath isn't
permanent and is just modified for the phase it is in, and not the test
phase where I need it.

Does anybody know if this is the case and how I can fix it?

I though maybe I could compile the jsp's to _jsp.java files in the pre-test
phase, but I wasn't sure about how to go about this.

Also has anybody got jetty working with maven 2? And has any body got the
jetty maven plugin working in the pre-test phase to test their web
applications with? I would really like to know, cos that would provide a
different solution to my problem.

thanks

meghan


classpath problem with ant plugin

2006-07-26 Thread raghurajan . x . gurunathan
Hi All,

I'm trying to use antrun plugin to call build.xml 

but when i call it eventhough i have defined jar as dependency in ant 
plugin execution i'm still getting  java.lang.NoClassDefFoundError can 
any one pls help me with this,

This iswhat i'm doing, i have build.xml generated from weblogic workshop, 
and calling that build.xml as follows in my pom

plugin
 artifactIdmaven-antrun-plugin/artifactId
executions
execution
 idWORKSHOP-WEBAPPBUILD/id
goals
goalrun/goal
/goals
 phasegenerate-sources/phase
configuration
tasks
ant 
antfile=${basedir}/jpf_build.xml inheritRefs=true
 target name=build/
/ant
/tasks
/configuration
/execution
/executions
dependencies
dependency
 groupIdweblogic/groupId
 artifactIdjavelin/artifactId
version8.1/version
/dependency
/dependencies
/plugin
/plugins
/build
dependencies
dependency
groupIdweblogic/groupId
artifactIdjavelin/artifactId
/dependency
/dependencies

The class com/bea/compiler/enterprise/IEntProject available in javelin 
jar, and this javelin jar is in my repository and it is being downloaded 
into my local repository also,

but when i ran mvn clean deploy i get the following error, which shows, 
somehow this jar is missing from classpath

java.lang.NoClassDefFoundError: com/bea/compiler/enterprise/IEntProject
[INFO] 

[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error executing 
ant tasks
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
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: Error executing 
ant tasks
at 
org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:114)
at 
org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:83)
at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
... 16 more
Caused by: The following error occurred while executing this line:


any help would be appreciated

Thanks,



-
This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law.  If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED.  Although 

Plugin Classpath Problem

2006-02-19 Thread Brian Topping

Howdy,

I'm putting together some changes for the WAR plugin for resource  
filtering, and I'm having some problems with classpaths.  I've  
attached a stacktrace.  The class that is being searched is in plexus- 
utils-1.2-SNAPSHOT on ibiblio, and it appears from the output snippet  
below that the jar is being properly loaded via local override, but  
when it comes time to load a class from the jar, it's not found.


Presumably it's a problem with my configuration, is there enough  
information in this trace to determine the issue?


Thanks,

Brian


[DEBUG] Retrieving parent-POM from the repository for project:  
null:plexus-utils:jar:1.2-20060213.104414-2
[DEBUG]   org.codehaus.plexus:plexus-utils:jar:1.0.5 (removed -  
nearer found: 1.2-SNAPSHOT)
[DEBUG]   org.codehaus.plexus:plexus-utils:jar:1.2-SNAPSHOT  
(selected for runtime)
[DEBUG]   org.apache.maven:maven-plugin-api:jar:2.0 (selected for  
runtime)
[DEBUG]   org.apache.maven:maven-artifact:jar:2.0.1 (removed -  
nearer found: 2.0)
[DEBUG]   org.apache.maven:maven-artifact:jar:2.0 (selected for  
runtime)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4 (removed -  
nearer found: 1.2-SNAPSHOT)
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-war-plugin: 
2.0-beta-3-SNAPSHOT:war' --
[DEBUG]   (s) classesDirectory = /Users/topping/dev/topspin/topspin- 
web/target/classes
[DEBUG]   (f) filters = [/Users/topping/dev/topspin/topspin-web/src/ 
main/webapp]
[DEBUG]   (f) outputDirectory = /Users/topping/dev/topspin/topspin- 
web/target

[DEBUG]   (s) project = [EMAIL PROTECTED]
[DEBUG]   (f) warName = topspin-web
[DEBUG]   (s) warSourceDirectory = /Users/topping/dev/topspin/ 
topspin-web/src/main/webapp
[DEBUG]   (s) webappDirectory = /Users/topping/dev/topspin/topspin- 
web/target/topspin-web
[DEBUG]   (f) workDirectory = /Users/topping/dev/topspin/topspin- 
web/target/war/work

[DEBUG] -- end configuration --
[INFO] [war:war]
[INFO] Exploding webapp...
[INFO] Copy webapp resources to /Users/topping/dev/topspin/topspin- 
web/target/topspin-web
[INFO]  
-- 
--

[ERROR] FATAL ERROR
[INFO]  
-- 
--

[INFO] org/codehaus/plexus/util/FileUtils$FilterWrapper
[INFO]  
-- 
--

[DEBUG] Trace
java.lang.NoClassDefFoundError: org/codehaus/plexus/util/FileUtils 
$FilterWrapper
at org.apache.maven.plugin.war.AbstractWarMojo.copyFile 
(AbstractWarMojo.java:329)
at org.apache.maven.plugin.war.AbstractWarMojo.copyResources 
(AbstractWarMojo.java:310)
at  
org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp 
(AbstractWarMojo.java:276)
at org.apache.maven.plugin.war.WarMojo.performPackaging 
(WarMojo.java:146)
at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java: 
124)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo 
(DefaultPluginManager.java:415)
at  
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals 
(DefaultLifecycleExecutor.java:531)
at  
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLif 
ecycle(DefaultLifecycleExecutor.java:472)
at  
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal 
(DefaultLifecycleExecutor.java:451)
at  
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHand 
leFailures(DefaultLifecycleExecutor.java:303)
at  
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegment 
s(DefaultLifecycleExecutor.java:270)
at  
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute 
(DefaultLifecycleExecutor.java:139)
at org.apache.maven.DefaultMaven.doExecute 
(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java: 
115)

at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)
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)





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



Re: Plugin Classpath Problem

2006-02-19 Thread Brett Porter
Unfortunately at this time, plexus-utils is in the root classloader
shared by all plugins. So version in $M2_HOME/core is the version you
get regardless of dependencies.

- Brett

On 2/19/06, Brian Topping [EMAIL PROTECTED] wrote:
 Howdy,

 I'm putting together some changes for the WAR plugin for resource
 filtering, and I'm having some problems with classpaths.  I've
 attached a stacktrace.  The class that is being searched is in plexus-
 utils-1.2-SNAPSHOT on ibiblio, and it appears from the output snippet
 below that the jar is being properly loaded via local override, but
 when it comes time to load a class from the jar, it's not found.

 Presumably it's a problem with my configuration, is there enough
 information in this trace to determine the issue?

 Thanks,

 Brian


  [DEBUG] Retrieving parent-POM from the repository for project:
  null:plexus-utils:jar:1.2-20060213.104414-2
  [DEBUG]   org.codehaus.plexus:plexus-utils:jar:1.0.5 (removed -
  nearer found: 1.2-SNAPSHOT)
  [DEBUG]   org.codehaus.plexus:plexus-utils:jar:1.2-SNAPSHOT
  (selected for runtime)
  [DEBUG]   org.apache.maven:maven-plugin-api:jar:2.0 (selected for
  runtime)
  [DEBUG]   org.apache.maven:maven-artifact:jar:2.0.1 (removed -
  nearer found: 2.0)
  [DEBUG]   org.apache.maven:maven-artifact:jar:2.0 (selected for
  runtime)
  [DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4 (removed -
  nearer found: 1.2-SNAPSHOT)
  [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-war-plugin:
  2.0-beta-3-SNAPSHOT:war' --
  [DEBUG]   (s) classesDirectory = /Users/topping/dev/topspin/topspin-
  web/target/classes
  [DEBUG]   (f) filters = [/Users/topping/dev/topspin/topspin-web/src/
  main/webapp]
  [DEBUG]   (f) outputDirectory = /Users/topping/dev/topspin/topspin-
  web/target
  [DEBUG]   (s) project = [EMAIL PROTECTED]
  [DEBUG]   (f) warName = topspin-web
  [DEBUG]   (s) warSourceDirectory = /Users/topping/dev/topspin/
  topspin-web/src/main/webapp
  [DEBUG]   (s) webappDirectory = /Users/topping/dev/topspin/topspin-
  web/target/topspin-web
  [DEBUG]   (f) workDirectory = /Users/topping/dev/topspin/topspin-
  web/target/war/work
  [DEBUG] -- end configuration --
  [INFO] [war:war]
  [INFO] Exploding webapp...
  [INFO] Copy webapp resources to /Users/topping/dev/topspin/topspin-
  web/target/topspin-web
  [INFO]
  --
  --
  [ERROR] FATAL ERROR
  [INFO]
  --
  --
  [INFO] org/codehaus/plexus/util/FileUtils$FilterWrapper
  [INFO]
  --
  --
  [DEBUG] Trace
  java.lang.NoClassDefFoundError: org/codehaus/plexus/util/FileUtils
  $FilterWrapper
  at org.apache.maven.plugin.war.AbstractWarMojo.copyFile
  (AbstractWarMojo.java:329)
  at org.apache.maven.plugin.war.AbstractWarMojo.copyResources
  (AbstractWarMojo.java:310)
  at
  org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp
  (AbstractWarMojo.java:276)
  at org.apache.maven.plugin.war.WarMojo.performPackaging
  (WarMojo.java:146)
  at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:
  124)
  at org.apache.maven.plugin.DefaultPluginManager.executeMojo
  (DefaultPluginManager.java:415)
  at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
  (DefaultLifecycleExecutor.java:531)
  at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLif
  ecycle(DefaultLifecycleExecutor.java:472)
  at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
  (DefaultLifecycleExecutor.java:451)
  at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHand
  leFailures(DefaultLifecycleExecutor.java:303)
  at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegment
  s(DefaultLifecycleExecutor.java:270)
  at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
  (DefaultLifecycleExecutor.java:139)
  at org.apache.maven.DefaultMaven.doExecute
  (DefaultMaven.java:322)
  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:
  115)
  at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke
  (NativeMethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke
  (DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  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)
 



 

Re: [M2] classpath problem with surefire

2005-07-13 Thread c_inconnu3

Joakim Erdfelt a écrit :


Johnny Ruiz wrote:


c_inconnu3 wrote:

And 2 properties files in src/test/resources/ and 
src/test/resources/a/b/c/.

When I run m2 test the following always returns null:



InputStream inputStream =
ClassLoader.getSystemResourceAsStream(a/b/c/myTest.properties);
System.out.println(  + inputStream); // null
inputStream = 
ClassLoader.getSystemResourceAsStream(myTest.properties);

System.out.println(  + inputStream); // null

I had this problem before, I solved it by not relying on the System 
ClassLoader.
(BTW: Surefire Isolates the test's ClassLoaders from the Maven 
ClassLoaders).


Use the same ClassLoader that the TestCase was loaded via.

Change it from ...
 InputStream inputStream =
 ClassLoader.getSystemResourceAsStream(a/b/c/myTest.properties);
to ...
 InputStream inputStream =
 
this.getClass().getClassLoader().getSystemResourceAsStream(a/b/c/myTest.properties); 



This subtle change helped me.
If that works, I'll explain why. ;-)

/* Joakim Erdfelt */

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




Thanks for this great help, i was going mad... :-)

This works :
* 
this.getClass().getClassLoader().getResourceAsStream(a/b/c/myTest.properties);


This DOES NOT works :
* ClassLoader.getSystemResourceAsStream(a/b/c/myTest.properties);
* 
this.getClass().getClassLoader().getSystemResourceAsStream(a/b/c/myTest.properties);


quote
If that works, I'll explain why. ;-)
/quote



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



Re: [M2] classpath problem with surefire

2005-07-13 Thread Jason van Zyl
On Wed, 2005-07-13 at 18:46 +0200, c_inconnu3 wrote:

 Thanks for this great help, i was going mad... :-)
 
 This works :
 * 
 this.getClass().getClassLoader().getResourceAsStream(a/b/c/myTest.properties);
 
 This DOES NOT works :
 * ClassLoader.getSystemResourceAsStream(a/b/c/myTest.properties);
 * 
 this.getClass().getClassLoader().getSystemResourceAsStream(a/b/c/myTest.properties);
 
 quote
 If that works, I'll explain why. ;-)
 /quote

As Joakim explained each plug-in runs inside its own ClassLoader so you
need to use the ClassLoader which loaded the plug-in in order to find
any resources packaged with the plug-in.

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

Jason van Zyl
jason at maven.org
http://maven.apache.org

We know what we are, but know not what we may be.

  -- Shakespeare


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



Re: [M2] classpath problem with surefire

2005-07-13 Thread Joakim Erdfelt

c_inconnu3 wrote:


Joakim Erdfelt a écrit :

Thanks for this great help, i was going mad... :-)

This works :
* 
this.getClass().getClassLoader().getResourceAsStream(a/b/c/myTest.properties); 



This DOES NOT works :
* ClassLoader.getSystemResourceAsStream(a/b/c/myTest.properties);
* 
this.getClass().getClassLoader().getSystemResourceAsStream(a/b/c/myTest.properties); 



quote
If that works, I'll explain why. ;-)
/quote


Jason has far more experience with Custom ClassLoaders than I do, but 
this is what I've learned ...


ClassLoaders are a way for the JVM to load a resource, the most 
traditional techniques being from a file system or from a jar file, and 
the most common resource being the raw bytes of a class file.


The call to ClassLoader.getSystemResourceAsString() will use the System 
ClassLoader, which is top level ClassLoader that gets populated with the 
classpath from the java command line, the CLASSPATH environment 
variable, and the contents of the extension folder. (Man, I'm really 
over-simplifying things here, there's more subtly then this when you get 
into the guts of it, but I don't think that's important for this 
explanation).


Maven manages what dependencies the Plugins and Projects can see by 
using a custom ClassLoader.


A custom ClassLoader, that is placed into the 
Thread.setContextClassLoader(), can isolate the dependencies required to 
exist only for the processes running within the life of that thread.


This is how the Maven Container (and J2EE Containers) can have multiple 
programs using incompatible dependencies operate with complete oblivion 
to each other.


In your example, you are actually running within 2 isolations of 
ClassLoaders.


 1) System ClassLoader (which maven core runs in)
   1.1) Plugin Isolated ClassLoader (which maven core spawned)
 1.1.1) Surefire Battery ClassLoader (which the surefire spawned)
1.1.1.a) Your tests.

When your original code running in the nested ClassLoader at 1.1.1.a 
asked the default System ClassLoader to obtain a resource, you 
essentially asked for a resource in the classpath all the way up at step 1.


When you changed your test to use 
this.getClass().getClassLoader().getResource... you stated that you want 
to use the same ClassLoader that started the tests. (which would be the 
one at 1.1.1).


That's why it worked.

BTW: I've gotten into the habit of always using the ClassLoader from the 
loaded class, this makes my libraries work everywhere.


Here's a snippet of code that I use to bootstrap a ClassLoader and kick 
of the 'public void main(String args[])' method in another class.


 URLClassLoader loader = new URLClassLoader(locator.getUrls());
 Thread.currentThread().setContextClassLoader(loader);
 Class mainClass = loader.loadClass(com.initech.vi.rus.Cli);
 Object objmain = mainClass.newInstance();
 Class argClass = Array.newInstance(String.class, 0).getClass();
 Method mainMethod = mainClass.getMethod(main, new Class[] { argClass });
 String arguments[] = (String[]) argList.toArray(new String[0]);
 mainMethod.invoke(objmain, new Object[] { arguments });

Hope that fulfills my promise. ;-)

/* Joakim Erdfelt */

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



[M2] classpath problem with surefire

2005-07-12 Thread c_inconnu3

Hi,

I have this pom:



?xml version=1.0 encoding=UTF-8?

project xmlns=http://maven.apache.org/POM/4.0.0;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
maven-v4_0_0.xsd

   modelVersion4.0.0/modelVersion

   groupIdmygroup/groupId
   artifactIdtests/artifactId
   version0.20-SNAPSHOT/version

   packagingjar/packaging

   dependencies
   dependency
   groupIdjunit/groupId
   artifactIdjunit/artifactId
   version3.8.1/version
   typejar/type
   scopetest/scope
   /dependency
   /dependencies

   build
   sourceDirectorysrc/main/java/sourceDirectory
   testSourceDirectorysrc/test/java/testSourceDirectory

   testResources
   testResource
   directorysrc/test/resources/directory
   includes
   include**/*.properties/include
   /includes
   /testResource
   /testResources

   plugins
   plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-compiler-plugin/artifactId
   version2.0-alpha-3/version
   configuration
   source1.5/source
   target1.5/target
   /configuration
   /plugin
   /plugins
   /build

/project



And 2 properties files in src/test/resources/ and src/test/resources/a/b/c/.
When I run m2 test the following always returns null:



InputStream inputStream =
ClassLoader.getSystemResourceAsStream(a/b/c/myTest.properties);
System.out.println(  + inputStream); // null
inputStream = ClassLoader.getSystemResourceAsStream(myTest.properties);
System.out.println(  + inputStream); // null



This works in eclipse and the properties files are indeed copied into
target/test-classes/ and target/test-classes/a/b/c/.

I cannot figure out what is wrong...

David DIDIER


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



Re: [M2] classpath problem with surefire

2005-07-12 Thread Johnny Ruiz

c_inconnu3 wrote:


Hi,

I have this pom:



?xml version=1.0 encoding=UTF-8?

project xmlns=http://maven.apache.org/POM/4.0.0;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
maven-v4_0_0.xsd

   modelVersion4.0.0/modelVersion

   groupIdmygroup/groupId
   artifactIdtests/artifactId
   version0.20-SNAPSHOT/version

   packagingjar/packaging

   dependencies
   dependency
   groupIdjunit/groupId
   artifactIdjunit/artifactId
   version3.8.1/version
   typejar/type
   scopetest/scope
   /dependency
   /dependencies

   build
   sourceDirectorysrc/main/java/sourceDirectory
   testSourceDirectorysrc/test/java/testSourceDirectory

   testResources
   testResource
   directorysrc/test/resources/directory
   includes
   include**/*.properties/include
   /includes
   /testResource
   /testResources

   plugins
   plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-compiler-plugin/artifactId
   version2.0-alpha-3/version
   configuration
   source1.5/source
   target1.5/target
   /configuration
   /plugin
   /plugins
   /build

/project



And 2 properties files in src/test/resources/ and 
src/test/resources/a/b/c/.

When I run m2 test the following always returns null:



InputStream inputStream =
ClassLoader.getSystemResourceAsStream(a/b/c/myTest.properties);
System.out.println(  + inputStream); // null
inputStream = ClassLoader.getSystemResourceAsStream(myTest.properties);
System.out.println(  + inputStream); // null



This works in eclipse and the properties files are indeed copied into
target/test-classes/ and target/test-classes/a/b/c/.

I cannot figure out what is wrong...

David DIDIER


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


Hi DAVID,

I'm not sure if I understand ur problem correctly but this might help.  
Please try this code..


try
   {
   inputStream = (InputStream) new 
FileInputStream(target/test-classes/a/b/c/myTest.properties);
   System.out.println(  + inputStream); //not null 
anymore :)
   File f = new 
File(target/test-classes/a/b/c/myTest.properties);
   System.out.println(File Exist =  + f.exists() +  :: 
Absolute Path = + f.getAbsolutePath());

 }
 catch (Exception ex){}


Johnny Ruiz


Re: [M2] classpath problem with surefire

2005-07-12 Thread Joakim Erdfelt

Johnny Ruiz wrote:


c_inconnu3 wrote:

And 2 properties files in src/test/resources/ and 
src/test/resources/a/b/c/.

When I run m2 test the following always returns null:



InputStream inputStream =
ClassLoader.getSystemResourceAsStream(a/b/c/myTest.properties);
System.out.println(  + inputStream); // null
inputStream = 
ClassLoader.getSystemResourceAsStream(myTest.properties);

System.out.println(  + inputStream); // null

I had this problem before, I solved it by not relying on the System 
ClassLoader.
(BTW: Surefire Isolates the test's ClassLoaders from the Maven 
ClassLoaders).


Use the same ClassLoader that the TestCase was loaded via.

Change it from ...
 InputStream inputStream =
 ClassLoader.getSystemResourceAsStream(a/b/c/myTest.properties);
to ...
 InputStream inputStream =
 
this.getClass().getClassLoader().getSystemResourceAsStream(a/b/c/myTest.properties); 



This subtle change helped me.
If that works, I'll explain why. ;-)

/* Joakim Erdfelt */

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



maven cactus plugin classpath problem

2004-12-25 Thread lincoln zheng
Hi All The Mavens!
I test cactus:test, it failed, it can not find javax.servlet pachage. I let 
environment classpath variable to point to the location of the pachage, but 
it not working?
Thanks
Lincoln


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


RE: Classpath Problem

2004-05-25 Thread Amato Massimiliano \(TLAB\)
Yes, but i don't think this is the problem. 

MY first test was to have an ant script that worked perfectly with all the dependancy 
in a lib directory, then I updated the script to use maven but i kept the libs local 
not in the repository and it startet having problem

I think this could be related to an xml parser, since in the ant execution it gives me 
a warning about jaxp not able to invoce SAX, swtiching now to aelfred that under maven 
is not printed

Max

-Original Message-
From: Dion Gillard [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 25, 2004 1:07 AM
To: Maven Users List
Subject: Re: Classpath Problem


Does it require tools.jar from the JDK on the classpath?

On Mon, 24 May 2004 16:51:12 +0200, Amato Massimiliano (TLAB)
[EMAIL PROTECTED] wrote:
 
 Hello,
 
 I am trying to write a plugin for workzen. I built an ant script that works 
 perfectly but when i tried to convert it into a plugin it failed.
 
 It looks like it is a classpath problem but i don't know exactly what to do..
 
 Here's the output of my execution and the plugin.jelly file
 
 ?xml version=1.0?
 
 project
 xmlns:j=jelly:core
 xmlns:jelxml=jelly:xml
 xmlns:jelant=jelly:ant
 xmlns:maven=jelly:maven
 xmlns:m=maven
 
   goal name=test description=Generate Delegator Classes
 
  path id=classpath
 path refid=maven.dependency.classpath/
 pathelement path=${plugin.getDependencyPath('dom4j')}/
 pathelement path=${plugin.getDependencyPath('log4j')}/
 pathelement path=${plugin.getDependencyPath('workzen+xit')}/
 pathelement path=${plugin.getDependencyPath('workzen+common')}/
 /path
 
 taskdef name=xml2bean classname=workzen.xit.ant.Xml2BeanTask
 classpath
 pathelement 
 path=${plugin.getDependencyPath('workzen+xit')}/
 /classpath
 /taskdef
 
 mkdir dir=./work/fred/output1/
 xml2bean
 Template  = /${basedir}/src/conf/pojo/control.vm
 InputUrl= /${basedir}/src/conf/pojo/bean.xml
 OutputDir   = ./work/fred/output1
 classpath refid=classpath/
 /xml2bean
   /goal
 
 /project
 
 And here's the output
  __  __
 |  \/  |__ _Apache__ ___
 | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
 |_|  |_\__,_|\_/\___|_||_|  v. 1.0-rc1-SNAPSHOT
 
 0 [main] INFO workzen.xit.Engine  - input connector: 
 workzen.xit.module.xml2bean.connector.Xml2BeanConnector
 0 [main] INFO workzen.xit.connector.XmlConnector  - input url: 
 /D:/Projects/Misc/Generator/src/conf/pojo/bean.xml
 16 [main] INFO workzen.xit.connector.XmlConnector  - output url: null
 328 [main] DEBUG workzen.xit.module.xml2bean.util.XmlLoader  - 
 package:com.workzen.xit.module.xml2bean.test
 344 [main] DEBUG workzen.xit.module.xml2bean.util.XmlLoader  - bean name:TypeBean
 359 [main] DEBUG workzen.xit.module.xml2bean.util.XmlLoader  - fit size: 15
 359 [main] DEBUG workzen.xit.module.xml2bean.util.XmlLoader  - field name:pKey
 359 [main] DEBUG workzen.xit.module.xml2bean.util.XmlLoader  - isprimary:true
 testa:
 [xml2bean] [ERROR] java.lang.NoClassDefFoundError: 
 sun/reflect/ConstructorAccessorImpl
 BUILD SUCCESSFUL
 Total time: 6 seconds
 Finished at: Mon May 24 16:43:17 CEST 2004
 
 Any help would be great
 Max
 
 -
 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]


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



Classpath Problem

2004-05-24 Thread Amato Massimiliano \(TLAB\)
Hello,

I am trying to write a plugin for workzen. I built an ant script that works perfectly 
but when i tried to convert it into a plugin it failed.

It looks like it is a classpath problem but i don't know exactly what to do..

Here's the output of my execution and the plugin.jelly file

?xml version=1.0?

project
xmlns:j=jelly:core
xmlns:jelxml=jelly:xml
xmlns:jelant=jelly:ant
xmlns:maven=jelly:maven
xmlns:m=maven

  goal name=test description=Generate Delegator Classes

 path id=classpath
path refid=maven.dependency.classpath/
pathelement path=${plugin.getDependencyPath('dom4j')}/
pathelement path=${plugin.getDependencyPath('log4j')}/  
pathelement path=${plugin.getDependencyPath('workzen+xit')}/
pathelement path=${plugin.getDependencyPath('workzen+common')}/

/path
 
taskdef name=xml2bean classname=workzen.xit.ant.Xml2BeanTask
classpath
pathelement 
path=${plugin.getDependencyPath('workzen+xit')}/  
/classpath
/taskdef
   
mkdir dir=./work/fred/output1/
xml2bean   
Template  = /${basedir}/src/conf/pojo/control.vm
InputUrl= /${basedir}/src/conf/pojo/bean.xml
OutputDir   = ./work/fred/output1
classpath refid=classpath/
/xml2bean   
  /goal

/project

And here's the output
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.0-rc1-SNAPSHOT

0 [main] INFO workzen.xit.Engine  - input connector: 
workzen.xit.module.xml2bean.connector.Xml2BeanConnector
0 [main] INFO workzen.xit.connector.XmlConnector  - input url: 
/D:/Projects/Misc/Generator/src/conf/pojo/bean.xml
16 [main] INFO workzen.xit.connector.XmlConnector  - output url: null
328 [main] DEBUG workzen.xit.module.xml2bean.util.XmlLoader  - 
package:com.workzen.xit.module.xml2bean.test
344 [main] DEBUG workzen.xit.module.xml2bean.util.XmlLoader  - bean name:TypeBean
359 [main] DEBUG workzen.xit.module.xml2bean.util.XmlLoader  - fit size: 15
359 [main] DEBUG workzen.xit.module.xml2bean.util.XmlLoader  - field name:pKey
359 [main] DEBUG workzen.xit.module.xml2bean.util.XmlLoader  - isprimary:true
testa:
[xml2bean] [ERROR] java.lang.NoClassDefFoundError: 
sun/reflect/ConstructorAccessorImpl
BUILD SUCCESSFUL
Total time: 6 seconds
Finished at: Mon May 24 16:43:17 CEST 2004


Any help would be great
Max

























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



Re: Classpath Problem

2004-05-24 Thread Dion Gillard
Does it require tools.jar from the JDK on the classpath?

On Mon, 24 May 2004 16:51:12 +0200, Amato Massimiliano (TLAB)
[EMAIL PROTECTED] wrote:
 
 Hello,
 
 I am trying to write a plugin for workzen. I built an ant script that works 
 perfectly but when i tried to convert it into a plugin it failed.
 
 It looks like it is a classpath problem but i don't know exactly what to do..
 
 Here's the output of my execution and the plugin.jelly file
 
 ?xml version=1.0?
 
 project
 xmlns:j=jelly:core
 xmlns:jelxml=jelly:xml
 xmlns:jelant=jelly:ant
 xmlns:maven=jelly:maven
 xmlns:m=maven
 
   goal name=test description=Generate Delegator Classes
 
  path id=classpath
 path refid=maven.dependency.classpath/
 pathelement path=${plugin.getDependencyPath('dom4j')}/
 pathelement path=${plugin.getDependencyPath('log4j')}/
 pathelement path=${plugin.getDependencyPath('workzen+xit')}/
 pathelement path=${plugin.getDependencyPath('workzen+common')}/
 /path
 
 taskdef name=xml2bean classname=workzen.xit.ant.Xml2BeanTask
 classpath
 pathelement 
 path=${plugin.getDependencyPath('workzen+xit')}/
 /classpath
 /taskdef
 
 mkdir dir=./work/fred/output1/
 xml2bean
 Template  = /${basedir}/src/conf/pojo/control.vm
 InputUrl= /${basedir}/src/conf/pojo/bean.xml
 OutputDir   = ./work/fred/output1
 classpath refid=classpath/
 /xml2bean
   /goal
 
 /project
 
 And here's the output
  __  __
 |  \/  |__ _Apache__ ___
 | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
 |_|  |_\__,_|\_/\___|_||_|  v. 1.0-rc1-SNAPSHOT
 
 0 [main] INFO workzen.xit.Engine  - input connector: 
 workzen.xit.module.xml2bean.connector.Xml2BeanConnector
 0 [main] INFO workzen.xit.connector.XmlConnector  - input url: 
 /D:/Projects/Misc/Generator/src/conf/pojo/bean.xml
 16 [main] INFO workzen.xit.connector.XmlConnector  - output url: null
 328 [main] DEBUG workzen.xit.module.xml2bean.util.XmlLoader  - 
 package:com.workzen.xit.module.xml2bean.test
 344 [main] DEBUG workzen.xit.module.xml2bean.util.XmlLoader  - bean name:TypeBean
 359 [main] DEBUG workzen.xit.module.xml2bean.util.XmlLoader  - fit size: 15
 359 [main] DEBUG workzen.xit.module.xml2bean.util.XmlLoader  - field name:pKey
 359 [main] DEBUG workzen.xit.module.xml2bean.util.XmlLoader  - isprimary:true
 testa:
 [xml2bean] [ERROR] java.lang.NoClassDefFoundError: 
 sun/reflect/ConstructorAccessorImpl
 BUILD SUCCESSFUL
 Total time: 6 seconds
 Finished at: Mon May 24 16:43:17 CEST 2004
 
 Any help would be great
 Max
 
 -
 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 and classpath problem

2003-12-02 Thread dion
Geesken, Edmund [EMAIL PROTECTED] wrote on 01/12/2003 10:04:38 
PM:

 Thanks for your answer but when I set the maven.dependency.classpath as 
the
 classpathref attirbute the result ist he same.
 
 
 
   goal name=Work:doCompile
 
 ant:echo...${file}.../ant:echo
 
 ant:echo...${maven.dependency.classpath}.../ant:echo
See my previous email on echo'ing objects using ant.
--
dIon Gillard, Multitask Consulting
Blog:  http://blogs.codehaus.org/people/dion/



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



calling ant and classpath problem

2003-12-01 Thread Geesken, Edmund
Thanks for your answer but when I set the maven.dependency.classpath as the
classpathref attirbute the result ist he same.

 

  goal name=Work:doCompile

ant:echo...${file}.../ant:echo

ant:echo...${maven.dependency.classpath}.../ant:echo





ant:jspc srcdir=${file.parentFile}

  destdir=${maven.build.dir}/default.war/jsptmp

  compiler=jasper

  verbose=9

  failonerror=true

  include name=${file.name} 

  classpathref=maven.dependency.classpath /

/ant:jspc

 



  /goal

 

 

The ant:echo shows an empty string but my project is build correctly maven
java:compile returns with no error

I have included the jasper-compiler.jar and the jasper-runtime.jar in the
dependency path (project.xml) but the result was the same.

Any idea?

 

Regards Edmund




The information contained herein is confidential and is intended solely for the
addressee. Access by any other party is unauthorised without the express 
written permission of the sender. If you are not the intended recipient, please 
contact the sender either via the company switchboard on +44 (0)20 7623 8000, or
via e-mail return. If you have received this e-mail in error or wish to read our
e-mail disclaimer statement and monitoring policy, please refer to 
http://www.drkw.com/disc/email/ or contact the sender.




calling ant and classpath problem

2003-12-01 Thread Geesken, Edmund
I have search around and have found one thing  i can not explain for me.

After every start of maven for example java:compile, site:generate or
something else.

The line 

Attempting to download maven-SNAPSHOT.jar.

is shown.

But when I start my own goal which is defined in the maven.xml file

Work:doCompile

 

This line is never shown.

 

Is maven not initialized?

Is there something more I have to do?

 

My maven.xml file

 

project default=Work:doCompile xmlns:ant=jelly:ant xmlns:j=jelly:core
xmlns:maven=jelly:maven

 

 goal name=Work:compileJSP

ant:echo...${file}.../ant:echo

ant:echo.maven..${maven.dependency.classpath}.../ant:echo

ant:echo.pom..${pom.dependency.classpath}.../ant:echo

ant:echo.classpath..${classpath}.../ant:echo

 

ant:classpath

   ant:path refid=maven.dependency.classpath/

   ant:pathelement path=${maven.build.dest}/

/ant:classpath



ant:jspc srcdir=${file.parentFile}

  destdir=${maven.build.dir}/default.war/jsptmp

  compiler=jasper

  verbose=9

  failonerror=true

  include name=${file.name} 

  classpathref=maven.compile.src.set /

/ant:jspc

 

  /goal

 

  goal name=Work:doCompile description=Compiles all JSPs

fileScanner var=files

  fileset dir=${pbase.dir}/jboss/server/default/deploy/default.war

include name=**/*.jsp /

exclude name=WEB-INF/* /

  /fileset

/fileScanner



j:forEach items=${files.iterator()} var=file

  j:set var=filename value=${file.parentFile.name} /

  ant:echo::${file.name}/ant:echo 

  ant:echo::${file.path}/ant:echo   

  ant:echo::${file.parentFile}/ant:echo   

  attainGoal name=Work:compileJSP/

/j:forEach

  /goal

 

/project

 

And the output on the console

 

C:\Limex51\MAVENmaven Work:doCompile

 __  __

|  \/  |__ _Apache__ ___

| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~

|_|  |_\__,_|\_/\___|_||_|  v. 1.0-rc1-SNAPSHOT

 

Work:doCompile:

[echo] ::region.jsp

[echo]
::C:\Lim\jboss\server\default\deploy\default.war\masterdata\cpty\region.jsp

[echo] ::C:\Lim\jboss\server\default\deploy\default.war\masterdata\cpty

Work:compileJSP:

[echo]
...C:\Lim\jboss\server\default\deploy\default.war\masterdata\cpty\region.jsp
...

[echo] .maven.

[echo] .pom.

[echo] .classpath.

[jspc] Compiling 1 source
fileC:\Lim\jboss\server\default\deploy\default.war\jsptmp

[jspc] java.lang.NoClassDefFoundError: org/apache/jasper/JspC

[jspc] Exception in thread main

 

BUILD FAILED

File.. file:/C:/project/MAVEN/

Element... ant:jspc

Line.. 21

Column 27

Java returned: 1

Total time: 6 seconds

Finished at: Mon Dec 01 13:13:45 CET 2003

 

 

Any idea what I forgot to do, to initialize??

The jars which contains the JspC are in the project.xml file

 

dependency

  groupIdjboss/groupId

  artifactIdjasper-compiler/artifactId

  version1.0/version

/dependency

dependency

  groupIdjboss/groupId

  artifactIdjasper-runtime/artifactId

  version1.0/version

/dependency

 

Am really happy for any hint

Thanks

 

Edmund 




The information contained herein is confidential and is intended solely for the
addressee. Access by any other party is unauthorised without the express
written permission of the sender. If you are not the intended recipient, please
contact the sender either via the company switchboard on +44 (0)20 7623 8000, or
via e-mail return. If you have received this e-mail in error or wish to read our
e-mail disclaimer statement and monitoring policy, please refer to 
http://www.drkw.com/disc/email/ or contact the sender.




Re: calling ant and classpath problem

2003-12-01 Thread khote
use -X switch to watch where it fails.

- Original Message - 
From: Geesken, Edmund [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 01, 2003 4:59 AM
Subject: calling ant and classpath problem


 I have search around and have found one thing  i can not explain for me.

 After every start of maven for example java:compile, site:generate or
 something else.

 The line

 Attempting to download maven-SNAPSHOT.jar.

 is shown.

 But when I start my own goal which is defined in the maven.xml file

 Work:doCompile



 This line is never shown.



 Is maven not initialized?

 Is there something more I have to do?



 My maven.xml file



 project default=Work:doCompile xmlns:ant=jelly:ant
xmlns:j=jelly:core
 xmlns:maven=jelly:maven



  goal name=Work:compileJSP

 ant:echo...${file}.../ant:echo

 ant:echo.maven..${maven.dependency.classpath}.../ant:echo

 ant:echo.pom..${pom.dependency.classpath}.../ant:echo

 ant:echo.classpath..${classpath}.../ant:echo



 ant:classpath

ant:path refid=maven.dependency.classpath/

ant:pathelement path=${maven.build.dest}/

 /ant:classpath



 ant:jspc srcdir=${file.parentFile}

   destdir=${maven.build.dir}/default.war/jsptmp

   compiler=jasper

   verbose=9

   failonerror=true

   include name=${file.name}

   classpathref=maven.compile.src.set /

 /ant:jspc



   /goal



   goal name=Work:doCompile description=Compiles all JSPs

 fileScanner var=files

   fileset dir=${pbase.dir}/jboss/server/default/deploy/default.war

 include name=**/*.jsp /

 exclude name=WEB-INF/* /

   /fileset

 /fileScanner



 j:forEach items=${files.iterator()} var=file

   j:set var=filename value=${file.parentFile.name} /

   ant:echo::${file.name}/ant:echo

   ant:echo::${file.path}/ant:echo

   ant:echo::${file.parentFile}/ant:echo

   attainGoal name=Work:compileJSP/

 /j:forEach

   /goal



 /project



 And the output on the console



 C:\Limex51\MAVENmaven Work:doCompile

  __  __

 |  \/  |__ _Apache__ ___

 | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~

 |_|  |_\__,_|\_/\___|_||_|  v. 1.0-rc1-SNAPSHOT



 Work:doCompile:

 [echo] ::region.jsp

 [echo]

::C:\Lim\jboss\server\default\deploy\default.war\masterdata\cpty\region.jsp

 [echo]
::C:\Lim\jboss\server\default\deploy\default.war\masterdata\cpty

 Work:compileJSP:

 [echo]

...C:\Lim\jboss\server\default\deploy\default.war\masterdata\cpty\region.jsp
 ...

 [echo] .maven.

 [echo] .pom.

 [echo] .classpath.

 [jspc] Compiling 1 source
 fileC:\Lim\jboss\server\default\deploy\default.war\jsptmp

 [jspc] java.lang.NoClassDefFoundError: org/apache/jasper/JspC

 [jspc] Exception in thread main



 BUILD FAILED

 File.. file:/C:/project/MAVEN/

 Element... ant:jspc

 Line.. 21

 Column 27

 Java returned: 1

 Total time: 6 seconds

 Finished at: Mon Dec 01 13:13:45 CET 2003





 Any idea what I forgot to do, to initialize??

 The jars which contains the JspC are in the project.xml file



 dependency

   groupIdjboss/groupId

   artifactIdjasper-compiler/artifactId

   version1.0/version

 /dependency

 dependency

   groupIdjboss/groupId

   artifactIdjasper-runtime/artifactId

   version1.0/version

 /dependency



 Am really happy for any hint

 Thanks



 Edmund



 --
--
 The information contained herein is confidential and is intended solely
for the
 addressee. Access by any other party is unauthorised without the express
 written permission of the sender. If you are not the intended recipient,
please
 contact the sender either via the company switchboard on +44 (0)20 7623
8000, or
 via e-mail return. If you have received this e-mail in error or wish to
read our
 e-mail disclaimer statement and monitoring policy, please refer to
 http://www.drkw.com/disc/email/ or contact the sender.
 --
--




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



Re: calling ant and classpath problem

2003-12-01 Thread khote
The maven hibernate plugin doesn't work, so I wrote this stuff to get it to
work:

  goal name=createdb:taskdef description=Define the schemaexport task to
both Ant and XDoclet
ant:path id=project.classpath
  ant:path refid=maven.dependency.classpath/
  ant:pathelement path=${maven.build.dest}/
  ant:pathelement path=${basedir}/conf/hibernate.properties/
/ant:path
ant:taskdef name=schemaexport
 classname=net.sf.hibernate.tool.hbm2ddl.SchemaExportTask
 classpathref=project.classpath
/
  /goal


maven.dependency.classpath won't echo because it's a reference, you would
have to iterate through it to see what's in it.
Also make sure that you use classpathref=project.classpath and not
classpathref=${project.classpath}, same with maven.dependency.classpath

- Original Message - 
From: Geesken, Edmund [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 01, 2003 6:14 AM
Subject: calling ant and classpath problem


 I have executed maven with the -X setting.

 And the result is, that the maven.dependency.classpath is set but in my
 maven.xml goal not accessible. The ant:echo returns an empty string.

 The ant:jspc is therefore called with the system classpath witch is not
 prepared for this compilation.



 Any ideas??



 Regards

 Edmund

 --
--
 --
--
 ---

 The output with -X





 C:\Lim\MAVENmaven Work:doCompile -X

  __  __

 |  \/  |__ _Apache__ ___

 | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~

 |_|  |_\__,_|\_/\___|_||_|  v. 1.0-rc1-SNAPSHOT



 [DEBUG] Adding reference: maven.dependency.classpath -
 C:\maven-1.0\repository\framework\jars\struts-1.1.jar;C:\maven-1.0\reposit


ory\jboss\jars\commons-httpclient-1.0.jar;C:\maven-1.0\repository\jboss\jars
 \concurrent-1.0.jar;C:\maven-1.0\repository\jboss\jars


\getopt-1.0.jar;C:\maven-1.0\repository\jboss\jars\gnu-regexp-1.0.jar;C:\mav
 en-1.0\repository\jboss\jars\jboss-boot-1.0.jar;C:\mav


en-1.0\repository\jboss\jars\jboss-common-1.0.jar;C:\maven-1.0\repository\jb
 oss\jars\jboss-jmx-1.0.jar;C:\maven-1.0\repository\jbo


ss\jars\jboss-system-1.0.jar;C:\maven-1.0\repository\jboss\jars\jdom-1.0.jar
 ;C:\maven-1.0\repository\jboss\jars\log4j-boot-1.0.jar


;C:\maven-1.0\repository\jboss\jars\webdavlib-1.0.jar;C:\maven-1.0\repositor
 y\jboss\jars\xml-apis-1.0.jar;C:\maven-1.0\repository\


jboss\jars\jboss-j2ee-1.0.jar;C:\maven-1.0\repository\jboss\jars\activation-
 1.0.jar;C:\maven-1.0\repository\jboss\jars\commons-bea


nutils-1.0.jar;C:\maven-1.0\repository\jboss\jars\jasper-compiler-1.0.jar;C:
 \maven-1.0\repository\jboss\jars\jasper-runtime-1.0.ja


r;C:\maven-1.0\repository\jboss\jars\javax.servlet-1.0.jar;C:\maven-1.0\repo
 sitory\jboss\jars\jboss-3.2.jar;C:\maven-1.0\repositor


y\jboss\jars\gdsrealm-1.0.jar;C:\maven-1.0\repository\jfreechart\jars\jfreec
 hart-0.9.8.jar;C:\maven-1.0\repository\jfreechart\jars


\jcommon-0.8.0.jar;C:\maven-1.0\repository\jfreechart\jars\batik-awt-util-1.
 0.jar;C:\maven-1.0\repository\jfreechart\jars\batik-ut


il-1.0.jar;C:\maven-1.0\repository\jfreechart\jars\batik-dom-1.0.jar;C:\mave
 n-1.0\repository\jfreechart\jars\batik-svggen-1.0.jar;


C:\maven-1.0\repository\jfreechart\jars\cewolf-1.0.jar;C:\maven-1.0\reposito
 ry\cactus\jars\cactus-1.0.jar;C:\maven-1.0\repository\


junit\jars\junit-3.8.1.jar;C:\maven-1.0\repository\klg\jars\jcchart-4.5.1.ja
 r;C:\maven-1.0\repository\klg\jars\jcpagelayout-4.5.1.


jar;C:\maven-1.0\repository\electric\jars\electric_xml-1.0.jar;C:\maven-1.0\
 repository\netscape\jars\ldapjdk-1.0.jar;C:\maven-1.0\


repository\openadaptor\jars\openadaptor-1.0.jar;C:\maven-1.0\repository\j2ee
 -project\jars\mail-1.0.jar;C:\maven-1.0\repository\j2e


e-project\jars\poi-1.0.jar;C:\maven-1.0\repository\j2ee-project\jars\jstl-1.
 0.jar;C:\maven-1.0\repository\j2ee-project\jars\standa


rd-1.0.jar;C:\maven-1.0\repository\j2ee-project\jars\xalan-1.0.jar;C:\maven-
 1.0\repository\j2ee-project\jars\xercesImpl-1.0.jar;C:


\maven-1.0\repository\dreba\jars\rmt_riskengine-1.0.jar;C:\maven-1.0\reposit
 ory\database\jars\jconn2-1.0.jar

 [available] [VERBOSE] Found: C:\Lim\SOURCE

 [available] [VERBOSE] Found: C:\Lim\TESTS\JUNIT

 [DEBUG] Adding reference: maven-classpath -

 [DEBUG] Adding reference: maven.compile.src.set -

 [DEBUG] Adding reference: maven.test.compile.src.set -

 Work:doCompile:

 [DEBUG] fileset: Setup scanner in dir
 C:\Lim\jboss\server\default\deploy\default.war\crossdisp with patternSet{
 includes: [**

 /*.jsp] excludes: [WEB-INF/*] }

 [echo] ::region.jsp

 [echo]
 ::C:\Lim\jboss\server\default\deploy\default.war\crossdisp\cpty\region.jsp

 [echo] ::C:\Lim\jboss\server\default\deploy\default.war\crossdisp\cpty

 Work:compileJSP:

 [echo]

...C:\Lim\jboss\server\default\deploy

Re: calling ant and classpath problem

2003-12-01 Thread dion
Geesken, Edmund [EMAIL PROTECTED] wrote on 02/12/2003 01:14:15 
AM:

 I have executed maven with the -X setting.
 
 And the result is, that the maven.dependency.classpath is set but in my
 maven.xml goal not accessible. The ant:echo returns an empty string.
 
 The ant:jspc is therefore called with the system classpath witch is not
 prepared for this compilation.
 
 
 
 Any ideas??
how are you echoing maven.dependency.classpath?

Ant can't echo objects normally, so you can't just use

echo${maven.dependency.classpath}/echo, usually you have to use an ant 
trick to do it, e.g.

property name=classpath refid=maven.dependency.classpath/
echo${classpath}/echo
--
dIon Gillard, Multitask Consulting
Blog:  http://blogs.codehaus.org/people/dion/




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



calling ant and classpath problem

2003-11-26 Thread Geesken, Edmund
I try to compile all my JSPs using a user defined maven goal and the ant
jspc target

I have the problem, that I can not set the classpath property of the
ant:jspc target to the 

Classpath maven is using for my project. Any idea how I can get this
variable?

 

I want to compile each jsp separately and I would like to catch the output/
result

Failed or Successful. Is there a way to catch this?

 

Regards

Edmund




The information contained herein is confidential and is intended solely for the
addressee. Access by any other party is unauthorised without the express 
written permission of the sender. If you are not the intended recipient, please 
contact the sender either via the company switchboard on +44 (0)20 7623 8000, or
via e-mail return. If you have received this e-mail in error or wish to read our
e-mail disclaimer statement and monitoring policy, please refer to 
http://www.drkw.com/disc/email/ or contact the sender.




Re: calling ant and classpath problem

2003-11-26 Thread dion
Geesken, Edmund [EMAIL PROTECTED] wrote on 27/11/2003 04:14:49 
AM:

 I try to compile all my JSPs using a user defined maven goal and the ant
 jspc target
 
 I have the problem, that I can not set the classpath property of the
 ant:jspc target to the Classpath maven is using for my project. Any idea 
how I can get this
 variable?

the jspc task has a classpathref attribute. 

Use classpathref=maven.dependency.classpath

 I want to compile each jsp separately and I would like to catch the 
output/
 result
 
 Failed or Successful. Is there a way to catch this?

Buggered if I know.
--
dIon Gillard, Multitask Consulting
Blog:  http://blogs.codehaus.org/people/dion/




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