Skip to content

Commit

Permalink
Resolve cyclic dependencies and fixed offline reactor builds
Browse files Browse the repository at this point in the history
Jenkins had cyclic dependencies which required manually intervening and
building parents before plugin dependencies.  Resolved this through disabling
ao-ant-tasks on some Maven build-only project, such as ao-javadoc-offline.

Maven imports of managed dependencies were not picking-up from the reactor when
using the ${POST-SNAPSHOT} variable.  Replaced uses of variable with direct
values.

Maven does not consider <scope>import</scope> in reactor ordering.  Added
corresponding dependencies of <type>pom</type> with <exclusions>*</exclusions>
to all places, which ensures the dependent projects are build before the
current.

Since <type>pom</type> is now frequently used in declared dependencies, changed
the default configuration of maven-dependency-plugin:
  <ignoreNonCompile>true</ignoreNonCompile>
  <ignoredUnusedDeclaredDependencies>
    <dependency>*:*:pom:*</dependency>
  </ignoredUnusedDeclaredDependencies>
  • Loading branch information
ao-apps committed Sep 15, 2023
1 parent 9cdaf1f commit 5625161
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 21 deletions.
12 changes: 8 additions & 4 deletions book/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ along with semanticcms-file-bom. If not, see <https://www.gnu.org/licenses/>.
<dependency>com.semanticcms:semanticcms-core-taglib</dependency>
<dependency>com.semanticcms:semanticcms-section-taglib</dependency>
<dependency>org.apache.taglibs:taglibs-standard-spec</dependency>
<!-- Runtime Direct -->
<dependency>org.apache.taglibs:taglibs-standard-impl</dependency>
</usedDependencies>
<ignoredDependencies>
<!-- No "module-info.java" in some release builds -->
Expand Down Expand Up @@ -282,9 +280,9 @@ along with semanticcms-file-bom. If not, see <https://www.gnu.org/licenses/>.
<dependency>
<groupId>com.aoapps</groupId><artifactId>ao-style</artifactId><version>2.0.1${POST-SNAPSHOT}</version>
</dependency>
<!-- BOM -->
<!-- Imports -->
<dependency>
<groupId>com.aoapps</groupId><artifactId>javaee-web-api-bom</artifactId><version>7.0.1${POST-SNAPSHOT}</version>
<groupId>com.aoapps</groupId><artifactId>javaee-web-api-bom</artifactId><version>7.0.1-POST-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -316,5 +314,11 @@ along with semanticcms-file-bom. If not, see <https://www.gnu.org/licenses/>.
<groupId>org.apache.taglibs</groupId><artifactId>taglibs-standard-impl</artifactId>
<scope>runtime</scope>
</dependency>
<!-- Imports (Reactor build order only) -->
<dependency>
<groupId>com.aoapps</groupId><artifactId>javaee-web-api-bom</artifactId><version>7.0.1-POST-SNAPSHOT</version>
<type>pom</type>
<exclusions><exclusion><artifactId>*</artifactId><groupId>*</groupId></exclusion></exclusions>
</dependency>
</dependencies>
</project>
69 changes: 52 additions & 17 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,47 +104,48 @@ along with semanticcms-file-bom. If not, see <https://www.gnu.org/licenses/>.
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-all</artifactId><version>1.7.1${POST-SNAPSHOT}</version>
</dependency>
<dependency>
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-all</artifactId><version>1.7.1${POST-SNAPSHOT}</version>
<type>pom</type>
<scope>import</scope>
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-model</artifactId><version>1.5.0${POST-SNAPSHOT}</version>
</dependency>
<dependency>
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-model</artifactId><version>1.5.0${POST-SNAPSHOT}</version>
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-servlet</artifactId><version>1.10.1${POST-SNAPSHOT}</version>
</dependency>
<dependency>
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-model</artifactId><version>1.5.0${POST-SNAPSHOT}</version>
<type>pom</type>
<scope>import</scope>
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-style</artifactId><version>1.5.0${POST-SNAPSHOT}</version>
</dependency>
<dependency>
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-servlet</artifactId><version>1.10.1${POST-SNAPSHOT}</version>
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-taglib</artifactId><version>1.10.0${POST-SNAPSHOT}</version>
</dependency>
<dependency>
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-servlet</artifactId><version>1.10.1${POST-SNAPSHOT}</version>
<type>pom</type>
<scope>import</scope>
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-view</artifactId><version>1.6.1${POST-SNAPSHOT}</version>
</dependency>
<!-- Imports -->
<dependency>
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-style</artifactId><version>1.5.0${POST-SNAPSHOT}</version>
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-all</artifactId><version>1.7.1-POST-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-style</artifactId><version>1.5.0${POST-SNAPSHOT}</version>
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-model</artifactId><version>1.5.0-POST-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-taglib</artifactId><version>1.10.0${POST-SNAPSHOT}</version>
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-servlet</artifactId><version>1.10.1-POST-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-taglib</artifactId><version>1.10.0${POST-SNAPSHOT}</version>
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-style</artifactId><version>1.5.0-POST-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-view</artifactId><version>1.6.1${POST-SNAPSHOT}</version>
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-taglib</artifactId><version>1.10.0-POST-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-view</artifactId><version>1.6.1${POST-SNAPSHOT}</version>
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-view</artifactId><version>1.6.1-POST-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -184,4 +185,38 @@ along with semanticcms-file-bom. If not, see <https://www.gnu.org/licenses/>.
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<!-- Imports (Reactor build order only) -->
<dependency>
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-all</artifactId><version>1.7.1-POST-SNAPSHOT</version>
<type>pom</type>
<exclusions><exclusion><artifactId>*</artifactId><groupId>*</groupId></exclusion></exclusions>
</dependency>
<dependency>
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-model</artifactId><version>1.5.0-POST-SNAPSHOT</version>
<type>pom</type>
<exclusions><exclusion><artifactId>*</artifactId><groupId>*</groupId></exclusion></exclusions>
</dependency>
<dependency>
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-servlet</artifactId><version>1.10.1-POST-SNAPSHOT</version>
<type>pom</type>
<exclusions><exclusion><artifactId>*</artifactId><groupId>*</groupId></exclusion></exclusions>
</dependency>
<dependency>
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-style</artifactId><version>1.5.0-POST-SNAPSHOT</version>
<type>pom</type>
<exclusions><exclusion><artifactId>*</artifactId><groupId>*</groupId></exclusion></exclusions>
</dependency>
<dependency>
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-taglib</artifactId><version>1.10.0-POST-SNAPSHOT</version>
<type>pom</type>
<exclusions><exclusion><artifactId>*</artifactId><groupId>*</groupId></exclusion></exclusions>
</dependency>
<dependency>
<groupId>com.semanticcms</groupId><artifactId>semanticcms-file-view</artifactId><version>1.6.1-POST-SNAPSHOT</version>
<type>pom</type>
<exclusions><exclusion><artifactId>*</artifactId><groupId>*</groupId></exclusion></exclusions>
</dependency>
</dependencies>
</project>

0 comments on commit 5625161

Please sign in to comment.