Skip to content

Commit b7e531f

Browse files
committed
Optimized the annoying adjustment process in the pom.xml for every new IDEA version.
1 parent d1f1cd1 commit b7e531f

1 file changed

Lines changed: 188 additions & 176 deletions

File tree

pom.xml

Lines changed: 188 additions & 176 deletions
Original file line numberDiff line numberDiff line change
@@ -24,183 +24,195 @@
2424
<project xmlns="http://maven.apache.org/POM/4.0.0"
2525
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2626
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
27-
<modelVersion>4.0.0</modelVersion>
28-
<groupId>org.jetbrains.plugins</groupId>
29-
<artifactId>mathematica-intellij-plugin</artifactId>
30-
<version>1.3.5</version>
31-
<name>Mathematica Support for IntelliJ IDEA</name>
32-
<description>Includes syntax highlighting, function completion, documentation lookup, refactoring, code formatting, etc.</description>
27+
<modelVersion>4.0.0</modelVersion>
28+
<groupId>org.jetbrains.plugins</groupId>
29+
<artifactId>mathematica-intellij-plugin</artifactId>
30+
<version>1.3.5</version>
31+
<name>Mathematica Support for IntelliJ IDEA</name>
32+
<description>Includes syntax highlighting, function completion, documentation lookup, refactoring, code formatting,
33+
etc.
34+
</description>
3335

34-
<properties>
35-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
36-
<idea.version>2016.2.3</idea.version>
37-
<ij.plugin>true</ij.plugin>
38-
</properties>
36+
<properties>
37+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
38+
<idea.ic.source>ideaIC-2016.2.3.tar.gz</idea.ic.source>
39+
<idea.ic.dir>${project.build.directory}/idea-IC</idea.ic.dir>
40+
<ij.plugin>true</ij.plugin>
41+
</properties>
3942

40-
<build>
41-
<resources>
42-
<resource>
43-
<directory>${project.basedir}/resources</directory>
44-
<filtering>true</filtering>
45-
</resource>
46-
</resources>
47-
<finalName>Mathematica-IntelliJ-Plugin</finalName>
48-
<sourceDirectory>src/</sourceDirectory>
49-
<plugins>
50-
<plugin>
51-
<groupId>org.apache.maven.plugins</groupId>
52-
<artifactId>maven-release-plugin</artifactId>
53-
<configuration>
54-
<autoVersionSubmodules>true</autoVersionSubmodules>
55-
<!--<tagNameFormat>v@{project.version}</tagNameFormat>-->
56-
</configuration>
57-
</plugin>
58-
<plugin>
59-
<groupId>org.apache.maven.plugins</groupId>
60-
<artifactId>maven-antrun-plugin</artifactId>
61-
<version>1.7</version>
62-
<executions>
63-
<execution>
64-
<id>download-files</id>
65-
<phase>validate</phase>
66-
<goals>
67-
<goal>run</goal>
68-
</goals>
69-
<configuration>
70-
<target>
71-
<!-- Download IDEA sources which are required to build the plugin-->
72-
<!-- For local testing, I included a copy target below -->
73-
<get src="http://download.jetbrains.com/idea/ideaIC-2016.2.3.tar.gz"
74-
dest="${project.build.directory}"
75-
verbose="true"
76-
usetimestamp="true"/>
77-
<!--<copy file="/home/patrick/tmp/ideaIU-2016.2.3.tar.gz"-->
78-
<!--tofile="${project.build.directory}/ideaIC-15.0.3.tar.gz"-->
79-
<!--verbose="true"/>-->
80-
</target>
81-
</configuration>
82-
</execution>
83-
<execution>
84-
<id>prepare</id>
85-
<phase>validate</phase>
86-
<configuration>
87-
<target>
88-
<echo message="prepare phase"/>
89-
<untar compression="gzip" src="${project.build.directory}/ideaIC-2016.2.3.tar.gz"
90-
dest="${project.build.directory}"/>
91-
</target>
92-
</configuration>
93-
<goals>
94-
<goal>run</goal>
95-
</goals>
96-
</execution>
97-
<execution>
98-
<id>compile-forms</id>
99-
<phase>process-classes</phase>
100-
<goals>
101-
<goal>run</goal>
102-
</goals>
103-
<configuration>
104-
<target>
105-
<path id="maven.plugin.complete.classpath">
106-
<path refid="maven.plugin.classpath"/>
107-
<fileset dir="${project.build.directory}/idea-IC-162.1628.40/lib">
108-
<include name="**/*.jar"/>
109-
</fileset>
110-
</path>
111-
<taskdef name="instrumentIdeaExtensions" classname="com.intellij.ant.InstrumentIdeaExtensions"
112-
classpathref="maven.plugin.complete.classpath"/>
113-
<path id="sourcepath">
114-
<dirset dir="${project.basedir}">
115-
<include name="src"/>
116-
</dirset>
117-
</path>
118-
<instrumentIdeaExtensions destdir="${project.build.outputDirectory}"
119-
extdirs="${project.build.directory}/idea-IC-162.1628.40/lib">
120-
<classpath refid="maven.compile.classpath"/>
121-
<src refid="sourcepath"/>
122-
</instrumentIdeaExtensions>
123-
</target>
124-
</configuration>
125-
</execution>
126-
</executions>
127-
<dependencies>
128-
<dependency>
129-
<!--suppress MavenModelInspection -->
130-
<groupId>com.sun</groupId>
131-
<!--suppress MavenModelInspection -->
132-
<artifactId>tools</artifactId>
133-
<!--suppress MavenModelInspection -->
134-
<version>1.6.0</version>
135-
<scope>system</scope>
136-
<!--suppress MavenModelInspection -->
137-
<systemPath>${env.JAVA_HOME}/lib/tools.jar</systemPath>
138-
<!--<systemPath>/home/patrick/build/share/java/jdk/lib/tools.jar</systemPath>-->
139-
</dependency>
140-
</dependencies>
141-
</plugin>
142-
<plugin>
143-
<groupId>org.apache.maven.plugins</groupId>
144-
<artifactId>maven-dependency-plugin</artifactId>
145-
<configuration>
146-
<outputDirectory>${project.build.directory}/lib/</outputDirectory>
147-
<overWriteReleases>false</overWriteReleases>
148-
<overWriteSnapshots>false</overWriteSnapshots>
149-
<overWriteIfNewer>true</overWriteIfNewer>
150-
</configuration>
151-
<executions>
152-
<execution>
153-
<id>copy-dependencies</id>
154-
<phase>package</phase>
155-
<goals>
156-
<goal>copy-dependencies</goal>
157-
</goals>
158-
</execution>
159-
</executions>
160-
</plugin>
161-
<plugin>
162-
<groupId>org.apache.maven.plugins</groupId>
163-
<artifactId>maven-compiler-plugin</artifactId>
164-
<version>2.5.1</version>
165-
<configuration>
166-
<compilerArguments>
167-
<extdirs>${project.build.directory}/idea-IC-162.1628.40/lib/</extdirs>
168-
</compilerArguments>
169-
<source>1.6</source>
170-
<target>1.6</target>
171-
</configuration>
172-
</plugin>
173-
<plugin>
174-
<artifactId>maven-assembly-plugin</artifactId>
175-
<version>2.2.1</version>
176-
<configuration>
177-
<descriptors>
178-
<descriptor>assembly.xml</descriptor>
179-
</descriptors>
180-
</configuration>
181-
<executions>
182-
<execution>
183-
<id>assembly everything</id>
184-
<phase>package</phase>
185-
<goals>
186-
<goal>single</goal>
187-
</goals>
188-
</execution>
189-
</executions>
190-
</plugin>
191-
</plugins>
192-
</build>
43+
<build>
44+
<resources>
45+
<resource>
46+
<directory>${project.basedir}/resources</directory>
47+
<filtering>true</filtering>
48+
</resource>
49+
</resources>
50+
<finalName>Mathematica-IntelliJ-Plugin</finalName>
51+
<sourceDirectory>src/</sourceDirectory>
52+
<plugins>
53+
<plugin>
54+
<groupId>org.apache.maven.plugins</groupId>
55+
<artifactId>maven-release-plugin</artifactId>
56+
<configuration>
57+
<autoVersionSubmodules>true</autoVersionSubmodules>
58+
<!--<tagNameFormat>v@{project.version}</tagNameFormat>-->
59+
</configuration>
60+
</plugin>
61+
<plugin>
62+
<groupId>org.apache.maven.plugins</groupId>
63+
<artifactId>maven-antrun-plugin</artifactId>
64+
<version>1.7</version>
65+
<executions>
66+
<execution>
67+
<id>download-files</id>
68+
<phase>validate</phase>
69+
<goals>
70+
<goal>run</goal>
71+
</goals>
72+
<configuration>
73+
<target>
74+
<!-- Download IDEA sources which are required to build the plugin-->
75+
<!-- For local testing, I included a copy target below -->
76+
<echo message="Downloading ${idea.ic.source} to ${project.build.directory}"/>
77+
<get src="http://download.jetbrains.com/idea/${idea.ic.source}"
78+
dest="${project.build.directory}"
79+
verbose="false"
80+
usetimestamp="true"/>
19381

194-
<pluginRepositories>
195-
<pluginRepository>
196-
<id>sonatype-public-repository</id>
197-
<url>https://oss.sonatype.org/content/groups/public</url>
198-
<snapshots>
199-
<enabled>true</enabled>
200-
</snapshots>
201-
<releases>
202-
<enabled>true</enabled>
203-
</releases>
204-
</pluginRepository>
205-
</pluginRepositories>
82+
83+
<!--<copy file="/home/patrick/Software/intellij/${idea.ic.source}"-->
84+
<!--tofile="${project.build.directory}/${idea.ic.source}"-->
85+
<!--verbose="true"/>-->
86+
</target>
87+
</configuration>
88+
</execution>
89+
<execution>
90+
<id>prepare</id>
91+
<phase>validate</phase>
92+
<configuration>
93+
<target>
94+
<echo message="unpacking ${idea.version}"/>
95+
<untar compression="gzip" src="${project.build.directory}/${idea.ic.source}"
96+
dest="${project.build.directory}"/>
97+
<exec executable="sh">
98+
<arg value="-c"/>
99+
<arg value="mv ${project.build.directory}/idea-IC-* ${idea.ic.dir}"/>
100+
</exec>
101+
</target>
102+
</configuration>
103+
<goals>
104+
<goal>run</goal>
105+
</goals>
106+
</execution>
107+
<execution>
108+
<id>compile-forms</id>
109+
<phase>process-classes</phase>
110+
<goals>
111+
<goal>run</goal>
112+
</goals>
113+
<configuration>
114+
<target>
115+
<path id="maven.plugin.complete.classpath">
116+
<path refid="maven.plugin.classpath"/>
117+
<fileset dir="${idea.ic.dir}/lib">
118+
<include name="**/*.jar"/>
119+
</fileset>
120+
</path>
121+
<taskdef name="instrumentIdeaExtensions"
122+
classname="com.intellij.ant.InstrumentIdeaExtensions"
123+
classpathref="maven.plugin.complete.classpath"/>
124+
<path id="sourcepath">
125+
<dirset dir="${project.basedir}">
126+
<include name="src"/>
127+
</dirset>
128+
</path>
129+
<instrumentIdeaExtensions destdir="${project.build.outputDirectory}"
130+
extdirs="${idea.ic.dir}/lib">
131+
<classpath refid="maven.compile.classpath"/>
132+
<src refid="sourcepath"/>
133+
</instrumentIdeaExtensions>
134+
</target>
135+
</configuration>
136+
</execution>
137+
</executions>
138+
<dependencies>
139+
<dependency>
140+
<!--suppress MavenModelInspection -->
141+
<groupId>com.sun</groupId>
142+
<!--suppress MavenModelInspection -->
143+
<artifactId>tools</artifactId>
144+
<!--suppress MavenModelInspection -->
145+
<version>1.6.0</version>
146+
<scope>system</scope>
147+
<!--suppress MavenModelInspection -->
148+
<systemPath>${env.JAVA_HOME}/lib/tools.jar</systemPath>
149+
150+
<!--<systemPath>/home/patrick/build/share/java/jdk/lib/tools.jar</systemPath>-->
151+
</dependency>
152+
</dependencies>
153+
</plugin>
154+
<plugin>
155+
<groupId>org.apache.maven.plugins</groupId>
156+
<artifactId>maven-dependency-plugin</artifactId>
157+
<configuration>
158+
<outputDirectory>${project.build.directory}/lib/</outputDirectory>
159+
<overWriteReleases>false</overWriteReleases>
160+
<overWriteSnapshots>false</overWriteSnapshots>
161+
<overWriteIfNewer>true</overWriteIfNewer>
162+
</configuration>
163+
<executions>
164+
<execution>
165+
<id>copy-dependencies</id>
166+
<phase>package</phase>
167+
<goals>
168+
<goal>copy-dependencies</goal>
169+
</goals>
170+
</execution>
171+
</executions>
172+
</plugin>
173+
<plugin>
174+
<groupId>org.apache.maven.plugins</groupId>
175+
<artifactId>maven-compiler-plugin</artifactId>
176+
<version>2.5.1</version>
177+
<configuration>
178+
<compilerArguments>
179+
<extdirs>${idea.ic.dir}/lib/</extdirs>
180+
</compilerArguments>
181+
<source>1.6</source>
182+
<target>1.6</target>
183+
</configuration>
184+
</plugin>
185+
<plugin>
186+
<artifactId>maven-assembly-plugin</artifactId>
187+
<version>2.2.1</version>
188+
<configuration>
189+
<descriptors>
190+
<descriptor>assembly.xml</descriptor>
191+
</descriptors>
192+
</configuration>
193+
<executions>
194+
<execution>
195+
<id>assembly everything</id>
196+
<phase>package</phase>
197+
<goals>
198+
<goal>single</goal>
199+
</goals>
200+
</execution>
201+
</executions>
202+
</plugin>
203+
</plugins>
204+
</build>
205+
206+
<pluginRepositories>
207+
<pluginRepository>
208+
<id>sonatype-public-repository</id>
209+
<url>https://oss.sonatype.org/content/groups/public</url>
210+
<snapshots>
211+
<enabled>true</enabled>
212+
</snapshots>
213+
<releases>
214+
<enabled>true</enabled>
215+
</releases>
216+
</pluginRepository>
217+
</pluginRepositories>
206218
</project>

0 commit comments

Comments
 (0)