maven surefire test failed after upgrade to JDK 8 - maven
I have multi module projects. All my tests were passed under JDK 7. But when I upgraded to JDK 8, the maven surefire run twice (it run twices in JDK 7 as well). The first test passed but the second one failed.
I have tried upgrade the the latest sure-fire but no luck.
Does any one know how to solve this issue?
parent.pom
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<fork>true</fork>
<source>${source.level}</source>
<target>${target.level}</target>
<testSource>${source.level}</testSource>
<testTarget>${target.level}</testTarget>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<argLine>-Xms512m -Xmx1024m
</argLine>
</configuration>
</plugin>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-antrun-plugin
</artifactId>
<versionRange>
[1.3,)
</versionRange>
<goals>
<goal>run</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
module 1
<build>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<versionRange>[1.0,)</versionRange>
<goals>
<goal>run</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<tasks>
<mkdir dir="target/generated-sources" />
<exec executable="${protoc.executable}">
<arg value="--java_out=target/generated-sources" />
<arg value="--proto_path=${basedir}/../messdefn/" />
<arg value="${basedir}/../messdefn/messdefn.proto" />
</exec>
</tasks>
<sourceRoot>target/generated-sources</sourceRoot>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.12.3</version>
</dependency>
</dependencies>
<configuration>
<excludedGroups>com.company.test.IntegrationTest</excludedGroups>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.9.1</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<includes>
<include>log4j.xml</include>
<include>dnp3_devices.ns</include>
<include>application.properties</include>
<include>unitils.properties</include>
<include>dbscripts/*.sql</include>
<include>applicationContext-test.xml</include>
<include>ehcache.xml</include>
</includes>
</testResource>
<testResource>
<directory>src/main/resources</directory>
<excludes>
<exclude>log4j.xml</exclude>
</excludes>
</testResource>
<!-- add the data file (*.xml) for unitils -->
<testResource>
<directory>${project.basedir}/src/test/java</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</testResource>
</testResources>
</build>
<profiles>
<profile>
<id>jenkins</id>
<activation>
<property>
<name>env.IS_CI_BUILD</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.5.2</version>
<configuration>
<instrumentation>
<ignores>
<ignore>com.company.protobuf.message.*</ignore>
</ignores>
<excludes>
<exclude>com/company/protobuf/message/**/*.class</exclude>
</excludes>
</instrumentation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/*Test.java</include>
<include>**/*ITCase.java</include>
</includes>
<excludedGroups>com.company.core.IgnoreITCase</excludedGroups>
<systemProperties>
<DB_BUILD_USER>${env.DB_BUILD_USER}</DB_BUILD_USER>
<TWO_TASK>${env.TWO_TASK}</TWO_TASK>
</systemProperties>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
and here is the maven result
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] top-level Maven project
[INFO] core Java library
[INFO] web application (presentation)
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building NS top-level Maven project 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # parent ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building NS core Java library 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # ns-core ---
[INFO] Deleting /home/bli/ns/tun-0018-New/BASE_STATION/java/target
[INFO]
[INFO] --- maven-antrun-plugin:1.8:run (generate-sources) # ns-core ---
[INFO] Executing tasks
main:
[mkdir] Created dir: /home/bli/ns/tun-0018-New/BASE_STATION/java/target/generated-sources
[INFO] Executed tasks
[INFO] Registering compile source root /home/bli/ns/tun-0018-New/BASE_STATION/java/target/generated-sources
[INFO]
[INFO] --- build-helper-maven-plugin:1.9.1:add-source (add-source) # ns-core ---
[INFO] Source directory: /home/bli/ns/tun-0018-New/BASE_STATION/java/target/generated-sources added.
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # ns-core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 5 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) # ns-core ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 335 source files to /home/bli/ns/tun-0018-New/BASE_STATION/java/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # ns-core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 5 resources
[INFO] Copying 5 resources
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) # ns-core ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 43 source files to /home/bli/ns/tun-0018-New/BASE_STATION/java/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) # ns-core ---
[INFO] Surefire report directory: /home/bli/ns/tun-0018-New/BASE_STATION/java/target/surefire-reports
[INFO] Using configured provider org.apache.maven.surefire.junitcore.JUnitCoreProvider
[INFO] parallel='none', perCoreThreadCount=true, threadCount=0, useUnlimitedThreads=false, threadCountSuites=0, threadCountClasses=0, threadCountMethods=0, parallelOptimized=true
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.company.core.shared.dto.MeterReadingPpDtoTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec - in com.company.core.shared.dto.MeterReadingPpDtoTest
Running com.company.core.shared.db.DbUtilsTest
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec - in com.company.core.shared.db.DbUtilsTest
Running com.company.core.shared.SinglePhaseMeterReadingDtoTest
Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.083 sec - in com.company.core.shared.SinglePhaseMeterReadingDtoTest
Running com.company.core.shared.utils.EnvironmentTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec - in com.company.core.shared.utils.EnvironmentTest
Running com.company.core.shared.utils.DateUtilsTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec - in com.company.core.shared.utils.DateUtilsTest
Running com.company.core.shared.utils.NsPropertyFileTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec - in com.company.core.shared.utils.NsPropertyFileTest
Running com.company.core.shared.utils.ConversionsTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in com.company.core.shared.utils.ConversionsTest
Running com.company.core.shared.utils.NsConfigurationTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec - in com.company.core.shared.utils.NsConfigurationTest
Running com.company.core.springutil.tunPropertyPlaceholderConfigurerTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.258 sec - in com.company.core.springutil.tunPropertyPlaceholderConfigurerTest
Running com.company.core.springutil.tunApplicationContextTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.013 sec - in com.company.core.springutil.tunApplicationContextTest
Running com.company.core.springutil.ApplicationContextProviderTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.034 sec - in com.company.core.springutil.ApplicationContextProviderTest
Running com.company.core.common.dao.NetworkDeviceDaoTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.221 sec - in com.company.core.common.dao.NetworkDeviceDaoTest
Running com.company.core.common.dao.dto.CategorySelectListEntryDtoTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in com.company.core.common.dao.dto.CategorySelectListEntryDtoTest
Running com.company.core.common.dao.model.ErtDeviceTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.009 sec - in com.company.core.common.dao.model.ErtDeviceTest
Running com.company.core.common.dao.model.MeterDeviceTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec - in com.company.core.common.dao.model.MeterDeviceTest
Running com.company.core.common.dao.model.ErtReadingTest
Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.018 sec - in com.company.core.common.dao.model.ErtReadingTest
Running com.company.core.common.dao.model.ProductTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.027 sec - in com.company.core.common.dao.model.ProductTest
Running com.company.core.common.dao.impl.jdbc.SystemCodeDaoJdbcTest
Tests run: 21, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.323 sec - in com.company.core.common.dao.impl.jdbc.SystemCodeDaoJdbcTest
Running com.company.core.common.hibernate.type.UtcTimestampTypeTest
Tests run: 18, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.019 sec - in com.company.core.common.hibernate.type.UtcTimestampTypeTest
Running com.company.core.common.service.impl.NetworkUserServiceImplTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec - in com.company.core.common.service.impl.NetworkUserServiceImplTest
Running com.company.core.common.model.StatusInfoTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec - in com.company.core.common.model.StatusInfoTest
Running com.company.core.common.UtilsTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec - in com.company.core.common.UtilsTest
Running com.company.core.meter.configuration.service.impl.ErtDeviceConfigurationServiceImplTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.028 sec - in com.company.core.meter.configuration.service.impl.ErtDeviceConfigurationServiceImplTest
Running com.company.core.meter.configuration.service.impl.MeterConfigurationServiceImplTest
Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - in com.company.core.meter.configuration.service.impl.MeterConfigurationServiceImplTest
Running com.company.core.meter.reading.dao.tunMeterReadingDaoTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec - in com.company.core.meter.reading.dao.tunMeterReadingDaoTest
Running com.company.core.meter.reading.dao.hibernate.InitiateReadingDaoHibernateTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.396 sec - in com.company.core.meter.reading.dao.hibernate.InitiateReadingDaoHibernateTest
Running com.company.core.meter.reading.dao.jdbc.DeviceReadingDaoJdbcTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.112 sec - in com.company.core.meter.reading.dao.jdbc.DeviceReadingDaoJdbcTest
Running com.company.core.meter.request.impl.InitiateReadingServiceImplTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.009 sec - in com.company.core.meter.request.impl.InitiateReadingServiceImplTest
Running com.company.core.vrapp.model.Dnp3ConfigurationTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec - in com.company.core.vrapp.model.Dnp3ConfigurationTest
Running com.company.core.vrapp.model.AverageDemandTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in com.company.core.vrapp.model.AverageDemandTest
Running com.company.core.vrapp.model.VrDeviceTest
Tests run: 21, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.116 sec - in com.company.core.vrapp.model.VrDeviceTest
Running com.company.core.messaging.rmq.impl.ReflectionTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in com.company.core.messaging.rmq.impl.ReflectionTest
Running com.company.core.messaging.rmq.impl.RmqBrokerConfigTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in com.company.core.messaging.rmq.impl.RmqBrokerConfigTest
Running com.company.core.messaging.rmq.impl.UtilsTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in com.company.core.messaging.rmq.impl.UtilsTest
Running com.company.core.messaging.rmq.impl.RmqQueueReaderTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in com.company.core.messaging.rmq.impl.RmqQueueReaderTest
Running com.company.core.messaging.rmq.message.RefreshMultiSpeakMessageTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.589 sec - in com.company.core.messaging.rmq.message.RefreshMultiSpeakMessageTest
Running com.company.core.messaging.rmq.BasicFunctionalityTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.228 sec - in com.company.core.messaging.rmq.BasicFunctionalityTest
Results :
Tests run: 207, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] >>> cobertura-maven-plugin:2.5.2:cobertura (default) > [cobertura]test # ns-core >>>
[INFO]
[INFO] --- maven-antrun-plugin:1.8:run (generate-sources) # ns-core ---
[INFO] Executing tasks
main:
[INFO] Executed tasks
[INFO] Registering compile source root /home/bli/ns/tun-0018-New/BASE_STATION/java/target/generated-sources
[INFO]
[INFO] --- build-helper-maven-plugin:1.9.1:add-source (add-source) # ns-core ---
[INFO] Source directory: /home/bli/ns/tun-0018-New/BASE_STATION/java/target/generated-sources added.
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # ns-core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 5 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) # ns-core ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 335 source files to /home/bli/ns/tun-0018-New/BASE_STATION/java/target/classes
[INFO]
[INFO] --- cobertura-maven-plugin:2.5.2:instrument (default) # ns-core ---
[INFO] Cobertura 1.9.4.1 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
Instrumenting 481 files to /home/bli/ns/tun-0018-New/BASE_STATION/java/target/generated-classes/cobertura
[cobertura] WARN [main] net.sourceforge.cobertura.instrument.ClassInstrumenter - No line number information found for class com.company.core.common.dao.impl.hibernate.ErtReadingDaoHibernate$1. Perhaps you need to compile with debug=true?
[cobertura] WARN [main] net.sourceforge.cobertura.instrument.ClassInstrumenter - No line number information found for class com.company.core.common.dao.impl.jdbc.LicenseDaoJdbc$1. Perhaps you need to compile with debug=true?
[cobertura] WARN [main] net.sourceforge.cobertura.instrument.ClassInstrumenter - No line number information found for class com.company.core.common.dao.impl.jdbc.CategorySelectListDaoJdbc$1. Perhaps you need to compile with debug=true?
[cobertura] WARN [main] net.sourceforge.cobertura.instrument.ClassInstrumenter - No line number information found for class com.company.core.common.dao.impl.jdbc.MeterServiceDaoJdbc$1. Perhaps you need to compile with debug=true?
[cobertura] WARN [main] net.sourceforge.cobertura.instrument.ClassInstrumenter - No line number information found for class com.company.core.meter.reading.dao.jdbc.PolyPhaseMeterReadingDaoJdbc$1. Perhaps you need to compile with debug=true?
[cobertura] WARN [main] net.sourceforge.cobertura.instrument.ClassInstrumenter - No line number information found for class com.company.core.meter.reading.dao.jdbc.SinglePhaseMeterReadingDaoJdbc$1. Perhaps you need to compile with debug=true?
Cobertura: Saved information on 481 classes.
Instrument time: 516ms
[INFO] Instrumentation was successful.
[INFO] NOT adding cobertura ser file to attached artifacts list.
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # ns-core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 5 resources
[INFO] Copying 5 resources
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) # ns-core ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 43 source files to /home/bli/ns/tun-0018-New/BASE_STATION/java/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) # ns-core ---
[INFO] Surefire report directory: /home/bli/ns/tun-0018-New/BASE_STATION/java/target/surefire-reports
[INFO] Using configured provider org.apache.maven.surefire.junitcore.JUnitCoreProvider
[INFO] parallel='none', perCoreThreadCount=true, threadCount=0, useUnlimitedThreads=false, threadCountSuites=0, threadCountClasses=0, threadCountMethods=0, parallelOptimized=true
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] top-level Maven project ......................... SUCCESS [ 0.079 s]
[INFO] core Java library ............................... FAILURE [ 17.884 s]
[INFO] web application (presentation) .................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.131 s
[INFO] Finished at: 2015-01-16T16:01:12-08:00
[INFO] Final Memory: 21M/363M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project ns-core: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed: There was an error in the forked process
[ERROR] java.lang.VerifyError: Instruction type does not match stack map
[ERROR] Exception Details:
[ERROR] Location:
[ERROR] com/company/test/BaseDaoIntegrationTest.removeDeviceReadingData(J[I)V #71: iload
[ERROR] Reason:
[ERROR] Type integer (current frame, locals[4]) is not assignable to 'java/text/NumberFormat' (stack map, locals[4])
[ERROR] Current Frame:
[ERROR] bci: #71
[ERROR] flags: { }
[ERROR] locals: { 'com/company/test/BaseDaoIntegrationTest', long, long_2nd, '[I', integer, integer, 'java/text/DecimalFormat', '[Ljava/lang/Object;', integer }
[ERROR] stack: { }
[ERROR] Stackmap Frame:
[ERROR] bci: #71
[ERROR] flags: { }
[ERROR] locals: { 'com/company/test/BaseDaoIntegrationTest', long, long_2nd, '[I', 'java/text/NumberFormat', '[Ljava/lang/Object;', integer }
[ERROR] stack: { }
[ERROR] Bytecode:
[ERROR] 0x0000000: 0336 0411 ffff 3605 120b 1100 21b8 0011
[ERROR] 0x0000010: bb00 5259 1254 b700 573a 0612 0b11 0022
[ERROR] 0x0000020: b800 112d be04 60bd 0004 3a07 120b 1100
[ERROR] 0x0000030: 24b8 0011 1907 031f b800 3953 120b 1100
[ERROR] 0x0000040: 25b8 0011 0436 0815 0819 07be 1100 2536
[ERROR] 0x0000050: 0411 0000 3605 a200 4615 0411 0025 a000
[ERROR] 0x0000060: 1a15 0511 0000 a000 1212 0b15 0415 0504
[ERROR] 0x0000070: b800 5f11 ffff 3605 120b 1100 26b8 0011
[ERROR] 0x0000080: 1907 1508 2d15 0804 642e b800 3e53 120b
[ERROR] 0x0000090: 1100 25b8 0011 8408 01a7 ffae 1505 9b00
[ERROR] 0x00000a0: 1212 0b15 0415 0503 b800 5f11 ffff 3605
[ERROR] 0x00000b0: 120b 1100 29b8 0011 0336 0815 0810 1011
[ERROR] 0x00000c0: 0029 3604 1100 0036 05a2 007a 1504 1100
[ERROR] 0x00000d0: 29a0 001a 1505 1100 00a0 0012 120b 1504
[ERROR] 0x00000e0: 1505 04b8 005f 11ff ff36 0512 0b11 002a
[ERROR] 0x00000f0: b800 1119 0615 0885 b600 633a 0912 0b11
[ERROR] 0x0000100: 002b b800 112a b600 31bb 0065 59b7 0066
[ERROR] 0x0000110: 1268 b600 6c19 09b6 006c 126e b600 6c2d
[ERROR] 0x0000120: beb8 0074 b600 6c12 76b6 006c b600 7a19
[ERROR] 0x0000130: 07b6 0044 5712 0b11 0029 b800 1184 0801
[ERROR] 0x0000140: a7ff 7b15 059b 0012 120b 1504 1505 03b8
[ERROR] 0x0000150: 005f 11ff ff36 0512 0b11 002f b800 11b1
[ERROR] 0x0000160:
[ERROR] Stackmap Table:
[ERROR] append_frame(#71,Object[#89],Object[#91],Integer)
[ERROR] chop_frame(#184,1)
[ERROR] append_frame(#187,Integer)
[ERROR] chop_frame(#351,1)
[ERROR]
[ERROR] at java.lang.Class.getDeclaredMethods0(Native Method)
[ERROR] at java.lang.Class.privateGetDeclaredMethods(Class.java:2693)
[ERROR] at java.lang.Class.privateGetMethodRecursive(Class.java:3040)
[ERROR] at java.lang.Class.getMethod0(Class.java:3010)
[ERROR] at java.lang.Class.getMethod(Class.java:1776)
[ERROR] at org.apache.maven.surefire.util.ReflectionUtils.tryGetMethod(ReflectionUtils.java:57)
[ERROR] at org.apache.maven.surefire.common.junit3.JUnit3TestChecker.isSuiteOnly(JUnit3TestChecker.java:64)
[ERROR] at org.apache.maven.surefire.common.junit3.JUnit3TestChecker.isValidJUnit3Test(JUnit3TestChecker.java:59)
[ERROR] at org.apache.maven.surefire.common.junit3.JUnit3TestChecker.accept(JUnit3TestChecker.java:54)
[ERROR] at org.apache.maven.surefire.common.junit4.JUnit4TestChecker.accept(JUnit4TestChecker.java:52)
[ERROR] at org.apache.maven.surefire.common.junit48.JUnit48TestChecker.accept(JUnit48TestChecker.java:50)
[ERROR] at org.apache.maven.surefire.util.DefaultScanResult.applyFilter(DefaultScanResult.java:97)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreProvider.scanClassPath(JUnitCoreProvider.java:210)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:134)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
[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/PluginExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
The Cobertura Maven plugin needs to be updated to version 2.7 to support Java 8.
See: http://jira.codehaus.org/browse/MCOBERTURA-189
Topic is similar to:
mvn test fails because of Surefire JDK version?
My working solution is:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<jvm>${env.JAVA_HOME}/bin/java</jvm>
</configuration>
</plugin>
The reason of the solution and the way how I came to it
I do not have Cobertura at all.
I had started my build from console.
I had defined JAVA_HOME to JDK 1.8.
java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
javac -version
javac 1.8.0_25
The mvn -U clean install -Dmaven.test.skip=true is working very well.
Executing only mvn -U clean install leads to:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.14.1:test (default-test) on project logprocessing-core: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.14.1:test failed: There was an error in the forked process
[ERROR] java.lang.UnsupportedClassVersionError: mycompany/myproject/common/TestConstants : Unsupported major.minor version 52.0
The same problem comes by using surefire 2.19.1.
Surefire has own private JDK preferences.
The same problem was in the past.
See:
http://sampreshan.svashishtha.com/2012/04/01/quicktip-maven-surefire-plugin-unsupported-major-minor-version-51-0/
https://coderwall.com/p/y8yg8w/maven-unsupported-major-minor-version-of-surefire
Unsupported major.minor version 51.0 on Junit, but not web app
Maven/Jenkins java.lang.UnsupportedClassVersionError: Unsupported major.minor version 51.0
Therefore the solution is to add explicitly jvm spec to plugin configuration.
Best regards,
Seweryn.
Run your program as an administrator, this worked for me.
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]
How to get Maven to output JUnit5 testReporter.publishEntry() values to console?
How do I get Maven to output testReporter.publishEntry() values to the command line console ? Example import org.junit.jupiter.api.*; import java.util.HashMap; import java.util.Map; class TestReporterTest { #Test void testReportSingleValue(TestReporter testReporter) { testReporter.publishEntry("Single value"); } #Test void testReportKeyValuePair(TestReporter testReporter) { testReporter.publishEntry("Key", "Value"); } #Test void testReportMultipleKeyValuePairs(TestReporter testReporter) { Map<String, String> values = new HashMap<>(); values.put("user", "John"); values.put("password", "secret"); testReporter.publishEntry(values); } } Result (Of running C:\home\programs\apache\maven\apache-maven-3.8.4\bin\mvn.cmd install -Dtest=TestReporterTest) Expected (something like): [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running com.manning.junitbook.ch02.dependencyinjection.TestReporterTest [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.075 s - in com.manning.junitbook.ch02.dependencyinjection.TestReporterTest [INFO] [INFO] timestamp = 2021-12-24T12:00:00.001, Key = Value [INFO] timestamp = 2021-12-24T12:00:00.001, password = secret, user = John [INFO] timestamp = 2021-12-24T12:00:00.001, value = Single value [INFO] [INFO] Results: [INFO] [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0 Actual: [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running com.manning.junitbook.ch02.dependencyinjection.TestReporterTest [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.075 s - in com.manning.junitbook.ch02.dependencyinjection.TestReporterTest [INFO] [INFO] Results: [INFO] [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0 Additional information POM file: https://github.com/ctudose/junit-in-action-third-edition/blob/master/ch02-core/pom.xml Full source code (TestReporterTest.java): https://github.com/ctudose/junit-in-action-third-edition/blob/master/ch02-core/src/test/java/com/manning/junitbook/ch02/dependencyinjection/TestReporterTest.java Full actual output (Maven command line): PS C:\home\code\junit-in-action-third-edition-master\ch02-core> C:\home\programs\apache\maven\apache-maven-3.8.4\bin\mvn.cmd install -Dtest=TestReporterTest [INFO] Scanning for projects... [INFO] [INFO] ------------------< com.manning.junitbook:ch02-core >------------------- [INFO] Building ch02-core 1.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) # ch02-core --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory C:\home\code\junit-in-action-third-edition-master\ch02-core\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # ch02-core --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # ch02-core --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # ch02-core --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-surefire-plugin:2.22.2:test (default-test) # ch02-core --- [INFO] [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running com.manning.junitbook.ch02.dependencyinjection.TestReporterTest [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.075 s - in com.manning.junitbook.ch02.dependencyinjection.TestReporterTest [INFO] [INFO] Results: [INFO] [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] [INFO] --- maven-jar-plugin:2.4:jar (default-jar) # ch02-core --- [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) # ch02-core --- [INFO] Installing C:\home\code\junit-in-action-third-edition-master\ch02-core\target\ch02-core-1.0-SNAPSHOT.jar to C:\Users\bbsop\.m2\repository\com\manning\junitbook\ch02-core\1.0-SNAPSHOT\ch02-core-1.0-SNAPSHOT.jar [INFO] Installing C:\home\code\junit-in-action-third-edition-master\ch02-core\pom.xml to C:\Users\bbsop\.m2\repository\com\manning\junitbook\ch02-core\1.0-SNAPSHOT\ch02-core-1.0-SNAPSHOT.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 4.562 s [INFO] Finished at: 2021-12-24T18:00:59+11:00 [INFO] ------------------------------------------------------------------------ PS C:\home\code\junit-in-action-third-edition-master\ch02-core>
Maven (with tycho) fails while materialize-products
I have an RCP Application which builds find on Eclipse 4.5.2 and 4.6.3; Today i tried to upgrade to Eclipse 2019-6; when i try to manfest a product with maven (mvn clean install) i get the following output: [INFO] --- tycho-p2-repository-plugin:1.4.0:archive-repository (default-archive-repository) # at.biooffice.rcp.product --- [INFO] Building zip: D:\WS18\git\at.biooffice.rcp.product\target\at.biooffice.rcp.product-3.0.1-SNAPSHOT.zip [INFO] [INFO] --- tycho-p2-director-plugin:1.4.0:materialize-products (materialize-products) # at.biooffice.rcp.product --- [INFO] Installing product at.biooffice for environment win32/win32/x86_64 to D:\WS18\git\at.biooffice.rcp.product\target\products\at.biooffice\win32\win32\x86_64 Installing at.biooffice 3.0.1.201907011447. Installation failed. Cannot complete the install because one or more required items could not be found. Software being installed: BioOffice 3.0.1.201907011447 (at.biooffice 3.0.1.201907011447) Missing requirement: toolingwin32.win32.x86_64org.eclipse.equinox.ds 3.0.1.201907011447 requires 'osgi.bundle; org.eclipse.equinox.ds 1.6.0.v20190122-0806' but it could not be found Cannot satisfy dependency: From: BioOffice 3.0.1.201907011447 (at.biooffice 3.0.1.201907011447) To: org.eclipse.equinox.p2.iu; toolingat.biooffice.configuration [3.0.1.201907011447,3.0.1.201907011447] Cannot satisfy dependency: From: toolingat.biooffice.configuration 3.0.1.201907011447 To: org.eclipse.equinox.p2.iu; toolingwin32.win32.x86_64org.eclipse.equinox.ds [3.0.1.201907011447,3.0.1.201907011447] There were errors. See log file: D:\WS18\git\at.biooffice.parent\workspace\.metadata\.log [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] BioOffice 3.0.1-SNAPSHOT ........................... SUCCESS [ 2.483 s] [INFO] microsoftsqlserver 2.0.0-SNAPSHOT .................. SUCCESS [ 0.590 s] [INFO] org.eclipse.gemini.dbaccess.microsoftsqlserver 2.0.0-SNAPSHOT SUCCESS [ 0.869 s] [INFO] com.mysql.jdbc 5.1.38-SNAPSHOT ..................... SUCCESS [ 0.170 s] [INFO] org.eclipse.gemini.dbaccess.mysql 5.1.38-SNAPSHOT .. SUCCESS [ 0.298 s] [INFO] at.biooffice.osgi.service.dialog 3.0.1-SNAPSHOT .... SUCCESS [ 0.269 s] [INFO] lumo.osgi.service.notification 3.0.1-SNAPSHOT ...... SUCCESS [ 0.457 s] [INFO] lumo.osgi.service.notification.impl 3.0.1-SNAPSHOT . SUCCESS [ 0.471 s] [INFO] lumo.core.runtime 3.0.1-SNAPSHOT ................... SUCCESS [ 18.182 s] [INFO] at.biooffice.osgi.service.eclipselink 3.0.1-SNAPSHOT SUCCESS [ 2.032 s] [INFO] at.biooffice.rcp 3.0.1-SNAPSHOT .................... SUCCESS [ 2.129 s] [INFO] at.biooffice.osgi.service.eclipselink.impl 3.0.1-SNAPSHOT SUCCESS [ 2.474 s] [INFO] lumo.exports.csv 3.0.1-SNAPSHOT .................... SUCCESS [ 1.399 s] [INFO] lumo.exports.mssql 3.0.1-SNAPSHOT .................. SUCCESS [ 1.387 s] [INFO] lumo.exports.kml 3.0.1-SNAPSHOT .................... SUCCESS [ 1.365 s] [INFO] lumo.exports.shp 3.0.1-SNAPSHOT .................... SUCCESS [ 1.209 s] [INFO] lumo.exports.vcard 3.0.1-SNAPSHOT .................. SUCCESS [ 1.260 s] [INFO] lumo.exports.taxaendangered 3.0.1-SNAPSHOT ......... SUCCESS [ 1.276 s] [INFO] lumo.imports.xml.nls 3.0.1-SNAPSHOT ................ SUCCESS [ 1.272 s] [INFO] lumo.osgi.service.multimedia 3.0.1-SNAPSHOT ........ SUCCESS [ 1.254 s] [INFO] lumo.osgi.service.multimedia.impl 3.0.1-SNAPSHOT ... SUCCESS [ 1.380 s] [INFO] at.biooffice.osgi.service.dialog.impl 3.0.1-SNAPSHOT SUCCESS [ 1.540 s] [INFO] at.biooffice.update 3.0.1-SNAPSHOT ................. SUCCESS [ 1.262 s] [INFO] at.biooffice.osgi.service.map 3.0.1-SNAPSHOT ....... SUCCESS [ 1.224 s] [INFO] at.biooffice.osgi.service.map.impl 3.0.1-SNAPSHOT .. SUCCESS [ 1.537 s] [INFO] at.biooffice.views.attachedliterature 3.0.1-SNAPSHOT SUCCESS [ 1.365 s] [INFO] at.biooffice.views.bioobject 3.0.1-SNAPSHOT ........ SUCCESS [ 1.399 s] [INFO] at.biooffice.common.admin 3.0.1-SNAPSHOT ........... SUCCESS [ 1.278 s] [INFO] at.biooffice.views.collection 3.0.1-SNAPSHOT ....... SUCCESS [ 1.266 s] [INFO] at.biooffice.views.contact 3.0.1-SNAPSHOT .......... SUCCESS [ 1.281 s] [INFO] at.biooffice.views.determination 3.0.1-SNAPSHOT .... SUCCESS [ 1.265 s] [INFO] at.biooffice.views.dataexchange 3.0.1-SNAPSHOT ..... SUCCESS [ 3.052 s] [INFO] at.biooffice.views.excursion 3.0.1-SNAPSHOT ........ SUCCESS [ 1.257 s] [INFO] at.biooffice.views.literature 3.0.1-SNAPSHOT ....... SUCCESS [ 1.263 s] [INFO] at.biooffice.views.lookups 3.0.1-SNAPSHOT .......... SUCCESS [ 1.326 s] [INFO] at.biooffice.views.multimedia 3.0.1-SNAPSHOT ....... SUCCESS [ 1.329 s] [INFO] at.biooffice.views.report 3.0.1-SNAPSHOT ........... SUCCESS [ 2.193 s] [INFO] at.biooffice.views.nls 3.0.1-SNAPSHOT .............. SUCCESS [ 1.284 s] [INFO] at.biooffice.views.project 3.0.1-SNAPSHOT .......... SUCCESS [ 1.279 s] [INFO] at.biooffice.views.querymanager 3.0.1-SNAPSHOT ..... SUCCESS [ 1.798 s] [INFO] at.biooffice.views.site 3.0.1-SNAPSHOT ............. SUCCESS [ 1.313 s] [INFO] at.biooffice.views.taxon 3.0.1-SNAPSHOT ............ SUCCESS [ 1.601 s] [INFO] at.biooffice.views.welcome 3.0.1-SNAPSHOT .......... SUCCESS [ 1.339 s] [INFO] at.biooffice.views.loan 3.0.1-SNAPSHOT ............. SUCCESS [ 1.375 s] [INFO] at.biooffice.views.servicemonitor 3.0.1-SNAPSHOT ... SUCCESS [ 1.235 s] [INFO] jre.win32.win32.x86_64 8.0.66 ...................... SUCCESS [ 2.631 s] [INFO] at.biooffice.feature 3.0.1-SNAPSHOT ................ SUCCESS [ 0.967 s] [INFO] at.biooffice.feature.admin 3.0.1-SNAPSHOT .......... SUCCESS [ 0.226 s] [INFO] at.biooffice.feature.free.addons 3.0.1-SNAPSHOT .... SUCCESS [ 0.275 s] [INFO] at.biooffice.rcp.product 3.0.1-SNAPSHOT ............ FAILURE [ 37.278 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 07:01 min [INFO] Finished at: 2019-07-01T16:54:21+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.eclipse.tycho:tycho-p2-director-plugin:1.4.0:materialize-products (materialize-products) on project at.biooffice.rcp.product: Installation of product at.biooffice for environment win32/win32/x86_64 failed: Call to p2 director application failed with exit code 13. Program arguments were: [-metadataRepository, file:/D:/WS18/git/at.biooffice.rcp.product/target/,file:/D:/WS18/git/at.biooffice.rcp.product/target/targetPlatformRepository/, -artifactRepository, file:/D:/WS18/git/at.biooffice.rcp.product/target/,file:/resolution-context-artifacts#D%253A%255CWS18%255Cgit%255Cat.biooffice.rcp.product,file:/D:/WS18/git/at.biooffice.rcp.product/target/,file:/D:/WS18/git/at.biooffice.feature/target/,file:/D:/WS18/git/at.biooffice.feature.admin/target/,file:/D:/WS18/git/at.biooffice.feature.free.addons/target/,file:/D:/WS18/git/at.biooffice.common.admin/target/,file:/D:/WS18/git/lumo.core.runtime/target/,file:/D:/WS18/git/at.biooffice.osgi.service.dialog/target/,file:/D:/WS18/git/lumo.osgi.service.notification/target/,file:/D:/WS18/git/at.biooffice.views.lookups/target/,file:/D:/WS18/git/at.biooffice.views.nls/target/,file:/D:/WS18/git/at.biooffice.views.querymanager/target/,file:/D:/WS18/git/lumo.imports.xml.nls/target/,file:/D:/WS18/git/jre.win32.win32.x86_64/target/,file:/D:/WS18/git/lumo.osgi.service.multimedia/target/,file:/D:/WS18/git/lumo.osgi.service.multimedia.impl/target/,file:/D:/WS18/git/lumo.osgi.service.notification.impl/target/,file:/D:/WS18/git/microsoftsqlserver/target/,file:/D:/WS18/git/org.eclipse.gemini.dbaccess.microsoftsqlserver/target/,file:/D:/WS18/git/at.biooffice.osgi.service.dialog.impl/target/,file:/D:/WS18/git/at.biooffice.osgi.service.eclipselink/target/,file:/D:/WS18/git/at.biooffice.osgi.service.eclipselink.impl/target/,file:/D:/WS18/git/at.biooffice.views.bioobject/target/,file:/D:/WS18/git/at.biooffice.views.collection/target/,file:/D:/WS18/git/at.biooffice.views.contact/target/,file:/D:/WS18/git/at.biooffice.views.dataexchange/target/,file:/D:/WS18/git/at.biooffice.views.excursion/target/,file:/D:/WS18/git/at.biooffice.views.literature/target/,file:/D:/WS18/git/at.biooffice.views.multimedia/target/,file:/D:/WS18/git/at.biooffice.views.report/target/,file:/D:/WS18/git/at.biooffice.views.project/target/,file:/D:/WS18/git/at.biooffice.views.site/target/,file:/D:/WS18/git/at.biooffice.views.taxon/target/,file:/D:/WS18/git/at.biooffice.views.welcome/target/,file:/D:/WS18/git/at.biooffice.rcp/target/,file:/D:/WS18/git/at.biooffice.update/target/,file:/D:/WS18/git/at.biooffice.views.determination/target/,file:/D:/WS18/git/at.biooffice.views.attachedliterature/target/,file:/D:/WS18/git/at.biooffice.views.loan/target/,file:/D:/WS18/git/com.mysql.jdbc/target/,file:/D:/WS18/git/org.eclipse.gemini.dbaccess.mysql/target/,file:/D:/WS18/git/lumo.exports.kml/target/,file:/D:/WS18/git/lumo.exports.taxaendangered/target/,file:/D:/WS18/git/lumo.exports.vcard/target/,file:/D:/WS18/git/lumo.exports.shp/target/,file:/D:/WS18/git/lumo.exports.mssql/target/,file:/D:/WS18/git/lumo.exports.csv/target/,file:/D:/WS18/git/at.biooffice.osgi.service.map/target/,file:/D:/WS18/git/at.biooffice.osgi.service.map.impl/target/,file:/C:/Users/BlackPearl/.m2/repository/, -installIU, at.biooffice, -destination, D:\WS18\git\at.biooffice.rcp.product\target\products\at.biooffice\win32\win32\x86_64, -profile, DefaultProfile, -profileProperties, org.eclipse.update.install.features=true, -roaming, -p2.os, win32, -p2.ws, win32, -p2.arch, x86_64]. -> [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 :at.biooffice.rcp.product so all bundles build successfully but the product does not! which referrs to: org.eclipse.equinox.p2.iu by definition i had both org.eclipse.rcp and org.eclipse.e4.rcp as requirement. this leads to this error i tried removing org.eclipse.rcp also org.eclipse.e4.rcp but in the end nothing works. any ideas how to fix this error?
It looks like you have an explicit dependency on the org.eclipse.equinox.ds plug-in. Current versions of Eclipse have dropped that plug-in and replaced it with the org.apache.felix.scr plug-in.
Error in flyway migrations on h2Database since upgrading to spring boot v2
I have searched for solutions to this and haven't found anything. I have a service performing migrations via flyway. As part of integration tests for this service we use h2 database. Previously all tests and migrations worked on the h2 database when based off of Spring Boot version 1.5.9.RELEASE Since moving to 2.0.3.RELEASE the migrations still work fine when i run a local MySQL db but not when I run the tests on h2database. Please note that I cannot edit the script, and I still want to run flyway on my tests (If i could the solution would be easy). I would like to fix my tests to perform as they have done so far. The migration script in question. The error is with the RENAME table syntax appears to be down to h2db not supporting that form of syntax. However, this does appear like it supported before (otherwise these tests would have failed on 1.5.9.RELEASE) ALTER TABLE `keys` CHANGE `key_value` `content_key` varchar(255) NOT NULL; DROP INDEX `key_value_idx` on `keys`; CREATE INDEX `content_key_idx` on `keys` (`content_key`); RENAME TABLE `keys` TO `content_keys`; The error java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:125) at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:108) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:117) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83) at org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener.prepareTestInstance(SpringBootDependencyInjectionTestExecutionListener.java:44) at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:246) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:227) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:246) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) at com.github.tomakehurst.wiremock.junit.WireMockClassRule$1.evaluate(WireMockClassRule.java:70) at com.github.tomakehurst.wiremock.junit.WireMockClassRule$1.evaluate(WireMockClassRule.java:70) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190) at org.junit.runners.Suite.runChild(Suite.java:128) at org.junit.runners.Suite.runChild(Suite.java:27) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68) at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateSqlException: Migration V2__rename_key_val.sql failed --------------------------------------- SQL State : 42001 Error Code : 42001 Message : Syntax error in SQL statement "RENAME[*] TABLE ""KEYS"" TO ""CONTENT_KEYS"" "; expected "ROLLBACK, REVOKE, RUNSCRIPT, RELEASE, REPLACE, {"; SQL statement: RENAME TABLE `keys` TO `content_keys` [42001-197] Location : db/migration/V2__rename_key_val.sql (/Users/ciaran.potter/Workspace/foobar/target/classes/db/migration/V2__rename_key_val.sql) Line : 7 Statement : RENAME TABLE `keys` TO `content_keys` at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1708) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:581) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:304) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1089) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:859) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:139) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:99) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:117) ... 38 more Caused by: org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateSqlException: Migration V2__rename_key_val.sql failed --------------------------------------- SQL State : 42001 Error Code : 42001 Message : Syntax error in SQL statement "RENAME[*] TABLE ""KEYS"" TO ""CONTENT_KEYS"" "; expected "ROLLBACK, REVOKE, RUNSCRIPT, RELEASE, REPLACE, {"; SQL statement: RENAME TABLE `keys` TO `content_keys` [42001-197] Location : db/migration/V2__rename_key_val.sql (/Users/ciaran.potter/Workspace/foobar/target/classes/db/migration/V2__rename_key_val.sql) Line : 7 Statement : RENAME TABLE `keys` TO `content_keys` at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:365) at org.flywaydb.core.internal.command.DbMigrate.access$400(DbMigrate.java:52) at org.flywaydb.core.internal.command.DbMigrate$5.call(DbMigrate.java:297) at org.flywaydb.core.internal.util.jdbc.TransactionTemplate.execute(TransactionTemplate.java:75) at org.flywaydb.core.internal.command.DbMigrate.applyMigrations(DbMigrate.java:294) at org.flywaydb.core.internal.command.DbMigrate.migrateGroup(DbMigrate.java:259) at org.flywaydb.core.internal.command.DbMigrate.access$300(DbMigrate.java:52) at org.flywaydb.core.internal.command.DbMigrate$4.call(DbMigrate.java:179) at org.flywaydb.core.internal.command.DbMigrate$4.call(DbMigrate.java:176) at org.flywaydb.core.internal.database.Connection$1.call(Connection.java:155) at org.flywaydb.core.internal.util.jdbc.TransactionTemplate.execute(TransactionTemplate.java:75) at org.flywaydb.core.internal.database.Connection.lock(Connection.java:151) at org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory.lock(JdbcTableSchemaHistory.java:148) at org.flywaydb.core.internal.command.DbMigrate.migrateAll(DbMigrate.java:176) at org.flywaydb.core.internal.command.DbMigrate.migrate(DbMigrate.java:145) at org.flywaydb.core.Flyway$1.execute(Flyway.java:1206) at org.flywaydb.core.Flyway$1.execute(Flyway.java:1168) at org.flywaydb.core.Flyway.execute(Flyway.java:1655) at org.flywaydb.core.Flyway.migrate(Flyway.java:1168) at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:66) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1767) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1704) ... 56 more Caused by: org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "RENAME[*] TABLE ""KEYS"" TO ""CONTENT_KEYS"" "; expected "ROLLBACK, REVOKE, RUNSCRIPT, RELEASE, REPLACE, {"; SQL statement: RENAME TABLE `keys` TO `content_keys` [42001-197] at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) at org.h2.message.DbException.getSyntaxError(DbException.java:217) at org.h2.command.Parser.getSyntaxError(Parser.java:555) at org.h2.command.Parser.parsePrepared(Parser.java:540) at org.h2.command.Parser.parse(Parser.java:335) at org.h2.command.Parser.parse(Parser.java:311) at org.h2.command.Parser.prepareCommand(Parser.java:278) at org.h2.engine.Session.prepareLocal(Session.java:611) at org.h2.engine.Session.prepareCommand(Session.java:549) at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1247) at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:217) at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:205) at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:95) at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java) at org.flywaydb.core.internal.util.jdbc.JdbcTemplate.executeStatement(JdbcTemplate.java:265) at org.flywaydb.core.internal.database.StandardSqlStatement.execute(StandardSqlStatement.java:41) at org.flywaydb.core.internal.database.ExecutableSqlScript.execute(ExecutableSqlScript.java:128) at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.execute(SqlMigrationExecutor.java:75) at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:363) ... 77 more Result of mvn dependency:list -Dsort [INFO] Scanning for projects... [INFO] [INFO] Building FooBar 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [WARNING] The artifact org.hibernate:hibernate-validator:jar:6.0.8.Final has been relocated to org.hibernate.validator:hibernate-validator:jar:6.0.8.Final [INFO] [INFO] --- maven-dependency-plugin:2.8:list (default-cli) # foobar --- [INFO] [INFO] The following files have been resolved: [INFO] antlr:antlr:jar:2.7.7:compile [INFO] ch.qos.logback:logback-classic:jar:1.2.3:compile [INFO] ch.qos.logback:logback-core:jar:1.2.3:compile [INFO] com.fasterxml.jackson.core:jackson-annotations:jar:2.9.5:compile [INFO] com.fasterxml.jackson.core:jackson-core:jar:2.9.6:compile [INFO] com.fasterxml.jackson.core:jackson-databind:jar:2.9.5:compile [INFO] com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:jar:2.9.5:compile [INFO] com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.6:compile [INFO] com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.5:compile [INFO] com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.9.6:compile [INFO] com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.9.5:compile [INFO] com.fasterxml.jackson.module:jackson-module-afterburner:jar:2.9.6:runtime [INFO] com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.9.6:compile [INFO] com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.6:compile [INFO] com.fasterxml:classmate:jar:1.3.4:compile [INFO] com.github.tomakehurst:wiremock-standalone:jar:2.17.0:test [INFO] com.google.code.findbugs:jsr305:jar:1.3.9:compile [INFO] com.google.errorprone:error_prone_annotations:jar:2.1.3:compile [INFO] com.google.guava:guava:jar:24.1-jre:compile [INFO] com.google.j2objc:j2objc-annotations:jar:1.1:compile [INFO] com.google.protobuf:protobuf-java:jar:2.6.0:runtime [INFO] com.h2database:h2:jar:1.4.197:runtime [INFO] com.jayway.jsonpath:json-path:jar:2.4.0:test [INFO] com.netflix.archaius:archaius-core:jar:0.7.6:compile [INFO] com.netflix.hystrix:hystrix-core:jar:1.5.12:compile [INFO] com.netflix.hystrix:hystrix-javanica:jar:1.5.12:compile [INFO] com.netflix.hystrix:hystrix-metrics-event-stream:jar:1.5.12:compile [INFO] com.netflix.hystrix:hystrix-serialization:jar:1.5.12:compile [INFO] com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test [INFO] com.zaxxer:HikariCP:jar:2.7.9:compile [INFO] commons-codec:commons-codec:jar:1.11:compile [INFO] commons-configuration:commons-configuration:jar:1.8:compile [INFO] commons-io:commons-io:jar:2.5:compile [INFO] commons-lang:commons-lang:jar:2.6:compile [INFO] commons-logging:commons-logging:jar:1.2:compile [INFO] dom4j:dom4j:jar:1.6.1:compile [INFO] io.micrometer:micrometer-core:jar:1.0.5:compile [INFO] io.reactivex:rxjava-reactive-streams:jar:1.2.1:compile [INFO] io.reactivex:rxjava:jar:1.3.8:compile [INFO] io.sentry:sentry-logback:jar:1.7.5:runtime [INFO] io.sentry:sentry:jar:1.7.5:runtime [INFO] io.springfox:springfox-core:jar:2.8.0:compile [INFO] io.springfox:springfox-schema:jar:2.8.0:compile [INFO] io.springfox:springfox-spi:jar:2.8.0:compile [INFO] io.springfox:springfox-spring-web:jar:2.8.0:compile [INFO] io.springfox:springfox-swagger-common:jar:2.8.0:compile [INFO] io.springfox:springfox-swagger-ui:jar:2.8.0:compile [INFO] io.springfox:springfox-swagger2:jar:2.8.0:compile [INFO] io.swagger:swagger-annotations:jar:1.5.14:compile [INFO] io.swagger:swagger-models:jar:1.5.14:compile [INFO] javax.annotation:javax.annotation-api:jar:1.3.2:compile [INFO] javax.inject:javax.inject:jar:1:compile [INFO] javax.transaction:javax.transaction-api:jar:1.2:compile [INFO] javax.validation:validation-api:jar:2.0.1.Final:compile [INFO] javax.ws.rs:javax.ws.rs-api:jar:2.1:compile [INFO] junit:junit:jar:4.12:test [INFO] mysql:mysql-connector-java:jar:8.0.11:compile [INFO] net.bytebuddy:byte-buddy-agent:jar:1.7.11:test [INFO] net.bytebuddy:byte-buddy:jar:1.7.11:compile [INFO] net.logstash.logback:logstash-logback-encoder:jar:5.1:compile [INFO] net.minidev:accessors-smart:jar:1.2:test [INFO] net.minidev:json-smart:jar:2.3:test [INFO] org.apache.commons:commons-csv:jar:1.4:compile [INFO] org.apache.commons:commons-lang3:jar:3.7:compile [INFO] org.apache.httpcomponents:fluent-hc:jar:4.5.5:compile [INFO] org.apache.httpcomponents:httpclient:jar:4.5.5:compile [INFO] org.apache.httpcomponents:httpcore:jar:4.4.9:compile [INFO] org.apache.logging.log4j:log4j-api:jar:2.10.0:compile [INFO] org.apache.logging.log4j:log4j-to-slf4j:jar:2.10.0:compile [INFO] org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.31:compile [INFO] org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.31:compile [INFO] org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.31:compile [INFO] org.aspectj:aspectjweaver:jar:1.8.13:compile [INFO] org.assertj:assertj-core:jar:3.9.1:test [INFO] org.attoparser:attoparser:jar:2.0.4.RELEASE:compile [INFO] org.bouncycastle:bcpkix-jdk15on:jar:1.56:compile [INFO] org.bouncycastle:bcprov-jdk15on:jar:1.56:compile [INFO] org.checkerframework:checker-compat-qual:jar:2.0.0:compile [INFO] org.codehaus.mojo:animal-sniffer-annotations:jar:1.14:compile [INFO] org.eclipse.jetty:jetty-client:jar:9.4.11.v20180605:compile [INFO] org.eclipse.jetty:jetty-http:jar:9.4.11.v20180605:compile [INFO] org.eclipse.jetty:jetty-io:jar:9.4.11.v20180605:compile [INFO] org.eclipse.jetty:jetty-util:jar:9.4.11.v20180605:compile [INFO] org.flywaydb:flyway-core:jar:5.0.7:compile [INFO] org.glassfish.hk2.external:aopalliance-repackaged:jar:2.5.0-b42:compile [INFO] org.glassfish.hk2.external:javax.inject:jar:2.5.0-b42:compile [INFO] org.glassfish.hk2:hk2-api:jar:2.5.0-b42:compile [INFO] org.glassfish.hk2:hk2-locator:jar:2.5.0-b42:compile [INFO] org.glassfish.hk2:hk2-utils:jar:2.5.0-b42:compile [INFO] org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile [INFO] org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.26-b03:compile [INFO] org.glassfish.jersey.connectors:jersey-apache-connector:jar:2.27:test [INFO] org.glassfish.jersey.connectors:jersey-jetty-connector:jar:2.27:compile [INFO] org.glassfish.jersey.core:jersey-client:jar:2.27:compile [INFO] org.glassfish.jersey.core:jersey-common:jar:2.26:compile [INFO] org.glassfish.jersey.ext:jersey-entity-filtering:jar:2.26:compile [INFO] org.glassfish.jersey.inject:jersey-hk2:jar:2.27:compile [INFO] org.glassfish.jersey.media:jersey-media-json-jackson:jar:2.27:compile [INFO] org.hamcrest:hamcrest-core:jar:1.3:test [INFO] org.hamcrest:hamcrest-library:jar:1.3:test [INFO] org.hdrhistogram:HdrHistogram:jar:2.1.10:compile [INFO] org.hibernate.common:hibernate-commons-annotations:jar:5.0.1.Final:compile [INFO] org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.2.Final:compile [INFO] org.hibernate.validator:hibernate-validator:jar:6.0.8.Final:compile [INFO] org.hibernate:hibernate-core:jar:5.2.17.Final:compile [INFO] org.hibernate:hibernate-entitymanager:jar:5.2.17.Final:compile [INFO] org.hibernate:hibernate-java8:jar:5.2.17.Final:compile [INFO] org.javassist:javassist:jar:3.22.0-GA:compile [INFO] org.jboss.logging:jboss-logging:jar:3.3.2.Final:compile [INFO] org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.0.1.Final:compile [INFO] org.jboss:jandex:jar:2.0.3.Final:compile [INFO] org.latencyutils:LatencyUtils:jar:2.0.3:compile [INFO] org.mapstruct:mapstruct:jar:1.2.0.Final:compile [INFO] org.mockito:mockito-core:jar:2.19.0:test [INFO] org.objenesis:objenesis:jar:2.6:test [INFO] org.ow2.asm:asm:jar:5.0.4:runtime [INFO] org.projectlombok:lombok:jar:1.16.18:compile [INFO] org.reactivestreams:reactive-streams:jar:1.0.2:runtime [INFO] org.reflections:reflections:jar:0.9.11:compile [INFO] org.skyscreamer:jsonassert:jar:1.5.0:test [INFO] org.slf4j:jul-to-slf4j:jar:1.7.25:compile [INFO] org.slf4j:slf4j-api:jar:1.7.25:compile [INFO] org.springframework.boot:spring-boot-actuator-autoconfigure:jar:2.0.3.RELEASE:compile [INFO] org.springframework.boot:spring-boot-actuator:jar:2.0.3.RELEASE:compile [INFO] org.springframework.boot:spring-boot-autoconfigure:jar:2.0.3.RELEASE:compile [INFO] org.springframework.boot:spring-boot-starter-actuator:jar:2.0.3.RELEASE:compile [INFO] org.springframework.boot:spring-boot-starter-aop:jar:2.0.3.RELEASE:compile [INFO] org.springframework.boot:spring-boot-starter-cache:jar:2.0.3.RELEASE:compile [INFO] org.springframework.boot:spring-boot-starter-data-jpa:jar:2.0.3.RELEASE:compile [INFO] org.springframework.boot:spring-boot-starter-jdbc:jar:2.0.3.RELEASE:compile [INFO] org.springframework.boot:spring-boot-starter-json:jar:2.0.3.RELEASE:compile [INFO] org.springframework.boot:spring-boot-starter-logging:jar:2.0.3.RELEASE:compile [INFO] org.springframework.boot:spring-boot-starter-security:jar:2.0.3.RELEASE:compile [INFO] org.springframework.boot:spring-boot-starter-test:jar:2.0.3.RELEASE:test [INFO] org.springframework.boot:spring-boot-starter-thymeleaf:jar:2.0.3.RELEASE:compile [INFO] org.springframework.boot:spring-boot-starter-tomcat:jar:2.0.3.RELEASE:compile [INFO] org.springframework.boot:spring-boot-starter-web:jar:2.0.3.RELEASE:compile [INFO] org.springframework.boot:spring-boot-starter:jar:2.0.3.RELEASE:compile [INFO] org.springframework.boot:spring-boot-test-autoconfigure:jar:2.0.3.RELEASE:test [INFO] org.springframework.boot:spring-boot-test:jar:2.0.3.RELEASE:test [INFO] org.springframework.boot:spring-boot:jar:2.0.3.RELEASE:compile [INFO] org.springframework.cloud:spring-cloud-commons:jar:2.0.0.RELEASE:compile [INFO] org.springframework.cloud:spring-cloud-context:jar:2.0.0.RELEASE:compile [INFO] org.springframework.cloud:spring-cloud-netflix-archaius:jar:2.0.0.RELEASE:compile [INFO] org.springframework.cloud:spring-cloud-netflix-core:jar:2.0.0.RELEASE:compile [INFO] org.springframework.cloud:spring-cloud-netflix-ribbon:jar:2.0.0.RELEASE:compile [INFO] org.springframework.cloud:spring-cloud-starter-hystrix:jar:1.4.4.RELEASE:compile [INFO] org.springframework.cloud:spring-cloud-starter-netflix-archaius:jar:2.0.0.RELEASE:compile [INFO] org.springframework.cloud:spring-cloud-starter-netflix-hystrix:jar:2.0.0.RELEASE:compile [INFO] org.springframework.cloud:spring-cloud-starter:jar:2.0.0.RELEASE:compile [INFO] org.springframework.data:spring-data-commons:jar:2.0.8.RELEASE:compile [INFO] org.springframework.data:spring-data-jpa:jar:2.0.8.RELEASE:compile [INFO] org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile [INFO] org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile [INFO] org.springframework.security:spring-security-config:jar:5.0.6.RELEASE:compile [INFO] org.springframework.security:spring-security-core:jar:5.0.6.RELEASE:compile [INFO] org.springframework.security:spring-security-crypto:jar:5.0.6.RELEASE:compile [INFO] org.springframework.security:spring-security-rsa:jar:1.0.5.RELEASE:compile [INFO] org.springframework.security:spring-security-web:jar:5.0.6.RELEASE:compile [INFO] org.springframework:spring-aop:jar:5.0.7.RELEASE:compile [INFO] org.springframework:spring-aspects:jar:5.0.7.RELEASE:compile [INFO] org.springframework:spring-beans:jar:5.0.7.RELEASE:compile [INFO] org.springframework:spring-context-support:jar:5.0.7.RELEASE:compile [INFO] org.springframework:spring-context:jar:5.0.7.RELEASE:compile [INFO] org.springframework:spring-core:jar:5.0.7.RELEASE:compile [INFO] org.springframework:spring-expression:jar:5.0.7.RELEASE:compile [INFO] org.springframework:spring-jcl:jar:5.0.7.RELEASE:compile [INFO] org.springframework:spring-jdbc:jar:5.0.7.RELEASE:compile [INFO] org.springframework:spring-orm:jar:5.0.7.RELEASE:compile [INFO] org.springframework:spring-test:jar:5.0.7.RELEASE:test [INFO] org.springframework:spring-tx:jar:5.0.7.RELEASE:compile [INFO] org.springframework:spring-web:jar:5.0.7.RELEASE:compile [INFO] org.springframework:spring-webmvc:jar:5.0.7.RELEASE:compile [INFO] org.thymeleaf.extras:thymeleaf-extras-java8time:jar:3.0.1.RELEASE:compile [INFO] org.thymeleaf:thymeleaf-spring5:jar:3.0.9.RELEASE:compile [INFO] org.thymeleaf:thymeleaf:jar:3.0.9.RELEASE:compile [INFO] org.unbescape:unbescape:jar:1.1.5.RELEASE:compile [INFO] org.xmlunit:xmlunit-core:jar:2.5.1:test [INFO] org.yaml:snakeyaml:jar:1.19:runtime My test application.yaml server.port: 18091 pathPrefix: '' management: health: diskspace: enabled: true endpoints: enabled: true health: enabled: true sensitive: false spring.jackson.mapper.use_static_typing: true consumerWhitelist: test,test1 server.compression.enabled: true server.compression.mime-types: application/json,application/xml,text/html,text/xml,text/plain logging: level: ROOT: INFO org.springframework: INFO org.hibernate: INFO liquibase: INFO springfox: INFO org.apache: WARN org.apache.http.wire: INFO org.slf4j.logger.org.apache.http: WARN org.thymeleaf: WARN com.netflix.hystrix: INFO javax: INFO spring: datasource: driverClassName: org.h2.Driver url: jdbc:h2:mem:foobar;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=TRUE;MODE=MYSQL username: foobar password: password
Replace RENAME TABLE 'table1' TO 'table2'; with ALTER TABLE 'table1' RENAME TO 'table2';
Maven Yui Compressor Plugin :String Index out of Range
My pom file is as below :- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.3</version> <executions> <execution> <!--<id>default-war</id>--> <phase>package</phase> <goals> <goal>war</goal> </goals> <configuration> <warSourceDirectory>src/main/minified</warSourceDirectory> <encoding>UTF-8</encoding> </configuration> </execution> </executions> <configuration> <failOnMissingWebXml>false</failOnMissingWebXml> <warSourceDirectory>src/main/minified</warSourceDirectory> <encoding>UTF-8</encoding> <webResources> <resource> <directory>${project.build.directory}/min</directory> </resource> </webResources> </configuration> </plugin> <plugin> <groupId>net.alchim31.maven</groupId> <artifactId>yuicompressor-maven-plugin</artifactId> <version>1.5.1</version> <executions> <execution> <id>compressyui</id> <phase>process-resources</phase> <goals> <goal>compress</goal> </goals> <configuration> <nosuffix>true</nosuffix> <warSourceDirectory>src/main/minified</warSourceDirectory> <webappDirectory>${project.build.directory}/min</webappDirectory> <jswarn>false</jswarn> <nosuffix>true</nosuffix> </configuration> </execution> </executions> </plugin> ---------------------------------- And when I do a maven clean and build in Netbeans I get the following output and failure. Can anyone please help what's wrong here :- This is the stacktrace --- [INFO] --- yuicompressor-maven-plugin:1.5.1:compress (compressyui) # icoreWeb --- [INFO] accountmgmt.css (28786b) -> accountmgmt.css (20283b)[70%] [INFO] fields.css (10674b) -> fields.css (7808b)[73%] [INFO] footer.css (5406b) -> footer.css (3790b)[70%] [INFO] apex-popup.css (2789b) -> apex-popup.css (1985b)[71%] [INFO] apex.css (65467b) -> apex.css (46778b)[71%] [INFO] bookingDisclosure.css (683b) -> bookingDisclosure.css (505b)[73%] [INFO] fields.css (9684b) -> fields.css (6622b)[68%] [INFO] apex.css (6439b) -> apex.css (4899b)[76%] [INFO] ie.css (7575b) -> ie.css (5137b)[67%] [INFO] rwd.css (27039b) -> rwd.css (18406b)[68%] [INFO] circle.css (457b) -> circle.css (288b)[63%] [INFO] contentOne.css (1105b) -> contentOne.css (699b)[63%] [INFO] contentOneHeader.css (56b) -> contentOneHeader.css (36b)[64%] [INFO] disclosure.css (11116b) -> disclosure.css (8832b)[79%] [INFO] footer.css (4983b) -> footer.css (3676b)[73%] [INFO] hispanicFieldStyle.css (2663b) -> hispanicFieldStyle.css (1627b)[61%] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 10.225s [INFO] Finished at: Fri Jan 02 09:11:12 EST 2015 [INFO] Final Memory: 26M/64M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal net.alchim31.maven:yuicompressor-maven-plugin:1.5.1:compress (compressyui) on project icoreWeb: Execution compressyui of goal net.alchim31.maven:yuicompressor-maven-plugin:1.5.1:compress failed: String index out of range: 76892 -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal net.alchim31.maven:yuicompressor-maven-plugin:1.5.1:compress (compressyui) on project icoreWeb: Execution compressyui of goal net.alchim31.maven:yuicompressor-maven-plugin:1.5.1:compress failed: String index out of range: 76892 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:60) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:354) Caused by: org.apache.maven.plugin.PluginExecutionException: Execution compressyui of goal net.alchim31.maven:yuicompressor-maven-plugin:1.5.1:compress failed: String index out of range: 76892 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 76892 at java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:879) at java.lang.StringBuffer.substring(StringBuffer.java:416) at com.yahoo.platform.yui.compressor.CssCompressor.compress(CssCompressor.java:125) at net_alchim31_maven_yuicompressor.YuiCompressorMojo.compressCss(YuiCompressorMojo.java:259) at net_alchim31_maven_yuicompressor.YuiCompressorMojo.processFile(YuiCompressorMojo.java:216) at net_alchim31_maven_yuicompressor.MojoSupport.processDir(MojoSupport.java:216) at net_alchim31_maven_yuicompressor.MojoSupport.execute(MojoSupport.java:151) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) ... 20 more [ERROR] [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 is this a problem with the plugin? what can be the possible solution? I can't use any other plugin as those are not in our nexus repository. Please help me understand what is wromg here