maven-antrun-plugin

Migrating legacy ant project to maven / gradle

試著忘記壹切 提交于 2020-01-05 08:07:25
问题 I have a legacy JAVA project and we use Ant to build it. We are planning to keep using ant for building the project but delegate the dependency management to maven/gradle without affecting the existing build process. What might be the best way to move forward - with Maven or with gradle? Since existing project has it's own structure(which may not conform to standard Maven archtypes), I know might have to make a custom archtype if using maven. https://stackoverflow.com/a/48791837/2458858

maven-antrun-plugin: generate sources for protobuf does not generate Java files

允我心安 提交于 2020-01-05 05:31:21
问题 I have the following plugin in my pom.xml , which is supposed to generate java files required for the compilation of other projects: <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.2</version> <configuration> <source>${jdk.version}</source> <target>${jdk.version}</target> </configuration> </plugin> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <extensions>true</extensions> <configuration> <archive> <manifestFile>META-INF/MANIFEST

How to retrieve information from antrun back to maven?

拜拜、爱过 提交于 2020-01-04 11:46:20
问题 How can I get information from maven-antrun-plugin back to Maven script? For example: [...] <plugin> <artifactId>maven-antrun-plugin</artifactId> <version>1.6</version> <executions> <execution> <phase>test</phase> <goals> <goal>run</goal> </goals> <configuration> <target> <exec ... resultproperty="foo"> </target> </configuration> </execution> </executions> </build> [...] I'm interested to use this foo property later in Maven. How to it get out of antrun ? 回答1: I am not sure if this solution

How to retrieve information from antrun back to maven?

最后都变了- 提交于 2020-01-04 11:46:06
问题 How can I get information from maven-antrun-plugin back to Maven script? For example: [...] <plugin> <artifactId>maven-antrun-plugin</artifactId> <version>1.6</version> <executions> <execution> <phase>test</phase> <goals> <goal>run</goal> </goals> <configuration> <target> <exec ... resultproperty="foo"> </target> </configuration> </execution> </executions> </build> [...] I'm interested to use this foo property later in Maven. How to it get out of antrun ? 回答1: I am not sure if this solution

Calling foreach in maven-antrun-plugin

被刻印的时光 ゝ 提交于 2020-01-01 11:36:17
问题 I'm trying to set up maven to execute the LESS CSS preprocessor on a directory in my web project. The basic flow is: Maven calls maven-antrun-plugin. Ant-contrib <foreach/> loops through a directory and finds all the .less files and calls a target. The target executes Rhino, which executes LESS which converts the file. To do this, I have the following XML: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.7</version> <executions>

Inheriting configuration property from parent pom in maven

自古美人都是妖i 提交于 2019-12-24 21:47:38
问题 I am trying to fiddle with maven antrun plugin. I have a parent pom and child pom. I want to maven-install child pom and have some custom properties that are specified in parent pom to be included in the jar manifest. I want to do this with maven-antrun plugin. This is what I have done: I have included ant jar task in parent pom. That ant jar task specifies properties to be added to the manifest. I have also added dummy echo tasks in both parent and child poms. I am hoping that child pom

Using javah maven-antrun-plugin with jdk 1.7, classes.jar became tools.jar

孤街浪徒 提交于 2019-12-24 09:08:39
问题 In jdk 1.7 for the Mac, the location of com.sun.tools.javah.Main moved from classes.jar to tools.jar. Consequently, Maven's maven-antrun-plugin cannot find the run the javah task and a ClassNotFound exception is thrown: Caused by: java.lang.ClassNotFoundException: com.sun.tools.javah.Main at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java :50) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244) at org.codehaus.plexus

Fresh Eclipse / optaplanner 7.12 examples “new project via Maven” fails

自作多情 提交于 2019-12-23 05:13:46
问题 With a fresh install of Eclipse 4.9.0 (2018-09), and m2e installed in Eclipse, I downloaded Optaplanner release 7.12.0, extracted the zip, and followed the first steps of the documentation instructions toward building the examples ("Open the file examples/sources/pom.xml as a new project, the maven integration will take care of the rest.") via: 1) File / Open Projects from File System... / Show other specialized import wizards / Maven / Existing Maven Projects 2) Selected the optaplanner

Parent properties inside maven antrun plugin

旧街凉风 提交于 2019-12-22 05:31:15
问题 There is a multi-module project. Inside the child I need to do some complicated stuff (integration test with deploying to application server and so on). So there is an integrationtest child, and from this module I need the root of the parent to reach other modules. I do not want to use "..". There is a property in integrationtest POM: <properties> <main.basedir>${project.parent.basedir}</main.basedir> ... </properties> And there is an antrun plugin with the following content: <plugins>

Is it possible to set a maven property from ant?

余生颓废 提交于 2019-12-21 10:17:29
问题 I tried to use the maven-antrun-plugin to check in a first execution if a file exists and then set a property accordingly. In another execution (another phase) of the antrun-plugin I want to make use of the property. But the property set in one execution cannot be used in another execution since it's an ant and not a maven property and doesn't get propagated. Is it possible to propagate the ant property to maven or in other words set a maven property from ant? Using another Maven build like