fix pluginManagement for m2e in cdmlib-model and -test
authorAndreas Müller <a.mueller@bgbm.org>
Fri, 14 Jan 2022 21:10:30 +0000 (22:10 +0100)
committerAndreas Müller <a.mueller@bgbm.org>
Fri, 14 Jan 2022 21:10:30 +0000 (22:10 +0100)
cdmlib-model/pom.xml
cdmlib-test/pom.xml

index 30f17cbe72d20bd7e1e0d6e27675bf5603a69029..509338b04a055d19fd0e9ec6479bcdd8cfd8b80c 100644 (file)
   <description>The domain model java implementation of EDIT's Common Data Model</description>
 
   <build>
-       <pluginManagement>
-           <plugins>
-             <plugin>
-               <groupId>org.apache.maven.plugins</groupId>
-               <artifactId>maven-antrun-plugin</artifactId>
-               <executions>
-                 <execution>
-                   <id>aspectj-main</id>
-                   <phase>process-sources</phase>
-                   <goals>
-                     <goal>run</goal>
-                   </goals>
-                   <configuration>
-                     <target>
-                       <path id="aspectPath" location="${settings.localRepository}/org/springframework/spring-aspects/${spring.version}/spring-aspects-${spring.version}.jar" />
-                       <taskdef classname="org.aspectj.tools.ant.taskdefs.AjcTask" name="iajc">
-                         <classpath refid="maven.plugin.classpath" />
-                       </taskdef>
-                       <iajc verbose="false" source="${java.codelevel}" destDir="target/classes" aspectPathRef="aspectPath">
-                       <!--  see https://www.eclipse.org/aspectj/doc/released/devguide/antTasks-iajc.html#antTasks-iajc-paths -->
-                       <classpath>
-                           <path refid="maven.compile.classpath" />
-                           <path refid="maven.plugin.classpath" />
-                       </classpath>
-                         <sourceroots>
-                           <pathelement location="src/main/java" />
-                         </sourceroots>
-                       </iajc>
-                     </target>
-                   </configuration>
-                 </execution>
-                 <execution>
-                   <id>aspectj-test</id>
-                   <phase>process-test-sources</phase>
-                   <goals>
-                     <goal>run</goal>
-                   </goals>
-                   <configuration>
-                     <target>
-                       <path id="aspectPath" location="${settings.localRepository}/org/springframework/spring-aspects/${spring.version}/spring-aspects-${spring.version}.jar" />
-                       <taskdef classname="org.aspectj.tools.ant.taskdefs.AjcTask" name="iajc">
-                         <classpath refid="maven.plugin.classpath" />
-                       </taskdef>
-                       <iajc verbose="false" source="${java.codelevel}" destDir="target/test-classes" aspectPathRef="aspectPath">
-                       <!--  see https://www.eclipse.org/aspectj/doc/released/devguide/antTasks-iajc.html#antTasks-iajc-paths -->
-                         <classpath>
-                           <path refid="maven.compile.classpath" />
-                           <path refid="maven.plugin.classpath" />
-                           <path refid="maven.test.classpath" />
-                       </classpath>
-                         <sourceroots>
-                           <pathelement location="src/test/java" />
-                         </sourceroots>
-                       </iajc>
-                     </target>
-                 </configuration>
-               </execution>
-             </executions>
-               <dependencies>
-                 <dependency>
-                   <groupId>org.aspectj</groupId>
-                   <artifactId>aspectjtools</artifactId>
-                   <version>${aspectj.version}</version>
-                 </dependency>
-                 <dependency>
-                   <groupId>org.aspectj</groupId>
-                   <artifactId>aspectjrt</artifactId>
-                   <version>${aspectj.version}</version>
-                 </dependency>
-             </dependencies>
-             </plugin>
-           </plugins>
-       </pluginManagement>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>aspectj-main</id>
+            <phase>process-sources</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <target>
+                <path id="aspectPath" location="${settings.localRepository}/org/springframework/spring-aspects/${spring.version}/spring-aspects-${spring.version}.jar" />
+                <taskdef classname="org.aspectj.tools.ant.taskdefs.AjcTask" name="iajc">
+                  <classpath refid="maven.plugin.classpath" />
+                </taskdef>
+                <iajc verbose="false" source="${java.codelevel}" destDir="target/classes" aspectPathRef="aspectPath">
+                <!--  see https://www.eclipse.org/aspectj/doc/released/devguide/antTasks-iajc.html#antTasks-iajc-paths -->
+                <classpath>
+                    <path refid="maven.compile.classpath" />
+                    <path refid="maven.plugin.classpath" />
+                </classpath>
+                  <sourceroots>
+                    <pathelement location="src/main/java" />
+                  </sourceroots>
+                </iajc>
+              </target>
+            </configuration>
+          </execution>
+          <execution>
+            <id>aspectj-test</id>
+            <phase>process-test-sources</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <target>
+                <path id="aspectPath" location="${settings.localRepository}/org/springframework/spring-aspects/${spring.version}/spring-aspects-${spring.version}.jar" />
+                <taskdef classname="org.aspectj.tools.ant.taskdefs.AjcTask" name="iajc">
+                  <classpath refid="maven.plugin.classpath" />
+                </taskdef>
+                <iajc verbose="false" source="${java.codelevel}" destDir="target/test-classes" aspectPathRef="aspectPath">
+                <!--  see https://www.eclipse.org/aspectj/doc/released/devguide/antTasks-iajc.html#antTasks-iajc-paths -->
+                  <classpath>
+                    <path refid="maven.compile.classpath" />
+                    <path refid="maven.plugin.classpath" />
+                    <path refid="maven.test.classpath" />
+                </classpath>
+                  <sourceroots>
+                    <pathelement location="src/test/java" />
+                  </sourceroots>
+                </iajc>
+              </target>
+          </configuration>
+        </execution>
+      </executions>
+        <dependencies>
+          <dependency>
+            <groupId>org.aspectj</groupId>
+            <artifactId>aspectjtools</artifactId>
+            <version>${aspectj.version}</version>
+          </dependency>
+          <dependency>
+            <groupId>org.aspectj</groupId>
+            <artifactId>aspectjrt</artifactId>
+            <version>${aspectj.version}</version>
+          </dependency>
+      </dependencies>
+      </plugin>
+    </plugins>
+       <pluginManagement>
+               <plugins>
+                       <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+                       <plugin>
+                               <groupId>org.eclipse.m2e</groupId>
+                               <artifactId>lifecycle-mapping</artifactId>
+                               <version>1.0.0</version>
+                               <configuration>
+                                       <lifecycleMappingMetadata>
+                                               <pluginExecutions>
+                                                       <pluginExecution>
+                                                               <pluginExecutionFilter>
+                                                                       <groupId>
+                                                                               org.apache.maven.plugins
+                                                                       </groupId>
+                                                                       <artifactId>
+                                                                               maven-antrun-plugin
+                                                                       </artifactId>
+                                                                       <versionRange>
+                                                                               [3.0.0,)
+                                                                       </versionRange>
+                                                                       <goals>
+                                                                               <goal>run</goal>
+                                                                       </goals>
+                                                               </pluginExecutionFilter>
+                                                               <action>
+                                                                       <ignore></ignore>
+                                                               </action>
+                                                       </pluginExecution>
+                                               </pluginExecutions>
+                                       </lifecycleMappingMetadata>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </pluginManagement>
   </build>
   <dependencies>
     <dependency>
index 2d34964ac3cc0495039b976460227b6049cbd27f..66569df03a14e310b86c770638ec684c39689813 100644 (file)
   <description>EDIT CDM library integration test layer. Some base classes and resources for CDM Library integration testing</description>
 
   <build>
-       <pluginManagement>
-           <plugins>
-             <plugin>
-               <artifactId>maven-antrun-plugin</artifactId>
-                   <executions>
-                     <execution>
-                         <!-- Generate DDL for test -->
-                         <!-- Alternatives: http://jpdigital.github.io/hibernate5-ddl-maven-plugin/usage.html, 
-                                            https://webdev.jhuep.com/~jcs/ejava-javaee/coursedocs/content/html/jpa-entitymgrex-dbschemagen.html -->
-                         <!-- manual execution of the below ant task:  -->
-                         <!-- mvn antrun:run@generate-ddl-create       -->
-                         <id>generate-ddl-create</id>
-                         <phase>process-classes</phase>
-                         <goals>
-                             <goal>run</goal>
-                         </goals>
-                         <configuration>
-                             <target>
-                                 <delete file="${project.build.outputDirectory}/dbscripts/001-cdm.h2.sql" />
-                                 <!-- copy template file -->
-                                 <copy file="${basedir}/src/main/resources/dbscripts/001-cdm.h2.template.sql" tofile="${project.build.outputDirectory}/dbscripts/001-cdm.h2.sql" />
-                                       <!-- for directory shortcuts: https://stackoverflow.com/questions/13354531/maven-project-build-directory   but a short cut to /src/main/resources did not work for me -->
-                                 <!-- run DdlCreator -->
-                                 <java classname="eu.etaxonomy.cdm.test.unitils.DdlCreator" fork="false" failonerror="true" classpathref="maven.compile.classpath" /> 
-                             </target>
-                         </configuration>
-                     </execution>
-                 </executions>
-             </plugin>
-             <plugin>
-               <groupId>org.apache.maven.plugins</groupId>
-               <artifactId>maven-jar-plugin</artifactId>
-               <version>3.2.0</version>
-               <executions>
-                 <execution>
-                   <goals>
-                     <goal>test-jar</goal>
-                   </goals>
-                 </execution>
-               </executions>
-             </plugin>
-           </plugins>
-       </pluginManagement>
+    <plugins>
+      <plugin>
+        <artifactId>maven-antrun-plugin</artifactId>
+            <executions>
+              <execution>
+                  <!-- Generate DDL for test -->
+                  <!-- Alternatives: http://jpdigital.github.io/hibernate5-ddl-maven-plugin/usage.html, 
+                                     https://webdev.jhuep.com/~jcs/ejava-javaee/coursedocs/content/html/jpa-entitymgrex-dbschemagen.html -->
+                  <!-- manual execution of the below ant task:  -->
+                  <!-- mvn antrun:run@generate-ddl-create       -->
+                  <id>generate-ddl-create</id>
+                  <phase>process-classes</phase>
+                  <goals>
+                      <goal>run</goal>
+                  </goals>
+                  <configuration>
+                      <target>
+                          <delete file="${project.build.outputDirectory}/dbscripts/001-cdm.h2.sql" />
+                          <!-- copy template file -->
+                          <copy file="${basedir}/src/main/resources/dbscripts/001-cdm.h2.template.sql" tofile="${project.build.outputDirectory}/dbscripts/001-cdm.h2.sql" />
+                                <!-- for directory shortcuts: https://stackoverflow.com/questions/13354531/maven-project-build-directory   but a short cut to /src/main/resources did not work for me -->
+                          <!-- run DdlCreator -->
+                          <java classname="eu.etaxonomy.cdm.test.unitils.DdlCreator" fork="false" failonerror="true" classpathref="maven.compile.classpath" /> 
+                      </target>
+                  </configuration>
+              </execution>
+          </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <version>3.2.0</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>test-jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+    <pluginManagement>
+       <plugins>
+               <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+               <plugin>
+                       <groupId>org.eclipse.m2e</groupId>
+                       <artifactId>lifecycle-mapping</artifactId>
+                       <version>1.0.0</version>
+                       <configuration>
+                               <lifecycleMappingMetadata>
+                                       <pluginExecutions>
+                                               <pluginExecution>
+                                                       <pluginExecutionFilter>
+                                                               <groupId>
+                                                                       org.apache.maven.plugins
+                                                               </groupId>
+                                                               <artifactId>
+                                                                       maven-antrun-plugin
+                                                               </artifactId>
+                                                               <versionRange>
+                                                                       [3.0.0,)
+                                                               </versionRange>
+                                                               <goals>
+                                                                       <goal>run</goal>
+                                                               </goals>
+                                                       </pluginExecutionFilter>
+                                                       <action>
+                                                               <ignore></ignore>
+                                                       </action>
+                                               </pluginExecution>
+                                       </pluginExecutions>
+                               </lifecycleMappingMetadata>
+                       </configuration>
+               </plugin>
+       </plugins>
+    </pluginManagement>
   </build>
   <dependencies>
     <dependency>