Established Member.. santafebound
Established Member..
587 views

Compilation failure when including JARs and DLLs in Custom Action

Jump to solution

I have included JARs and DLLs in a lib directory in myArtifact-plugin folder in order to run a script in my custom action. Is this even possible? Why am I getting the following error when to build the project?

 

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] OO sample content project
[INFO] myArtifactTest-generate-plugin
[INFO] myArtifactTest-generate-cp
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building OO sample content project 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ myArtifactTest-generate ---
[INFO] Installing C:\Users\MNXE\plugins\myArtifactTest-generate\pom.xml to C:\Users\MNXE\.m2\repository\myGroupTest-generate\myArtifactTest-generate\1.0.0\myArtifactTest-generate-1.0.0.pom
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building myArtifactTest-generate-plugin 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- oo-action-plugin-maven-plugin:10.20.8:generate-action-plugin (generate-contentpack-plugin) @ myArtifactTest-generate-plugin ---
[INFO]
[INFO] --- maven-plugin-plugin:2.9:descriptor (default-descriptor) @ myArtifactTest-generate-plugin ---
[WARNING] Using platform encoding (Cp1250 actually) to read mojo metadata, i.e. build is platform dependent!
[INFO] Applying mojo extractor for language: java
[INFO] Mojo extractor for language: java found 4 mojo descriptors.
[INFO] Applying mojo extractor for language: bsh
[INFO] Mojo extractor for language: bsh found 0 mojo descriptors.
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ myArtifactTest-generate-plugin ---
[debug] execute contextualize
[WARNING] Using platform encoding (Cp1250 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\Users\MNXE\plugins\myArtifactTest-generate\myArtifactTest-generate-plugin\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ myArtifactTest-generate-plugin ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1250, i.e. build is platform dependent!
[INFO] Compiling 5 source files to C:\Users\MNXE\plugins\myArtifactTest-generate\myArtifactTest-generate-plugin\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /C:/Users/MNXE/plugins/myArtifactTest-generate/myArtifactTest-generate-plugin/src/main/java/SampleActions.java:[9,21] package com.jacob.com does not exist
[ERROR] /C:/Users/MNXE/plugins/myArtifactTest-generate/myArtifactTest-generate-plugin/src/main/java/SampleActions.java:[12,20] package autoitx4java does not exist
[ERROR] /C:/Users/MNXE/plugins/myArtifactTest-generate/myArtifactTest-generate-plugin/src/main/java/SampleActions.java:[129,38] cannot find symbol
symbol: class AutoItX
location: class SampleActions
[ERROR] /C:/Users/MNXE/plugins/myArtifactTest-generate/myArtifactTest-generate-plugin/src/main/java/SampleActions.java:[134,41] cannot find symbol
symbol: class AutoItX
location: class SampleActions
[ERROR] /C:/Users/MNXE/plugins/myArtifactTest-generate/myArtifactTest-generate-plugin/src/main/java/SampleActions.java:[139,39] cannot find symbol
symbol: class AutoItX
location: class SampleActions
[INFO] 5 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] OO sample content project ......................... SUCCESS [0.827s]
[INFO] myArtifactTest-generate-plugin .................... FAILURE [3.190s]
[INFO] myArtifactTest-generate-cp ........................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.232s
[INFO] Finished at: Wed May 11 11:13:00 CEST 2016
[INFO] Final Memory: 17M/213M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project myArtifactTest-generate-plugin: Compilation failure: Compilation failure:
[ERROR] /C:/Users/MNXE/plugins/myArtifactTest-generate/myArtifactTest-generate-plugin/src/main/java/SampleActions.java:[9,21] package com.jacob.com does not exist
[ERROR] /C:/Users/MNXE/plugins/myArtifactTest-generate/myArtifactTest-generate-plugin/src/main/java/SampleActions.java:[12,20] package autoitx4java does not exist
[ERROR] /C:/Users/MNXE/plugins/myArtifactTest-generate/myArtifactTest-generate-plugin/src/main/java/SampleActions.java:[129,38] cannot find symbol
[ERROR] symbol: class AutoItX
[ERROR] location: class SampleActions
[ERROR] /C:/Users/MNXE/plugins/myArtifactTest-generate/myArtifactTest-generate-plugin/src/main/java/SampleActions.java:[134,41] cannot find symbol
[ERROR] symbol: class AutoItX
[ERROR] location: class SampleActions
[ERROR] /C:/Users/MNXE/plugins/myArtifactTest-generate/myArtifactTest-generate-plugin/src/main/java/SampleActions.java:[139,39] cannot find symbol
[ERROR] symbol: class AutoItX
[ERROR] location: class SampleActions
[ERROR] -> [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/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :myArtifactTest-generate-plugin

Labels (1)
0 Likes
1 Solution

Accepted Solutions
Established Member.. santafebound
Established Member..

Re: Compilation failure when including JARs and DLLs in Custom Action

Jump to solution

The issue was that the external libraries were not properly configured in my local Maven repository or main pom file. I added the following to my dependencies and it managed to download the dependency for com.jacob.com.LibraryLoader through Maven:

<dependency>
<groupId>net.sf.jacob-project</groupId>
<artifactId>jacob</artifactId>
<version>1.14.3</version>
</dependency>

 

0 Likes
1 Reply
Established Member.. santafebound
Established Member..

Re: Compilation failure when including JARs and DLLs in Custom Action

Jump to solution

The issue was that the external libraries were not properly configured in my local Maven repository or main pom file. I added the following to my dependencies and it managed to download the dependency for com.jacob.com.LibraryLoader through Maven:

<dependency>
<groupId>net.sf.jacob-project</groupId>
<artifactId>jacob</artifactId>
<version>1.14.3</version>
</dependency>

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.