deploy xtext language as maven artifact [message #1758472] |
Tue, 28 March 2017 22:42  |
Eclipse User |
|
|
|
Hi,
I tried deploying an xtext language as maven artifacts, but the project that uses the DSL cannot be compiled by maven, .
I experiemented with https://github.com/xtext/maven-xtext-example.
1. Added the following distribution configuration in my.mavenized.herolanguage.releng/pom.xm:
<distributionManagement>
<repository>
<id>internal.repo</id>
<name>Local repo</name>
<url>file:///Users/paul/Downloads/maven-xtext-example/deployed</url>
</repository>
</distributionManagement>
2. run : mvn deploy under my.mavenized.herolanguage.releng
3. The deploy directory (/Users/paul/Downloads/maven-xtext-example/deployed) looks like:
└── my
└── mavenized
└── herolanguage
├── my.mavenized.herolanguage
│ ├── 1.0.0-SNAPSHOT
│ │ ├── maven-metadata.xml
│ │ ├── maven-metadata.xml.md5
│ │ ├── maven-metadata.xml.sha1
│ │ ├── my.mavenized.herolanguage-1.0.0-20170329.022618-1-p2artifacts.xml
│ │ ├── my.mavenized.herolanguage-1.0.0-20170329.022618-1-p2artifacts.xml.md5
│ │ ├── my.mavenized.herolanguage-1.0.0-20170329.022618-1-p2artifacts.xml.sha1
│ │ ├── my.mavenized.herolanguage-1.0.0-20170329.022618-1-p2metadata.xml
│ │ ├── my.mavenized.herolanguage-1.0.0-20170329.022618-1-p2metadata.xml.md5
│ │ ├── my.mavenized.herolanguage-1.0.0-20170329.022618-1-p2metadata.xml.sha1
│ │ ├── my.mavenized.herolanguage-1.0.0-20170329.022618-1.jar
│ │ ├── my.mavenized.herolanguage-1.0.0-20170329.022618-1.jar.md5
│ │ ├── my.mavenized.herolanguage-1.0.0-20170329.022618-1.jar.sha1
│ │ ├── my.mavenized.herolanguage-1.0.0-20170329.022618-1.pom
│ │ ├── my.mavenized.herolanguage-1.0.0-20170329.022618-1.pom.md5
│ │ └── my.mavenized.herolanguage-1.0.0-20170329.022618-1.pom.sha1
4. in exampl-project, I added the deploy directory in the pom:
+ <repositories>
+ <repository>
+ <id>localrepository</id>
+ <url>file:///Users/paul/Downloads/maven-xtext-example/deployed</url>
+ </repository>
+ </repositories>
5. Then in example-project, run: mvn compile, the error is:
[ERROR] Failed to execute goal org.eclipse.xtext:xtext-maven-plugin:2.11.0:generate (default) on project example-project: Execution default of goal org.eclipse.xtext:xtext-maven-plugin:2.11.0:generate failed: Plugin org.eclipse.xtext:xtext-maven-plugin:2.11.0 or one of its dependencies could not be resolved: Could not find artifact my.mavenized.herolanguage:my.mavenized.herolanguage:jar:1.0.0-SNAPSHOT ->
Is it the appropriate way of deploying a xtext language ?
I was able to compile the example if I install the language locally by exectuing : mvn install in the releng directory.
One difference I note is the local jar in ~/.m2 is
~/.m2/repository/my/mavenized/herolanguage/my.mavenized.herolanguage/1.0.0-SNAPSHOT/my.mavenized.herolanguage-1.0.0-SNAPSHOT.jar
as compared to the deployed jar
my.mavenized.herolanguage-1.0.0-20170329.022618-1.jar
Thanks
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03767 seconds