Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Basic plugin api #27

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Prof-Bloodstone
Copy link
Contributor

This is just a proposal - I'm open for suggestions.
This lets plugins hook into ASE and customize the wand further.
I personally used the PDC to provide a custom wand that needs to be crafted/found.

Since the JUnit repo was removed, it was failing to build for me - so I've made it skip tests by default.

Are you interested in adding some sort of API for the plugin? Might be something completely different.

fields.

This allows plugins to hook into ASE and provide their own, custom tool.
@RoboMWM
Copy link

RoboMWM commented Jul 8, 2020

I would not skip tests by default, but instead fix them.

@Prof-Bloodstone
Copy link
Contributor Author

I would not skip tests by default, but instead fix them.

A fix would be to (partially) revert 6535bc7 . The issue now is that the JUnit is missing from list of dependencies - and mvn fails without it.

@RoboMWM
Copy link

RoboMWM commented Jul 13, 2020

I don't see any tests directory - so why would mvn fail... does he have tests specified elsewhere?

@Prof-Bloodstone
Copy link
Contributor Author

I don't see any tests anywhere - that's why I'm confused.

But the fact is that without my latest commit - I get:

[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ armorstandeditor ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /my_path/ArmorStandEditor/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.6.0:testCompile (default-testCompile) @ armorstandeditor ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ armorstandeditor ---
[INFO] Surefire report directory: /my_path/ArmorStandEditor/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
org.apache.maven.surefire.util.SurefireReflectionException: java.lang.reflect.InvocationTargetException; nested exception is java.lang.reflect.InvocationTargetException: null
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.lang.NoClassDefFoundError: junit/framework/TestCase
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	at org.apache.maven.surefire.util.DefaultScanResult.loadClass(DefaultScanResult.java:131)
	at org.apache.maven.surefire.util.DefaultScanResult.applyFilter(DefaultScanResult.java:95)
	at org.apache.maven.surefire.junit.JUnit3Provider.scanClassPath(JUnit3Provider.java:128)
	at org.apache.maven.surefire.junit.JUnit3Provider.invoke(JUnit3Provider.java:79)
	... 9 more
Caused by: java.lang.ClassNotFoundException: junit.framework.TestCase
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	... 25 more

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.866 s
[INFO] Finished at: 2020-07-13T17:58:21+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project armorstandeditor: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ? -> [Help 1]

@RoboMWM
Copy link

RoboMWM commented Jul 13, 2020

What mvn goal are you running

@Prof-Bloodstone
Copy link
Contributor Author

I believe I tried a lot of those - mainly package and deploy iirc. It's been some time.

@RoboMWM
Copy link

RoboMWM commented Jul 15, 2020

mvn package is what I usually use, so that's interesting if it fails, wonder how he's compiling the plugin then.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants