Skip to content

Commit

Permalink
Version 0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
lcbarcellos committed Mar 25, 2020
2 parents f9c4f82 + a26f496 commit d921540
Show file tree
Hide file tree
Showing 34 changed files with 1,997 additions and 365 deletions.
134 changes: 89 additions & 45 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>br.ufes.inf.nemo</groupId>
<artifactId>ufo-protege-plugin</artifactId>
<version>0.0.2</version>
<version>0.0.3</version>
<packaging>bundle</packaging>

<name>UFO Protégé Plugin</name>
Expand All @@ -22,12 +22,30 @@
<github.repo.name>ufo-protege-plugin</github.repo.name>
<github.repo.folder>${github.organization}/${github.repo.name}</github.repo.folder>

<gufo.iri>http://purl.org/nemo/gufo#</gufo.iri>

<protege.run.config>${protege.home}/config.xml</protege.run.config>
<protege.osgi></protege.osgi>
<protege.launcher></protege.launcher>

<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<ufo-protege-plugin.update-url>https://raw.githubusercontent.com/nemo-ufes/ufo-protege-plugin/update/update.properties</ufo-protege-plugin.update-url>

<autoupdate.branch>update</autoupdate.branch>
<autoupdate.file>update.properties</autoupdate.file>
<autoupdate.url>https://raw.githubusercontent.com/${github.repo.folder}/${autoupdate.branch}/${autoupdate.file}</autoupdate.url>
<autoupdate.download.url>https://github.com/${github.repo.folder}/releases/download/v${project.version}/${project.build.finalName}.jar</autoupdate.download.url>


<plugin.main.package>br.ufes.inf.nemo.ufo.protege</plugin.main.package>

<validation.main.package>${plugin.main.package}.validation</validation.main.package>
<validation.rules.package>${validation.main.package}.rules</validation.rules.package>
<validation.rules.resource.name>rules.list</validation.rules.resource.name>

<scripts.target.directory>${project.build.directory}/scripts</scripts.target.directory>
<js.generated.sources>${project.build.directory}/generated-sources/rhino</js.generated.sources>
<js.generated.resources>${project.build.directory}/generated-resources/rhino</js.generated.resources>
</properties>

<dependencies>
Expand Down Expand Up @@ -75,7 +93,7 @@
<dependency>
<groupId>org.mozilla</groupId>
<artifactId>rhino</artifactId>
<version>1.7.11</version>
<version>1.7.12</version>
</dependency>
</dependencies>

Expand All @@ -96,7 +114,7 @@
</Include-Resource>
<Export-Package/>
<Embed-Dependency>rsyntaxtextarea,rhino</Embed-Dependency>
<Update-Url>${ufo-protege-plugin.update-url}</Update-Url>
<Update-Url>${autoupdate.url}</Update-Url>
</instructions>
</configuration>
</plugin>
Expand All @@ -105,47 +123,86 @@
<version>3.1.0</version>
<executions>
<execution>
<id>copy-update-files</id>
<phase>package</phase>
<id>copy-script-files</id>
<phase>generate-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/update</outputDirectory>
<outputDirectory>${scripts.target.directory}</outputDirectory>
<resources>
<resource>
<directory>${basedir}/scripts</directory>
<filtering>true</filtering>
<includes>
<include>release.sh</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<configuration>
<mainClass>org.mozilla.javascript.tools.shell.Main</mainClass>
<includePluginDependencies>true</includePluginDependencies>
<includeProjectDependencies>true</includeProjectDependencies>
</configuration>
<executions>
<execution>
<id>generate-sources</id>
<goals>
<goal>java</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<arguments>
<argument>-opt</argument>
<argument>-1</argument>
<argument>${project.build.directory}/scripts/build.js</argument>
</arguments>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>net.sourceforge.owlapi</groupId>
<artifactId>owlapi-osgidistribution</artifactId>
<version>4.5.9</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>restore-permission</id>
<phase>package</phase>
<id>add-generated-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${js.generated.sources}</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-annotation-list</id>
<phase>generate-resources</phase>
<goals>
<goal>run</goal>
<goal>add-resource</goal>
</goals>
<configuration>
<target>
<chmod file="${project.build.directory}/update/release.sh" perm="755"/>
<propertyfile file="${project.build.directory}/update/update.properties">
<entry key="id" value="${project.groupId}.${project.artifactId}"/>
<entry key="version" value="${project.version}"/>
<entry key="download" value="https://github.com/${github.repo.folder}/releases/download/v${project.version}/${project.build.finalName}.jar"/>
<entry key="name" value="${project.name}"/>
</propertyfile>
</target>
<resources>
<resource>
<directory>${js.generated.resources}</directory>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -182,39 +239,26 @@
<version>1.6</version>
<executions>
<execution>
<id>remove-other-versions</id>
<id>install-plugin-on-protege</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- Delete other versions of plugin -->
<delete>
<fileset dir="${protege.home}/plugins" includes="${project.groupId}.*.jar"/>
<fileset dir="${protege.home}/plugins"
includes="${project.groupId}.${project.artifactId}-*.jar"/>
</delete>
<!-- Copy current version to Protégé plugin directory -->
<copy file="${project.build.directory}/${project.build.finalName}.jar"
tofile="${protege.home}/plugins/${project.groupId}.${project.build.finalName}.jar"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.coderplus.maven.plugins</groupId>
<artifactId>copy-rename-maven-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<id>copy-file</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<sourceFile>${project.build.directory}/${project.build.finalName}.jar</sourceFile>
<destinationFile>${protege.home}/plugins/${project.groupId}.${project.build.finalName}.jar</destinationFile>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
Expand Down
Loading

0 comments on commit d921540

Please sign in to comment.