|
| 1 | +<?xml version="1.0"?> |
| 2 | +<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" |
| 3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
| 4 | + <modelVersion>4.0.0</modelVersion> |
| 5 | + <parent> |
| 6 | + <groupId>javaxt</groupId> |
| 7 | + <artifactId>javaxt-core-test</artifactId> |
| 8 | + <version>dev</version> |
| 9 | + </parent> |
| 10 | + <groupId>javaxt.core.build</groupId> |
| 11 | + <artifactId>javaxt-core-build</artifactId> |
| 12 | + <version>dev</version> |
| 13 | + <name>javaxt-core-build</name> |
| 14 | + <dependencies> |
| 15 | + <dependency> |
| 16 | + <groupId>junit</groupId> |
| 17 | + <artifactId>junit</artifactId> |
| 18 | + <version>3.8.1</version> |
| 19 | + <scope>test</scope> |
| 20 | + </dependency> |
| 21 | + </dependencies> |
| 22 | + <profiles> |
| 23 | + <profile> |
| 24 | + <id>github-sources</id> |
| 25 | + <activation> |
| 26 | + <property> |
| 27 | + <name>!javaxt.core.local.dir</name> |
| 28 | + </property> |
| 29 | + </activation> |
| 30 | + <build> |
| 31 | + <plugins> |
| 32 | + <plugin> |
| 33 | + <groupId>org.apache.maven.plugins</groupId> |
| 34 | + <artifactId>maven-scm-plugin</artifactId> |
| 35 | + <version>1.11.3</version> |
| 36 | + <configuration> |
| 37 | + <connectionType>scm:git</connectionType> |
| 38 | + <connectionUrl>scm:git:https://github.com/javaxt-project/javaxt-core.git</connectionUrl> |
| 39 | + <developerConnectionUrl>scm:git:https://github.com/javaxt-project/javaxt-core.git</developerConnectionUrl> |
| 40 | + <checkoutDirectory>${project.build.directory}/javaxt-core-src</checkoutDirectory> |
| 41 | + <branch>${javaxt.core.branch:main}</branch> |
| 42 | + </configuration> |
| 43 | + <executions> |
| 44 | + <execution> |
| 45 | + <id>checkout-javaxt-core</id> |
| 46 | + <phase>generate-sources</phase> |
| 47 | + <goals> |
| 48 | + <goal>checkout</goal> |
| 49 | + </goals> |
| 50 | + </execution> |
| 51 | + </executions> |
| 52 | + </plugin> |
| 53 | + |
| 54 | + <plugin> |
| 55 | + <groupId>org.apache.maven.plugins</groupId> |
| 56 | + <artifactId>maven-antrun-plugin</artifactId> |
| 57 | + <version>3.0.0</version> |
| 58 | + <executions> |
| 59 | + <execution> |
| 60 | + <id>copy-sources</id> |
| 61 | + <phase>generate-sources</phase> |
| 62 | + <goals> |
| 63 | + <goal>run</goal> |
| 64 | + </goals> |
| 65 | + <configuration> |
| 66 | + <target> |
| 67 | + <echo message="Copying sources from git checkout to main/java"/> |
| 68 | + <copy todir="${project.basedir}/src/main/java" overwrite="true"> |
| 69 | + <fileset dir="${project.build.directory}/javaxt-core-src/src"/> |
| 70 | + </copy> |
| 71 | + <echo message="Copy completed"/> |
| 72 | + </target> |
| 73 | + </configuration> |
| 74 | + </execution> |
| 75 | + </executions> |
| 76 | + </plugin> |
| 77 | + </plugins> |
| 78 | + </build> |
| 79 | + </profile> |
| 80 | + <profile> |
| 81 | + <id>local-sources</id> |
| 82 | + <activation> |
| 83 | + <property> |
| 84 | + <name>javaxt.core.local.dir</name> |
| 85 | + </property> |
| 86 | + </activation> |
| 87 | + <build> |
| 88 | + <plugins> |
| 89 | + <plugin> |
| 90 | + <groupId>org.apache.maven.plugins</groupId> |
| 91 | + <artifactId>maven-antrun-plugin</artifactId> |
| 92 | + <version>3.0.0</version> |
| 93 | + <executions> |
| 94 | + <execution> |
| 95 | + <id>copy-local-sources</id> |
| 96 | + <phase>generate-sources</phase> |
| 97 | + <goals> |
| 98 | + <goal>run</goal> |
| 99 | + </goals> |
| 100 | + <configuration> |
| 101 | + <target> |
| 102 | + <echo message="Copying from local directory: '${javaxt.core.local.dir}'"/> |
| 103 | + <copy todir="${project.basedir}/src/main/java" overwrite="true"> |
| 104 | + <fileset dir="${javaxt.core.local.dir}" includes="**/*"/> |
| 105 | + </copy> |
| 106 | + <echo message="Local copy completed successfully"/> |
| 107 | + </target> |
| 108 | + </configuration> |
| 109 | + </execution> |
| 110 | + </executions> |
| 111 | + </plugin> |
| 112 | + </plugins> |
| 113 | + </build> |
| 114 | + </profile> |
| 115 | + </profiles> |
| 116 | + <build> |
| 117 | + <plugins> |
| 118 | + <plugin> |
| 119 | + <groupId>org.apache.maven.plugins</groupId> |
| 120 | + <artifactId>maven-compiler-plugin</artifactId> |
| 121 | + <version>3.8.1</version> |
| 122 | + <configuration> |
| 123 | + <source>1.8</source> |
| 124 | + <target>1.8</target> |
| 125 | + </configuration> |
| 126 | + </plugin> |
| 127 | + <plugin> |
| 128 | + <groupId>org.apache.maven.plugins</groupId> |
| 129 | + <artifactId>maven-antrun-plugin</artifactId> |
| 130 | + <version>3.0.0</version> |
| 131 | + <executions> |
| 132 | + <execution> |
| 133 | + <id>debug-property</id> |
| 134 | + <phase>validate</phase> |
| 135 | + <goals> |
| 136 | + <goal>run</goal> |
| 137 | + </goals> |
| 138 | + <configuration> |
| 139 | + <target> |
| 140 | + <echo message="DEBUG: javaxt.core.local.dir = '${javaxt.core.local.dir}'"/> |
| 141 | + <echo message="DEBUG: Property length = ${javaxt.core.local.dir.length()}"/> |
| 142 | + <echo message="DEBUG: Property is empty = ${javaxt.core.local.dir:EMPTY}"/> |
| 143 | + </target> |
| 144 | + </configuration> |
| 145 | + </execution> |
| 146 | + <execution> |
| 147 | + <id>clean-copied-sources</id> |
| 148 | + <phase>clean</phase> |
| 149 | + <goals> |
| 150 | + <goal>run</goal> |
| 151 | + </goals> |
| 152 | + <configuration> |
| 153 | + <target> |
| 154 | + <delete dir="${project.basedir}/src/main/java" failonerror="false"/> |
| 155 | + <delete dir="${project.build.directory}/javaxt-core-src" failonerror="false"/> |
| 156 | + <delete dir="${project.basedir}/dist" failonerror="false"/> |
| 157 | + </target> |
| 158 | + </configuration> |
| 159 | + </execution> |
| 160 | + </executions> |
| 161 | + </plugin> |
| 162 | + </plugins> |
| 163 | + </build> |
| 164 | +</project> |
0 commit comments