|
73 | 73 | </dependencies>
|
74 | 74 |
|
75 | 75 | <build>
|
| 76 | + |
76 | 77 | <plugins>
|
77 | 78 | <plugin>
|
78 | 79 | <groupId>org.springframework.boot</groupId>
|
79 | 80 | <artifactId>spring-boot-maven-plugin</artifactId>
|
| 81 | + </plugin> |
| 82 | + <plugin> |
| 83 | + <groupId>org.apache.maven.plugins</groupId> |
| 84 | + <artifactId>maven-surefire-plugin</artifactId> |
| 85 | + <version>3.0.0</version> |
80 | 86 | <configuration>
|
81 |
| - <image> |
82 |
| - <builder>paketobuildpacks/builder-jammy-base:latest</builder> |
83 |
| - </image> |
| 87 | + <systemPropertyVariables> |
| 88 | + <spring.profiles.active>test</spring.profiles.active> |
| 89 | + </systemPropertyVariables> |
| 90 | + <includes> |
| 91 | + <include>**/*TestCase.java</include> |
| 92 | + <include>**/*Test.java</include> |
| 93 | + <include>**/*IT.java</include> |
| 94 | + </includes> |
84 | 95 | </configuration>
|
85 | 96 | </plugin>
|
86 | 97 | <plugin>
|
87 |
| - <groupId>com.spotify</groupId> |
88 |
| - <artifactId>dockerfile-maven-plugin</artifactId> |
89 |
| - <version>1.4.13</version> |
| 98 | + <groupId>org.codehaus.mojo</groupId> |
| 99 | + <artifactId>exec-maven-plugin</artifactId> |
| 100 | + <version>3.3.0</version> |
90 | 101 | <executions>
|
91 | 102 | <execution>
|
92 |
| - <id>default</id> |
| 103 | + <id>docker-build</id> |
| 104 | + <phase>package</phase> |
93 | 105 | <goals>
|
94 |
| - <goal>build</goal> |
| 106 | + <goal>exec</goal> |
95 | 107 | </goals>
|
| 108 | + <configuration> |
| 109 | + <executable>docker</executable> |
| 110 | + <workingDirectory>${project.basedir}</workingDirectory> |
| 111 | + <arguments> |
| 112 | + <argument>build</argument> |
| 113 | + <argument>-f</argument> |
| 114 | + <argument>Dockerfile</argument> |
| 115 | + <argument>--build-arg</argument> |
| 116 | + <argument>JAR_FILE=${project.artifactId}-${project.version}.jar</argument> |
| 117 | + <argument>-t</argument> |
| 118 | + <argument>protegeproject/${project.artifactId}:${project.version}</argument> |
| 119 | + <argument>.</argument> |
| 120 | + </arguments> |
| 121 | + </configuration> |
| 122 | + </execution> |
| 123 | + <execution> |
| 124 | + <id>docker-push</id> |
| 125 | + <phase>install</phase> |
| 126 | + <goals> |
| 127 | + <goal>exec</goal> |
| 128 | + </goals> |
| 129 | + <configuration> |
| 130 | + <executable>docker</executable> |
| 131 | + <workingDirectory>${project.basedir}</workingDirectory> |
| 132 | + <arguments> |
| 133 | + <argument>push</argument> |
| 134 | + <argument>protegeproject/${project.artifactId}:${project.version}</argument> |
| 135 | + </arguments> |
| 136 | + </configuration> |
96 | 137 | </execution>
|
97 | 138 | </executions>
|
98 |
| - <configuration> |
99 |
| - <repository>protegeproject/${project.artifactId}</repository> |
100 |
| - <tag>${project.version}</tag> |
101 |
| - <buildArgs> |
102 |
| - <JAR_FILE>${project.build.finalName}.jar</JAR_FILE> |
103 |
| - </buildArgs> |
104 |
| - <!-- <username>${env.DOCKER_USERNAME}</username>--> |
105 |
| - <!-- <password>${env.DOCKER_PASSWORD}</password>--> |
106 |
| - </configuration> |
107 | 139 | </plugin>
|
108 | 140 | </plugins>
|
109 | 141 | </build>
|
110 | 142 |
|
111 |
| - <profiles> |
112 |
| - <profile> |
113 |
| - <id>release</id> |
114 |
| - <build> |
115 |
| - <plugins> |
116 |
| - <plugin> |
117 |
| - <groupId>org.apache.maven.plugins</groupId> |
118 |
| - <artifactId>maven-source-plugin</artifactId> |
119 |
| - <version>3.2.1</version> |
120 |
| - <executions> |
121 |
| - <execution> |
122 |
| - <id>attach-sources</id> |
123 |
| - <goals> |
124 |
| - <goal>jar-no-fork</goal> |
125 |
| - </goals> |
126 |
| - </execution> |
127 |
| - </executions> |
128 |
| - </plugin> |
129 |
| - |
130 |
| - <plugin> |
131 |
| - <groupId>org.apache.maven.plugins</groupId> |
132 |
| - <artifactId>maven-javadoc-plugin</artifactId> |
133 |
| - <version>3.2.0</version> |
134 |
| - <configuration> |
135 |
| - <doclint>none</doclint> |
136 |
| - <release>16</release> |
137 |
| - </configuration> |
138 |
| - <executions> |
139 |
| - <execution> |
140 |
| - <id>attach-javadocs</id> |
141 |
| - <goals> |
142 |
| - <goal>jar</goal> |
143 |
| - </goals> |
144 |
| - </execution> |
145 |
| - </executions> |
146 |
| - </plugin> |
147 |
| - |
148 |
| - <plugin> |
149 |
| - <groupId>org.apache.maven.plugins</groupId> |
150 |
| - <artifactId>maven-gpg-plugin</artifactId> |
151 |
| - <version>1.6</version> |
152 |
| - <executions> |
153 |
| - <execution> |
154 |
| - <id>sign-artifacts</id> |
155 |
| - <phase>verify</phase> |
156 |
| - <goals> |
157 |
| - <goal>sign</goal> |
158 |
| - </goals> |
159 |
| - <configuration> |
160 |
| - <gpgArguments> |
161 |
| - <arg>--pinentry-mode</arg> |
162 |
| - <arg>loopback</arg> |
163 |
| - </gpgArguments> |
164 |
| - </configuration> |
165 |
| - </execution> |
166 |
| - </executions> |
167 |
| - </plugin> |
168 |
| - |
169 |
| - <plugin> |
170 |
| - <groupId>org.sonatype.plugins</groupId> |
171 |
| - <artifactId>nexus-staging-maven-plugin</artifactId> |
172 |
| - <version>1.6.7</version> |
173 |
| - <extensions>true</extensions> |
174 |
| - <configuration> |
175 |
| - <serverId>ossrh</serverId> |
176 |
| - <nexusUrl>https://oss.sonatype.org</nexusUrl> |
177 |
| - <autoReleaseAfterClose>true</autoReleaseAfterClose> |
178 |
| - </configuration> |
179 |
| - <dependencies> |
180 |
| - <!-- |
181 |
| - TODO: |
182 |
| - Remove after OSSRH-66257, NEXUS-26993 are fixed, |
183 |
| - possibly via https://github.com/sonatype/nexus-maven-plugins/pull/91 |
184 |
| - --> |
185 |
| - <dependency> |
186 |
| - <groupId>com.thoughtworks.xstream</groupId> |
187 |
| - <artifactId>xstream</artifactId> |
188 |
| - <version>1.4.15</version> |
189 |
| - </dependency> |
190 |
| - </dependencies> |
191 |
| - </plugin> |
192 |
| - |
193 |
| - </plugins> |
194 |
| - </build> |
195 |
| - </profile> |
196 |
| - </profiles> |
197 |
| - |
198 | 143 | </project>
|
0 commit comments