javaee / wadl

Web Application Description Language (WADL) project. This legacy project is available for review only
https://javaee.github.io/wadl/
Other
26 stars 15 forks source link

Maven Build #82

Open ghost opened 5 years ago

ghost commented 5 years ago

Always getting maven build failure !!

maxringtail commented 5 years ago

Issue still persists:

mvn install [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for org.jvnet.ws.wadl:wadl-cmdline:jar:1.1.8-SNAPSHOT [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 75, column 21 [WARNING] The expression ${artifactId} is deprecated. Please use ${project.artifactId} instead. [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] WADL [pom] [INFO] WADL XSLT [jar] [INFO] WADL Core [jar] [INFO] WADL Maven Plugin [maven-plugin] [INFO] WADL Ant Task [jar] [INFO] WADL Commandline [jar] [INFO] WADL Tools Distribution [pom] [INFO] [INFO] -----------------------< org.jvnet.ws.wadl:wadl >----------------------- [INFO] Building WADL 1.1.8-SNAPSHOT [1/7] [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) @ wadl --- [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ wadl --- [INFO] Installing C:\Development\wadl-master\wadl-master\wadl\pom.xml to C:\Users\michelan.arendse.CLICKATELL.m2\repository\org\jvnet\ws\wadl\wadl\1.1.8-SNAPSHOT\wadl-1.1.8-SNAPSHOT.pom [INFO] [INFO] --------------------< org.jvnet.ws.wadl:wadl-xslt >--------------------- [INFO] Building WADL XSLT 1.1.8-SNAPSHOT [2/7] [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) @ wadl-xslt --- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ wadl-xslt --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 2 resources [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ wadl-xslt --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ wadl-xslt --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 3 resources [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ wadl-xslt --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ wadl-xslt --- [INFO] Surefire report directory: C:\Development\wadl-master\wadl-master\wadl\wadl-xslt\target\surefire-reports


T E S T S

Running org.jvnet.ws.wadl.xslt.UriTemplateParserTest Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.289 sec Running org.jvnet.ws.wadl.xslt.WadlXsltUtilsTest Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec

Results :

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

[INFO] [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ wadl-xslt --- [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ wadl-xslt --- [INFO] Installing C:\Development\wadl-master\wadl-master\wadl\wadl-xslt\target\wadl-xslt-1.1.8-SNAPSHOT.jar to C:\Users\michelan.arendse.CLICKATELL.m2\repository\org\jvnet\ws\wadl\wadl-xslt\1.1.8-SNAPSHOT\wadl-xslt-1.1.8-SNAPSHOT.jar [INFO] Installing C:\Development\wadl-master\wadl-master\wadl\wadl-xslt\pom.xml to C:\Users\michelan.arendse.CLICKATELL.m2\repository\org\jvnet\ws\wadl\wadl-xslt\1.1.8-SNAPSHOT\wadl-xslt-1.1.8-SNAPSHOT.pom [INFO] [INFO] --------------------< org.jvnet.ws.wadl:wadl-core >--------------------- [INFO] Building WADL Core 1.1.8-SNAPSHOT [3/7] [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) @ wadl-core --- [INFO] [INFO] --- maven-jaxb-plugin:1.1.1:generate (default) @ wadl-core --- [INFO] C:\Development\wadl-master\wadl-master\wadl\wadl-core\target\generated-sources\xjc\org\jvnet\ws\wadl is not found and thus excluded from the dependency check [INFO] Compiling file:/C:/Development/wadl-master/wadl-master/wadl/wadl-core/src/main/resources/xsd/wadl.xsd [ERROR] [ERROR] schema_reference: Failed to read schema document 'xml.xsd', because 'file' access is not allowed due to restriction set by the accessExternalSchema property. [ERROR] line 9 of file:/C:/Development/wadl-master/wadl-master/wadl/wadl-core/src/main/resources/xsd/wadl.xsd [ERROR] [INFO] failure in the XJC task. Use the Ant -verbose switch for more details [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for WADL 1.1.8-SNAPSHOT: [INFO] [INFO] WADL ............................................... SUCCESS [ 0.820 s] [INFO] WADL XSLT .......................................... SUCCESS [ 3.022 s] [INFO] WADL Core .......................................... FAILURE [ 0.988 s] [INFO] WADL Maven Plugin .................................. SKIPPED [INFO] WADL Ant Task ...................................... SKIPPED [INFO] WADL Commandline ................................... SKIPPED [INFO] WADL Tools Distribution ............................ SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.277 s [INFO] Finished at: 2019-06-05T13:53:24+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.sun.tools.xjc.maven2:maven-jaxb-plugin:1.1.1:generate (default) on project wadl-core: Execution default of goal com.sun.tools.xjc.maven2:maven-jaxb-plugin:1.1.1:generate failed: unable to parse the schema. Error messages should have been provided -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn -rf :wadl-core

maxringtail commented 5 years ago

If you having the same issue as I have in Java 8 then do the following: Check for a file named jaxp.properties /path/jdk1.8.0/jre/lib, create if it does not exist and then write these lines in it. javax.xml.accessExternalSchema = all javax.xml.accessExternalDTD = all

Add the following to wadl/wadl-maven-plugin/pom.xml : <dependency> <groupId>org.easymock</groupId> <artifactId>easymockclassextension</artifactId> <version>3.2</version> <scope>test</scope> </dependency>

NikitaZ commented 4 years ago

The above easymock dependency helped me to build maven plugin! It's strange though that the projects depends on another easymock artifact with version 3.6, shouldn't these versions be in sync.

I'm building with

mvn -Djavax.xml.accessExternalSchema=all -Djavax.xml.accessExternalDTD=all clean install

to avoid errors related to accessExternal.... Most probably this can be fixed by adding proper vmOpts in the plugin configuration in the pom file.