Skip to content

Commit

Permalink
release 2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
raydac committed May 13, 2018
1 parent d0b2d7c commit 6422adb
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 19 deletions.
24 changes: 20 additions & 4 deletions .projectKnowledge/doc_common.mmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Mind Map generated by NB MindMap plugin
> __version__=`1.1`,showJumps=`true`
---

# com\.igormaznitsa<br/>mvn\-golang\-wrapper<br/>2\.1\.8
# com\.igormaznitsa<br/>mvn\-golang\-wrapper<br/>2\.2\.0

## goals
> fillColor=`#00FFCC`
Expand Down Expand Up @@ -112,6 +112,18 @@ Mind Map generated by NB MindMap plugin
> fillColor=`#33FFCC`


#### externalPackageFile
> fillColor=`#33FFCC`


##### $\{mvn\.golang\.get\.packages\.file\}
> fillColor=`#33FFCC`


###### can have value 'none'
> fillColor=`#33FFCC`,mmd.emoticon=`error`


#### \<branch\>
> fillColor=`#33FFCC`

Expand Down Expand Up @@ -280,19 +292,19 @@ Mind Map generated by NB MindMap plugin
> fillColor=`#FFCC00`


#### com\.igormaznitsa:mvn\-golang\-hello:2\.1\.8
#### com\.igormaznitsa:mvn\-golang\-hello:2\.2\.0
> fillColor=`#CCCCFF`


### multi\-module
> fillColor=`#FFCC00`,leftSide=`true`


#### com\.igormaznitsa:mvn\-golang\-hello\-multi:2\.1\.8
#### com\.igormaznitsa:mvn\-golang\-hello\-multi:2\.2\.0
> fillColor=`#CCCCFF`


## common<br/>configuration
## common<br/>configuration<br/>options
> leftSide=`true`


Expand Down Expand Up @@ -336,6 +348,10 @@ Mind Map generated by NB MindMap plugin
> fillColor=`#BDFF9A`


##### $\{mvn\.golang\.go\.version\}
> fillColor=`#BDFF9A`


#### \<goRoot\>
> fillColor=`#BDFF9A`

Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 2.2.0 (SNAPSHOT)
# 2.2.0 (13-may-2018)
- added property `mvn.golang.go.version` to define value for `goVersion` configuration parameter, it allows decrease configuration section dramatically
- added `externalPackageFile` (property `mvn.golang.get.packages.file`) option to the `get` mojo, it allows to keep package list in external file
- default value of the `useMavenProxy` flag is changed to __true__ to make the plugin more compatible with default maven process
Expand Down
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[![License Apache 2.0](https://img.shields.io/badge/license-Apache%20License%202.0-green.svg)](http://www.apache.org/licenses/LICENSE-2.0)
[![Java 7.0+](https://img.shields.io/badge/java-7.0%2b-green.svg)](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
[![Maven central](https://maven-badges.herokuapp.com/maven-central/com.igormaznitsa/mvn-golang-wrapper/badge.svg)](http://search.maven.org/#artifactdetails|com.igormaznitsa|mvn-golang-wrapper|2.1.8|jar)
[![Maven central](https://maven-badges.herokuapp.com/maven-central/com.igormaznitsa/mvn-golang-wrapper/badge.svg)](http://search.maven.org/#artifactdetails|com.igormaznitsa|mvn-golang-wrapper|2.2.0|jar)
[![Maven 3.0.3+](https://img.shields.io/badge/maven-3.0.3%2b-green.svg)](https://maven.apache.org/)
[![PayPal donation](https://img.shields.io/badge/donation-PayPal-red.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AHWJHJFBAWGL2)
[![Yandex.Money donation](https://img.shields.io/badge/donation-Я.деньги-yellow.svg)](http://yasobe.ru/na/iamoss)

![mvn-golang](https://raw.githubusercontent.com/raydac/mvn-golang/master/assets/mvngolang.png)

# Changelog
__2.2.0 (SNAPSHOT)__
__2.2.0 (13-may-2018)__
- added property `mvn.golang.go.version` to define value for `goVersion` configuration parameter, it allows decrease configuration section dramatically, [example](https://github.com/raydac/mvn-golang/tree/master/mvn-golang-examples/mvn-golang-example-termui/pom.xml)
- added `externalPackageFile` (property `mvn.golang.get.packages.file`) option to the `get` mojo, it allows to keep package list in external file, [example](https://github.com/raydac/mvn-golang/tree/master/mvn-golang-examples/mvn-golang-example-termui)
- default value of the `useMavenProxy` flag is changed to __true__ to make the plugin more compatible with default maven process
Expand All @@ -35,15 +35,15 @@ __2.1.7 (18-feb-2018)__
# GO start!
__Taste Go in just two commands!__
```
mvn archetype:generate -B -DarchetypeGroupId=com.igormaznitsa -DarchetypeArtifactId=mvn-golang-hello -DarchetypeVersion=2.1.8 -DgroupId=com.go.test -DartifactId=gohello -Dversion=1.0-SNAPSHOT
mvn archetype:generate -B -DarchetypeGroupId=com.igormaznitsa -DarchetypeArtifactId=mvn-golang-hello -DarchetypeVersion=2.2.0 -DgroupId=com.go.test -DartifactId=gohello -Dversion=1.0-SNAPSHOT
mvn -f ./gohello/pom.xml package
```
it will generate a maven project with extra configuration files to make the project compatible with NetBeans IDE and Intellij IDEA Golang plugin, they can be removed with `mvn clean -Pclean-ide-config`
[Also you can take a look at the example `Hello world` project using the plugin](https://github.com/raydac/mvn-golang-example)

If you want to generate a multi-module project, then you can use such snippet
```
mvn archetype:generate -B -DarchetypeGroupId=com.igormaznitsa -DarchetypeArtifactId=mvn-golang-hello-multi -DarchetypeVersion=2.1.8 -DgroupId=com.go.test -DartifactId=gohello-multi -Dversion=1.0-SNAPSHOT
mvn archetype:generate -B -DarchetypeGroupId=com.igormaznitsa -DarchetypeArtifactId=mvn-golang-hello-multi -DarchetypeVersion=2.2.0 -DgroupId=com.go.test -DartifactId=gohello-multi -Dversion=1.0-SNAPSHOT
```

# Introduction
Expand Down Expand Up @@ -79,7 +79,7 @@ Below described build section for simple golang project which keeps source in `s
<plugin>
<groupId>com.igormaznitsa</groupId>
<artifactId>mvn-golang-wrapper</artifactId>
<version>2.1.8</version>
<version>2.2.0</version>
<extensions>true</extensions>
<configuration>
<goVersion>1.10.1</goVersion>
Expand All @@ -103,7 +103,18 @@ Below described build section for simple golang project which keeps source in `s

# How to work with dependencies?

The Plug-in doesn't work with standard maven dependencies andf they must be defined through task of the plugin, the example of easiest case of dependencies is
Since 2.2.0 version you can dramatically decrease configuration section to work with dependencies, now you can just define some external file contains package info through system property `mvn.golang.get.packages.file`, the file will be loaded and parsed and its definitions will be added into package depedencies.
Format of the file is very easy. Each package described on a line in format `package: <PACKAGE_NAME>[,branch: <BRANCH>][,tag: <TAG>][,revision: <REVISION>]` also it supports single line comments through `//` and directive `#include <FILE_NAME>` to load packages from some external file. Also it supports interpolation of properties defined in format `${property.name}` and provide access to maven, system and environment variables.
Example:
```
// example package file
#include "${basedir}/external/file.txt"
package:github.com/maruel/panicparse,tag:v1.0.2 // added because latest changes in panicparse is incompatible with termui
package:github.com/gizak/termui,branch:v2
```
This mechanism just makes work with dependencies easier and if you want to provide some specific flags and scripts to process CVS folders you have to define configuration parameters in pom.xml, pacages defined in the external file and in the pom.xml will be mixed.

The Plug-in doesn't work with standard maven dependencies and they must be defined through task of the plugin, the example of easiest case of dependencies is
```
<execution>
<id>default-get</id>
Expand Down
Binary file modified assets/doc_common.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion mvn-golang-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.igormaznitsa</groupId>
<artifactId>mvn-golang</artifactId>
<version>2.2.0-SNAPSHOT</version>
<version>2.2.0</version>
</parent>

<artifactId>mvn-golang-examples</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion mvn-golang-hello-multi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.igormaznitsa</groupId>
<artifactId>mvn-golang</artifactId>
<version>2.2.0-SNAPSHOT</version>
<version>2.2.0</version>
</parent>

<groupId>com.igormaznitsa</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<defaultValue>main</defaultValue>
</requiredProperty>
<requiredProperty key="gowrapper">
<defaultValue>2.2.0-SNAPSHOT</defaultValue>
<defaultValue>2.2.0</defaultValue>
</requiredProperty>
<requiredProperty key="gosdk">
<defaultValue>1.10.2</defaultValue>
Expand Down
2 changes: 1 addition & 1 deletion mvn-golang-hello/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.igormaznitsa</groupId>
<artifactId>mvn-golang</artifactId>
<version>2.2.0-SNAPSHOT</version>
<version>2.2.0</version>
</parent>

<groupId>com.igormaznitsa</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<defaultValue>main</defaultValue>
</requiredProperty>
<requiredProperty key="gowrapper">
<defaultValue>2.2.0-SNAPSHOT</defaultValue>
<defaultValue>2.2.0</defaultValue>
</requiredProperty>
<requiredProperty key="gosdk">
<defaultValue>1.10.2</defaultValue>
Expand Down
2 changes: 1 addition & 1 deletion mvn-golang-wrapper/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.igormaznitsa</groupId>
<artifactId>mvn-golang</artifactId>
<version>2.2.0-SNAPSHOT</version>
<version>2.2.0</version>
</parent>

<artifactId>mvn-golang-wrapper</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.igormaznitsa</groupId>
<artifactId>mvn-golang</artifactId>
<version>2.2.0-SNAPSHOT</version>
<version>2.2.0</version>
<packaging>pom</packaging>

<name>mvn-golang</name>
Expand All @@ -13,7 +13,7 @@
<inceptionYear>2016</inceptionYear>

<properties>
<main-project-version>2.2.0-SNAPSHOT</main-project-version>
<main-project-version>2.2.0</main-project-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.build.timestamp.format>yyyyMMddHHmm</maven.build.timestamp.format>
<meta.version>1.1.2</meta.version>
Expand Down

0 comments on commit 6422adb

Please sign in to comment.