Skip to content

Commit

Permalink
ICU-21205 Fix Eclipse failing to import the icu4j maven project
Browse files Browse the repository at this point in the history
  • Loading branch information
mihnita committed Aug 16, 2024
1 parent ed117b9 commit 40189ff
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
23 changes: 23 additions & 0 deletions icu4j/main/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,29 @@

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<!-- Test files shared between ICU4C and ICU4J -->
<id>add-test-resource</id>
<goals>
<goal>add-test-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>${rootlocation}/../testdata/</directory>
<includes>
<include>message2/**</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Expand Down
14 changes: 10 additions & 4 deletions icu4j/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,19 @@
<goal>add-resource</goal>
</goals>
<configuration>
<runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
<resources>
<resource>
<directory>${rootlocation}/..</directory>
<directory>${rootlocation}/../testdata/</directory>
<includes>
<include>LICENSE</include>
<include>testdata/</include>
<!-- Do not "repair" this to use ${rootlocation}/../ and LICENSE.
This is a workaround for Eclipse, which fails to import the projects because
${rootlocation}/../ overlaps with the location of the sub-projects (for example main/core).
True, because {rootlocation} is resolved to $icu_root/icu4j.
So ${rootlocation}/../ points to $icu_root, which overlaps with $icu_root/icu4j/main/core.
But $icu_root/testdata/ does not overlap with $icu_root/icu4j/ so all is good.
We then go up one step for the LICENSE, because Eclipse does not validate for files overlapping, only folders.
-->
<include>../LICENSE</include>
</includes>
</resource>
</resources>
Expand Down

0 comments on commit 40189ff

Please sign in to comment.