You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by wxlund <wx...@yahoo.com> on 2008/05/21 22:25:13 UTC

mvn site vs mvn package differences with eclipse plung

I am having problems getting my surefire reports from mvn site.  When I run
mvn package the unit tests seem to report the tests correctly.  I randomly
tested the failed tests within eclipse and found that the failing tests
broken inside and outside of eclipse (meaning when I run mvn package). 

I correctly get the following:

[INFO] Scanning for projects...
... <snipped>

BUILD SUCCESSFUL
Total time: 2 minutes 49 seconds
[INFO] Extracting errors and failures from surefire reports
-------------------------------------------------------
 T E S T S 
-------------------------------------------------------
Ran com.accenture.tools.sd.model.domain.util.BaseTest
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.15 sec <<<
FAILURE!
Ran com.accenture.tools.sd.model.domain.util.Composite_MultiLineEntryTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.25 sec
Ran com.accenture.tools.sd.model.domain.util.CreateNamesTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.0 sec
Ran com.accenture.tools.sd.model.domain.util.DomainaValidatorBorderTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.959 sec
Ran com.accenture.tools.sd.model.domain.util.DomainOverrideTest
Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.15 sec
Ran com.accenture.tools.sd.model.domain.util.DomainValidatoMenuTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.159 sec
Ran
com.accenture.tools.sd.model.domain.util.DomainValidatorBaseEnumerationTypeTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.039 sec
Ran com.accenture.tools.sd.model.domain.util.DomainValidatorBitmapTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.979 sec
Ran com.accenture.tools.sd.model.domain.util.DomainValidatorClientTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.978 sec
Ran com.accenture.tools.sd.model.domain.util.DomainValidatorComboBoxTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.029 sec
Ran com.accenture.tools.sd.model.domain.util.DomainValidatorComponentTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.069 sec
Ran
com.accenture.tools.sd.model.domain.util.DomainValidatorCompositeCompositeTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.899 sec
Ran
com.accenture.tools.sd.model.domain.util.DomainValidatorCompositeDataWidgetTest
Tests run: 7, Failures: 6, Errors: 0, Skipped: 0, Time elapsed: 0.979 sec
<<< FAILURE!
Ran
com.accenture.tools.sd.model.domain.util.DomainValidatorCompositeElementTest
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.999 sec
<<< FAILURE!
Ran
com.accenture.tools.sd.model.domain.util.DomainValidatorCompositeRadioButtonTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.089 sec
Ran com.accenture.tools.sd.model.domain.util.DomainValidatorCompositeTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.139 sec
Ran com.accenture.tools.sd.model.domain.util.DomainValidatorDataElementTest
Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.269 sec
<<< FAILURE!
Ran com.accenture.tools.sd.model.domain.util.DomainValidatorDataSetTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.109 sec
Ran
com.accenture.tools.sd.model.domain.util.DomainValidatorFacetBaseDateTimeTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.969 sec
Ran
com.accenture.tools.sd.model.domain.util.DomainValidatorFileStructureTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.079 sec
Ran com.accenture.tools.sd.model.domain.util.DomainValidatorFontTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.029 sec
Ran
com.accenture.tools.sd.model.domain.util.DomainValidatorGhostStaticImageTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.019 sec
Ran com.accenture.tools.sd.model.domain.util.DomainValidatorIndexTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.989 sec
Ran com.accenture.tools.sd.model.domain.util.DomainValidatorJpegTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.029 sec
Ran com.accenture.tools.sd.model.domain.util.DomainValidatorListBoxTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.889 sec
<<< ERROR!
Ran
com.accenture.tools.sd.model.domain.util.DomainValidatorlistboxwidgetElementTest
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 1.818 sec
<<< ERROR!
Ran com.accenture.tools.sd.model.domain.util.DomainValidatorMaskTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.869 sec
Ran com.accenture.tools.sd.model.domain.util.DomainValidatorMessageTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.059 sec
Ran
com.accenture.tools.sd.model.domain.util.DomainValidatorMultiLineEntryTest
Tests run: 4, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.969 sec
<<< FAILURE!
Ran com.accenture.tools.sd.model.domain.util.DomainValidatorPackageTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.199 sec
Ran
com.accenture.tools.sd.model.domain.util.DomainValidatorRecordElementTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.899 sec
Ran
com.accenture.tools.sd.model.domain.util.DomainValidatorRecordGroupElementTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.999 sec
Ran com.accenture.tools.sd.model.domain.util.DomainValidatorRecordGroupTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.039 sec
Ran com.accenture.tools.sd.model.domain.util.DomainValidatorRecordTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.069 sec
Ran
com.accenture.tools.sd.model.domain.util.DomainValidatorRelationalTableTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.079 sec
Ran com.accenture.tools.sd.model.domain.util.DomainValidatorServerTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.039 sec
Ran com.accenture.tools.sd.model.domain.util.DomainValidatorShellTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.059 sec
Ran
com.accenture.tools.sd.model.domain.util.DomainValidatorSingleLineEntryTest
Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.079 sec
<<< FAILURE!
Ran com.accenture.tools.sd.model.domain.util.DomainValidatorStaticImageTest
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.028 sec
<<< FAILURE!
Ran com.accenture.tools.sd.model.domain.util.DomainValidatorStaticLabelTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.939 sec
Ran com.accenture.tools.sd.model.domain.util.DomainValidatorStaticLineTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.969 sec
Ran
com.accenture.tools.sd.model.domain.util.DomainValidatorStaticRectangleTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.979 sec
Ran com.accenture.tools.sd.model.domain.util.DomainValidatorTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.008 sec
Ran com.accenture.tools.sd.model.domain.util.DomainValidatorWidgetTest
Tests run: 4, Failures: 4, Errors: 0, Skipped: 0, Time elapsed: 1.029 sec
<<< FAILURE!
Ran
com.accenture.tools.sd.model.domain.util.DominavalidatorRadioButtonGroupTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.969 sec
Ran com.accenture.tools.sd.model.domain.util.EObjectValidateDBTest
Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.999 sec
<<< ERROR!
Ran com.accenture.tools.sd.model.domain.util.ListBox_WidgetElementTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.139 sec
Ran com.accenture.tools.sd.model.domain.util.SetDefaultTest
Tests run: 37, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.69 sec
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] There are test failures and errors.
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 3 minutes 6 seconds
[INFO] Finished at: Wed May 21 15:08:20 CDT 2008
[INFO] Final Memory: 6M/508M
[INFO]
------------------------------------------------------------------------
bash-3.2$ 

but when I run with mvn site I get all kinds of inconsistencies:

1.  The errors are bogus.  They don't match the previous run.  For example,
when you just look at the last error in the run it shows 

Ran com.accenture.tools.sd.model.domain.util.SetDefaultTest
Tests run: 37, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.69 sec

but with mvn site I have:

Ran com.accenture.tools.sd.model.domain.util.SetDefaultTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.0 sec <<<
ERROR!

The test run itself gave the following:

java-test:
     [echo] Running com.accenture.tools.sd.model.domain.util.SetDefaultTest.
Result file:
C:\opt\test-eclipse/results/com.accenture.tools.sd.model.domain.util.SetDefaultTest.xml.
     [java] org.osgi.framework.BundleException: The activator
com.accenture.tools.sd.model.domain.DomainPlugin for bundle
com.accenture.tools.sd.model.domain is invalid
     [java] 	at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:141)
     [java] 	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:970)
     [java] 	at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
     [java] 	at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:260)
     [java] 	at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:400)
     [java] 	at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111)
     [java] 	at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:417)
     [java] 	at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:189)
     [java] 	at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:340)
     [java] 	at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:408)
     [java] 	at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369)
     [java] 	at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357)
     [java] 	at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
     [java] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
     [java] 	at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(BundleLoader.java:289)
     [java] 	at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:227)
     [java] 	at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1269)
     [java] 	at
org.eclipse.test.EclipseTestRunner.loadSuiteClass(EclipseTestRunner.java:324)
     [java] 	at
org.eclipse.test.EclipseTestRunner.getTest(EclipseTestRunner.java:237)
     [java] 	at
org.eclipse.test.EclipseTestRunner.<init>(EclipseTestRunner.java:220)
     [java] 	at
org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:204)
     [java] 	at
org.eclipse.test.CoreTestApplication.runTests(CoreTestApplication.java:35)
     [java] 	at
org.eclipse.test.CoreTestApplication.run(CoreTestApplication.java:31)
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java] 	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     [java] 	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java] 	at java.lang.reflect.Method.invoke(Method.java:585)
     [java] 	at
org.eclipse.equinox.internal.app.EclipseAppContainer.callMethod(EclipseAppContainer.java:533)
     [java] 	at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:155)
     [java] 	at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
     [java] 	at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
     [java] 	at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
     [java] 	at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java] 	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     [java] 	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java] 	at java.lang.reflect.Method.invoke(Method.java:585)
     [java] 	at
org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
     [java] 	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
     [java] 	at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
     [java] 	at org.eclipse.equinox.launcher.Main.main(Main.java:1144)
     [java] 	at org.eclipse.core.launcher.Main.main(Main.java:30)
     [java] Caused by: java.lang.NoClassDefFoundError:
net/sourceforge/cobertura/coveragedata/HasBeenInstrumented
     [java] 	at java.lang.ClassLoader.defineClass1(Native Method)
     [java] 	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
     [java] 	at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:161)
     [java] 	at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:501)
     [java] 	at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:471)
     [java] 	at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:430)
     [java] 	at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:413)
     [java] 	at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:189)
     [java] 	at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:340)
     [java] 	at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:408)
     [java] 	at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369)
     [java] 	at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357)
     [java] 	at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
     [java] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
     [java] 	at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(BundleLoader.java:289)
     [java] 	at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:227)
     [java] 	at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:134)
     [java] 	... 41 more
     [java] Java Result: 2

The osgi activator is the error I'm getting for all of them.  Has anybody
seen this before and if so, how do I fix?

Thanks,

Wayne

-- 
View this message in context: http://www.nabble.com/mvn-site-vs-mvn-package-differences-with-eclipse-plung-tp17372004p17372004.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: mvn site vs mvn package differences caused by cobertura

Posted by wxlund <wx...@yahoo.com>.
After a little more exploring I found the root problem for the inconsistency
between mvn site and mvn package.  (Disclaimer:  I've used maven for a few
years but have always leaned on smart Dev Arch guys that know the tool much
better than myself for setting things up correctly).  Anyway,  the culprit
is the cobertura step.  Cobertura reruns the tests but doesn't run them with
the required maven-psteclipse-plugin.  This explains why it throws bogus
errors on not being able to find the bundle activators.  

Question:  How can I get Cobertura to use psteclipse (Junit Plug-in Tests)
for running the tests instead of the default junit testing?  For now I
commented it out of the reporting section so that I can at least see the
results of unit testing.  Any help would be appreciated.  
-- 
View this message in context: http://www.nabble.com/mvn-site-vs-mvn-package-differences-with-eclipse-plugin-tp17372004p17386787.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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