I'm trying to export an Eclipse feature using Tycho, replacing the "Export Wizard" found on the Eclipse overview of the feature. The wizard gives the option for the export destination as a zip file. Is there a way to do the same with Tycho?
In order to build a zip file with the feature and the feature's plug-ins, you need to add a module of the assembly packaging type eclipse-repository to your reactor:
Add an eclipse-repository module with the same parent POM as the
eclipse-feature module (in order to inherit the same target
platform configuration).
Create a category.xml file in the root of the new module with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature id="todo.your.feature.id" />
</site>
Add the new module to your root POM.
Related
I need to add org.json jar to my xtext project.
I found many postings how to add jar to plugin but I dont understand how it works. Can someone provide a listing which steps (detailed) I have to do to achieve my goal?
Thanks in advance
there is no need to add a jar if you simply can install the plugin from eclipse orbit.
If you dont have a target platform
Help -> Install New Software
Add -> https://download.eclipse.org/tools/orbit/downloads/drops/R20190602212107/repository/
select JSON Implementation for Java (type org.json in the filter)
Next, Finish
restart
add org.json to required bundles
If you do have a .target file
add
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.json" version="1.0.0.v201011060100"/>
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20190602212107/repository"/>
</location>
if you really want to add a jar
create lib folder, paste jar
edit build.properties tick lib folder in Binary build
this should add lib/ to bin.includes
open Manifest, go to runtime tab
under classpath click add and select lib/xxxx.jar
if you want to export the package from the plugin add the package under exported package
I have followed the instructions for configuration of multi-module appengine projects here:
https://cloud.google.com/appengine/docs/standard/java/configuration-files
I copied the appengine-application.xml directly from the example provided, changing only the project name to use a Maven property. The file looks like this:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<appengine-application xmlns="http://appengine.google.com/ns/1.0">
<application>${appengine.app.name}</application>
</appengine-application>
My appengine-application.xml file is located in the following directory structure:
projectname-backend/
src/...
pom.xml
projectname-common/
src/...
pom.xml
projectname-ear/
src/
main/
application/
META-INF/
appengine-application.xml
application.xml
MANIFEST.MF
pom.xml
projectname-frontend/
src/...
pom.xml
Even after cleaning the project, Eclipse is throwing this validation error for the file:
cvc-elt.1: Cannot find the declaration of element 'appengine-application'.
Other files, particularly application.xml in the same directory, are fine. So it seems to be namespace issue but I can't find any information on what it should be - this is current example in the Google doco.
Any ideas?
I have a jar file with source code packed.
i inserted the jar in war/WEB-INF/lib/xxx.jar Add to build path
but when i run the project i got an error
Edited Added gwt.xml
<module rename-to='bookmanagementsystem'>
<inherits name='com.google.gwt.user.User'/>
<inherits name='com.google.gwt.user.theme.standard.Standard'/>
<inherits name='com.example.Book'></inherits>
<entry-point class='com.example.Book.client.Index'/>
</module>
Edited
I solved
Plugin failed to connect to Development Mode server at 127.0.0.1:9997
Now i got a problem
Loading inherited module 'com.example.book'
[ERROR] Unable to find 'com/example/book.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
[ERROR] Line 6: Unexpected exception while processing element 'inherits'
If you want to include external jar to GWT then make sure you did the following
check the jar has .gwt.xml file and it must specify the source.
add it to lib folder
configure build path and add jar to libraries
select the jar from Order and Export
inherits this module in your .gwt.xml file
Eg. if you have a package in jar named "sample.source" and your .gwt.xml file in jar is "Source.gwt.xml" and this .gwt.xml file in "sample" folder and classes or entities in "source" folder
Then your current project must inherits it. ie it must have the following tag
<inherits name='sample.Source'/>
Eg :
Sorce.gwt.xml in jar file
<module>
<source path="">
<include name="**/MyEntity.java"/>
</source>
</module>
For reference :http://jonathan.lalou.free.fr/?p=1077
GWT is not supporting serialization in client side so try to use RPC and use these classes from jar in server or you just copy the packages of jar and add to src of gwt project.
OR
I solved the problem the jar files must have java source code along with class files or pack java source code into jar and use.
I am using the rockstarapps plugin for concatenating and compressing/minifying .js files with Google Closure.
I chose the option to rebuild files when a dependency changes but now I would like to change the dependencies, output file, etc... How do I do that?
What does the 'Add to Auto-Building' option do?
thank you,
DM
In the root of your project is an ant build file called .rockstarapps.
This is Xml and human readable.
The output file is specified near the top: <file name="path/to/file.js">
Auto Building: I assume this adds the file to the build section of .rockstarapps
The autobuilding option will only be activated if the files change, to add a new dependency, go to the .rockstarapps file and add up the line necessary, after saving just change some line into any of the dependencies and the file should be compiled with your new dependencies.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<rockstarapps>
<file name="WebContent/js/extlib.core.all.js">
<min>false</min>
<comp>false</comp>
<closureCompiler>false</closureCompiler>
<gZip>false</gZip>
<resolveImports>false</resolveImports>
<urlRewriting>false</urlRewriting>
<autoBuild>true</autoBuild>
<lineLength>-1</lineLength>
<autoTimestamps>false</autoTimestamps>
<removeLogs>false</removeLogs>
<oldFileNames>false</oldFileNames>
<dependencies>
<file>WebContent/ExtLib/core/modernizr.tdm.js</file>
<file>WebContent/ExtLib/core/jquery-1.8.3.js</file>
<file>WebContent/ExtLib/core/custom-tdm-jqm.js</file>
<file>WebContent/ExtLib/core/jquery.mobile-1.3.0.js</file>
<file>WebContent/ExtLib/template/knockout-2.2.1.js</file>
</dependencies>
<properties/>
</file>
</rockstarapps>
I have an ant script that does the tipically: clean, compile, jar, javadocs, etc. I also have 3 projects in Eclipse: a library and 2 projects to test it.
In the build path of this 2 test projects I've defined as external jar the library jar located in the library project.
The library jar has its version in the jar name, i.e. library-0.1.jar. In the ant script I have a property with the version of the library:
<property name="project_version" value="0.1"/>
So to change the version I modify this property and run the script again. As you may deduce this generates a dependency error in the 2 other projects because they will still be pointing to an old file library-0.1.jar.
How can I change automatically the build path of that 2 other projects in Eclipse? Apache ant can do this with a specific tag?
Thanks.
Refer to the version with a variable in all your build files, e.g.
<include name="my-${version}.jar"/>
Now when you execute your builds, you can execute with explict version to match what you require, e.g.
ant -Dversion=1.3
Alternatively, you could load the same properties file in each of your build scripts to load the version property
<property file="version.properties">
Note that if you go with the latter you should remove the property declaration (from you post above) which sets the value explicitly. Either that or load the properties file first.
....
Use sed, e.g. (not tested):
version=2
sed s/value="\d+"/value="$version"/g build.xml
EDIT: Using the method below you will be able to compile using Ant, but eclipse will show you a dependency error in the project explorer because you don't have defined any external jar in the build path panel. To solve this you have to edit the .classpath file that you will see in the project root and add the following line:
<classpathentry kind="lib" path="../Library/bin"/>
Where Library is the folder for Library project and bin the folder for classes.
SOLVED:
I have to write an ant script for the 2 other projects and set the classpath with the script, not with eclipse IDE:
<path id="build-classpath">
<fileset dir="${dist}">
<include name="${project_name}-${project_version}.jar"/>
</fileset>
</path>
${dist} is the folder where is the jar library it's something like: "../Library/dist", where Library is the name of the project.
${project_name} and ${project_version} are loaded from a version.properties file that, again, is stored in "../Library":
<property file="..Library/version.properties"/>
The file version.properties just contains:
project_name=LibraryName
project_version=0.1
Then, to add the classpath when compiling...
<target name="compile" depends="clean, makedir">
<javac srcdir="${src}" destdir="${bin}">
<classpath refid="build-classpath"/>
</javac>
</target>
The refid value is the path id defined previously.