Tapestry : no pop up error - css

I'm working on a Tapestry project.
Before, when I forgot a field in a form, I got a beautiful mistake in a pop-up. But since I imported jQuery, the errors are not in pop-up, but next to the fields.
This is my import :
<dependency>
<groupId>org.got5</groupId>
<artifactId>tapestry5-jquery</artifactId>
<version>3.3.0</version>
</dependency>
<repository>
<id>apache-staging</id>
<url>https://repository.apache.org/content/groups/staging/</url>
</repository>
<repository>
<id>devlab722-repo</id>
<url>http://nexus.devlab722.net/nexus/content/repositories/releases
</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>devlab722-snapshot-repo</id>
<url>http://nexus.devlab722.net/nexus/content/repositories/snapshots
</url>
<releases>
<enabled>false</enabled>
</releases>
</repository>
Does anyone had this problem?
Thank you.

I found the solution to my problem here:
https://groups.google.com/forum/#%21topic/tapestry5-jquery/jqHyY0JCz-c
In the AppModule.java, I added this :
configuration.add(JQuerySymbolConstants.SUPPRESS_PROTOTYPE, "false");
configuration.add(JQuerySymbolConstants.JQUERY_ALIAS, "$j");
in the contributeApplicationDefaults function

I'm glad you liked the Tapestry error popups from prior releases ... I suspect you are the only one who liked them; I'm afraid once you upgrade to 5.4 they are gone for good.

Related

Spring Boot - java.lang.ClassNotFoundException: org.springframework.context.ApplicationContextInitializer

I am trying to deploy a simple Spring Boot web app to Pivotal Cloud foundry, but I get the below error in my logs when i perform a cf push
java.lang.ClassNotFoundException: org.springframework.context.ApplicationContextInitializer
Here is my pom.xml
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.0.BUILD-SNAPSHOT</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.7</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc-portlet</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
The same app gets deployed in my local host and I have no issues building the war. Any thoughts on this ?
As Andy Wilkinson pointed out, this is an issue in a mismatch between Spring Boot 1.4 and the java_buildpack. It can be solved by explicitly mentioning the URL to the java_buildpack:
$ cf push -b https://github.com/cloudfoundry/java-buildpack.git …
Seems like a jar did not download during the maven build due to an SSL handshake exception. For some reason my build did not fail in spite of the missing jar. Found this by enabling debug during the mvn clean install

Issue with downloading Pentaho Kettle jar files from repository

I am trying to download kettle jars from the following repository in Maven:
<repository>
<id>pentaho-rep</id>
<url>http://maven-repository.com/artifact/pentaho-kettle/</url>
</repository>
but get following file format error during maven build:
.m2\repository\pentaho\kettle\kettle-core\5.3.0.0-200\kettle-core-5.3.0.0-200.jar; error in opening zip file
I tried deleting .m2, also tried other kettle versions, etc. but same problem. It is not clear to me if the repository is corrupted, or some other issue. Any suggestions or alternate repo location I can use (that contains kettle 5.2 version and above)? There is not much useful help available on Pentaho site or forum on this. Thanks.
I don't believe we publish our JARs to maven-repository.com. Try our official repository: http://nexus.pentaho.org/content/groups/omni
I have used the below repo. for getting the files.
<repository>
<id>pentaho-releases</id>
<url>http://repository.pentaho.org/artifactory/repo/</url>
</repository>
It may not be the official pentaho repository. But it worked for me. You may check this ref. blog.
Hope it might help you too :)
Thanks, the following worked for me:
<repositories>
<repository>
<id>pentaho-releases</id>
<url>http://repository.pentaho.org/artifactory/repo/</url>
</repository>
</repositories>
<properties>
<pentaho.kettle.version>5.3.0.0-200</pentaho.kettle.version>
</properties>
<dependencies>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-core</artifactId>
<version>${pentaho.kettle.version}</version>
</dependency>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-engine</artifactId>
<version>${pentaho.kettle.version}</version>
</dependency>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-ui-swt</artifactId>
<version>${pentaho.kettle.version}</version>
</dependency>
</dependencies>

Maven: how to setup my pom.xml so that it can fetch dependencies via HTTP and deploy module via FTP

I'm trying to setup the pom.xml for one of my projects. And I can't figure out how to make it fetch dependencies via HTTP, but deploy new artifacts via FTP.
Here's the situation. I have a multi-module project on which I am working collaboratively with some other people. I also happen to rent a cheap web server that could allow me to share release and snapshot versions of some of my modules via a maven repository.
I want deployment to the repository to be authenticated (so that only authorized people can write to it) and to be done via FTP.
On the other hand, I want everyone to be able to download the published version of the artifacts anonymously via HTTP.
So far, the only thing I found was to add the following section to my pom.xml
<distributionManagement>
<snapshotRepository>
<id>my.repo.snapshots</id>
<name>My Repository - Snapshots</name>
<url>${url}/snapshots</url>
</snapshotRepository>
<repository>
<id>my.repo.releases</id>
<name>My Repository - Releases</name>
<url>${url}/releases</url>
</repository>
</distributionManagement>
The problem with this setup is that it doesn't let me pick FTP for upload and HTTP for download.
Is there any way to configure my pom.xml to do that?
Turns out the solution was right under my nose. The repositories for deploying artifacts are indeed configured through <distributionManagement/>, but repositories for fetching artifacts are configured through the <repositories> element in the <profiles> section.
My working pom.xml configuration now includes:
<distributionManagement>
<repository>
<id>deploy.releases</id>
<name>Repository - Releases</name>
<url>ftp://ftp.domain.com/releases/</url>
</repository>
<snapshotRepository>
<id>deploy.snapshots</id>
<name>Repository - Snapshots</name>
<url>ftp://ftp.domain.com/snapshots/</url>
</snapshotRepository>
</distributionManagement>
<profiles>
<profile>
<id>project.default</id>
<activation>
<property>
<name>!skipProjectDefaultProfile</name>
</property>
</activation>
<repositories>
<repository>
<id>repo.releases</id>
<url>http://maven.domain.com/releases/</url>
</repository>
<repository>
<id>repo.snapshots</id>
<url>http://maven.domain.com/snapshots/</url>
</repository>
</repositories>
</profile>
</profiles>
on top of that, my settings.xml contains the authentication information for FTP
<servers>
<server>
<id>deploy.releases</id>
<username>user</username>
<password>pass</password>
</server>
<server>
<id>deploy.snapshots</id>
<username>user</username>
<password>pass</password>
</server>
</servers>

ImageJ as JAR library

I tried to google this, looking for code examples but I had no luck.
Anyone knows a place where I can find a tutorial or just examples on how to use Imagej in Java to open and process images?
I was able to get ImageJ in a Jar
What I'd like to do is make a simple image difference processor
Thanks for your help and time
There are two major versions of ImageJ you can program against: the original ImageJ 1.x, and the still-in-beta ImageJ2.
Either way, I strongly suggest structuring your code as a Maven project. By doing this, you avoid manually managing JAR files, and can develop your project in any Maven-enabled IDE (Eclipse, NetBeans, IDEA, etc.) or from the command line.
The ImageJ artifacts (for either v1 or v2) are not yet available on Maven Central, but will be soon. Until then, you'll need to add a <repository> reference to maven.imagej.net. Here is a sample snippet for your pom.xml:
<parent>
<groupId>org.scijava</groupId>
<artifactId>pom-scijava</artifactId>
<version>1.15</version>
</parent>
...
<dependencies>
<dependency>
<groupId>net.imagej</groupId>
<artifactId>ij</artifactId>
<version>${imagej1.version}</version>
</dependency>
</dependencies>
...
<!-- NB: for project parent -->
<repositories>
<repository>
<id>imagej.releases</id>
<url>http://maven.imagej.net/content/repositories/releases</url>
</repository>
</repositories>
Or if you want to depend on ImageJ2:
<dependency>
<groupId>net.imagej</groupId>
<artifactId>ij-app</artifactId>
<version>${imagej.version}</version>
</dependency>
For documentation of ImageJ1, ImageJ2 and related projects including many of their dependencies, see the javadoc at:
http://javadoc.imagej.net/
For tutorials on how to use ImageJ2, see:
https://github.com/imagej/imagej-tutorials
And for more information on programming against ImageJ1, see:
http://imagej.net/developer/

Compiling multiple .as files using Maven

I am having issues getting maven to do a simple clean install I am getting the following error:
Failed to execute goal org.sonatype.flexmojos:flexmojos-maven-plugin:3.8:compile-swf (default-compile-swf) on project flex: Source file not expecified and no default found! -> [Help 1]
I was following the tutorial on this site: Adobe Developer Connection - Flex and Maven
I have all of my .as files located in: src/main/flex/ but the problem is that I don't have a Main class, these are all basically interfaces so I can't just choose one of them to be the source file.
I have Eclipse installed as well, and it is yelling at me for the plugin part of the POM, saying:
Multiple annotations found at this line:
- Plugin execution not covered by lifecycle configuration: org.sonatype.flexmojos:flexmojos-maven-plugin:
3.8:compile-swf (execution: default-compile-swf, phase: compile)
- Plugin execution not covered by lifecycle configuration: org.sonatype.flexmojos:flexmojos-maven-plugin:
3.8:test-compile (execution: default-test-compile, phase: test-compile)
So I am not sure if this is related or not, but I have tried to copy/paste the code from the link above verbatim but I still get that error and the guy never mentions anything about it, so perhaps it's just a bug in the maven plugin in Eclipse.
Here is my POM.xml file:
<?xml version="1.0"?>
<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>com.company</groupId>
<artifactId>parent</artifactId>
<version>1.0</version>
</parent>
<artifactId>flex</artifactId>
<name>flex</name>
<packaging>swf</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.company</groupId>
<artifactId>common</artifactId>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>flex-framework</artifactId>
<version>3.6.0.16995</version>
<type>pom</type>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main/flex</sourceDirectory>
<plugins>
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<extensions>true</extensions>
<dependencies>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>compiler</artifactId>
<version>3.6.0.16995</version>
<type>pom</type>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
I am open to ANY ideas on how to get this to compile these .as files. Thank you!
Edit: Okay I figured it out. I changed the packaging from swf to swc and it works. So very sad.
I converted the package from swf to swc and it worked like a champ. Hopefully this helps someone in the future.
you need the configuration tag so flexmojos knows where to start the build. (default application, or main class)
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<extensions>true</extensions>
<dependencies>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>compiler</artifactId>
<configuration>
<sourceFile>Module.mxml</sourceFile>
</configuration>
<version>3.6.0.16995</version>
<type>pom</type>
</dependency>
</dependencies>
</plugin>

Resources