# maven-repos
**Repository Path**: modelgroup/maven-repos
## Basic Information
- **Project Name**: maven-repos
- **Description**: No description available
- **Primary Language**: Shell
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 1
- **Forks**: 0
- **Created**: 2017-02-13
- **Last Updated**: 2021-05-15
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# UIDL/EDL开发环境安装
### 安装UIDL/EDL Eclipse 插件
#### 1. 下载eclipse:
[Xtext 2.10 baseline](https://www.eclipse.org/downloads/packages/eclipse-ide-java-and-dsl-developers/neon1)
[Xtext 2.15 baseline]( https://www.eclipse.org/downloads/packages/release/2018-09/r/eclipse-ide-java-and-dsl-developers
)
版本:Eclipse IDE for Java and DSL Developers
#### 2. 安装UIDL/EDL插件:
1. 点击Help -> Install New Software ...
1. Work with:里添加文件edu.fudan.langlab.uidl.repository*.zip/edu.fudan.langl.edl.repository.*zip 文件的绝对路径, 文件在附件里下载。
1. 选择Uidl/Edl Feature, 取消Contact all update sites, 点击Next, 点击Finish. 重启后完成安装。
UIDL和EDL的eclipse最好分开。
### 更新UIDL/EDL Eclipse 插件
如果已经安装过UIDL/EDL插件,更新只需要执行 2.安装UIDL/EDL插件 里面的第三步。
### 配置UIDL/EDL命令行插件
下载 https://gitee.com/modelgroup/maven-repos 到某个目录
```bash
git clone https://gitee.com/modelgroup/maven-repos
```
在~/.m2/setttings.xml里的`profiles`部分里面加上
```xml
uidl-edl-compiler
uidl-plugin-repos
uidl plugin repos
file://_uidl-edl-compiler-path_
uidl-repos
uidl repos
file://_uidl-edl-compiler-path_
```
其中_uidl-compiler-path_替换成`maven-repos/uidl-edl-compiler`的绝对路径。比如
```
file:///home/paul/projects/maven-repos/uidl-edl-compiler
```
并在`activeProfiles`部分激活上面设置
```
uidl-edl-compiler
```
运行UIDL/EDL编译命令:
```
mvn compile -Pxcompile
```
如果老项目xtext.compile.version变量不是2.15.0, 需要设为2.15.0, 或者命令行传入。
```
mvn compile -Pxcompile -Dxtext.compile.version=2.15.0
```
UIDL/EDL工程POM参考:
- [uidl pom](https://gitee.com/modelgroup/maven-plugins/blob/master/uidl2-web-archetype/src/main/resources/archetype-resources/pom.xml)
- [edl pom](https://gitee.com/modelgroup/maven-plugins/blob/master/edl-archetype/src/main/resources/archetype-resources/pom.xml)
### 更新UIDL/EDL命令行插件
在maven-repos目录下执行 (为了防止size过大,每次push当前版本,不保留之前):
```
git fetch --all
git reset --hard origin/master
```
更新后第一次编译UIDL/EDL, 需要在编译命令加后加一次 -U 选项, 后续编译不需要加-U。
```bash
mvn compile -P uidl-edl-compiler,xcompile
```
### 设置maven local repository(UniqueSoft ~/.m2大小限制的情况下)
在公司linux机器上开发,需要将maven local repository设置为/sandbox下。其他情况不需要做这一步。
修改maven安装目录下的conf/settings.xml文件
加上
```xml
/xxxxx/xxx/
```
eclipse设置:
打开preference -> Maven -> User Settings
User Serttings选择配置文件
conf/settings.xml
点击Apply -> OK
### 新建UIDL/EDL工程
参考[archetype工程](https://gitee.com/modelgroup/maven-plugins)说明
导入eclipse:
选择File -> Import -> Existing Projects, 然后选择新建uidl工程的路径导入eclipse。
如果是Uniquesoft linux机器且maven repository设在了/sandbox下,需要在eclipse里打开Help -> Preferences -> Maven -> User Settings, 把User Settings设为maven安装目录下的conf/settings.xml文件,然后点击Apply -> OK
### 运行UIDL工程
启动uidl工程,在uidl工程下运行:
```bash
mvn gwt:run
```
运行的工程需要用下面设置的firefox打开.
点击启动的GWT Development Mode窗口上 Copy to Clipboard,并复制到浏览器地址栏。
### maven runtime依赖
如果自己有runtime所有源代码, 自己编译安装runtime,不需要做这一步。
#### 配置和安装
公司电脑,参考https://gitee.com/modelgroup/maven-repos/wikis/%E4%BD%BF%E7%94%A8artifactory-repository
#### 更新
```
mvn dependency:purge-local-repository -DactTransitively=false -P artifactory
```
现在runtime(v3)和coreui(v3)主题一起更新可以在任何目录下运行脚本:
```
curl https://gitee.com/modelgroup/maven-repos/raw/master/scripts/mvnrefreshartifacts.sh | bash
```
更新特定依赖可以传入参数:
```
curl https://gitee.com/modelgroup/maven-repos/raw/master/scripts/mvnrefreshartifacts.sh | bash -s group:artifact:3.0.0
```
### Firefox
附件里下载firefox和插件(gwt-dev-plugin.xpi),拖动插件到firefox安装。
如需其他版本: https://ftp.mozilla.org/pub/firefox/releases/