How to Configure Rock Star Apps plugin in Eclipse for Concatenating and Compressing Javascripts - eclipse

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>

Related

How to build a feature to a zip file using Tycho

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.

Joomla 3.1.4 ,JInstaller: :Install: Cannot find Joomla XML setup file,error

I have setup already joomla 3.1.4 and I tried to install a plugin,But Im getting this error:
JInstaller: :Install: Cannot find Joomla XML setup file
This is my xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE install PUBLIC "-//Joomla! 1.5//DTD template 1.0//EN" "http://www.joomla.org/xml/dtd/1.5/template-install.dtd">
<extension version="3.1" type="plugin" group="content" client="myjoomlasite">
<name>plg_content_helloworld</name>
<author>Tahsin Çetin</author>
<creationDate>July 27th,2013</creationDate>
<copyright>Tahsin Çetin</copyright>
<licence>GNU General Public License</licence>
<authorEmail>tcetin#yandex.com</authorEmail>
<authorUrl>http://tahsincetin.com</authorUrl>
<version>1.1.0</version>
<description>Simple Hello World plugin</description>
<files>
<filename plugin="helloworld">helloworld.php</filename>
<filename>index.html</filename>
<filename>helloworld.xml</filename>
</files>
</extension>
You do not need to specify "helloworld.xml" in your xml file.Remove file and install again.This will be your final xml file-
<?xml version="1.0" encoding="UTF-8"?>
<extension version="3.1" type="plugin" group="content" client="myjoomlasite">
<name>plg_content_helloworld</name>
<author>Tahsin Çetin</author>
<creationDate>July 27th,2013</creationDate>
<copyright>Tahsin Çetin</copyright>
<licence>GNU General Public License</licence>
<authorEmail>tcetin#yandex.com</authorEmail>
<authorUrl>http://tahsincetin.com</authorUrl>
<version>1.1.0</version>
<description>Simple Hello World plugin</description>
<files>
<filename plugin="helloworld">helloworld.php</filename>
<filename>index.html</filename>
</files>
</extension>
Hope this will help.
The "Cannot find Joomla XML setup file" usually means you are trying to install an extension that wasn't designed for the version of Joomla you are installing to.
Read more here
In your opening <extension> tag, you do not need to specify a client attribute.
Where is the XML file in relation to your ZIP package? If it isn't at the top level of the ZIP, it won't be found.
Generally when this happens something is wrong with the XML file. If you have made any changes, try to think where those changes were and find a problem with the XML file.
Problems could be:
No opening or closing tag. Closing tags are easy to miss. Count them, make sure there's an opening and a closing tag.
Duplicated tags. It's easy to add two labels or showons for example, especially if you are copying and pasting.
Space before the opening XML tag
No closing fieldset tag
No closing extension or config tag. Easily deleted if you are replacing the file
You can easily use a tool like this:
https://www.w3schools.com/xml/xml_validator.asp
Which will help you to find issues such as missing opening and closing tags.

Setting -XdisableCastChecking to true

I need to set -XdisableCastChecking to true for building a GWT application (with Eclipse).
I know how to do it to compile the application but I'm not able to set -XdisableCastChecking to true for building the war file (I'm using a build.xml and file).
Does anybody know how to include this flag into the ant file?
Thank you in advance.
Alsila
If you are using a standard build.xml generated with the wepAppCreator, you should have at the top of your build.xml something like the block below. Modify the gwt.args line adding the arguments you want to pass to the gwt compiler:
<?xml version="1.0" encoding="utf-8" ?>
<project name="myproject" default="build" basedir=".">
<!-- Arguments to gwtc and devmode targets -->
<property name="gwt.args" value="-XdisableCastChecking" />
[...]

Log4j2.xml file not being seen when using NetBeans

I'm having a problem with my logj2.xml being seen on my Windows7/64 box running Java 1.7.0_13/64. I'm trying to run the application using the NetBeans/64 7.2.1 IDE via the debugger.
log4j2.xml is sitting in my r:\ directory. The (user)classpath is ".;r:\". It is apparently not being seen, because when I look at the 'config.config.name' of the Logger in my debugger, it gives me the value of 'Default'. Also, I can't find the file specified in the log4j2.xml file anywhere, on any drive, of my machine. I've also looked for any new files containing the word 'default' on my machine, and can find none that are current.
So I suspect I'm doing 1 of 2 things wrong:
1) Setting my classpath incorrectly.
2) Putting my log4j2.xml file together incorrectly.
Any help would be appreciated. My keys are getting sticky from banging them with my forehead.
Here's the config file:
<?xml version="1.0" encoding="UTF-8"?>
<configuration status="debug" name="xxx" packages="" >
<appenders>
<RollingFile name="log" fileName="qqq.log"
immediateFlush="true" filePattern="qqq-%d{yyyy-MM-dd}.log">
<PatternLayout>
<pattern>"%d{YYYY-MM-dd HH:mm:ss} [%t] %-5level %logger{36} - %n%msg%n%n%n"</pattern>
</PatternLayout>
<Policies>
<TimeBasedTriggeringPolicy />
<SizeBasedTriggeringPolicy />
</Policies>
<DefaultRolloverStrategy max="92"/>
</RollingFile>
</appenders>
<loggers>
<root level="trace">
<appender-ref ref="log"/>
</root>
</loggers>
</configuration>
Ok, got it. I've renamed this question to include NetBeans, because that was the gist of my problem.
As a review, it is required that the log4j2.xml file needs to go on the classpath. While I could affect the classpath in netbeans by adding jar files to the project, I didn't initially think about finding a config file on the classpath. Anyway, once I realized that, I played around a bit in project properties, and finally figured out that just adding the folder to the 'Compile-time libraries' dialog ( in this case "r:\" ) puts the config file on the classpath, and my logging works just like it should.
Whew!
Hope this helps someone.
Thanks joe7pak, your posts were the last piece of the puzzle to solve my log4j properties problem in NetBeans. My problem required a couple extra steps that may help round this solution out.
First, I created a log4j.xml file in the src directory using the default xml from http://wiki.apache.org/logging-log4j/Log4jXmlFormat.
I then set the NetBeans VM options in Properties\Run to: -Dlog4j.debug. I noticed that a jar's (httpbuilder) log4j.xml file was being loaded by default instead of mine.
So I added the src folder to the compile time libraries in Properties\Libraries using your recommendation. However, it was still loading the log4j.xml file from the jar.
The final touch was to move the src folder to the top of the compile time libraries.
Thanks for your post and for answering yourself.

Plugin JARs are missing in an application built with Tycho

I am building an Eclipse application with Maven Tycho. I managed to create the pom files for building the plugins and features. I ran install on them and got Build successful. I have also cretaed the pom for the application (product) and set the Packaging to "eclipse-application". The application is feature-based. I ran install and got the Build successful. I got the generated folder for the application, containing the folders "plugins" and "features".
The problem is that not all the jar files, for all the plugins, can be found in the plugins folder. I can find the jar files for the plugins that are listed in the features. But the jar files for the plugins listed in the Dependencies tab of other plugins are not generated. In other words, only the plugins referenced in the features are generated as jar files, while the jar files for the ones referenced in the plugins are not generated.
Obviously, I cannot run the application without them. What am I doing wrong? How can I get all the required jar files generated?
Thank you!
Firstly, don't use eclipse-application. It has been deprecated, and, being someone that has tried to make it work with his own projects, I can tell you that it's a bad idea as it has a lot of problems. Instead, use eclipse-repository.
Secondly, the only .jar files that will show up in your products plugins directory will be ones that have compiled successfully, and are also in the dependencies section of your .product file, and not your manifest.mf.
I suspect that your problem is related to the second point, but I've seen eclipse-application do so many odd things that it alone might resolve your issue.
The first answer is on the right track... Use eclipse-repository.
To have Tycho generate a repository, you are probably using the tycho-p2-repository-plugin ... And if you're using that plugin, then you may want to add this little element to the configuration section.
<includeAllDependencies>true</includeAllDependencies>
Here's a larger sample of my pom.xml that's in my p2repository plugin.
<?xml version="1.0" encoding="UTF-8"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>my.domain.product</groupId>
<artifactId>parent</artifactId>
<version>1.1.8-SNAPSHOT</version>
<relativePath>../my.domain.product.parent</relativePath>
</parent>
<artifactId>my.domain.product.p2repository</artifactId>
<packaging>eclipse-repository</packaging>
<name>My Product - P2 Repository</name>
<build>
<plugins>
<plugin>
<groupId>${tycho-groupid}</groupId>
<artifactId>tycho-p2-repository-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<includeAllDependencies>true</includeAllDependencies>
<createArtifactRepository>true</createArtifactRepository>
<compress>true</compress>
</configuration>
</plugin>
</plugins>
Hope this helps.