How can I get a maven assembly to omit all directories in the archive? - maven

Results I am after: I want a zip file without any directories in it. Files only.
My plugin entry:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptor>src/assembly/descriptor.xml</descriptor>
<appendAssemblyId>false</appendAssemblyId>
<finalName>${artifactId}-${pom.version}</finalName>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
My descriptor:
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd
http://maven.apache.org/ASSEMBLY/2.0.0
http://maven.apache.org/ASSEMBLY/2.0.0 ">
<id>distribution</id>
<formats>
<format>zip</format>
</formats>
<!--<baseDirectory>target</baseDirectory>-->
<!--<includeBaseDirectory>true</includeBaseDirectory>-->
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<outputDirectory>./</outputDirectory>
<includes>
<include>src/**/*</include>
</includes>
<excludes>
<exclude>**/assembly/**</exclude>
<exclude>**/*.iml</exclude>
</excludes>
</fileSet>
</fileSets>
</assembly>
...which results in a zip file:
user#host /cygdrive/c/Ws/someproject : zv subproject/target/somezip-SNAPSHOT.zip
Archive: subproject/target/somezip-SNAPSHOT.zip
Length Date Time Name
--------- ---------- ----- ----
0 01-11-2018 09:03 src/
0 01-05-2018 09:01 src/main/
0 01-09-2018 11:34 src/main/resources/
1158 01-09-2018 11:34 src/main/resources/SomeFile_0_0_0.xml
1836 01-09-2018 11:34 src/main/resources/AnotherFile_0_0_0.xml
11636 01-09-2018 11:34 src/main/resources/SomeFile1_0_0_0.xml
1171 01-09-2018 11:34 src/main/resources/SomeFile1_0_0_1.xml
1398 01-09-2018 11:34 src/main/resources/SomeFile1_0_0_1.xml
1006 01-09-2018 11:34 src/main/resources/SomeFile1_0_1_0.xml
6691 01-09-2018 11:34 src/main/resources/SomeFile1_1_0_0.xml
1641 01-09-2018 11:34 src/main/resources/SomeFile1_1_0_1.xml
1937 01-09-2018 11:34 src/main/resources/SomeFile1_1_0_0.xml
3181 01-09-2018 11:34 src/main/resources/SomeFile3_0_0_0.xml
1774 01-09-2018 11:34 src/main/resources/SomeFile3_1_0_0.xml
1185 01-09-2018 11:34 src/main/resources/SomeFile3_1_0_0.xml
14609 01-09-2018 11:34 src/main/resources/SomeFile3_3_0_0.xml
35711 01-09-2018 11:34 src/main/resources/SomeFile4_0_0_0.xml
15805 01-09-2018 11:34 src/main/resources/SomeFile5_0_0_0.xml
3491 01-09-2018 11:34 src/main/resources/SomeFile5_1_0_0.xml
18757 01-09-2018 11:34 src/main/resources/SomeFile_0_0_0.xml
1571 01-09-2018 11:34 src/main/resources/SomeFile_0_1_0.xml
1063 01-09-2018 11:34 src/main/resources/SomeFile_0_1_1.xml
1631 01-09-2018 11:34 src/main/resources/Wiggity.txt
--------- -------
140357 13 files

Related

Coverage checks have not been met. See log for details

In pom.xml
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<compilerVersion>${java.version}</compilerVersion>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<!-- Sets the path to the file which contains the execution data. -->
<dataFile>target/jacoco.exec</dataFile>
<!-- Sets the output directory for the code coverage report. -->
<outputDirectory>target/jacoco-ut</outputDirectory>
</configuration>
</execution>
<execution>
<id>jacoco-check</id>
<goals>
<goal>check</goal>
</goals>
<configuration>
<rules>
<rule>
<element>PACKAGE</element>
<limits>
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>0.50</minimum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
But after run
mvn clean verify
I get error:
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.gmail.alexei28.javatestmavenbom.module1.App2Test
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.168 sec
Running com.gmail.alexei28.javatestmavenbom.module1.AppTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec
Results :
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.5:report (report) # mymodule1 ---
[INFO] Loading execution data file /home/alexeij/dev/projects/JavaTestMavenBOM/mymodule1/target/jacoco.exec
[INFO] Analyzed bundle 'mymodule1' with 7 classes
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # mymodule1 ---
[INFO] Building jar: /home/alexeij/dev/projects/JavaTestMavenBOM/mymodule1/target/mymodule1-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.5:check (jacoco-check) # mymodule1 ---
[INFO] Loading execution data file /home/alexeij/dev/projects/JavaTestMavenBOM/mymodule1/target/jacoco.exec
[INFO] Analyzed bundle 'mymodule1' with 7 classes
[WARNING] Rule violated for package com.gmail.alexei28.javatestmavenbom.module1.ngnms: lines covered ratio is 0.00, but expected minimum is 0.50
[WARNING] Rule violated for package com.gmail.alexei28.javatestmavenbom.module1: lines covered ratio is 0.00, but expected minimum is 0.50
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.977 s
[INFO] Finished at: 2022-06-01T16:23:21+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jacoco:jacoco-maven-plugin:0.8.5:check (jacoco-check) on project mymodule1: Coverage checks have not been met. See log for details. -> [Help 1]
[ERROR]

windows 10 Native Build error - Native-image building on Windows currently only supports target architecture: AMD64 (x86 unsupported)

I'm testing out a new project, and trying to use Gluon for this.
ATM I am building on windows 10 with AMD Ryzen 7.
Following the instructions from: https://docs.gluonhq.com/#platforms_windows
When I attempt to build:mvn gluonfx:build it fails with:
[INFO] --- gluonfx-maven-plugin:1.0.9:compile (default-cli) # gluon-singleviewproject-jdk17 ---
[Tue Nov 16 13:14:32 PST 2021][INFO] ==================== COMPILE TASK ====================
_______ ___ __ __ _______ __ _
| || | | | | || || | | |
| ___|| | | | | || _ || |_| |
| | __ | | | |_| || | | || |
| || || |___ | || |_| || _ |
| |_| || || || || | | |
|_______||_______||_______||_______||_| |__|
[Tue Nov 16 13:14:33 PST 2021][INFO] We will now compile your code for x86_64-microsoft-windows. This may take some time.
Access to the latest docs, tips and tricks and more info on
how to get support? Register your usage of Gluon Substrate now at
https://gluonhq.com/activate
[Tue Nov 16 13:14:34 PST 2021][INFO] [SUB] Warning: Ignoring server-mode native-image argument --no-server.
[Tue Nov 16 13:14:36 PST 2021][INFO] [SUB] [com.gluonapplication.gluonapplication:29680] classlist: 1,238.84 ms, 0.96 GB
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] [com.gluonapplication.gluonapplication:29680] setup: 709.11 ms, 0.96 GB
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] Error: Native-image building on Windows currently only supports target architecture: AMD64 (x86 unsupported)
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] Error: To prevent native-toolchain checking provide command-line option -H:-CheckToolchain
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] com.oracle.svm.core.util.UserError$UserException: Native-image building on Windows currently only supports target architecture: AMD64 (x86 unsupported)
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] To prevent native-toolchain checking provide command-line option -H:-CheckToolchain
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] at com.oracle.svm.core.util.UserError.abort(UserError.java:139)
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] at com.oracle.svm.hosted.c.codegen.CCompilerInvoker.addSkipCheckingInfo(CCompilerInvoker.java:103)
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] at com.oracle.svm.hosted.c.codegen.CCompilerInvoker.verifyCompiler(CCompilerInvoker.java:94)
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:884)
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:530)
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:491)
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:380)
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:543)
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:119)
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus.main(NativeImageGeneratorRunner.java:573)
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] [com.gluonapplication.gluonapplication:29680] [total]: 1,978.21 ms, 0.96 GB
My POM:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.gluonapplication</groupId>
<artifactId>gluon-singleviewproject-jdk17</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Gluon-SingleViewProject-jdk17</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>11</maven.compiler.release>
<javafx.version>17.0.1</javafx.version>
<attach.version>4.0.13</attach.version>
<gluonfx.plugin.version>1.0.9</gluonfx.plugin.version>
<javafx.plugin.version>0.0.8</javafx.plugin.version>
<mainClassName>com.gluonapplication.GluonApplication</mainClassName>
</properties>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>${javafx.version}</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>${javafx.version}</version>
</dependency>
<dependency>
<groupId>com.gluonhq</groupId>
<artifactId>charm-glisten</artifactId>
<version>6.1.0</version>
</dependency>
<dependency>
<groupId>com.gluonhq.attach</groupId>
<artifactId>display</artifactId>
<version>${attach.version}</version>
</dependency>
<dependency>
<groupId>com.gluonhq.attach</groupId>
<artifactId>lifecycle</artifactId>
<version>${attach.version}</version>
</dependency>
<dependency>
<groupId>com.gluonhq.attach</groupId>
<artifactId>statusbar</artifactId>
<version>${attach.version}</version>
</dependency>
<dependency>
<groupId>com.gluonhq.attach</groupId>
<artifactId>storage</artifactId>
<version>${attach.version}</version>
</dependency>
<dependency>
<groupId>com.gluonhq.attach</groupId>
<artifactId>util</artifactId>
<version>${attach.version}</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>Gluon</id>
<url>https://nexus.gluonhq.com/nexus/content/repositories/releases</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>${javafx.plugin.version}</version>
<configuration>
<mainClass>${mainClassName}</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>com.gluonhq</groupId>
<artifactId>gluonfx-maven-plugin</artifactId>
<version>${gluonfx.plugin.version}</version>
<configuration>
<target>host</target>
<attachList>
<list>display</list>
<list>lifecycle</list>
<list>statusbar</list>
<list>storage</list>
</attachList>
<mainClass>${mainClassName}</mainClass>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>ios</id>
<properties>
<gluonfx.target>ios</gluonfx.target>
</properties>
</profile>
<profile>
<id>android</id>
<properties>
<gluonfx.target>android</gluonfx.target>
</properties>
</profile>
</profiles>
</project>
This is is basically hellofxml, any thoughts or pointers on debugging this greatly appreciated.

Convert xml to xlsx vbscript

I have a vbscript code, where I convert from xml to xlsx. However, when converting it duplicates the information and takes the order of the columns. How do I reverse or adjust? Because I'm not able to format correctly. If you use excel and open it by hand and convert to xlsx it is correct.
This is my vbs code:
Dim xlApp, xlWkb, SourceFolder, TargetFolder, file
Set xlApp = CreateObject ("excel.application")
Set fs = CreateObject ("Scripting.FileSystemObject")
Const ForWriting = 2
Const TristateTrue = -1
Const xlNormal = 51
SourceFolder = "C: \ Users \ Convex \ Documents \ MICHAEL \ XML"
TargetFolder = "C: \ Users \ Convex \ Documents \ MICHAEL \ XLS"
xlApp.Visible = false
for each file in fs.GetFolder (SourceFolder) .files
Set xlWkb = xlApp.Workbooks.Open (file)
BaseName = fs.getbasename (file)
FullTargetPath = TargetFolder & "\" & BaseName & ".xlsx"
xlWkb.SaveAs FullTargetPath, xlNormal
xlWkb.close
next
'Uncomment this line to delete the source file
'fs.DeleteFile ("C: \ xml-to-xls \ xml \ *. xml")
Set xlWkb = Nothing
Set xlApp = Nothing
Set fs = Nothing
This is the xml:
<? xml version = "1.0" encoding = "utf-8"?>
<Transaction>
<list>
<registers>
<matricula> 5 </matricula>
<name> ANGEL EDUARDO TRIGUEROS CISNEROS </name>
<cpf> 000000000 </cpf>
</registrates>
<registers>
<matricula> 9 </matricula>
<name> MARCO AURELIO CARNEIRO </name>
<cpf> 00000000000 </cpf>
</registrates>
<registers>
<matricula> 6 </matricula>
<name> ADRIELLE ROSA CAMARGO DE ANDRADE </name>
<cpf> 000000000 </cpf>
</registrates>
<registers>
<matricula> 3 </matricula>
<name> GUILHERME QUINTINO RIBEIRO </name>
<cpf> 0000000 </cpf>
</registrates>
<registers>
<matricula> 14 </matricula>
<name> TIAGO DA FONTE LEITE </name>
<cpf> 00000000 </cpf>
</registrates>
<registers>
<matricula> 2 </matricula>
<name> LUIZ ANTONIO SACCO </name>
<cpf> 00000000000 </cpf>
</registrates>
<registers>
<matricula> 10 </matricula>
<name> JULIANA PEREIRA DA CUNHA WALENKAMP </name>
<cpf> 000000000 </cpf>
</registrates>
<registers>
<matricula> 8 </matricula>
<name> MARCEL KEITI TOMA </name>
<cpf> 00000000000 </cpf>
</registrates>
<registers>
<matricula> 13 </matricula>
<name> CRISTIANE BONATES MACEDO DE AMO </name>
<cpf> 00000000000 </cpf>
</registrates>
<registers>
<matricula> 11 </matricula>
<name> LUIS ANTONIO PAIN JUNIOR </name>
<cpf> 000000000 </cpf>
</registrates>
<registers>
<matricula> 12 </matricula>
<name> FLAVIO DALE LUCHE </name>
<cpf> 000000000 </cpf>
</registrates>
<registers>
<matricula> 1 </matricula>
<name> BRUNO VIEIRA ROBERTI </name>
<cpf> 000000000 </cpf>
</registrates>
<registers>
<matricula> 4 </matricula>
<name> GUILHERME GAMEIRO DUARTE </name>
<cpf> 00000000 </cpf>
</registrates>
<registers>
<matricula> 7 </matricula>
<name> CARLA FERNANDA PASQUALI </name>
<cpf> 0000000 </cpf>
</registrates>
</list>
</Transaction>
This is my vbs code:
Dim xlApp, xlWkb, SourceFolder, TargetFolder, file
Set xlApp = CreateObject ("excel.application")
Set fs = CreateObject ("Scripting.FileSystemObject")
Const ForWriting = 2`enter code here`
Const TristateTrue = -1
Const xlNormal = 51
SourceFolder = "C: \ Users \ Convex \ Documents \ MICHAEL \ XML"
TargetFolder = "C: \ Users \ Convex \ Documents \ MICHAEL \ XLS"
xlApp.Visible = false
for each file in fs.GetFolder (SourceFolder) .files
Set xlWkb = xlApp.Workbooks.Open (file)
BaseName = fs.getbasename (file)
FullTargetPath = TargetFolder & "\" & BaseName & ".xlsx"
xlWkb.SaveAs FullTargetPath, xlNormal
xlWkb.close
next
'Uncomment this line to delete the source file
'fs.DeleteFile ("C: \ xml-to-xls \ xml \ *. xml")
Set xlWkb = Nothing
Set xlApp = Nothing
Set fs = Nothing
This is the xml:
<? xml version = "1.0" encoding = "utf-8"?>
<Transaction>
<list>
<registers>
<matricula> 5 </matricula>
<name> ANGEL EDUARDO TRIGUEROS CISNEROS </name>
<cpf> 000000000 </cpf>
</registrates>
<registers>
<matricula> 9 </matricula>
<name> MARCO AURELIO CARNEIRO </name>
<cpf> 00000000000 </cpf>
</registrates>
<registers>
<matricula> 6 </matricula>
<name> ADRIELLE ROSA CAMARGO DE ANDRADE </name>
<cpf> 000000000 </cpf>
</registrates>
<registers>
<matricula> 3 </matricula>
<name> GUILHERME QUINTINO RIBEIRO </name>
<cpf> 0000000 </cpf>
</registrates>
<registers>
<matricula> 14 </matricula>
<name> TIAGO DA FONTE LEITE </name>
<cpf> 00000000 </cpf>
</registrates>
<registers>
<matricula> 2 </matricula>
<name> LUIZ ANTONIO SACCO </name>
<cpf> 00000000000 </cpf>
</registrates>
<registers>
<matricula> 10 </matricula>
<name> JULIANA PEREIRA DA CUNHA WALENKAMP </name>
<cpf> 000000000 </cpf>
</registrates>
<registers>
<matricula> 8 </matricula>
<name> MARCEL KEITI TOMA </name>
<cpf> 00000000000 </cpf>
</registrates>
<registers>
<matricula> 13 </matricula>
<name> CRISTIANE BONATES MACEDO DE AMO </name>
<cpf> 00000000000 </cpf>
</registrates>
<registers>
<matricula> 11 </matricula>
<name> LUIS ANTONIO PAIN JUNIOR </name>
<cpf> 000000000 </cpf>
</registrates>
<registers>
<matricula> 12 </matricula>
<name> FLAVIO DALE LUCHE </name>
<cpf> 000000000 </cpf>
</registrates>
<registers>
<matricula> 1 </matricula>
<name> BRUNO VIEIRA ROBERTI </name>
<cpf> 000000000 </cpf>
</registrates>
<registers>
<matricula> 4 </matricula>
<name> GUILHERME GAMEIRO DUARTE </name>
<cpf> 00000000 </cpf>
</registrates>
<registers>
<matricula> 7 </matricula>
<name> CARLA FERNANDA PASQUALI </name>
<cpf> 0000000 </cpf>
</registrates>
</list>
</Transaction>

Getting "Expecting a stackmap frame at branch target" when running Maven integration testing

I’m using Maven 3.2.3 with this version of Java
davea$ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home
When I run
mvn clean install
I get errors like the below in my integration tests …
testFindSampleUsersByCodeAscByDefault(org.mainco.subco.user.service.SampleUserService2IT) Time elapsed: 2.204 sec <<< ERROR!
java.lang.VerifyError: Expecting a stackmap frame at branch target 57
Exception Details:
Location:
org/mainco/subco/user/service/SampleUserServiceImpl$ValueComparator.compare(Lorg/mainco/subco/user/domain/User;Lorg/mainco/subco/user/domain/User;)I #10: ifnull
Reason:
Expected stackmap frame at this location.
Bytecode:
0x0000000: 2ab4 001b 2bb9 002e 0200 c600 2f2a b400
0x0000010: 1b2b b900 2e02 00c0 0030 b600 34c6 001c
0x0000020: 2ab4 001b 2bb9 002e 0200 c000 30b6 0034
0x0000030: b600 39b6 003e a700 0512 404e 2ab4 001b
0x0000040: 2cb9 002e 0200 c600 2f2a b400 1b2c b900
0x0000050: 2e02 00c0 0030 b600 34c6 001c 2ab4 001b
0x0000060: 2cb9 002e 0200 c000 30b6 0034 b600 39b6
0x0000070: 003e a700 0512 403a 042d 1904 b600 4436
0x0000080: 0515 0599 0016 2d19 04b6 0044 2d19 04b6
0x0000090: 0044 b800 4a6c a700 0403 3606 1506 2ab4
0x00000a0: 0023 9900 0702 a700 0404 a000 0502 ac04
0x00000b0: ac
at org.mainco.subco.user.service.SampleUserServiceImpl.findSampleUsers(SampleUserServiceImpl.java:439)
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:497)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy98.findSampleUsers(Unknown Source)
at org.mainco.subco.user.service.SampleUserService2IT.testFindSampleUsersByCodeAscByDefault(SampleUserService2IT.java:215)
Here is how my compiler plugin is configured …
<profile>
<id>jdk-8</id>
<activation>
<jdk>1.8</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<compilerArgument>-proc:none</compilerArgument>
<fork>true</fork>
</configuration>
<executions>
<execution>
<id>default-testCompile</id>
<phase>test-compile</phase>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
and here is how my failsafe is configured
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<reuseForks>true</reuseForks>
<argLine>-Xmx4096m -XX:MaxPermSize=512M -XX:-UseSplitVerifier ${itCoverageAgent}</argLine>
<skipTests>${skipAllTests}</skipTests>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
Any ideas how to prevent these bizarre “Expecting a stackmap frame at branch target” errors I’m seeing?
Edit:
I'm using these dependnecies (as speculated by the comments that these were problems):
[INFO] +- org.springframework:spring-aop:jar:3.2.11.RELEASE:compile
...
[INFO] +- org.aspectj:aspectjweaver:jar:1.8.6:compile
[INFO] +- org.aspectj:aspectjrt:jar:1.8.6:compile
I had this same problem when I moved to JDK 8. Code built fine, just got these errors when running the unit tests. I see you are using -XX:-UseSplitVerifier, which didn't work for me either. I had found a short blurb somewhere that instead of using -XX:-UseSplitVerifier with JDK 8, I should use -noverify. I gave it a try and it worked for me.
Hope this helps.
before java8, you can add arg item of -XX:-UseSplitVerifier while starting jvm to solve such issue;
UseSplitVerifier arg item was removed by java8, but you can also use -noverify for replacement

Maven Multi-Module and Source Plugin: How to keep the original structure of the project?

I have a problem with Maven and the Maven Source Plugin, i.e., the structure of the generated zip file (and the *-sources.jar file) differs from the original structure. This makes it hard for people to modify our source code again. Thus I would like to get the same structure as in the original version.
In the following I will describe briefly the original structure of the project, the structure of the zip file and the structure of the *-sources.jar file. Afterwards I will present two pom.xml files, the parent-pom and one of the modules. What I'm asking for is basically a method how to add the main pom.xml to the zip file and keep the structure of a module (e.g., eismassim->src->main). Of course I could add a bash script that fulfils the task, however I think there is a general solution to it that I do not know of.
Let me start with the overall description: I have a multi module project in Maven that has the following structure:
.
|-- dep.xml
|-- pom.xml
|-- documents
|-- eismassim
| |-- dep.xml
| |-- pom.xml
| `-- src
| |-- main
| | `-- java
| `-- test
| `-- java
|-- javaagents
| |-- dep.xml
| |-- pom.xml
| |-- scripts
| `-- src
| |-- main
| | `-- java
| `-- test
| `-- java
|-- massim
| |-- dep.xml
| |-- pom.xml
| |-- scripts
| `-- src
| `-- main
| |-- java
| `-- resources
|-- webapp
| |-- pom.xml
| |-- scripts
| |-- src
| | `-- main
| | |-- java
| | |-- resources
| | `-- webapp
The generated zip file massim-2013-1.0-bin.zip has the following structure:
.
|-- massim-2013-1.0
| |-- CHANGELOG
| |-- documents
| |-- eismassim
| | `-- target
| | |-- dependency
| | | |-- eis-0.3.jar
| | | `-- junit-4.8.2.jar
| | |-- eismassim-2.1.jar
| | |-- eismassim-2.1-javadoc.jar
| | `-- eismassim-2.1-sources.jar
| |-- javaagents
| | |-- scripts
| | `-- target
| | |-- dependency
| | | |-- apltk-0.1.jar
| | | |-- eis-0.3.jar
| | | |-- eismassim-2.1.jar
| | | `-- junit-4.8.2.jar
| | |-- javaagents-2.1.jar
| | |-- javaagents-2.1-javadoc.jar
| | `-- javaagents-2.1-sources.jar
| |-- massim
| | |-- scripts
| | `-- target
| | |-- agentcontest-2013-1.0.jar
| | |-- agentcontest-2013-1.0-javadoc.jar
| | |-- agentcontest-2013-1.0-sources.jar
| | `-- dependency
| | |-- appframework-1.03.jar
| `-- webapp
| |-- scripts
| |-- target
| | |-- massim-javadoc.jar
| | |-- massim-sources.jar
| | `-- massim.war
Thirdly, the structure of the eismassim-2.1-sources.jar:
.
|-- massim
| |-- App.java
| |-- eis
| `-- eismassim
| |-- connection
| |-- CowboysEntity.java
| |-- Entity.java
|-- META-INF
| `-- MANIFEST.MF
`-- pom.xml
Executing mvn package after unzipping the jar file results in an empty package. So I would have to create src->main->java for each module again and move the files to the right position or modify the pom.xml by hand. Is it possible to fix this?
The parent pom file:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>massim</groupId>
<artifactId>massim</artifactId>
<version>2013-1.0</version>
<packaging>pom</packaging>
<name>MAPC Package</name>
<url>http://multiagentcontest.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<modules>
<module>massim</module>
<module>eismassim</module>
<module>javaagents</module>
<module>webapp</module>
</modules>
<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
<executions>
<execution>
<id>auto-clean</id>
<phase>initialize</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>attached</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
<configuration>
<descriptor>dep.xml</descriptor>
</configuration>
</plugin>
</plugins>
</build>
</project>
And for eismassim:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>massim</groupId>
<artifactId>eismassim</artifactId>
<version>2.1</version>
<packaging>jar</packaging>
<name>EISMASSim</name>
<url>http://multiagentcontest.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>apleis</groupId>
<artifactId>eis</artifactId>
<version>0.3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<configuration>
<archive>
<manifestEntries>
<Main-Class>massim.eismassim.EnvironmentInterface</Main-Class>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<includePom>true</includePom>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<configuration>
<quiet>true</quiet>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh-external</artifactId>
<version>1.0-beta-6</version>
</extension>
</extensions>
</build>
</project>
Thank you for your help.

Resources