这是对flyway maven插件从包含多个flyway SQL文件的jar工件文件执行的限制的一个轻微的解决方法。
创建配置文件
这是我的个人资料样本
<profiles>
<profile>
<id>flyway</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>copy</id>
<phase>process-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
</execution>
</executions>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.abc</groupId>
<artifactId>flyway</artifactId>
<version>1.0.0-SNAPSHOT</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/jars</outputDirectory>
<destFileName>my-flyway.jar</destFileName>
</artifactItem>
</artifactItems>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</plugin>
<plugin>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>${flyway.version}</version>
<configuration>
<sqlMigrationSeparator>__</sqlMigrationSeparator>
<locations>
<location>filesystem:./target/jars/my-flyway.jar</location>
</locations>
<url>${flyway.url}</url>
<user>${flyway.user}</user>
<password>${flyway.password}</password>
<schemas>
<schema>my_schema</schema>
</schemas>
<baselineOnMigrate>true</baselineOnMigrate>
</configuration>
<dependencies>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
</profiles>
maven命令行是
mvn -P flyway clean process-resources flyway:migrate
好的,我已经调试了源代码。Jar需要一个特殊的协议,当它被放在flyway命令行工具 /jars目录中时,该协议被提供给它。在flyway maven插件中没有这样的等价物。
问题内容: 我正在创建一个eclipse插件,并且在使用外部jar时遇到了麻烦。在我的插件中,我启动一个需要一些外部jar的应用程序。我如何做才能与其余插件一起自动导出它们? 提前致谢 :) 问题答案: 打开你的 转到选项卡,然后在类路径部分中添加您的JAR
那么如何防止插件jar进入war文件呢?多谢了。
我在我支持的许多应用程序中实现了Flyway,它像梦一样工作。 但是,当我将应用程序部署到测试环境时,迁移就停止了。 经过一些调查,我发现当迁移被加载到jar文件中时,它们不是通过Flyway定位的,而是当它们没有被压缩时(比如当我在Eclipse中工作时,或者如果我将jar解压到类路径中),它会按预期工作。 由于应用程序的插件架构,我无法使用“默认”设置,因此我将Flyway对象设置为: 如果要
22.14.Jar jar 任务创建包含项目的类文件和资源的 JAR 文件. JAR 文件在 archives 的依赖配置中是作为一个 artifact 的声明. 这意味着, JAR 是相关项目一个可用的 classpath. 如果您上传您的项目到存储库, 这个 JAR 会被声明为依赖描述符的一部分. 可以再Section 15.8, “Creating archives”与Chapter 51,
我正在尝试将一个主题从插件sdk迁移到工作区。 我实际采取的步骤是: 1-我在windows 7操作系统上安装了BLADE CLI。我遵循以下链接:安装BLADE CLI。 2-然后在gradle.properties文件下的工作区,我取消注释这一行: liferay。工作区。插件。sdk。dir=插件sdk 我创建了一个目录plugins-sdk,并将我的项目主题放在其中。 3-我检查了刀片夹子
当我运行Gradle任务时,它会失败,并出现以下错误: 警告:不支持的Kotlin插件版本。和插件依赖于Kotlin的功能,这些功能的工作方式可能与请求版本不同。 除了kotlin-dsl Gradle插件的发布说明中写的内容之外,还有迁移指南吗? null