Project

General

Profile

« Previous | Next » 

Revision 87b297f0

Added by Andreas Müller 4 months ago

fix pluginManagement for m2e in cdmlib-model and -test

View differences:

cdmlib-model/pom.xml
11 11
  <description>The domain model java implementation of EDIT's Common Data Model</description>
12 12

  
13 13
  <build>
14
	<pluginManagement>
15
	    <plugins>
16
	      <plugin>
17
	        <groupId>org.apache.maven.plugins</groupId>
18
	        <artifactId>maven-antrun-plugin</artifactId>
19
	        <executions>
20
	          <execution>
21
	            <id>aspectj-main</id>
22
	            <phase>process-sources</phase>
23
	            <goals>
24
	              <goal>run</goal>
25
	            </goals>
26
	            <configuration>
27
	              <target>
28
	                <path id="aspectPath" location="${settings.localRepository}/org/springframework/spring-aspects/${spring.version}/spring-aspects-${spring.version}.jar" />
29
	                <taskdef classname="org.aspectj.tools.ant.taskdefs.AjcTask" name="iajc">
30
	                  <classpath refid="maven.plugin.classpath" />
31
	                </taskdef>
32
	                <iajc verbose="false" source="${java.codelevel}" destDir="target/classes" aspectPathRef="aspectPath">
33
	                <!--  see https://www.eclipse.org/aspectj/doc/released/devguide/antTasks-iajc.html#antTasks-iajc-paths -->
34
	                <classpath>
35
	                    <path refid="maven.compile.classpath" />
36
	                    <path refid="maven.plugin.classpath" />
37
	                </classpath>
38
	                  <sourceroots>
39
	                    <pathelement location="src/main/java" />
40
	                  </sourceroots>
41
	                </iajc>
42
	              </target>
43
	            </configuration>
44
	          </execution>
45
	          <execution>
46
	            <id>aspectj-test</id>
47
	            <phase>process-test-sources</phase>
48
	            <goals>
49
	              <goal>run</goal>
50
	            </goals>
51
	            <configuration>
52
	              <target>
53
	                <path id="aspectPath" location="${settings.localRepository}/org/springframework/spring-aspects/${spring.version}/spring-aspects-${spring.version}.jar" />
54
	                <taskdef classname="org.aspectj.tools.ant.taskdefs.AjcTask" name="iajc">
55
	                  <classpath refid="maven.plugin.classpath" />
56
	                </taskdef>
57
	                <iajc verbose="false" source="${java.codelevel}" destDir="target/test-classes" aspectPathRef="aspectPath">
58
	                <!--  see https://www.eclipse.org/aspectj/doc/released/devguide/antTasks-iajc.html#antTasks-iajc-paths -->
59
	                  <classpath>
60
	                    <path refid="maven.compile.classpath" />
61
	                    <path refid="maven.plugin.classpath" />
62
	                    <path refid="maven.test.classpath" />
63
	                </classpath>
64
	                  <sourceroots>
65
	                    <pathelement location="src/test/java" />
66
	                  </sourceroots>
67
	                </iajc>
68
	              </target>
69
	          </configuration>
70
	        </execution>
71
	      </executions>
72
	        <dependencies>
73
	          <dependency>
74
	            <groupId>org.aspectj</groupId>
75
	            <artifactId>aspectjtools</artifactId>
76
	            <version>${aspectj.version}</version>
77
	          </dependency>
78
	          <dependency>
79
	            <groupId>org.aspectj</groupId>
80
	            <artifactId>aspectjrt</artifactId>
81
	            <version>${aspectj.version}</version>
82
	          </dependency>
83
	      </dependencies>
84
	      </plugin>
85
	    </plugins>
86
	</pluginManagement>
14
    <plugins>
15
      <plugin>
16
        <groupId>org.apache.maven.plugins</groupId>
17
        <artifactId>maven-antrun-plugin</artifactId>
18
        <executions>
19
          <execution>
20
            <id>aspectj-main</id>
21
            <phase>process-sources</phase>
22
            <goals>
23
              <goal>run</goal>
24
            </goals>
25
            <configuration>
26
              <target>
27
                <path id="aspectPath" location="${settings.localRepository}/org/springframework/spring-aspects/${spring.version}/spring-aspects-${spring.version}.jar" />
28
                <taskdef classname="org.aspectj.tools.ant.taskdefs.AjcTask" name="iajc">
29
                  <classpath refid="maven.plugin.classpath" />
30
                </taskdef>
31
                <iajc verbose="false" source="${java.codelevel}" destDir="target/classes" aspectPathRef="aspectPath">
32
                <!--  see https://www.eclipse.org/aspectj/doc/released/devguide/antTasks-iajc.html#antTasks-iajc-paths -->
33
                <classpath>
34
                    <path refid="maven.compile.classpath" />
35
                    <path refid="maven.plugin.classpath" />
36
                </classpath>
37
                  <sourceroots>
38
                    <pathelement location="src/main/java" />
39
                  </sourceroots>
40
                </iajc>
41
              </target>
42
            </configuration>
43
          </execution>
44
          <execution>
45
            <id>aspectj-test</id>
46
            <phase>process-test-sources</phase>
47
            <goals>
48
              <goal>run</goal>
49
            </goals>
50
            <configuration>
51
              <target>
52
                <path id="aspectPath" location="${settings.localRepository}/org/springframework/spring-aspects/${spring.version}/spring-aspects-${spring.version}.jar" />
53
                <taskdef classname="org.aspectj.tools.ant.taskdefs.AjcTask" name="iajc">
54
                  <classpath refid="maven.plugin.classpath" />
55
                </taskdef>
56
                <iajc verbose="false" source="${java.codelevel}" destDir="target/test-classes" aspectPathRef="aspectPath">
57
                <!--  see https://www.eclipse.org/aspectj/doc/released/devguide/antTasks-iajc.html#antTasks-iajc-paths -->
58
                  <classpath>
59
                    <path refid="maven.compile.classpath" />
60
                    <path refid="maven.plugin.classpath" />
61
                    <path refid="maven.test.classpath" />
62
                </classpath>
63
                  <sourceroots>
64
                    <pathelement location="src/test/java" />
65
                  </sourceroots>
66
                </iajc>
67
              </target>
68
          </configuration>
69
        </execution>
70
      </executions>
71
        <dependencies>
72
          <dependency>
73
            <groupId>org.aspectj</groupId>
74
            <artifactId>aspectjtools</artifactId>
75
            <version>${aspectj.version}</version>
76
          </dependency>
77
          <dependency>
78
            <groupId>org.aspectj</groupId>
79
            <artifactId>aspectjrt</artifactId>
80
            <version>${aspectj.version}</version>
81
          </dependency>
82
      </dependencies>
83
      </plugin>
84
    </plugins>
85
  	<pluginManagement>
86
  		<plugins>
87
  			<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
88
  			<plugin>
89
  				<groupId>org.eclipse.m2e</groupId>
90
  				<artifactId>lifecycle-mapping</artifactId>
91
  				<version>1.0.0</version>
92
  				<configuration>
93
  					<lifecycleMappingMetadata>
94
  						<pluginExecutions>
95
  							<pluginExecution>
96
  								<pluginExecutionFilter>
97
  									<groupId>
98
  										org.apache.maven.plugins
99
  									</groupId>
100
  									<artifactId>
101
  										maven-antrun-plugin
102
  									</artifactId>
103
  									<versionRange>
104
  										[3.0.0,)
105
  									</versionRange>
106
  									<goals>
107
  										<goal>run</goal>
108
  									</goals>
109
  								</pluginExecutionFilter>
110
  								<action>
111
  									<ignore></ignore>
112
  								</action>
113
  							</pluginExecution>
114
  						</pluginExecutions>
115
  					</lifecycleMappingMetadata>
116
  				</configuration>
117
  			</plugin>
118
  		</plugins>
119
  	</pluginManagement>
87 120
  </build>
88 121
  <dependencies>
89 122
    <dependency>
cdmlib-test/pom.xml
13 13
  <description>EDIT CDM library integration test layer. Some base classes and resources for CDM Library integration testing</description>
14 14

  
15 15
  <build>
16
	<pluginManagement>
17
	    <plugins>
18
	      <plugin>
19
	        <artifactId>maven-antrun-plugin</artifactId>
20
	            <executions>
21
	              <execution>
22
	                  <!-- Generate DDL for test -->
23
	                  <!-- Alternatives: http://jpdigital.github.io/hibernate5-ddl-maven-plugin/usage.html, 
24
	                                     https://webdev.jhuep.com/~jcs/ejava-javaee/coursedocs/content/html/jpa-entitymgrex-dbschemagen.html -->
25
	                  <!-- manual execution of the below ant task:  -->
26
	                  <!-- mvn antrun:run@generate-ddl-create       -->
27
	                  <id>generate-ddl-create</id>
28
	                  <phase>process-classes</phase>
29
	                  <goals>
30
	                      <goal>run</goal>
31
	                  </goals>
32
	                  <configuration>
33
	                      <target>
34
	                          <delete file="${project.build.outputDirectory}/dbscripts/001-cdm.h2.sql" />
35
	                          <!-- copy template file -->
36
	                          <copy file="${basedir}/src/main/resources/dbscripts/001-cdm.h2.template.sql" tofile="${project.build.outputDirectory}/dbscripts/001-cdm.h2.sql" />
37
	                                <!-- 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 -->
38
	                          <!-- run DdlCreator -->
39
	                          <java classname="eu.etaxonomy.cdm.test.unitils.DdlCreator" fork="false" failonerror="true" classpathref="maven.compile.classpath" /> 
40
	                      </target>
41
	                  </configuration>
42
	              </execution>
43
	          </executions>
44
	      </plugin>
45
	      <plugin>
46
	        <groupId>org.apache.maven.plugins</groupId>
47
	        <artifactId>maven-jar-plugin</artifactId>
48
	        <version>3.2.0</version>
49
	        <executions>
50
	          <execution>
51
	            <goals>
52
	              <goal>test-jar</goal>
53
	            </goals>
54
	          </execution>
55
	        </executions>
56
	      </plugin>
57
	    </plugins>
58
	</pluginManagement>
16
    <plugins>
17
      <plugin>
18
        <artifactId>maven-antrun-plugin</artifactId>
19
            <executions>
20
              <execution>
21
                  <!-- Generate DDL for test -->
22
                  <!-- Alternatives: http://jpdigital.github.io/hibernate5-ddl-maven-plugin/usage.html, 
23
                                     https://webdev.jhuep.com/~jcs/ejava-javaee/coursedocs/content/html/jpa-entitymgrex-dbschemagen.html -->
24
                  <!-- manual execution of the below ant task:  -->
25
                  <!-- mvn antrun:run@generate-ddl-create       -->
26
                  <id>generate-ddl-create</id>
27
                  <phase>process-classes</phase>
28
                  <goals>
29
                      <goal>run</goal>
30
                  </goals>
31
                  <configuration>
32
                      <target>
33
                          <delete file="${project.build.outputDirectory}/dbscripts/001-cdm.h2.sql" />
34
                          <!-- copy template file -->
35
                          <copy file="${basedir}/src/main/resources/dbscripts/001-cdm.h2.template.sql" tofile="${project.build.outputDirectory}/dbscripts/001-cdm.h2.sql" />
36
                                <!-- 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 -->
37
                          <!-- run DdlCreator -->
38
                          <java classname="eu.etaxonomy.cdm.test.unitils.DdlCreator" fork="false" failonerror="true" classpathref="maven.compile.classpath" /> 
39
                      </target>
40
                  </configuration>
41
              </execution>
42
          </executions>
43
      </plugin>
44
      <plugin>
45
        <groupId>org.apache.maven.plugins</groupId>
46
        <artifactId>maven-jar-plugin</artifactId>
47
        <version>3.2.0</version>
48
        <executions>
49
          <execution>
50
            <goals>
51
              <goal>test-jar</goal>
52
            </goals>
53
          </execution>
54
        </executions>
55
      </plugin>
56
    </plugins>
57
    <pluginManagement>
58
    	<plugins>
59
    		<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
60
    		<plugin>
61
    			<groupId>org.eclipse.m2e</groupId>
62
    			<artifactId>lifecycle-mapping</artifactId>
63
    			<version>1.0.0</version>
64
    			<configuration>
65
    				<lifecycleMappingMetadata>
66
    					<pluginExecutions>
67
    						<pluginExecution>
68
    							<pluginExecutionFilter>
69
    								<groupId>
70
    									org.apache.maven.plugins
71
    								</groupId>
72
    								<artifactId>
73
    									maven-antrun-plugin
74
    								</artifactId>
75
    								<versionRange>
76
    									[3.0.0,)
77
    								</versionRange>
78
    								<goals>
79
    									<goal>run</goal>
80
    								</goals>
81
    							</pluginExecutionFilter>
82
    							<action>
83
    								<ignore></ignore>
84
    							</action>
85
    						</pluginExecution>
86
    					</pluginExecutions>
87
    				</lifecycleMappingMetadata>
88
    			</configuration>
89
    		</plugin>
90
    	</plugins>
91
    </pluginManagement>
59 92
  </build>
60 93
  <dependencies>
61 94
    <dependency>

Also available in: Unified diff