1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
package org.apache.maven.plugin.eclipse.writers; |
20 | |
|
21 | |
import java.io.File; |
22 | |
import java.io.FileOutputStream; |
23 | |
import java.io.IOException; |
24 | |
import java.io.OutputStreamWriter; |
25 | |
import java.io.Writer; |
26 | |
import java.util.ArrayList; |
27 | |
import java.util.HashMap; |
28 | |
import java.util.HashSet; |
29 | |
import java.util.Iterator; |
30 | |
import java.util.List; |
31 | |
import java.util.Map; |
32 | |
import java.util.Set; |
33 | |
|
34 | |
import org.apache.maven.plugin.MojoExecutionException; |
35 | |
import org.apache.maven.plugin.eclipse.BuildCommand; |
36 | |
import org.apache.maven.plugin.eclipse.Constants; |
37 | |
import org.apache.maven.plugin.eclipse.EclipseSourceDir; |
38 | |
import org.apache.maven.plugin.eclipse.Messages; |
39 | |
import org.apache.maven.plugin.ide.IdeDependency; |
40 | |
import org.apache.maven.plugin.ide.IdeUtils; |
41 | |
import org.codehaus.plexus.util.IOUtil; |
42 | |
import org.codehaus.plexus.util.StringUtils; |
43 | |
import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter; |
44 | |
import org.codehaus.plexus.util.xml.XMLWriter; |
45 | |
|
46 | |
|
47 | |
|
48 | |
|
49 | |
|
50 | |
|
51 | |
|
52 | |
|
53 | |
|
54 | 12 | public class EclipseClasspathWriter |
55 | |
extends AbstractEclipseWriter |
56 | |
{ |
57 | |
|
58 | |
|
59 | |
|
60 | |
|
61 | |
private static final String ORG_ECLIPSE_AJDT_INPATH = "org.eclipse.ajdt.inpath"; |
62 | |
|
63 | |
|
64 | |
|
65 | |
|
66 | |
private static final String ORG_ECLIPSE_AJDT_ASPECTPATH = "org.eclipse.ajdt.aspectpath"; |
67 | |
|
68 | |
private static final String ASPECTJRT_CONTAINER = "org.eclipse.ajdt.core.ASPECTJRT_CONTAINER"; |
69 | |
|
70 | |
|
71 | |
|
72 | |
|
73 | |
private static final String NAME = "name"; |
74 | |
|
75 | |
|
76 | |
|
77 | |
|
78 | |
private static final String VALUE = "value"; |
79 | |
|
80 | |
|
81 | |
|
82 | |
|
83 | |
private static final String ATTRIBUTE = "attribute"; |
84 | |
|
85 | |
|
86 | |
|
87 | |
|
88 | |
private static final String ATTRIBUTES = "attributes"; |
89 | |
|
90 | |
|
91 | |
|
92 | |
|
93 | |
protected static final String M2_REPO = "M2_REPO"; |
94 | |
|
95 | |
|
96 | |
|
97 | |
|
98 | |
private static final String ATTR_SOURCEPATH = "sourcepath"; |
99 | |
|
100 | |
|
101 | |
|
102 | |
|
103 | |
private static final String ATTR_OUTPUT = "output"; |
104 | |
|
105 | |
|
106 | |
|
107 | |
|
108 | |
private static final String ATTR_PATH = "path"; |
109 | |
|
110 | |
|
111 | |
|
112 | |
|
113 | |
private static final String ATTR_KIND = "kind"; |
114 | |
|
115 | |
|
116 | |
|
117 | |
|
118 | |
private static final String ATTR_VAR = "var"; |
119 | |
|
120 | |
|
121 | |
|
122 | |
|
123 | |
private static final String ATTR_LIB = "lib"; |
124 | |
|
125 | |
|
126 | |
|
127 | |
|
128 | |
private static final String ATTR_SRC = "src"; |
129 | |
|
130 | |
|
131 | |
|
132 | |
|
133 | |
private static final String ATTR_INCLUDING = "including"; |
134 | |
|
135 | |
|
136 | |
|
137 | |
|
138 | |
private static final String ATTR_EXCLUDING = "excluding"; |
139 | |
|
140 | |
|
141 | |
|
142 | |
|
143 | |
private static final String ELT_CLASSPATHENTRY = "classpathentry"; |
144 | |
|
145 | |
|
146 | |
|
147 | |
|
148 | |
private static final String ELT_CLASSPATH = "classpath"; |
149 | |
|
150 | |
|
151 | |
|
152 | |
|
153 | |
private static final String FILE_DOT_CLASSPATH = ".classpath"; |
154 | |
|
155 | |
|
156 | |
|
157 | |
|
158 | |
public void write() |
159 | |
throws MojoExecutionException |
160 | |
{ |
161 | |
|
162 | |
Writer w; |
163 | |
|
164 | |
try |
165 | |
{ |
166 | 12 | w = |
167 | |
new OutputStreamWriter( new FileOutputStream( new File( config.getEclipseProjectDirectory(), |
168 | |
FILE_DOT_CLASSPATH ) ), "UTF-8" ); |
169 | |
} |
170 | 0 | catch ( IOException ex ) |
171 | |
{ |
172 | 0 | throw new MojoExecutionException( Messages.getString( "EclipsePlugin.erroropeningfile" ), ex ); |
173 | 12 | } |
174 | |
|
175 | 12 | XMLWriter writer = new PrettyPrintXMLWriter( w ); |
176 | |
|
177 | 12 | writer.startElement( ELT_CLASSPATH ); |
178 | |
|
179 | 12 | String defaultOutput = |
180 | |
IdeUtils.toRelativeAndFixSeparator( config.getProjectBaseDir(), config.getBuildOutputDirectory(), false ); |
181 | |
|
182 | |
|
183 | |
|
184 | |
|
185 | |
|
186 | |
|
187 | 12 | List specialSources = new ArrayList(); |
188 | |
|
189 | |
|
190 | 12 | Map byOutputDir = new HashMap(); |
191 | |
|
192 | 24 | for ( int j = 0; j < config.getSourceDirs().length; j++ ) |
193 | |
{ |
194 | 12 | EclipseSourceDir dir = config.getSourceDirs()[j]; |
195 | |
|
196 | |
|
197 | 12 | List byOutputDirs = (List) byOutputDir.get( dir.getOutput() ); |
198 | 12 | if ( byOutputDirs == null ) |
199 | |
{ |
200 | |
|
201 | 12 | byOutputDir.put( dir.getOutput() == null ? defaultOutput : dir.getOutput(), byOutputDirs = |
202 | |
new ArrayList() ); |
203 | |
} |
204 | 12 | byOutputDirs.add( dir ); |
205 | |
} |
206 | |
|
207 | 24 | for ( int j = 0; j < config.getSourceDirs().length; j++ ) |
208 | |
{ |
209 | 12 | EclipseSourceDir dir = config.getSourceDirs()[j]; |
210 | |
|
211 | 12 | log.debug( "Processing classpath for: " + dir.toString() + "; default output=" + defaultOutput ); |
212 | |
|
213 | 12 | boolean isSpecial = false; |
214 | |
|
215 | |
|
216 | 12 | if ( dir.isResource() ) |
217 | |
{ |
218 | |
|
219 | |
|
220 | |
|
221 | 12 | if ( dir.getOutput() != null |
222 | |
&& !dir.getOutput().equals( defaultOutput ) |
223 | |
&& dir.getOutput().startsWith( defaultOutput ) |
224 | |
&& byOutputDir.get( defaultOutput ) != null |
225 | |
&& !( (List) byOutputDir.get( defaultOutput ) ).isEmpty() |
226 | |
) |
227 | |
{ |
228 | |
|
229 | |
|
230 | |
|
231 | 6 | log.debug( "Marking as special to prevent output folder nesting: " + dir.getPath() + " (output=" |
232 | |
+ dir.getOutput() + ")" ); |
233 | |
|
234 | 6 | isSpecial = true; |
235 | 6 | specialSources.add( dir ); |
236 | |
} |
237 | |
} |
238 | |
|
239 | 12 | writer.startElement( ELT_CLASSPATHENTRY ); |
240 | |
|
241 | 12 | writer.addAttribute( ATTR_KIND, "src" ); |
242 | 12 | writer.addAttribute( ATTR_PATH, dir.getPath() ); |
243 | |
|
244 | 12 | if ( !isSpecial && dir.getOutput() != null && !defaultOutput.equals( dir.getOutput() ) ) |
245 | |
{ |
246 | 0 | writer.addAttribute( ATTR_OUTPUT, dir.getOutput() ); |
247 | |
} |
248 | |
|
249 | 12 | String includes = dir.getIncludeAsString(); |
250 | 12 | if ( StringUtils.isNotEmpty( includes ) ) |
251 | |
{ |
252 | 0 | writer.addAttribute( ATTR_INCLUDING, includes ); |
253 | |
} |
254 | |
|
255 | 12 | String excludes = dir.getExcludeAsString(); |
256 | 12 | if ( StringUtils.isNotEmpty( excludes ) ) |
257 | |
{ |
258 | 0 | writer.addAttribute( ATTR_EXCLUDING, excludes ); |
259 | |
} |
260 | |
|
261 | 12 | writer.endElement(); |
262 | |
|
263 | |
} |
264 | |
|
265 | |
|
266 | 12 | if ( !specialSources.isEmpty() ) |
267 | |
{ |
268 | 6 | log.info( "Creating maven-eclipse.xml Ant file to handle resources" ); |
269 | |
|
270 | |
try |
271 | |
{ |
272 | 6 | Writer buildXmlWriter = |
273 | |
new OutputStreamWriter( new FileOutputStream( new File( config.getEclipseProjectDirectory(), |
274 | |
"maven-eclipse.xml" ) ), "UTF-8" ); |
275 | 6 | PrettyPrintXMLWriter buildXmlPrinter = new PrettyPrintXMLWriter( buildXmlWriter ); |
276 | |
|
277 | 6 | buildXmlPrinter.startElement( "project" ); |
278 | 6 | buildXmlPrinter.addAttribute( "default", "copy-resources" ); |
279 | |
|
280 | 6 | buildXmlPrinter.startElement( "target" ); |
281 | 6 | buildXmlPrinter.addAttribute( NAME, "init" ); |
282 | |
|
283 | 6 | buildXmlPrinter.endElement(); |
284 | |
|
285 | 6 | buildXmlPrinter.startElement( "target" ); |
286 | 6 | buildXmlPrinter.addAttribute( NAME, "copy-resources" ); |
287 | 6 | buildXmlPrinter.addAttribute( "depends", "init" ); |
288 | |
|
289 | 6 | for ( Iterator it = specialSources.iterator(); it.hasNext(); ) |
290 | |
{ |
291 | |
|
292 | |
|
293 | 6 | EclipseSourceDir dir = (EclipseSourceDir) it.next(); |
294 | 6 | buildXmlPrinter.startElement( "copy" ); |
295 | 6 | buildXmlPrinter.addAttribute( "todir", dir.getOutput() ); |
296 | 6 | buildXmlPrinter.addAttribute( "filtering", "" + dir.isFiltering() ); |
297 | |
|
298 | 6 | buildXmlPrinter.startElement( "fileset" ); |
299 | 6 | buildXmlPrinter.addAttribute( "dir", dir.getPath() ); |
300 | 6 | if ( dir.getIncludeAsString() != null ) |
301 | |
{ |
302 | 6 | buildXmlPrinter.addAttribute( "includes", dir.getIncludeAsString() ); |
303 | |
} |
304 | 6 | if ( dir.getExcludeAsString() != null ) |
305 | |
{ |
306 | 6 | buildXmlPrinter.addAttribute( "excludes", dir.getExcludeAsString() ); |
307 | |
} |
308 | 6 | buildXmlPrinter.endElement(); |
309 | |
|
310 | 6 | buildXmlPrinter.endElement(); |
311 | 6 | } |
312 | |
|
313 | 6 | buildXmlPrinter.endElement(); |
314 | |
|
315 | 6 | buildXmlPrinter.endElement(); |
316 | |
|
317 | 6 | IOUtil.close( buildXmlWriter ); |
318 | |
} |
319 | 0 | catch ( IOException e ) |
320 | |
{ |
321 | 0 | throw new MojoExecutionException( "Cannot create " + config.getEclipseProjectDirectory() |
322 | |
+ "/maven-eclipse.xml", e ); |
323 | 6 | } |
324 | |
|
325 | 6 | log.info( "Creating external launcher file" ); |
326 | |
|
327 | 6 | new EclipseAntExternalLaunchConfigurationWriter().init( log, config, "Maven_Ant_Builder.launch", |
328 | |
"maven-eclipse.xml" ).write(); |
329 | |
|
330 | |
|
331 | |
|
332 | 6 | config.getBuildCommands().add( |
333 | |
new BuildCommand( |
334 | |
"org.eclipse.ui.externaltools.ExternalToolBuilder", |
335 | |
"LaunchConfigHandle", |
336 | |
"<project>/" |
337 | |
+ EclipseLaunchConfigurationWriter.FILE_DOT_EXTERNAL_TOOL_BUILDERS |
338 | |
+ "Maven_Ant_Builder.launch" ) ); |
339 | |
} |
340 | |
|
341 | |
|
342 | |
|
343 | |
|
344 | |
|
345 | 12 | writer.startElement( ELT_CLASSPATHENTRY ); |
346 | 12 | writer.addAttribute( ATTR_KIND, ATTR_OUTPUT ); |
347 | 12 | writer.addAttribute( ATTR_PATH, defaultOutput ); |
348 | 12 | writer.endElement(); |
349 | |
|
350 | 12 | Set addedDependencies = new HashSet(); |
351 | |
|
352 | |
|
353 | |
|
354 | |
|
355 | |
|
356 | |
|
357 | 12 | IdeDependency[] depsToWrite = config.getDepsOrdered(); |
358 | 18 | for ( int j = 0; j < depsToWrite.length; j++ ) |
359 | |
{ |
360 | 6 | IdeDependency dep = depsToWrite[j]; |
361 | 6 | if ( dep.isJavaApi() ) |
362 | |
{ |
363 | 0 | String depId = getDependencyId( dep ); |
364 | 0 | if ( !addedDependencies.contains( depId ) ) |
365 | |
{ |
366 | 0 | addDependency( writer, dep ); |
367 | 0 | addedDependencies.add( depId ); |
368 | |
} |
369 | |
} |
370 | |
} |
371 | |
|
372 | |
|
373 | |
|
374 | |
|
375 | 18 | for ( int j = 0; j < depsToWrite.length; j++ ) |
376 | |
{ |
377 | 6 | IdeDependency dep = depsToWrite[j]; |
378 | |
|
379 | 6 | if ( dep.isAddedToClasspath() ) |
380 | |
{ |
381 | 6 | String depId = getDependencyId( dep ); |
382 | |
|
383 | 6 | if ( !addedDependencies.contains( depId ) ) |
384 | |
{ |
385 | 6 | addDependency( writer, dep ); |
386 | 6 | addedDependencies.add( depId ); |
387 | |
} |
388 | |
} |
389 | |
} |
390 | |
|
391 | |
|
392 | |
|
393 | |
|
394 | |
|
395 | 12 | for ( Iterator it = config.getClasspathContainers().iterator(); it.hasNext(); ) |
396 | |
{ |
397 | 0 | writer.startElement( ELT_CLASSPATHENTRY ); |
398 | 0 | writer.addAttribute( ATTR_KIND, "con" ); |
399 | 0 | writer.addAttribute( ATTR_PATH, (String) it.next() ); |
400 | 0 | writer.endElement(); |
401 | |
} |
402 | |
|
403 | 12 | writer.endElement(); |
404 | |
|
405 | 12 | IOUtil.close( w ); |
406 | |
|
407 | 12 | } |
408 | |
|
409 | |
private String getDependencyId( IdeDependency dep ) |
410 | |
{ |
411 | 6 | String depId = |
412 | |
dep.getGroupId() + ":" + dep.getArtifactId() + ":" + dep.getClassifier() + ":" + dep.getVersion(); |
413 | |
|
414 | 6 | if ( dep.isReferencedProject() ) |
415 | |
{ |
416 | |
|
417 | 0 | depId = dep.getEclipseProjectName(); |
418 | |
} |
419 | 6 | return depId; |
420 | |
} |
421 | |
|
422 | |
protected void addDependency( XMLWriter writer, IdeDependency dep ) |
423 | |
throws MojoExecutionException |
424 | |
{ |
425 | |
|
426 | |
String path; |
427 | |
String kind; |
428 | 6 | String sourcepath = null; |
429 | 6 | String javadocpath = null; |
430 | |
|
431 | 6 | if ( dep.isReferencedProject() && !config.isPde() ) |
432 | |
{ |
433 | 0 | path = "/" + dep.getEclipseProjectName(); |
434 | 0 | kind = ATTR_SRC; |
435 | |
} |
436 | 6 | else if ( dep.isReferencedProject() && config.isPde() ) |
437 | |
{ |
438 | |
|
439 | 0 | return; |
440 | |
} |
441 | |
else |
442 | |
{ |
443 | 6 | File artifactPath = dep.getFile(); |
444 | |
|
445 | 6 | if ( artifactPath == null ) |
446 | |
{ |
447 | 0 | log.error( Messages.getString( "EclipsePlugin.artifactpathisnull", dep.getId() ) ); |
448 | 0 | return; |
449 | |
} |
450 | |
|
451 | 6 | if ( dep.isSystemScoped() ) |
452 | |
{ |
453 | 0 | path = IdeUtils.toRelativeAndFixSeparator( config.getEclipseProjectDirectory(), artifactPath, false ); |
454 | |
|
455 | 0 | if ( log.isDebugEnabled() ) |
456 | |
{ |
457 | 0 | log.debug( Messages.getString( "EclipsePlugin.artifactissystemscoped", |
458 | |
new Object[] { dep.getArtifactId(), path } ) ); |
459 | |
} |
460 | |
|
461 | 0 | kind = ATTR_LIB; |
462 | |
} |
463 | |
else |
464 | |
{ |
465 | 6 | File localRepositoryFile = new File( config.getLocalRepository().getBasedir() ); |
466 | |
|
467 | |
|
468 | |
|
469 | 6 | if ( config.isPde() && ( dep.isProvided() || dep.isOsgiBundle() ) ) |
470 | |
{ |
471 | 0 | return; |
472 | |
} |
473 | 6 | else if ( config.isPde() && !dep.isProvided() && !dep.isTestDependency() ) |
474 | |
{ |
475 | |
|
476 | 0 | path = dep.getFile().getName(); |
477 | |
|
478 | 0 | kind = ATTR_LIB; |
479 | |
} |
480 | |
|
481 | |
|
482 | |
else |
483 | |
{ |
484 | 6 | String fullPath = artifactPath.getPath(); |
485 | 6 | String relativePath = |
486 | |
IdeUtils.toRelativeAndFixSeparator( localRepositoryFile, new File( fullPath ), false ); |
487 | |
|
488 | 6 | if ( !new File( relativePath ).isAbsolute() ) |
489 | |
{ |
490 | 6 | path = M2_REPO + "/" |
491 | |
+ relativePath; |
492 | 6 | kind = ATTR_VAR; |
493 | |
} |
494 | |
else |
495 | |
{ |
496 | 0 | path = relativePath; |
497 | 0 | kind = ATTR_LIB; |
498 | |
} |
499 | |
} |
500 | |
|
501 | 6 | if ( dep.getSourceAttachment() != null ) |
502 | |
{ |
503 | 0 | if ( ATTR_VAR.equals( kind ) ) |
504 | |
{ |
505 | 0 | sourcepath = |
506 | |
M2_REPO |
507 | |
+ "/" |
508 | |
+ IdeUtils.toRelativeAndFixSeparator( localRepositoryFile, dep.getSourceAttachment(), |
509 | |
false ); |
510 | |
} |
511 | |
else |
512 | |
{ |
513 | |
|
514 | 0 | sourcepath = IdeUtils.getCanonicalPath( dep.getSourceAttachment() ); |
515 | |
} |
516 | |
} |
517 | |
|
518 | 6 | if ( dep.getJavadocAttachment() != null ) |
519 | |
{ |
520 | |
|
521 | |
|
522 | 6 | javadocpath = |
523 | |
StringUtils.replace( IdeUtils.getCanonicalPath( dep.getJavadocAttachment() ), "\\", "/" ); |
524 | |
} |
525 | |
|
526 | |
} |
527 | |
|
528 | |
} |
529 | |
|
530 | |
|
531 | 6 | if ( ( config.getAjdtVersion() != 0 ) && isAspectJRuntime( dep ) ) |
532 | |
{ |
533 | 0 | if ( ! config.getClasspathContainers().contains( ASPECTJRT_CONTAINER ) ) |
534 | |
{ |
535 | 0 | config.getClasspathContainers().add( ASPECTJRT_CONTAINER ); |
536 | |
} |
537 | 0 | return; |
538 | |
} |
539 | |
|
540 | 6 | writer.startElement( ELT_CLASSPATHENTRY ); |
541 | 6 | writer.addAttribute( ATTR_KIND, kind ); |
542 | 6 | writer.addAttribute( ATTR_PATH, path ); |
543 | |
|
544 | 6 | if ( sourcepath != null ) |
545 | |
{ |
546 | 0 | writer.addAttribute( ATTR_SOURCEPATH, sourcepath ); |
547 | |
} |
548 | |
|
549 | 6 | boolean attributeElemOpen = false; |
550 | |
|
551 | 6 | if ( javadocpath != null ) |
552 | |
{ |
553 | 6 | if ( !attributeElemOpen ) |
554 | |
{ |
555 | 6 | writer.startElement( ATTRIBUTES ); |
556 | 6 | attributeElemOpen = true; |
557 | |
} |
558 | |
|
559 | 6 | writer.startElement( ATTRIBUTE ); |
560 | 6 | writer.addAttribute( VALUE, "jar:" + new File( javadocpath ).toURI() + "!/" ); |
561 | 6 | writer.addAttribute( NAME, "javadoc_location" ); |
562 | 6 | writer.endElement(); |
563 | |
|
564 | |
} |
565 | |
|
566 | 6 | if ( Constants.PROJECT_PACKAGING_WAR.equals( this.config.getPackaging() ) && config.getWtpapplicationxml() |
567 | |
&& kind.equals( ATTR_VAR ) && !dep.isTestDependency() && !dep.isProvided() |
568 | |
&& !dep.isSystemScopedOutsideProject( this.config.getProject() ) ) |
569 | |
{ |
570 | 0 | if ( !attributeElemOpen ) |
571 | |
{ |
572 | 0 | writer.startElement( ATTRIBUTES ); |
573 | 0 | attributeElemOpen = true; |
574 | |
} |
575 | |
|
576 | 0 | writer.startElement( ATTRIBUTE ); |
577 | 0 | writer.addAttribute( VALUE, "/WEB-INF/lib" ); |
578 | 0 | writer.addAttribute( NAME, "org.eclipse.jst.component.dependency" ); |
579 | 0 | writer.endElement(); |
580 | |
|
581 | |
} |
582 | |
|
583 | 6 | if ( dep.isAjdtDependency() && ( config.getAjdtVersion() >= 1.5 ) ) |
584 | |
{ |
585 | 0 | if ( !attributeElemOpen ) |
586 | |
{ |
587 | 0 | writer.startElement( ATTRIBUTES ); |
588 | 0 | attributeElemOpen = true; |
589 | |
} |
590 | |
|
591 | 0 | writer.startElement( ATTRIBUTE ); |
592 | 0 | writer.addAttribute( NAME, ORG_ECLIPSE_AJDT_ASPECTPATH ); |
593 | 0 | writer.addAttribute( VALUE, Boolean.TRUE.toString() ); |
594 | 0 | writer.endElement(); |
595 | |
|
596 | |
} |
597 | |
|
598 | 6 | if ( dep.isAjdtWeaveDependency() && ( config.getAjdtVersion() >= 1.5 ) ) |
599 | |
{ |
600 | 0 | if ( !attributeElemOpen ) |
601 | |
{ |
602 | 0 | writer.startElement( ATTRIBUTES ); |
603 | 0 | attributeElemOpen = true; |
604 | |
} |
605 | |
|
606 | 0 | writer.startElement( ATTRIBUTE ); |
607 | 0 | writer.addAttribute( NAME, ORG_ECLIPSE_AJDT_INPATH ); |
608 | 0 | writer.addAttribute( VALUE, Boolean.TRUE.toString() ); |
609 | 0 | writer.endElement(); |
610 | |
|
611 | |
} |
612 | |
|
613 | 6 | if ( attributeElemOpen ) |
614 | |
{ |
615 | 6 | writer.endElement(); |
616 | |
} |
617 | 6 | writer.endElement(); |
618 | |
|
619 | 6 | } |
620 | |
|
621 | |
|
622 | |
|
623 | |
|
624 | |
private boolean isAspectJRuntime( IdeDependency dep ) |
625 | |
{ |
626 | 0 | if ( dep.getArtifactId().equals( "aspectjrt" ) ) |
627 | |
{ |
628 | 0 | return dep.getGroupId().equals( "org.aspectj" ) || dep.getGroupId().equals( "aspectj" ); |
629 | |
} |
630 | 0 | return false; |
631 | |
} |
632 | |
} |