ant

Apache Ant gets frozen while running this script

守給你的承諾、 提交于 2019-12-31 06:27:35
问题 I want to show a password input dialog from ant script. Here's my code from build.xml : <target name="sign" unless="isUpToDate"> <script language="javascript"> importClass(javax.swing.JPasswordField); importClass(javax.swing.JOptionPane); var pf = new JPasswordField(); var okCxl = JOptionPane.showConfirmDialog(null, pf, "Enter Password", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE); if (okCxl == JOptionPane.OK_OPTION) { project.setNewProperty("keypass", pf.getPassword()); } else {

Exclude jar from ant classpath

旧街凉风 提交于 2019-12-31 03:28:05
问题 I'm trying to make a "clean maven" setup on some legacy project that uses ant scripts. I don't know much about ant, so my question might seem naive. I'm almost done, but the delivery ant script is failing, due to a redundancy in the classpath. If I understand the build, those lines should add to the classpath every lib in the "provided" scope : <artifact:dependencies pathid="dependency.classpath" scopes="provided"> <pom file="./pom.xml"/> </artifact:dependencies> And then this one : <path id=

How to print current executing JUnit test method while running all tests in a class or suite using ANT?

眉间皱痕 提交于 2019-12-31 02:28:07
问题 I have a set of JUnit Test Cases and I execute them from ANT using the junit task. While executing the tests, in the console I get to see only which test case (i.e. Java class) is currently running, but not the test method. Is there a way I can print the current executing test method? Or is there any other way to do this other than having my own JUnit test runner? Sample Console Output [junit] Running examples.TestCase1 [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 2.835 sec

Jenkins and return code from windows batch

本小妞迷上赌 提交于 2019-12-31 01:50:47
问题 I using a Jenkins (on a windows machine) job to compile some code for different targets via Ant. For doing so, I wrap the call to the ant target within a (windows) batch loop like this: @echo off for %%t in (target1 target2 target3) do ( ant -f build.xml build -DPARAM_TARGET=%%t ) That was my first idea ... but this codes leads to an successful build even if (e.g.) target1 failed. So I put some more lines to the windows batch build step to get more overview. Also I have checekdout the code to

Netbeans Java (JavaFX) Native Packaging with additional files and folders

痴心易碎 提交于 2019-12-31 01:46:29
问题 How to include additional files and folders (configuration files) when natively packaging Java applications? When building the project, I have set the build file to create directories and copy additional files to the dist directory. My normal builds (without native packaging) would result to this directory structure: -> dist -> lib -> application.jar -> config folder //additional folder -> another additional folder //additional folder Now, I would like to build my native installer (setup)

Ant loadfile override property

岁酱吖の 提交于 2019-12-31 00:46:29
问题 I'm trying to use the Ant task <loadfile> in a loop to parse the contents of a file. I have something like <loadfile srcFile="@{some.input}" property="my.property"> Since Ant properties are immutable, this doesn't work for me. I need 'my.property' to update on every iteration. Is there a way to achieve this? I know Ant-contrib has a <var> task but I'm not sure how to use <loadfile> with it. Any recommendations? Thanks. 回答1: The Ant plugin Flaka provides a let task, allowing to overwrite

Launch an Eclipse Run Configuration from ANT

笑着哭i 提交于 2019-12-30 22:56:39
问题 I am using Orion server for my Java-based web application. I have a run configuration that launches Orion with the correct classpaths and all necessary configuration. I also have several ANT scripts for copying files to the build path. I want to create an ANT script that shuts down Orion, copies necessary files, and restarts Orion. I can shutdown and copy in ANT, but I can't figure out how to launch a run configuration. I prefer to reference the launch configuration as opposed to specifying

Launch an Eclipse Run Configuration from ANT

你。 提交于 2019-12-30 22:55:10
问题 I am using Orion server for my Java-based web application. I have a run configuration that launches Orion with the correct classpaths and all necessary configuration. I also have several ANT scripts for copying files to the build path. I want to create an ANT script that shuts down Orion, copies necessary files, and restarts Orion. I can shutdown and copy in ANT, but I can't figure out how to launch a run configuration. I prefer to reference the launch configuration as opposed to specifying

How to use size of file inside Ant target

可紊 提交于 2019-12-30 20:31:13
问题 I'm currently in the process of replacing my homebrewn build script by an Ant build script. Now I need to replace various tokens by the size of a specific file. I know how to get the size in bytes via the <length> task and store in in a property, but I need the size in kilobytes and megabytes too. How can I access the file size in other representations (KB, MB) or compute these values from within the Ant target and store them in a property? Edit: After I discovered the <script> task, it was

ant V版本登陆权限

烂漫一生 提交于 2019-12-30 18:00:11
ant design pro of Vue版本登陆权限 这是原始篇也是最好理解并且根据各自接口需求改方法,总结就是登陆的时候把角色权限id传到permission.js做匹配,然后vuex进行拦截匹配对应菜单结结尾附带路由文件代码。 1.第一步配置接口 注释main.js里mock.js devServer : { // development server port 8000 port : 8000 , // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11 proxy : { '/api' : { target : '接口地址' , changeOrigin : true , pathRewrite : { '^/api' : '' } } } } , 配置登陆接口api 接着去登陆页导入接口 代码已贴出可参考 < template > < div class = "main" > < a - form id = "formLogin" class = "user-layout-login" ref = "formLogin" : form = "form" @submit = "handleSubmit" > < a - tabs : activeKey =