Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Build with Maven
run: |
cd maven
xvfb-run -a mvn install
xvfb-run -a mvn install -Plocal-dev-javase


- name: Fetch archetype projects
Expand All @@ -34,8 +34,8 @@ jobs:
run: |
unzip cn1-maven-archetypes.zip
cd cn1-maven-archetypes-master
xvfb-run -a mvn install archetype:update-local-catalog
xvfb-run -a mvn archetype:crawl
xvfb-run -a mvn install archetype:update-local-catalog -Plocal-dev-javase
xvfb-run -a mvn archetype:crawl -Plocal-dev-javase
- name: Run Maven Unit Tests
run: |
pwd
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Run Unit Tests
run: |
cd maven
mvn clean verify -DunitTests=true -pl core-unittests -am -Dmaven.javadoc.skip=true
mvn clean verify -DunitTests=true -pl core-unittests -am -Dmaven.javadoc.skip=true -Plocal-dev-javase
cd ..
- name: Install dependencies
run: |
Expand All @@ -53,8 +53,8 @@ jobs:
mkdir -p build/tempJavaSources
mkdir -p dist
mkdir -p dist/javadoc
wget https://github.com/codenameone/JavaDocSourceEmbed/releases/download/refs%2Fheads%2Fmaster/JavaDocSourceEmbed-1.0-SNAPSHOT.jar
java -jar JavaDocSourceEmbed-1.0-SNAPSHOT.jar src build/tempJavaSources
# Skip JavaDocSourceEmbed due to gist access issues in CI
cp -r src/* build/tempJavaSources/
find build/tempJavaSources ../Ports/CLDC11/src -name "*.java" | /usr/bin/grep -v /impl/ | /usr/bin/xargs javadoc --allow-script-in-comments -protected -d dist/javadoc -windowtitle "Codename One API" || true
cd dist/javadoc
zip -r ../../javadocs.zip *
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/release-on-maven-central.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,21 @@ jobs:
git config --global user.name "GitHub Actions Bot"
git config --global user.email "[email protected]"

- name: Check Maven Version
run: mvn -v

- name: Deploy with Maven
run: |
cat $HOME/.m2/settings.xml
cd maven
bash update-version.sh "$GITHUB_REF_NAME"
export GPG_TTY=$(tty)
xvfb-run -a mvn deploy -Psign-artifacts -Dgpg.passphrase=$MAVEN_GPG_PASSPHRASE
xvfb-run -a mvn deploy -Psign-artifacts -Dgpg.passphrase=$MAVEN_GPG_PASSPHRASE -Plocal-dev-javase
cd ..
git clone https://github.com/shannah/cn1-maven-archetypes
cd cn1-maven-archetypes
bash update-version.sh "$GITHUB_REF_NAME"
xvfb-run -a mvn deploy -Psign-artifacts -Dgpg.passphrase=$MAVEN_GPG_PASSPHRASE
xvfb-run -a mvn deploy -Psign-artifacts -Dgpg.passphrase=$MAVEN_GPG_PASSPHRASE -Plocal-dev-javase
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,5 @@ target
pom.xml.versionsBackup
pom.xml.releaseBackup
pom.xml.tag
!maven/**/*.zip
!maven/**/*.zip
**/.flattened-pom.xml
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,11 @@ The setup is covered in depth in [this article and video](https://www.codenameon
~~~~
git clone https://github.com/codenameone/CodenameOne
cd CodenameOne/maven
mvn install
mvn install -Plocal-dev-javase
~~~~

NOTE: The `-Plocal-dev-javase` profile is necessary for building the javase port. Without it, you'll get build errors.

This will build and install Codename One in your local Maven repository. This process can take a while since it automatically downloads dependencies with a size of ~1GB.


Expand All @@ -196,15 +198,15 @@ To build the archetype projects from source, you should check out the [cn1-maven
~~~~
git clone https://github.com/shannah/cn1-maven-archetypes
cd cn1-maven-archetypes
mvn install
mvn install -Plocal-dev-javase
~~~~


Now that Codename One is installed in your local Maven repository, you can use that version in a project instead of the release version.
A new testing project can be quickly generated with the [Codename One initializr](https://start.codenameone.com).

After downloading and extracting the project, open its pom.xml file and and look for the `<cn1.version>` and `<cn1.plugin.version>` properties.
Then change these to point to the version that got installed into your *local* maven repository by `mvn install`. The locally built version will usually be a SNAPSHOT version (e.g. 7.0.21-SNAPSHOT).
Then change these to point to the version that got installed into your *local* maven repository by `mvn install -Plocal-dev-javase`. The locally built version will usually be a SNAPSHOT version (e.g. 7.0.21-SNAPSHOT).


### Quick Start with Ant
Expand Down
5 changes: 4 additions & 1 deletion maven/javase/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@
<profile>
<id>local-dev-javase</id>
<activation>
<activeByDefault>true</activeByDefault>
<property>
<name>codename1.platform</name>
<value>javase</value>
</property>
</activation>
<dependencies>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.7.0</version>
<version>0.8.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
Expand Down
197 changes: 99 additions & 98 deletions maven/sqlite-jdbc/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
@@ -1,98 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>codenameone</artifactId>
<groupId>com.codenameone</groupId>
<version>8.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>sqlite-jdbc</artifactId>
<version>8.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<relocations>
<relocation>
<pattern>org.slf4j</pattern>
<shadedPattern>com.codename1.compat.sqlite.slf4j</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.2</version>
<executions>
<execution>
<id>copy-javadoc</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>${sqlite.jdbc.version}</version>
<classifier>javadoc</classifier>
<destFileName>sqlite-jdbc-javadoc.jar</destFileName>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>attach-javadoc</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>javadoc</classifier>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
<includes>
<include>sqlite-jdbc-javadoc.jar</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<sqlite.jdbc.version>3.46.1.0</sqlite.jdbc.version>
</properties>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>codenameone</artifactId>
<groupId>com.codenameone</groupId>
<version>8.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>sqlite-jdbc</artifactId>
<name>sqlite-jdbc</name>
<version>8.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<relocations>
<relocation>
<pattern>org.slf4j</pattern>
<shadedPattern>com.codename1.compat.sqlite.slf4j</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.2</version>
<executions>
<execution>
<id>copy-javadoc</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>${sqlite.jdbc.version}</version>
<classifier>javadoc</classifier>
<destFileName>sqlite-jdbc-javadoc.jar</destFileName>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>attach-javadoc</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>javadoc</classifier>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
<includes>
<include>sqlite-jdbc-javadoc.jar</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<sqlite.jdbc.version>3.46.1.0</sqlite.jdbc.version>
</properties>
</project>