[jira] Commented: (MECLIPSE-132) "Class not found" when run/debug JUnit tests

2006-09-28 Thread Brian Keyser (JIRA)
[ http://jira.codehaus.org/browse/MECLIPSE-132?page=comments#action_76034 ] 

Brian Keyser commented on MECLIPSE-132:
---

Our project structure is organized into a hierarchy of projects.  I have found 
that the complete set of libraries needs to be specified for each of the 
individual projects.  In other words, if Project A needs libraries aa, ab, ac 
and Project B needs ba, bb, bc, you would need to specify aa, ab, ac, ba, bb, 
bc for both Project A and Project B.  Looks like the plugin might be having 
trouble determining library dependencies.

> "Class not found" when run/debug JUnit tests
> 
>
> Key: MECLIPSE-132
> URL: http://jira.codehaus.org/browse/MECLIPSE-132
> Project: Maven 2.x Eclipse Plugin
>  Issue Type: Bug
>  Components: dependency resolution
> Environment: gentoo linux 2006, kernel 2.6, sun-jdk-1.5.0.06, maven 
> 2.0.4, eclipse sdk 3.2, myeclipse 5 m2
>Reporter: Diego Ballve
> Attachments: maven-sample.zip
>
>
> This is for the behavior described in
> http://www.nabble.com/Keep-getting-%22Class-not-found%22-when-running-debugging-JUnit-tests-tf1851758.html#a5442440
> You get "Class not found" when running/debuging JUnit tests.
> For me it happened when I was importing another project and its dependencies 
> (both m2 projects).
> Clean compile works fine, problem is with run.
> The workaround to get it working is:
> In the project containing your tests, edit Java Build Path | Order and 
> Export: Make sure M2 Dependencies appears BEFORE JRE System Library. 
> Thanks,
> Diego

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Updated: (MECLIPSE-132) "Class not found" when run/debug JUnit tests

2006-09-28 Thread Brian Keyser (JIRA)
 [ http://jira.codehaus.org/browse/MECLIPSE-132?page=all ]

Brian Keyser updated MECLIPSE-132:
--

Attachment: maven-sample.zip

Two Eclipse projects (maven-sample and maven-sample-test) to reproduce the 
problem.

> "Class not found" when run/debug JUnit tests
> 
>
> Key: MECLIPSE-132
> URL: http://jira.codehaus.org/browse/MECLIPSE-132
> Project: Maven 2.x Eclipse Plugin
>  Issue Type: Bug
>  Components: dependency resolution
> Environment: gentoo linux 2006, kernel 2.6, sun-jdk-1.5.0.06, maven 
> 2.0.4, eclipse sdk 3.2, myeclipse 5 m2
>Reporter: Diego Ballve
> Attachments: maven-sample.zip
>
>
> This is for the behavior described in
> http://www.nabble.com/Keep-getting-%22Class-not-found%22-when-running-debugging-JUnit-tests-tf1851758.html#a5442440
> You get "Class not found" when running/debuging JUnit tests.
> For me it happened when I was importing another project and its dependencies 
> (both m2 projects).
> Clean compile works fine, problem is with run.
> The workaround to get it working is:
> In the project containing your tests, edit Java Build Path | Order and 
> Export: Make sure M2 Dependencies appears BEFORE JRE System Library. 
> Thanks,
> Diego

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Commented: (MECLIPSE-132) "Class not found" when run/debug JUnit tests

2006-09-28 Thread Brian Keyser (JIRA)
[ http://jira.codehaus.org/browse/MECLIPSE-132?page=comments#action_76030 ] 

Brian Keyser commented on MECLIPSE-132:
---

Our environment is susceptible to this enviroment as well using Eclipse 3.2 and 
the Maven2 Eclipse Plugin 0.0.9.  I have been able to create a small test case 
the mirrors our environment.  We separate our projects into both a source and a 
test project.  We do this because we weave different aspects in our production 
and test environments.  However, this configuration does expose the problem.

The two projects included in the following attachment are a source 
(maven-sample) project and a test (maven-sample-test) project.  If the JUnit 
dependency is removed from the maven-sample project, the NoClassDefFoundError 
appears when attempting to run the test cases.  If the JUnit dependency is 
present in the maven-sample project, then the test cases can be run.  However, 
this "trick" does not work for our configuration.

I was also able to get Diego's suggestion to work if I added a Maven2 
Dependencies above the JRE System Library in the Classpath -> Bootstrap Entries 
of the target I was trying to run.  However, this is less than ideal if you 
wish to choose a single test case to execute.

> "Class not found" when run/debug JUnit tests
> 
>
> Key: MECLIPSE-132
> URL: http://jira.codehaus.org/browse/MECLIPSE-132
> Project: Maven 2.x Eclipse Plugin
>  Issue Type: Bug
>  Components: dependency resolution
> Environment: gentoo linux 2006, kernel 2.6, sun-jdk-1.5.0.06, maven 
> 2.0.4, eclipse sdk 3.2, myeclipse 5 m2
>Reporter: Diego Ballve
> Attachments: maven-sample.zip
>
>
> This is for the behavior described in
> http://www.nabble.com/Keep-getting-%22Class-not-found%22-when-running-debugging-JUnit-tests-tf1851758.html#a5442440
> You get "Class not found" when running/debuging JUnit tests.
> For me it happened when I was importing another project and its dependencies 
> (both m2 projects).
> Clean compile works fine, problem is with run.
> The workaround to get it working is:
> In the project containing your tests, edit Java Build Path | Order and 
> Export: Make sure M2 Dependencies appears BEFORE JRE System Library. 
> Thanks,
> Diego

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Created: (MWAR-64) resource processing does not occur correct hierarchical modules.

2006-08-07 Thread Brian Keyser (JIRA)
resource processing does not occur correct hierarchical modules.


 Key: MWAR-64
 URL: http://jira.codehaus.org/browse/MWAR-64
 Project: Maven 2.x War Plugin
  Issue Type: Bug
Affects Versions: 2.0.1
 Environment: Windows XP
Reporter: Brian Keyser


I have a project that is similar to

+ - ProjectA
   |
   - pom.xml
   |
   + ProjectB
  |
  - pom.xml

Within the pom.xml for ProjectB there is an entry describing additional 
resources to include in the war

...

org.apache.maven.plugins
maven-war-plugin



src/main/resources
true




...

When running 'mvn install' from the project A directory, I get the following 
error

...
[INFO] Copy webapp webResources to 
C:\thinktank\thinktank-d1.1.0\server\server-webapp\target\server-webapp-1.1.0-SNAPSHOT
[INFO] 
[ERROR] FATAL ERROR
[INFO] 
[INFO] basedir src\main\resources does not exist
[INFO] 
[DEBUG] Trace
java.lang.IllegalStateException: basedir src\main\resources does not exist
at 
org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:542)
at 
org.apache.maven.plugin.war.AbstractWarMojo.getWarFiles(AbstractWarMojo.java:810)
at 
org.apache.maven.plugin.war.AbstractWarMojo.copyResources(AbstractWarMojo.java:437)
at 
org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:355)
at 
org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:161)
at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:127)
at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
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: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)

However, if I change the  to

...
projectb/src/main/resources
...

The install goal works fine.

If I run 'mvn install' from projectb with the first configuration it does 
perform an install, ie, when the directory is configured as 
'src/main/resources'.  Seems like there is a problem in reading the base 
directory for hierarchical projects.

Thanks for taking a look at this.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira